-
Notifications
You must be signed in to change notification settings - Fork 69
feat: Concurrent executions with indexedDB Main Finalization #1328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
atomicgamedeveloper
wants to merge
37
commits into
INTO-CPS-Association:feature/distributed-demo
Choose a base branch
from
atomicgamedeveloper:main
base: feature/distributed-demo
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+10,684
−2,605
Open
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
26e5724
feat: Concurrent executions with indexedDB
Microchesst e168a9a
yarn syntax
Microchesst 6fc0304
test: everything except e2e
Microchesst 117405f
yarn format
Microchesst a8a6614
e2e Test
Microchesst 047f00d
test: e2e
Microchesst b91218f
feat: now using accordion and can load across reloads, still needs te…
Microchesst 58f6d06
Feat: interface for 'database/digitaltTwins.ts'
Microchesst c80a929
fix: now only updating a dt's specific state
Microchesst 9d3f7e3
fix: moving some files out of preview code
Microchesst 4e522fe
test: unit int and e2e are now updated.
Microchesst 1c0f14c
feat: refactoring to keep code structure, and to define a good code a…
Microchesst 7ff06cf
Steady e2e tests
atomicgamedeveloper 2c410b8
Merge branch 'conc-branch'
atomicgamedeveloper c7625b3
Fix (preview) unit/int import errors
atomicgamedeveloper 5372c1e
Fix remaining tests
atomicgamedeveloper 70a9d39
Address review comments
atomicgamedeveloper b438465
Verify Previous Changes Present
atomicgamedeveloper 7c8b331
Mv files for PR #1314
atomicgamedeveloper 3049e79
Deduplicate code in tests
atomicgamedeveloper 518c532
Deduplicate code in tests
atomicgamedeveloper ed14698
Rm changes from servers folder
atomicgamedeveloper 150c53e
Add .gitignore changes and format
atomicgamedeveloper 3828bd4
Merge branch 'feature/distributed-demo' into main
atomicgamedeveloper 5f003f6
Replace relative import paths
atomicgamedeveloper 69da665
Rm rest of relative paths + rm external imports from model files
atomicgamedeveloper 8319953
Address final comments
atomicgamedeveloper 17fafa7
Merge branch 'main' of https://github.com/atomicgamedeveloper/DTaaS
atomicgamedeveloper 12e34aa
Add tests for execution status handling and database error scenarios
atomicgamedeveloper 147579f
Fix sonarcube problems
atomicgamedeveloper ffa85e5
Add additional coverage
atomicgamedeveloper 001fdd5
Add SonarCube rules, update package.json to 0.10.0, add tests and mor…
atomicgamedeveloper b45382a
Rename database/digitalTwin to executionHistoryDB, cover executionHis…
atomicgamedeveloper 15c870e
Merge branch 'feature/distributed-demo' into main
atomicgamedeveloper 6c414fd
Rm duplicate interface
atomicgamedeveloper db24df9
Merge branch 'main' of https://github.com/atomicgamedeveloper/DTaaS
atomicgamedeveloper 1aa7d38
Deduplicate further
atomicgamedeveloper File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,49 @@ | ||
| import * as React from 'react'; | ||
| import { Dispatch, SetStateAction } from 'react'; | ||
| import { Button, Badge } from '@mui/material'; | ||
| import { useSelector } from 'react-redux'; | ||
| import { selectExecutionHistoryByDTName } from 'model/backend/state/executionHistory.selectors'; | ||
|
|
||
| interface HistoryButtonProps { | ||
| readonly setShowLog: Dispatch<React.SetStateAction<boolean>>; | ||
| readonly historyButtonDisabled: boolean; | ||
| readonly assetName: string; | ||
| } | ||
|
|
||
| export const handleToggleHistory = ( | ||
| setShowLog: Dispatch<SetStateAction<boolean>>, | ||
| ) => { | ||
| setShowLog((prev) => !prev); | ||
| }; | ||
|
|
||
| function HistoryButton({ | ||
| setShowLog, | ||
| historyButtonDisabled, | ||
| assetName, | ||
| }: HistoryButtonProps) { | ||
| const executions = | ||
| useSelector(selectExecutionHistoryByDTName(assetName)) || []; | ||
|
|
||
| const executionCount = Array.isArray(executions) ? executions.length : 0; | ||
|
|
||
| return ( | ||
| <Badge | ||
| badgeContent={Math.max(executionCount, 0)} | ||
| color="secondary" | ||
| overlap="circular" | ||
| invisible={executionCount === 0} | ||
| > | ||
| <Button | ||
| variant="contained" | ||
| size="small" | ||
| color="primary" | ||
| onClick={() => handleToggleHistory(setShowLog)} | ||
| disabled={historyButtonDisabled && executionCount === 0} | ||
| > | ||
| History | ||
| </Button> | ||
| </Badge> | ||
| ); | ||
| } | ||
|
|
||
| export default HistoryButton; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.