Skip to content
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

Jh lab editor gui #66

Draft
wants to merge 187 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
187 commits
Select commit Hold shift + click to select a range
dea409c
Initial setup of component structure.
jhurst502 Jun 18, 2021
16bd1b8
Imported GUI prototype
jhurst502 Jun 18, 2021
1e3be9e
Added context menu
jhurst502 Jun 18, 2021
c36131d
Added removable VMs
jhurst502 Jun 18, 2021
bacceaa
Added toggle feature to wan node. Ports are now visable
jhurst502 Jun 18, 2021
1ea77b5
Added warning banner/alert
AClifton22 Jun 19, 2021
3fa54f7
Nodes can be added independently of other nodes. Fixed some issues wi…
jhurst502 Jun 21, 2021
88d25f9
remove node on backspace and delete
jhurst502 Jun 21, 2021
dbec0c9
created skeleton of 503 service unavailable page and added it to routes
WarriorAchilles Jun 23, 2021
9bc83e8
added text and styling to 503 page
WarriorAchilles Jun 28, 2021
f1d6d85
Added feature to remove node on keyboard event
jhurst502 Jun 29, 2021
e6f6268
Cleaned up unnecessary functions. Fixed issue with nodes occasionally…
jhurst502 Jun 29, 2021
5e1360b
Nodes can be duplicated.
jhurst502 Jun 29, 2021
9a4da0d
Changes to alert
AClifton22 Jun 29, 2021
52094c7
Added Alerts to routes and removed from Layout.
AClifton22 Jun 29, 2021
6b7aafc
Prevent image drag in firefox, fixed duplicate node error on switch, …
jhurst502 Jun 30, 2021
7e4cdcb
Centered text on banner alert and removed Warning.
AClifton22 Jul 1, 2021
bd936db
cleaned up the styling by putting it in its own file
WarriorAchilles Jul 2, 2021
135b752
Prevented multiple connections on one port. Gave VM 4 port default.
jhurst502 Jul 2, 2021
3ccbdce
added an image to the page
WarriorAchilles Jul 2, 2021
a472e9a
Added number of ports selection when creating new switches
jhurst502 Jul 2, 2021
89d89d9
Changes to layout of ports on switch node
jhurst502 Jul 3, 2021
de3ac56
Add scaffolding for selectable user roles in the admin panel
johnpcooke94 Jul 10, 2021
6827b12
Added switch selection images.
jhurst502 Jul 12, 2021
8db8517
Changes to switch selection menu.
jhurst502 Jul 12, 2021
902f048
Added event listener for ctrl+z / ctrl+shift+z
jhurst502 Jul 12, 2021
47ae760
finished basic static 503 page
WarriorAchilles Jul 13, 2021
b87e487
Fixed issue with multiple context menus being able to appear at once.
jhurst502 Jul 14, 2021
7cf396c
Added rename feature in new context menu. Rename on double click does…
jhurst502 Jul 14, 2021
b722e68
Styling for close button in select switch menu
jhurst502 Jul 14, 2021
a5c9007
Fixes to context menu
jhurst502 Jul 15, 2021
c994d95
Added banner files
AClifton22 Jul 15, 2021
d90705d
Merge branch 'master' into Alert
AClifton22 Jul 15, 2021
75e6dd8
started work on adaptive 503
WarriorAchilles Jul 16, 2021
4c78999
removed Banner files, added modules style path to Alert which removed…
AClifton22 Jul 16, 2021
3674a48
Up-to-date-branch
AClifton22 Jul 16, 2021
af42bb6
Changed nodes on 5 port switch
jhurst502 Jul 16, 2021
df708d9
Fixed issue of Name disappearing when using double click to rename. D…
jhurst502 Jul 16, 2021
f1c0475
Add basic request functionality for committing role changes in admin …
johnpcooke94 Jul 19, 2021
558ee51
Fix bug in commit role change functionality
johnpcooke94 Jul 19, 2021
180adff
Update style on commit button in user panel
johnpcooke94 Jul 19, 2021
54be3a4
added basic adaptability functionality
WarriorAchilles Jul 23, 2021
307039f
Merge branch 'master' into ZE-adaptive-503-page
WarriorAchilles Jul 23, 2021
b96e805
Added properties to alert, type of alerts and css for each type.
AClifton22 Jul 24, 2021
113c847
Fixed issue with crash after deleting certain nodes. Changed naming o…
jhurst502 Jul 26, 2021
b27b126
Prevent connecting two ports belonging to the same node
jhurst502 Jul 26, 2021
58c6d7a
Updated favicon.
jbello0909 Mar 14, 2021
e3b67bb
Merge pull request #61 from ius-csg/update/fav-icon
jasekiw Jul 28, 2021
cdb2653
Update Axios
jasekiw Jul 28, 2021
721835b
Merge pull request #62 from ius-csg/update/axios
jasekiw Jul 28, 2021
dd60ad8
added conditional rendering based on props
WarriorAchilles Jul 28, 2021
6e6a86a
Changes Jason requested
AClifton22 Jul 28, 2021
bff41d1
Added different colored links for increased visibility.
jhurst502 Jul 28, 2021
fa9d828
Update admin panel user role update functionality with a cleaner impl…
johnpcooke94 Jul 29, 2021
6d0745e
Clean up user role implementation in UserListItem.tsx
johnpcooke94 Jul 29, 2021
3467923
Added scss module for SelectSwitch component. Slide in animation on t…
jhurst502 Jul 29, 2021
a44a9d6
refactored code so most of it was it its own component that is then r…
WarriorAchilles Jul 29, 2021
bbb5135
edited conditional rendering
WarriorAchilles Jul 29, 2021
70c58e4
Prevent two nodes from connecting more than once
jhurst502 Jul 29, 2021
c9f95ab
Added bootstrap buttons to Diagram component.
jhurst502 Jul 29, 2021
13087bb
Implement storing node count as state to fix error with deleting node…
jhurst502 Jul 29, 2021
9d39324
Change language on user admin panel for saving changes to user roles
johnpcooke94 Jul 30, 2021
5abc0d5
Changed Alert.tsx file to AlertNotification.tsx and module
AClifton22 Jul 30, 2021
4eab8dc
Move save button on admin users pane to sit above the table and updat…
johnpcooke94 Jul 30, 2021
36556c4
Merge pull request #60 from ius-csg/jc-update-user-role
jasekiw Jul 30, 2021
55174e1
Merge pull request #58 from ius-csg/Alert
jasekiw Jul 30, 2021
6102b1c
Make style changes to avoid user the status notification on user role…
johnpcooke94 Jul 30, 2021
c384fa3
More link colors!
jhurst502 Jul 30, 2021
04ee04f
Option to add VM ports in the context menu.
jhurst502 Jul 30, 2021
e34bc74
Removed rule preventing multiple connections between nodes. Crash on …
jhurst502 Jul 30, 2021
7648118
Fixed issue with links being the same color when nodeCount is not inc…
jhurst502 Jul 30, 2021
b46a3f9
fixed restoration time rendering
WarriorAchilles Jul 30, 2021
c908179
fixed merge conflicts
WarriorAchilles Jul 30, 2021
e0db734
Applied patch to beautiful-react-diagrams to fix crash on deleting no…
jhurst502 Aug 6, 2021
70961c9
Removed setDeleting state. Used a better way to prevent changing colo…
jhurst502 Aug 6, 2021
2051c8f
Add a warning to the admin panel when the user attempts to change the…
johnpcooke94 Aug 7, 2021
96a1b8e
Changed warning on to use React Bootstrap modal instead of vanilla al…
johnpcooke94 Aug 8, 2021
d863a49
Fix an issue with updating user roles when the user changes the dropd…
johnpcooke94 Aug 9, 2021
89060a0
Take out console logs
jhurst502 Aug 13, 2021
d3c5080
Removed commented out code. Fixed issue with duplicated nodes having …
jhurst502 Aug 20, 2021
bbd7ebd
Cleaned up some SonarLint codesmells.
jhurst502 Aug 20, 2021
8a01ec5
Connect user pane to webstate to update webstate if user changes thei…
johnpcooke94 Aug 22, 2021
290b62a
Update webstate and reload UI if admin user changes their own role to…
johnpcooke94 Aug 29, 2021
0814024
Merge branch 'dev' into jc-update-user-role
johnpcooke94 Aug 29, 2021
b1e2ae6
Separate commit status text into its own component for better readabi…
johnpcooke94 Sep 1, 2021
eb8c616
Update redirect logic to use react-router redirect component when use…
johnpcooke94 Sep 8, 2021
78aface
Merge pull request #67 from ius-csg/jc-update-user-role
jasekiw Sep 8, 2021
1f5a7f5
merged MaintenanceInfoLayout.tsx code into ServiceUnavailable.tsx, mo…
WarriorAchilles Sep 21, 2021
5020655
Merge pull request #63 from ius-csg/ZE-adaptive-503-page
jasekiw Sep 22, 2021
dc5a0fe
Implement search users function in admin panel
johnpcooke94 Oct 2, 2021
70da7f2
Merge branch 'dev' into jc-update-user-role
johnpcooke94 Oct 2, 2021
874c582
Renamed instances of 'PNG' to 'png'
jhurst502 Oct 3, 2021
6d60b5d
Refactored styling to css classes
jhurst502 Oct 3, 2021
cb8cc6e
Update src/components/LabEditorGUI/ContextMenu.tsx
jhurst502 Oct 3, 2021
15adb92
Changed Typscript types of 'any' on types that did not involve beauti…
jhurst502 Oct 4, 2021
933e1e9
Fixed merge conflict
jhurst502 Oct 4, 2021
2b511a6
Created component for switch button to remove duplicate logic
jhurst502 Oct 4, 2021
b8ebdb8
Make save button inline with search bar on user panel
johnpcooke94 Oct 4, 2021
826fbec
tag editor for module creation/editing
jhenry09 Oct 9, 2021
f976341
fix merge
jhenry09 Oct 18, 2021
4976bd3
Update user search function to use Array.filter()
johnpcooke94 Oct 20, 2021
eb32ff0
Add api call
zkhussain Oct 21, 2021
1e12541
Enable user to extend the lab
zkhussain Oct 21, 2021
2ae8bb1
Update display of modules
zkhussain Oct 21, 2021
0a639ae
Remove module changes
zkhussain Oct 21, 2021
8ee689c
Update user search function for more consistent behavior, accounting …
johnpcooke94 Oct 24, 2021
8fcc86d
Update some CSS for current CSS3 compatibility
johnpcooke94 Oct 30, 2021
2b55bf7
Fix the remainder of CSS for CSS3 compatibility
johnpcooke94 Oct 30, 2021
c7aabbc
Fix CSS code smells, mostly duplicate declarations
johnpcooke94 Oct 30, 2021
0e1af25
Fix some SonarCloud code smells
johnpcooke94 Oct 30, 2021
bf548d5
Fix more code smells
johnpcooke94 Oct 30, 2021
38d1e24
Rename AdminPanel.tsx to AdminPage.tsx
johnpcooke94 Oct 30, 2021
ca123db
Rename Contact.tsx to Contact.tsx
johnpcooke94 Oct 30, 2021
a0bc793
Fix more code smells
johnpcooke94 Oct 30, 2021
4509968
Fix more code smells
johnpcooke94 Oct 30, 2021
bb178dd
Fix yet more code smells!
johnpcooke94 Oct 30, 2021
775415f
Create sonar.yml
johnpcooke94 Oct 30, 2021
7a4af2d
Fix one more code smell
johnpcooke94 Oct 30, 2021
1be855f
Merge pull request #75 from ius-csg/jc/pay-tech-debt
Cliftonz Oct 30, 2021
e779859
Add sonar-project.properties file for sonarcloud
johnpcooke94 Oct 30, 2021
1462c6b
Merge branch 'dev' into jc/add-sonar-action
johnpcooke94 Oct 30, 2021
914bf8c
Merge pull request #76 from ius-csg/jc/add-sonar-action
Cliftonz Oct 30, 2021
372caa0
Fix delay in lab time extension
zkhussain Oct 31, 2021
7cb573b
Show a popup if the lab times up
zkhussain Oct 31, 2021
a0e2e73
Fix code smells
zkhussain Oct 31, 2021
3aa6cf8
Add build.yml action to build project with Yarn
johnpcooke94 Oct 31, 2021
6224ebc
Fix issue in build.yml
johnpcooke94 Oct 31, 2021
e9abc7b
Install dependencies before attempting to build
johnpcooke94 Oct 31, 2021
941bd17
Dump GitHub CI variable before building
johnpcooke94 Oct 31, 2021
9f7fa1b
Hide button instead of disabling it
zkhussain Oct 31, 2021
7037cae
Fix TSLint issues and run TSLint before building
johnpcooke94 Oct 31, 2021
3f8cbf3
Change name of SonarCloud workflow for better clarity
johnpcooke94 Oct 31, 2021
e591279
Merge pull request #78 from ius-csg/jc/add-build-actions
Cliftonz Oct 31, 2021
680a578
Merge branch 'dev' into jc-update-user-role
johnpcooke94 Nov 2, 2021
b3001fd
Fix issue in build.yml causing unexpected job cancellation
johnpcooke94 Nov 2, 2021
04b0c9e
Merge pull request #70 from ius-csg/jc-update-user-role
jasekiw Nov 2, 2021
db69e36
Raise job timeout time in build.yml to address early job cancellation
johnpcooke94 Nov 2, 2021
a9822e9
Merge pull request #79 from ius-csg/jc/fix-actions
Cliftonz Nov 2, 2021
cfada4d
Merge remote-tracking branch 'origin/dev' into zh/extend-temp-lab-end…
zkhussain Nov 3, 2021
0103647
Create popup component
zkhussain Nov 3, 2021
1c3f7b0
Make requested changes
zkhussain Nov 3, 2021
d21b107
updated page and components to reflect backend changes
WarriorAchilles Nov 3, 2021
52519fb
Merge pull request #73 from ius-csg/zh/extend-temp-lab-end-time
jasekiw Nov 4, 2021
ec10e0a
updated Maintenance type to reflect what's coming in from backend, as…
WarriorAchilles Nov 5, 2021
1274914
Merge branch 'dev' into ze/503-page-updates
WarriorAchilles Nov 5, 2021
b9cde22
changed so either the maintenance message or the down message will be…
WarriorAchilles Nov 10, 2021
dd43c65
modified ServiceMessage component to display date and time in a clean…
WarriorAchilles Nov 12, 2021
b9bc9ea
removed 'CSG' from more information line
WarriorAchilles Nov 13, 2021
d3eff3d
Change display of modules
zkhussain Nov 16, 2021
a14943c
Merge pull request #80 from ius-csg/ze/503-page-updates
jasekiw Nov 17, 2021
53235f6
Merge pull request #83 from ius-csg/zh/fix-display-of-modules
jasekiw Nov 17, 2021
3a6e256
branch fixes and dependecy fixes
jhenry09 Nov 17, 2021
994a888
Merge branch 'dev' into jh/tag-bar
jhenry09 Nov 17, 2021
ea825f2
System messages (#71)
AClifton22 Nov 17, 2021
79d3467
fixing branch issues
jhenry09 Nov 17, 2021
58e7fcf
branch fixes
jhenry09 Nov 17, 2021
255decb
branch fixes
jhenry09 Nov 17, 2021
e684aa4
Merge branch 'dev' into jh/tag-bar
jhenry09 Nov 17, 2021
12afb7b
removed unneeded dependecies
jhenry09 Nov 17, 2021
460cc1f
Merge branch 'jh/tag-bar' of https://github.com/ius-csg/cslabs-webapp…
jhenry09 Nov 17, 2021
5cb93e5
fix merge conflicts
jhenry09 Nov 17, 2021
bd82b97
Do not display temp lab time/extension for other lab types
zkhussain Nov 30, 2021
e5f68c0
fixed route for getting tag
jhenry09 Dec 14, 2021
482f45d
Fixed issue with VM node movement when a new port is added
jhurst502 Dec 27, 2021
e46c2dd
Better undo and redo. Links now work for undo and redo.
jhurst502 Dec 28, 2021
26e50fc
fix tag endpoint
jasekiw Dec 28, 2021
c99ce7c
Merge pull request #72 from ius-csg/jh/tag-bar
jasekiw Dec 28, 2021
51604ca
Update CI actions for master branch renaming
johnpcooke94 Dec 30, 2021
2c76d0a
Merge pull request #93 from ius-csg/jc/branch-rename
jasekiw Dec 30, 2021
858976e
Merge pull request #86 from ius-csg/zh/extend-temp-lab-end-time
jasekiw Dec 30, 2021
2ef30fe
Stated changing 'any' types to actual types found in diagrams library
jhurst502 Jan 3, 2022
c6fe261
Added library to caputure GUI as image
jhurst502 Jan 3, 2022
d9bac6b
Begin refactor to allow LabEditorGui to be toggle-able within existin…
jhurst502 Jan 4, 2022
b96de38
GUI is default in LabEditor, removed buttons in picture of diagram
jhurst502 Jan 12, 2022
181e876
Fixed more types
jhurst502 Jan 12, 2022
64ec7ec
Added logic to save gui topology as file
jhurst502 Jan 24, 2022
001bdda
Reverted accidental change for testing purposes
jhurst502 Feb 6, 2022
ca593e8
Rename bridges to cables in editor
jhurst502 Feb 6, 2022
fca19da
Remove port menu option
jhurst502 Feb 6, 2022
b837e35
Disable gui when not editing. Begin reformat of gui schema into exist…
jhurst502 Feb 20, 2022
628560a
Added uuids to nodes
jhurst502 Feb 20, 2022
213518d
More changes to make nodes work with uuids, add node type
jhurst502 Feb 20, 2022
f25f2f7
Reformatting schema links to match existing
jhurst502 Feb 21, 2022
c9c3bd6
Handled isCoreBridge for LabEditor GUI
jhurst502 Mar 7, 2022
9715c64
Slice port numbers off connected node
jhurst502 Mar 20, 2022
31b3af9
Merged dev
jhurst502 Mar 20, 2022
194b5d4
Revert bridge to Switch naming change
jhurst502 May 5, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Node.js Build With Yarn
on:
push:
branches:
- main
- dev
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Yarn Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [12.x]
timeout-minutes: 20
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm i -g yarn
- run: yarn install
- name: Run TSLint
run: yarn run lint
- run: CI='' yarn run build
21 changes: 21 additions & 0 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: SonarCloud Analysis
on:
push:
branches:
- main
- dev
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
24 changes: 17 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,19 @@
"analyze:vendor": "source-map-explorer build/static/js/1.*",
"analyze:app": "source-map-explorer build/static/js/main.*",
"check-npm": "node -e \"if(process.env.npm_execpath.indexOf('yarn') === -1) throw new Error('You must use Yarn to install, not NPM')\"",
"preinstall": "yarn run check-npm"
"preinstall": "yarn run check-npm",
"postinstall": "patch-package"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.24",
"@fortawesome/fontawesome-svg-core": "^1.2.36",
"@fortawesome/free-brands-svg-icons": "^5.11.1",
"@fortawesome/free-solid-svg-icons": "^5.11.1",
"@fortawesome/react-fontawesome": "^0.1.4",
"@fortawesome/free-solid-svg-icons": "^5.15.4",
"@fortawesome/react-fontawesome": "^0.1.15",
"@sentry/browser": "^5.11.2",
"@types/history": "^4.7.3",
"@types/humanize-duration": "^3.18.0",
"@types/jwt-decode": "^2.2.1",
"@types/lodash": "^4.14.171",
"@types/luxon": "^1.21.0",
"@types/node": "^13.7.0",
"@types/novnc-core": "^0.1.1",
Expand All @@ -38,18 +40,22 @@
"@types/react-router-bootstrap": "^0.24.5",
"@types/react-router-dom": "^5.1.3",
"@types/react-select": "^3.0.11",
"@types/react-tag-autocomplete": "^6.1.1",
"@types/uuid": "^3.4.6",
"@types/winston": "^2.4.4",
"@types/yup": "^0.26.27",
"@types/zxcvbn": "^4.4.0",
"axios": "^0.19.2",
"axios-retry": "^3.1.2",
"axios": "^0.21.1",
"axios-retry": "^3.1.9",
"beautiful-react-diagrams": "^0.5.1",
"browser-detect": "^0.2.28",
"connected-react-router": "^6.6.1",
"formik": "2.0.3",
"history": "^4.10.1",
"html-to-image": "^1.9.0",
"humanize-duration": "^3.21.0",
"jwt-decode": "^2.2.0",
"lodash": "^4.17.21",
"luxon": "^1.21.3",
"node-sass": "^4.12.0",
"novnc-core": "^0.2.1",
Expand All @@ -58,14 +64,15 @@
"react-app-polyfill": "^1.0.2",
"react-bootstrap": "^1.0.0-beta.16",
"react-burger-menu": "^2.5.4",
"react-copy-to-clipboard": "^5.0.2",
"react-copy-to-clipboard": "^5.0.3",
"react-dev-utils": "^10.1.0",
"react-dom": "^16.9.0",
"react-pdf": "^4.1.0",
"react-redux": "^7.1.3",
"react-router-bootstrap": "^0.25.0",
"react-router-dom": "^5.1.0",
"react-select": "^3.1.0",
"react-tag-autocomplete": "^6.3.0",
"redux": "^4.0.4",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.3.0",
Expand All @@ -80,13 +87,16 @@
"@types/jest": "^25.1.1",
"@types/puppeteer": "^2.0.1",
"@types/react-pdf": "^4.0.3",
"@types/react-tag-autocomplete": "^6.1.1",
"enzyme": "^3.7.0",
"enzyme-adapter-react-16": "^1.7.0",
"enzyme-to-json": "^3.3.4",
"faker": "^4.1.0",
"jest": "24.9.0",
"jest-cli": "^25.2.3",
"npm-run-all": "^4.1.5",
"patch-package": "^6.4.7",
"postinstall-postinstall": "^2.1.0",
"puppeteer": "^2.1.1",
"react-scripts": "^3.4.1",
"source-map-explorer": "^2.2.2",
Expand Down
136 changes: 136 additions & 0 deletions patches/beautiful-react-diagrams+0.5.1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
diff --git a/node_modules/beautiful-react-diagrams/@types/DiagramSchema.ts b/node_modules/beautiful-react-diagrams/@types/DiagramSchema.ts
index 2639876..0033790 100644
--- a/node_modules/beautiful-react-diagrams/@types/DiagramSchema.ts
+++ b/node_modules/beautiful-react-diagrams/@types/DiagramSchema.ts
@@ -12,6 +12,7 @@ export type NodeCoordinates = [number, number];

export type Node<P> = {
id: string;
+ nodeType: string;
coordinates: NodeCoordinates;
disableDrag?: boolean;
content?: ReactNode;
diff --git a/node_modules/beautiful-react-diagrams/Diagram/Link/Link.js b/node_modules/beautiful-react-diagrams/Diagram/Link/Link.js
index e4a958b..5a34e47 100644
--- a/node_modules/beautiful-react-diagrams/Diagram/Link/Link.js
+++ b/node_modules/beautiful-react-diagrams/Diagram/Link/Link.js
@@ -62,9 +62,9 @@ var Link = function Link(props) {
return getEntityCoordinates['default'](output, portRefs, nodeRefs, canvas);
}, [output, portRefs, nodeRefs, canvas]);
var pathOptions = {
- type: input.type === 'port' || output.type === 'port' ? 'bezier' : 'curve',
- inputAlignment: input.entity.alignment || null,
- outputAlignment: output.entity.alignment || null
+ type: (input?.type === 'port' || output?.type === 'port') ? 'bezier' : 'curve',
+ inputAlignment: input?.entity?.alignment || null,
+ outputAlignment: output?.entity?.alignment || null
};
var path = React.useMemo(function () {
return makeSvgPath['default'](inputPoint, outputPoint, pathOptions);
diff --git a/node_modules/beautiful-react-diagrams/Diagram/Link/getEntityCoordinates.js b/node_modules/beautiful-react-diagrams/Diagram/Link/getEntityCoordinates.js
index 87da7a7..1e69411 100644
--- a/node_modules/beautiful-react-diagrams/Diagram/Link/getEntityCoordinates.js
+++ b/node_modules/beautiful-react-diagrams/Diagram/Link/getEntityCoordinates.js
@@ -6,13 +6,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
var getRelativePoint = require('../../shared/functions/getRelativePoint.js');

var getEntityCoordinates = function getEntityCoordinates(entity, portRefs, nodeRefs, canvas) {
- if (entity && entity.type === 'node' && nodeRefs[entity.entity.id]) {
+ if (entity && entity?.type === 'node' && entity?.entity?.id && nodeRefs[entity.entity.id]) {
var nodeEl = nodeRefs[entity.entity.id];
var bbox = nodeEl.getBoundingClientRect();
return [entity.entity.coordinates[0] + bbox.width / 2, entity.entity.coordinates[1] + bbox.height / 2];
}

- if (portRefs && portRefs[entity.entity.id]) {
+ if (portRefs && entity?.entity?.id && portRefs[entity.entity.id]) {
var portEl = portRefs[entity.entity.id];

var _bbox = portEl.getBoundingClientRect();
diff --git a/node_modules/beautiful-react-diagrams/esm/Diagram/Link/Link.js b/node_modules/beautiful-react-diagrams/esm/Diagram/Link/Link.js
index 306fffc..8d87c56 100644
--- a/node_modules/beautiful-react-diagrams/esm/Diagram/Link/Link.js
+++ b/node_modules/beautiful-react-diagrams/esm/Diagram/Link/Link.js
@@ -52,9 +52,9 @@ var Link = function Link(props) {
return getEntityCoordinates(output, portRefs, nodeRefs, canvas);
}, [output, portRefs, nodeRefs, canvas]);
var pathOptions = {
- type: input.type === 'port' || output.type === 'port' ? 'bezier' : 'curve',
- inputAlignment: input.entity.alignment || null,
- outputAlignment: output.entity.alignment || null
+ type: (input?.type === 'port' || output?.type === 'port') ? 'bezier' : 'curve',
+ inputAlignment: input?.entity?.alignment || null,
+ outputAlignment: output?.entity?.alignment || null
};
var path = useMemo(function () {
return makeSvgPath(inputPoint, outputPoint, pathOptions);
diff --git a/node_modules/beautiful-react-diagrams/esm/Diagram/Link/getEntityCoordinates.js b/node_modules/beautiful-react-diagrams/esm/Diagram/Link/getEntityCoordinates.js
index be36a34..7a1e4f3 100644
--- a/node_modules/beautiful-react-diagrams/esm/Diagram/Link/getEntityCoordinates.js
+++ b/node_modules/beautiful-react-diagrams/esm/Diagram/Link/getEntityCoordinates.js
@@ -2,13 +2,13 @@
import getRelativePoint from '../../shared/functions/getRelativePoint.js';

var getEntityCoordinates = function getEntityCoordinates(entity, portRefs, nodeRefs, canvas) {
- if (entity && entity.type === 'node' && nodeRefs[entity.entity.id]) {
+ if (entity && entity?.type === 'node' && entity?.entity?.id && nodeRefs[entity.entity.id]) {
var nodeEl = nodeRefs[entity.entity.id];
var bbox = nodeEl.getBoundingClientRect();
return [entity.entity.coordinates[0] + bbox.width / 2, entity.entity.coordinates[1] + bbox.height / 2];
}

- if (portRefs && portRefs[entity.entity.id]) {
+ if (portRefs && entity?.entity?.id && portRefs[entity.entity.id]) {
var portEl = portRefs[entity.entity.id];

var _bbox = portEl.getBoundingClientRect();
diff --git a/node_modules/beautiful-react-diagrams/esm/hooks/useSchema/schemaReducer.js b/node_modules/beautiful-react-diagrams/esm/hooks/useSchema/schemaReducer.js
index 829d14a..2198760 100644
--- a/node_modules/beautiful-react-diagrams/esm/hooks/useSchema/schemaReducer.js
+++ b/node_modules/beautiful-react-diagrams/esm/hooks/useSchema/schemaReducer.js
@@ -27,12 +27,14 @@ var schemaReducer = function schemaReducer(state, action) {

if (state.nodes) {
var index = findIndex(state.nodes, ['id', action.payload.nodeId]);
- var inputPorts = getNodePortsId(state.nodes[index], 'inputs');
- var outputPorts = getNodePortsId(state.nodes[index], 'outputs');
- nextLinks = nextLinks.filter(function (link) {
- return !inputPorts.includes(link.input) && !outputPorts.includes(link.output);
- });
- state.nodes.splice(index, 1);
+ if (index >= 0) {
+ var inputPorts = getNodePortsId(state.nodes[index], 'inputs');
+ var outputPorts = getNodePortsId(state.nodes[index], 'outputs');
+ nextLinks = nextLinks.filter(
+ (link) => !inputPorts.includes(link.input) && !outputPorts.includes(link.output),
+ );
+ state.nodes.splice(index, 1);
+ }
}

return {
diff --git a/node_modules/beautiful-react-diagrams/hooks/useSchema/schemaReducer.js b/node_modules/beautiful-react-diagrams/hooks/useSchema/schemaReducer.js
index fd9b41c..82c69b8 100644
--- a/node_modules/beautiful-react-diagrams/hooks/useSchema/schemaReducer.js
+++ b/node_modules/beautiful-react-diagrams/hooks/useSchema/schemaReducer.js
@@ -35,12 +35,14 @@ var schemaReducer = function schemaReducer(state, action) {

if (state.nodes) {
var index = findIndex__default['default'](state.nodes, ['id', action.payload.nodeId]);
- var inputPorts = getNodePortsId['default'](state.nodes[index], 'inputs');
- var outputPorts = getNodePortsId['default'](state.nodes[index], 'outputs');
- nextLinks = nextLinks.filter(function (link) {
- return !inputPorts.includes(link.input) && !outputPorts.includes(link.output);
- });
- state.nodes.splice(index, 1);
+ if (index >= 0) {
+ var inputPorts = getNodePortsId(state.nodes[index], 'inputs');
+ var outputPorts = getNodePortsId(state.nodes[index], 'outputs');
+ nextLinks = nextLinks.filter(
+ (link) => !inputPorts.includes(link.input) && !outputPorts.includes(link.output),
+ );
+ state.nodes.splice(index, 1);
+ }
}

return {
Binary file modified public/favicon.ico
Binary file not shown.
22 changes: 11 additions & 11 deletions public/vmware/css/extended-keypad.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
background: -webkit-linear-gradient(top, rgba(170,171,182,.93) 0%,rgba(123,123,133,.93) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(170,171,182,.93) 0%,rgba(123,123,133,.93) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(170,171,182,.93) 0%,rgba(123,123,133,.93) 100%); /* IE10+ */
background: linear-gradient(top, rgba(170,171,182,.93) 0%,rgba(123,123,133,.93) 100%); /* W3C */
background: linear-gradient(to top, rgba(170,171,182,.93) 0%,rgba(123,123,133,.93) 100%); /* W3C */
}

.fnKey-pane-wrapper {
Expand All @@ -27,7 +27,7 @@
background: -webkit-linear-gradient(top, #c1c4d1 0%,#b0b1bd 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #c1c4d1 0%,#b0b1bd 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #c1c4d1 0%,#b0b1bd 100%); /* IE10+ */
background: linear-gradient(top, #c1c4d1 0%, #b0b1bd 100%); /* W3C */
background: linear-gradient(to top, #c1c4d1 0%, #b0b1bd 100%); /* W3C */
position: absolute;
padding: 0;
-moz-box-shadow: 0px 5px 7px rgba(0,0,0,.5);
Expand All @@ -43,7 +43,7 @@
background: -webkit-linear-gradient(top, #6e6e77 0%,#656565 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #6e6e77 0%,#656565 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #6e6e77 0%,#656565 100%); /* IE10+ */
background: linear-gradient(top, #6e6e77 0%, #656565 100%); /* W3C */
background: linear-gradient(to top, #6e6e77 0%, #656565 100%); /* W3C */
position: absolute;
padding: 0;
-moz-box-shadow: 0px 5px 7px rgba(0,0,0,.5);
Expand Down Expand Up @@ -128,7 +128,7 @@
height: 57px;
margin: 6px;
-moz-border-radius: 6px; -webkit-border-radius: 6px; -khtml-border-radius: 6px; border-radius: 6px;
font-family: "HelveticaNeue", "Helvetica Neue", "HelveticaNeue", "Helvetica Neue", 'TeXGyreHeros', "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif;
font-family: "HelveticaNeue", "Helvetica Neue", 'TeXGyreHeros', "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif;
font-size: 18px;
text-shadow: 0 1px 1px #eeeeee;
-moz-box-shadow: 0px 1px 3px rgba(0, 0, 0, .7);
Expand All @@ -140,14 +140,14 @@
background: -webkit-linear-gradient(top, #fff 0%,#f3f5fb 2%,#d2d2d8 98%,#999 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #fff 0%,#f3f5fb 2%,#d2d2d8 98%,#999 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #fff 0%,#f3f5fb 2%,#d2d2d8 98%,#999 100%); /* IE10+ */
background: linear-gradient(top, #fff 0%,#f3f5fb 2%,#d2d2d8 98%,#999 100%); /* W3C */
background: linear-gradient(to top, #fff 0%,#f3f5fb 2%,#d2d2d8 98%,#999 100%); /* W3C */
}

.ctrl-pane .ctrl-key-bottom-row {
background: -webkit-linear-gradient(top, #fff 0%,#e1e1e3 2%,#d1d1d4 50%,#bebec3 98%,#838387 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #fff 0%,#e1e1e3 2%,#d1d1d4 50%,#bebec3 98%,#838387 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #fff 0%,#e1e1e3 2%,#d1d1d4 50%,#bebec3 98%,#838387 100%); /* IE10+ */
background: linear-gradient(top, #fff 0%,#e1e1e3 2%,#d1d1d4 50%,#bebec3 98%,#838387 100%); /* W3C */
background: linear-gradient(to top, #fff 0%,#e1e1e3 2%,#d1d1d4 50%,#bebec3 98%,#838387 100%); /* W3C */
}

.ctrl-pane .up-position .fn-key-top-row {
Expand All @@ -156,7 +156,7 @@
background: -webkit-linear-gradient(top, #ffffff 0%,#f7f7f7 2%,#dcdde3 96%,#999999 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ffffff 0%,#f7f7f7 2%,#dcdde3 96%,#999999 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #ffffff 0%,#f7f7f7 2%,#dcdde3 96%,#999999 100%); /* IE10+ */
background: linear-gradient(top, #ffffff 0%,#f7f7f7 2%,#dcdde3 96%,#999999 100%); /* W3C */
background: linear-gradient(to top, #ffffff 0%,#f7f7f7 2%,#dcdde3 96%,#999999 100%); /* W3C */
}

.ctrl-pane .up-position .fn-key-bottom-row {
Expand All @@ -165,7 +165,7 @@
background: -webkit-linear-gradient(top, #ffffff 0%,#f3f5fb 2%,#d2d2d8 98%,#999999 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ffffff 0%,#f3f5fb 2%,#d2d2d8 98%,#999999 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #ffffff 0%,#f3f5fb 2%,#d2d2d8 98%,#999999 100%); /* IE10+ */
background: linear-gradient(top, #ffffff 0%,#f3f5fb 2%,#d2d2d8 98%,#999999 100%); /* W3C */
background: linear-gradient(to top, #ffffff 0%,#f3f5fb 2%,#d2d2d8 98%,#999999 100%); /* W3C */
}

.ctrl-pane .down-position .fn-key-top-row {
Expand All @@ -174,7 +174,7 @@
background: -webkit-linear-gradient(top, #ffffff 0%,#e1e1e3 4%,#d1d1d4 45%,#b7b8bd 98%,#838387 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ffffff 0%,#e1e1e3 4%,#d1d1d4 45%,#b7b8bd 98%,#838387 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #ffffff 0%,#e1e1e3 4%,#d1d1d4 45%,#b7b8bd 98%,#838387 100%); /* IE10+ */
background: linear-gradient(top, #ffffff 0%,#e1e1e3 4%,#d1d1d4 45%,#b7b8bd 98%,#838387 100%); /* W3C */
background: linear-gradient(to top, #ffffff 0%,#e1e1e3 4%,#d1d1d4 45%,#b7b8bd 98%,#838387 100%); /* W3C */
}

.ctrl-pane .down-position .fn-key-bottom-row {
Expand All @@ -183,7 +183,7 @@
background: -webkit-linear-gradient(top, #ffffff 0%,#d9dadd 4%,#c8c8cd 45%,#b0b0b7 98%,#838387 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ffffff 0%,#d9dadd 4%,#c8c8cd 45%,#b0b0b7 98%,#838387 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #ffffff 0%,#d9dadd 4%,#c8c8cd 45%,#b0b0b7 98%,#838387 100%); /* IE10+ */
background: linear-gradient(top, #ffffff 0%,#d9dadd 4%,#c8c8cd 45%,#b0b0b7 98%,#838387 100%); /* W3C */
background: linear-gradient(to top, #ffffff 0%,#d9dadd 4%,#c8c8cd 45%,#b0b0b7 98%,#838387 100%); /* W3C */
}

.ctrl-pane .fn-key-top-row {
Expand Down Expand Up @@ -216,7 +216,7 @@
background: -webkit-linear-gradient(bottom, #888888 25%, #CCCCCC 68%);
background: -ms-linear-gradient(bottom, #888888 25%, #CCCCCC 68%);
background: -o-linear-gradient(bottom, #888888 25%, #CCCCCC 68%);
background: linear-gradient(bottom, #888888 25%, #CCCCCC 68%);
background: linear-gradient(to bottom, #888888 25%, #CCCCCC 68%);
}

.ctrl-pane .ctrl-key-top-row div, .ctrl-pane .ctrl-key-bottom-row div,
Expand Down
Loading