Skip to content

Commit

Permalink
Merge branch 'develop' into feature/CH-95
Browse files Browse the repository at this point in the history
  • Loading branch information
filippomc committed Jul 30, 2024
2 parents ee064c9 + 25098cc commit d3782ff
Show file tree
Hide file tree
Showing 243 changed files with 5,661 additions and 12,513 deletions.
25 changes: 15 additions & 10 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
Closes #
Closes [CH-X](https://metacell.atlassian.net/browse/CH-X)

Implemented solution: ...
# Implemented solution

How to test this PR: ...
...

### Sanity checks:
# How to test this PR

...

# Sanity checks:
- [ ] The pull request is explicitly linked to the relevant issue(s)
- [ ] The issue is well described: clearly states the problem and the general proposed solution(s)
- [ ] From the issue and the current PR it is explicitly stated how to test the current change
- [ ] In this PR it is explicitly stated how to test the current change
- [ ] The labels in the issue set the scope and the type of issue (bug, feature, etc.)
- [ ] The relevant components are indicated in the issue (if any)
- [ ] All the automated test checks are passing
- [ ] All the linked issues are included in one milestone
- [ ] All the linked issues are in the Review/QA column of the [board](https://app.zenhub.com/workspaces/cloud-harness-5fdb203b7e195b0015a273d7/board)
- [ ] All the linked issues are included in one Sprint
- [ ] All the linked issues are in the Review state
- [ ] All the linked issues are assigned

### Breaking changes (select one):
# Breaking changes (select one):
- [ ] The present changes do not change the preexisting api in any way
- [ ] This PR and the issue are tagged as a `breaking-change`
- [ ] This PR and the issue are tagged as a `breaking-change` and the migration procedure is well described [above](#implemented-solution)

### Possible deployment updates issues (select one):
# Possible deployment updates issues (select one):
- [ ] There is no reason why deployments based on CloudHarness may break after the current update
- [ ] This PR and the issue are tagged as `alert:deployment`

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ __pycache__
.env
tools/deployment-cli-tools/tests/resources/migration
tools/deployment-cli-tools/tests/resources/migration.bak
/.venv
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Python 3.9 must be installed.
It is recommended to setup a virtual environment.
With conda:
```bash
conda create --name ch python=3.9
conda create --name ch python=3.12
conda activate ch
```

Expand Down Expand Up @@ -108,7 +108,6 @@ A JRE is needed to run the code generators based on openapi-generator.

For more info, see [here](https://openapi-generator.tech/docs/installation).


## CloudHarness command line tools
To use the cli tools, install requirements first:

Expand Down
4 changes: 2 additions & 2 deletions application-templates/base/test/e2e/landing.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe("End to end test", () => {
return el.textContent;
});

expect(await page.title()).toEqual("Samples");
expect(title).toEqual("Sample React application is working!");
expect(await page.title()).not.toBeNull();
expect(title).not.toBeNull();
});
});
20 changes: 0 additions & 20 deletions application-templates/webapp/frontend/.babelrc

This file was deleted.

1 change: 0 additions & 1 deletion application-templates/webapp/frontend/.dockerignore

This file was deleted.

2 changes: 0 additions & 2 deletions application-templates/webapp/frontend/.eslintignore

This file was deleted.

19 changes: 19 additions & 0 deletions application-templates/webapp/frontend/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs', 'src/rest/*'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
'@typescript-eslint/no-explicit-any': 'off',
}
}
49 changes: 0 additions & 49 deletions application-templates/webapp/frontend/.eslintrc.yml

This file was deleted.

4 changes: 0 additions & 4 deletions application-templates/webapp/frontend/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion application-templates/webapp/frontend/README.md

This file was deleted.

2 changes: 0 additions & 2 deletions application-templates/webapp/frontend/build.yaml

This file was deleted.

16 changes: 16 additions & 0 deletions application-templates/webapp/frontend/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!doctype html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CloudHarness sample application</title>
</head>

<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>

</html>
61 changes: 6 additions & 55 deletions application-templates/webapp/frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,60 +1,11 @@
{
"name": "__APP_NAME__",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"prebuild": "eslint . --color",
"build": "webpack --config webpack.config.js",
"build-dev": "webpack --config webpack.config.js --env mode=development",
"prestart": "eslint . --color --fix",
"start": "webpack serve --progress --env DOMAIN=http://localhost:5000 --config webpack.config.dev.js",
"start:dev": "webpack serve --progress --env.DOMAIN=https://__APP_NAME__.cloudharness.metacell.us --config webpack.config.dev.js",
"start:local": "webpack serve --progress --env DOMAIN=http://__APP_NAME__.ch.local --config webpack.config.dev.js"
},
"author": "",
"license": "MIT",
"dependencies": {
"axios": "^0.21.1",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-router": "^5.0.0",
"react-router-dom": "^5.0.0",
"use-clipboard-copy": "^0.1.2"
},
"devDependencies": {
"@babel/core": "^7.8.3",
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/preset-env": "^7.8.3",
"@babel/preset-react": "^7.8.3",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.0.6",
"babel-plugin-module-resolver": "^4.0.0",
"babel-preset-minify": "^0.5.1",
"clean-webpack-plugin": "^3.0.0",
"compression-webpack-plugin": "^7.1.2",
"copy-webpack-plugin": "^6.2.1",
"css-loader": "^5.2.4",
"dotenv": "^16.0.2",
"eslint": "5.16.0",
"eslint-plugin-jest": "^23.8.2",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^3.0.0",
"file-loader": "^5.0.2",
"html-loader": "^0.5.5",
"html-webpack-plugin": "^5.5.0",
"image-webpack-loader": "^8.1.0",
"less": "^3.10.3",
"less-loader": "^6.1.2",
"less-vars-to-js": "^1.3.0",
"raw-loader": "^4.0.2",
"style-loader": "^1.1.3",
"ts-loader": "^9.0.0",
"typescript": "^4.8.3",
"webpack": "^5.61.0",
"webpack-cli": "^4.6.0",
"webpack-dev-server": "^4.5.0",
"webpack-merge": "^5.7.0"
"dev": "vite",
"start": "DOMAIN=http://localhost:5000 vite",
"start:dev": "DOMAIN=https://test.ch.metacell.us vite",
"start:local": "DOMAIN=http://samples.ch vite",
"prebuild": "eslint .",
"build": "vite build"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions application-templates/webapp/frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import React from 'react';
import './styles/style.less';

import RestTest from './components/RestTest';
import Version from './components/Version';


const Main = () => (
<>
<img src="/assets/icon.png" />
<h1>Sample React application is working!</h1>
<img src="/logo.png" width="800" />
<h1>__APP_NAME__ React application is working!</h1>
<Version />
<RestTest />
<p>See api documentation <a href="/api/ui">here</a></p>
<p>See api documentation <a href="/api/ui/">here</a></p>
</>
);
)


export default Main;
export default Main;
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import React, { useState, useEffect } from 'react';
import { useState, useEffect } from 'react';


import { TestApi } from '../rest/api'
import { TestApi } from '../rest/apis/TestApi'
const test = new TestApi();



const RestTest = () => {
const [result, setResult] = useState(null);
const [result, setResult] = useState<any>(null);
useEffect(() => {
test.ping().then(r => setResult(r), () => setResult({ data: "API error"}));
test.ping().then((r) => setResult(r), () => setResult( "API error"));
}, []);


return result ? <p>Backend answered: { result.data } </p> : <p>Backend did not answer</p>
return result ? <p>Backend answered: { result } </p> : <p>Backend did not answer</p>
}

export default RestTest;
19 changes: 19 additions & 0 deletions application-templates/webapp/frontend/src/components/Version.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { useState, useEffect } from 'react';



const Version = () => {
const [result, setResult] = useState<any>(null);
useEffect(() => {
fetch("/proxy/common/api/version", {
headers: {
'Accept': 'application/json'
}
}).then(r => r.json().then(j => setResult(j)), () => setResult("API error"));
}, []);


return result ? <p>Tag: { result?.tag } - Build: {result?.build} </p> : <p>Backend did not answer</p>
}

export default Version;
5 changes: 5 additions & 0 deletions application-templates/webapp/frontend/src/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
body {
text-align: center;
background-color: '#eeeeee';
font-family: Roboto, Helvetica, sans-serif;
}
10 changes: 0 additions & 10 deletions application-templates/webapp/frontend/src/index.ejs

This file was deleted.

6 changes: 0 additions & 6 deletions application-templates/webapp/frontend/src/index.tsx

This file was deleted.

4 changes: 0 additions & 4 deletions application-templates/webapp/frontend/src/styles/style.less

This file was deleted.

2 changes: 0 additions & 2 deletions application-templates/webapp/frontend/src/utils/history.js

This file was deleted.

22 changes: 0 additions & 22 deletions application-templates/webapp/frontend/tsconfig.json

This file was deleted.

Loading

0 comments on commit d3782ff

Please sign in to comment.