-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 'Execute' tab to Digital Twins page preview (#903)
Adds experimental digital execution on gitlab DevOps pipeline. This execution can happen with an external gitlab like gitlab.com but requires certain gitlab project setup to work. --------- Co-authored-by: vanessa <[email protected]>
- Loading branch information
1 parent
fe2ded9
commit 865c74b
Showing
76 changed files
with
4,158 additions
and
453 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,8 @@ build/ | |
config/ | ||
node_modules/ | ||
script/ | ||
coverage/ | ||
coverage/ | ||
dist/ | ||
test-results/ | ||
playwright-report/ | ||
public/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@into-cps-association/dtaas-web", | ||
"version": "0.4.1", | ||
"version": "0.5.0", | ||
"description": "Web client for Digital Twin as a Service (DTaaS)", | ||
"main": "index.tsx", | ||
"author": "prasadtalasila <[email protected]> (http://prasad.talasila.in/)", | ||
|
@@ -9,22 +9,23 @@ | |
"Asger Busk Breinholm", | ||
"Mathias Brændgaard", | ||
"Emre Temel", | ||
"Cesar Vela" | ||
"Cesar Vela", | ||
"Vanessa Scherma" | ||
], | ||
"license": "SEE LICENSE IN <LICENSE.md>", | ||
"private": false, | ||
"type": "module", | ||
"scripts": { | ||
"build": "npx shx cp config/gitlab.json src/util/gitlab.json && npx react-scripts build && npx rimraf src/util/gitlab.json", | ||
"clean": "npx rimraf build/ dist/ node_modules/ coverage/ playwright-report/ test-results/ *.svg src/util/gitlab.json", | ||
"build": "npx react-scripts build", | ||
"clean": "npx rimraf build/ dist/ node_modules/ coverage/ playwright-report/ test-results/ test.svg src.svg src/util/gitlab.json", | ||
"config:dev": "npx shx cp config/dev.js public/env.js && npx shx cp config/dev.js build/env.js", | ||
"config:local": "npx shx cp config/local.js public/env.js && npx shx cp config/local.js build/env.js", | ||
"config:prod": "npx shx cp config/prod.js public/env.js && npx shx cp config/prod.js build/env.js", | ||
"config:test": "npx shx cp config/test.js public/env.js && npx shx cp config/test.js build/env.js", | ||
"develop": "npx shx cp config/gitlab.json src/util/gitlab.json && npx react-scripts start", | ||
"develop": "npx react-scripts start", | ||
"format": "prettier --ignore-path ../.gitignore --write \"**/*.{ts,tsx,css,scss}\"", | ||
"gitlab:compile": "npx shx cp config/gitlab.json src/util/gitlab.json && npx tsc --project tsconfig.gitlab.json && npx rimraf src/util/gitlab.json", | ||
"gitlab:run": "node dist/gitlabDriver.js", | ||
"gitlab:compile": "npx tsc --project tsconfig.gitlab.json", | ||
"gitlab:run": "node dist/src/preview/util/gitlabDriver.js", | ||
"graph": "npx madge --image src.svg src && npx madge --image test.svg test", | ||
"start": "serve -s build -l 4000", | ||
"stop": "npx kill-port 4000", | ||
|
@@ -33,7 +34,9 @@ | |
"test:e2e:ext": "cross-env ext=true yarn test:e2e", | ||
"test:e2e": "playwright test -c ./playwright.config.ts", | ||
"test:int": "jest -c ./jest.config.json ../test/integration --setupFilesAfterEnv ./test/integration/jest.setup.ts", | ||
"test:unit": "jest -c ./jest.config.json ../test/unit --setupFilesAfterEnv ./test/unit/jest.setup.ts" | ||
"test:unit": "jest -c ./jest.config.json ../test/unit --setupFilesAfterEnv ./test/unit/jest.setup.ts", | ||
"test:preview:int": "jest -c ./jest.config.json ../test/preview/integration --setupFilesAfterEnv ./test/preview/integration/jest.setup.ts", | ||
"test:preview:unit": "jest -c ./jest.config.json ../test/preview/unit --setupFilesAfterEnv ./test/preview/unit/jest.setup.ts" | ||
}, | ||
"eslintConfig": { | ||
"extends": [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export interface Asset { | ||
name: string; | ||
description?: string; | ||
path: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import * as React from 'react'; | ||
import { Grid } from '@mui/material'; | ||
import { useSelector } from 'react-redux'; | ||
import { RootState } from 'store/store'; | ||
import AssetCardExecute from './AssetCard'; | ||
import { Asset } from './Asset'; | ||
|
||
const outerGridContainerProps = { | ||
container: true, | ||
spacing: 2, | ||
sx: { | ||
justifyContent: 'flex-start', | ||
overflow: 'auto', | ||
maxHeight: 'inherent', | ||
marginTop: 2, | ||
}, | ||
}; | ||
|
||
interface AssetBoardProps { | ||
tab: string; | ||
error: string | null; | ||
} | ||
|
||
const AssetGridItem: React.FC<{ | ||
asset: Asset; | ||
tab: string; | ||
}> = ({ asset }) => ( | ||
<Grid | ||
key={asset.path} | ||
item | ||
xs={12} | ||
sm={6} | ||
md={4} | ||
lg={3} | ||
sx={{ minWidth: 250 }} | ||
> | ||
<AssetCardExecute asset={asset} /> | ||
</Grid> | ||
); | ||
|
||
const AssetBoard: React.FC<AssetBoardProps> = ({ tab, error }) => { | ||
const assets = useSelector((state: RootState) => state.assets.items); | ||
|
||
if (error) { | ||
return <em style={{ textAlign: 'center' }}>{error}</em>; | ||
} | ||
|
||
return ( | ||
<Grid {...outerGridContainerProps}> | ||
{assets.map((asset: Asset) => ( | ||
<AssetGridItem key={asset.path} asset={asset} tab={tab} /> | ||
))} | ||
</Grid> | ||
); | ||
}; | ||
|
||
export default AssetBoard; |
Oops, something went wrong.