Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
445 commits
Select commit Hold shift + click to select a range
6555078
moved all the code accross
M-Wicenec Sep 19, 2023
ee644a8
Optionally allow movement of constructs when resizing. Sort nodes in …
james-strauss-uwa Sep 19, 2023
4559a89
drop function working now
M-Wicenec Sep 19, 2023
1ef3ffa
making the node suggestion position better
M-Wicenec Sep 19, 2023
d59f7e6
merge from html-graph-renderer main branch
M-Wicenec Sep 19, 2023
883a1fa
Rename of variables to 'screen' and 'graph' space. Minor improvement …
james-strauss-uwa Sep 19, 2023
41277ff
update to zooming funcitons
M-Wicenec Sep 20, 2023
1db73e6
edge selecting is now possible
M-Wicenec Sep 20, 2023
35ec068
right click working on edges
M-Wicenec Sep 20, 2023
cfaf90b
added an edge click handler thats wider to make edges easier to click
M-Wicenec Sep 21, 2023
08c26f4
adecided on and added all the edge colors
M-Wicenec Sep 22, 2023
a27db8a
edge colors now dynamic again
M-Wicenec Sep 22, 2023
c4aa680
fixed comment edges colour
M-Wicenec Sep 22, 2023
9096a1f
Merge pull request #636 from ICRAR/eagle-1136
M-Wicenec Sep 22, 2023
26426d7
construct resize on drag and pop out distance
M-Wicenec Sep 26, 2023
8926f51
added transition animation control for leaving construct
M-Wicenec Sep 27, 2023
2e09839
fixed a bug and added a transition animation
M-Wicenec Sep 27, 2023
25f9bfc
Merge pull request #637 from ICRAR/html-graph-renderer-construct
M-Wicenec Sep 27, 2023
4e37750
drag selection
M-Wicenec Sep 27, 2023
caf8ae0
added ability to select constructs plus children
M-Wicenec Sep 27, 2023
7c0c0d5
some changes to colours and the selector function
M-Wicenec Sep 27, 2023
5279cfa
comments..
M-Wicenec Sep 27, 2023
90b0c14
improved get all children function
M-Wicenec Sep 28, 2023
271eb96
css fix
M-Wicenec Sep 29, 2023
35029e8
styling changes and getting rid of wip code
M-Wicenec Sep 29, 2023
4ce2ee1
disabled auto centering for constructs as it was breaking my graph
M-Wicenec Sep 29, 2023
7898083
edited the center graph function
M-Wicenec Sep 29, 2023
9abe776
closes loop edges shown dashed
M-Wicenec Sep 29, 2023
868627a
adjusted the closes loop edges dasharray
M-Wicenec Sep 29, 2023
8faaf3b
ading an arrow to the middle of edges
M-Wicenec Oct 2, 2023
fcec542
found a method of rotating arrows
M-Wicenec Oct 2, 2023
35faf6d
arrow pointing in the right direction
M-Wicenec Oct 2, 2023
a16bcb6
edge arrow size is now controlable via graph config
M-Wicenec Oct 3, 2023
c40b090
calcalculating the arrow angle on edges
M-Wicenec Oct 3, 2023
6026665
hiding arrows if edge too short and comments
M-Wicenec Oct 3, 2023
9c45ec5
flipped the arrows
M-Wicenec Oct 3, 2023
bff6bc1
hover info on node title and ports
M-Wicenec Oct 3, 2023
abfb8d9
extending the svg working area
M-Wicenec Oct 4, 2023
367fd8d
fixed cgrpah layering issues
M-Wicenec Oct 5, 2023
e25999f
turned around the drag behavious for constructs and children
M-Wicenec Oct 6, 2023
af2e594
constructs can now be smaller and their icon has been made smaller
M-Wicenec Oct 6, 2023
ef48bdb
hopefully fixed the elypse issue on large cosntructs
M-Wicenec Oct 6, 2023
72a0f21
construct resizing done on all constructs
M-Wicenec Oct 6, 2023
980dd2e
rewrote the port drawing to be in its own div to help graph layering
M-Wicenec Oct 10, 2023
11099ed
fixing embedded app positions
M-Wicenec Oct 10, 2023
6905119
gfixed edge layering over constructs
M-Wicenec Oct 11, 2023
8fe9a6e
added a new function that gets all nodes including embedded ones
M-Wicenec Oct 11, 2023
b08f88c
Merge branch 'master' into html-graph-renderer
M-Wicenec Oct 12, 2023
fe7210b
middle mouse on graph is now dragging the background instead of the n…
M-Wicenec Oct 12, 2023
c98763f
changed a colour
M-Wicenec Oct 13, 2023
e0aa6aa
Merge branch 'html-graph-renderer' of https://github.com/icrar/EAGLE …
M-Wicenec Oct 13, 2023
3dd9468
Fix bug when adding new node by clicking on a component icon in a pal…
james-strauss-uwa Oct 13, 2023
b4d6ad4
much improved canvas drag performance
M-Wicenec Oct 16, 2023
fab02a7
made nodes and edges arrays an observable
M-Wicenec Oct 16, 2023
5657592
construct borders
M-Wicenec Oct 17, 2023
f3bbe5f
adjusted the borders of constructs
M-Wicenec Oct 17, 2023
2287be9
adjusted construct borders some more
M-Wicenec Oct 17, 2023
55a7a0f
adjusted constructand embedded app background colors
M-Wicenec Oct 17, 2023
9a1c1b8
small construct bg adjustment
M-Wicenec Oct 17, 2023
5bdc5b6
small adjustment to branch nodes
M-Wicenec Oct 17, 2023
beb96af
swapped loop and scatter border styling
M-Wicenec Oct 17, 2023
86d7f9f
fixed and made the center graph function much smarter
M-Wicenec Oct 17, 2023
31d454a
removed developer code
M-Wicenec Oct 17, 2023
f85d9ce
improved the click handler
M-Wicenec Oct 18, 2023
faddaf5
drag improvements
M-Wicenec Oct 18, 2023
d380487
bug fix for dragging canvas and better highlight for constructs
M-Wicenec Oct 19, 2023
7bc39b0
double click to select all nodes in construct
M-Wicenec Oct 19, 2023
6df0d54
Fixed bug where 'dummy' ports were not removed from an automatically-…
james-strauss-uwa Oct 19, 2023
3d19a32
changes branch selected css
M-Wicenec Oct 19, 2023
879ac68
Merge branch 'html-graph-renderer' of https://github.com/icrar/EAGLE …
M-Wicenec Oct 19, 2023
5264906
smal drag bugfix
M-Wicenec Oct 19, 2023
67574c9
Fixed issue when dragging a new edge from dummy ports into open space…
james-strauss-uwa Oct 19, 2023
3f80dbb
Merge branch 'html-graph-renderer' of https://github.com/ICRAR/EAGLE …
james-strauss-uwa Oct 19, 2023
8ad278d
fixed a bug ith input applications
M-Wicenec Oct 20, 2023
087ea14
Merge branch 'html-graph-renderer' of https://github.com/icrar/EAGLE …
M-Wicenec Oct 20, 2023
6618b9e
improved construct resizing efficiency
M-Wicenec Oct 20, 2023
b59deaa
Start of attempt to draw edge during dragging, and keep drawing it wh…
james-strauss-uwa Oct 20, 2023
6ddab92
iimprovements to constructs and node titles
M-Wicenec Oct 20, 2023
1edd20d
adjusted branch node header hight
M-Wicenec Oct 20, 2023
a91210e
Got the dragging edge rendering, still need to turn it off when appro…
james-strauss-uwa Oct 20, 2023
9ddf8d9
Enable dragging edge drawing only while dragging
james-strauss-uwa Oct 24, 2023
3ae2324
Minor cleanup
james-strauss-uwa Oct 24, 2023
ce89b97
Minor cleanup
james-strauss-uwa Oct 24, 2023
eb6a1a7
Minor cleanup and removed polygon and clickPath from draggingEdge
james-strauss-uwa Oct 24, 2023
05875af
Draw the suggested auto-complete edge
james-strauss-uwa Oct 25, 2023
299692a
Fixed bug where dragging and auto-complete edges would be drawn to th…
james-strauss-uwa Oct 25, 2023
e00b975
Fixed one more bug with edge drawing
james-strauss-uwa Oct 25, 2023
de8378e
fixed node dragging positions
M-Wicenec Oct 25, 2023
1b22fc3
Merge branch 'eagle-1089' of https://github.com/icrar/EAGLE into eagl…
M-Wicenec Oct 25, 2023
b9b6ad7
Re-added mouseEnterPort, mouseLeavePort
james-strauss-uwa Oct 25, 2023
3fbc7ab
Merge branch 'eagle-1089' of https://github.com/ICRAR/EAGLE into eagl…
james-strauss-uwa Oct 25, 2023
62facfb
Fixed bug where context menu shown when dragging edge into open space…
james-strauss-uwa Oct 26, 2023
eea50b3
nothing is woking
M-Wicenec Oct 31, 2023
3db8709
Revert "nothing is woking"
M-Wicenec Oct 31, 2023
41d0819
graph too screen function fixed
M-Wicenec Oct 31, 2023
fa6b115
drifting issue when dragging slow fixed
M-Wicenec Nov 1, 2023
533c3ae
Merge branch 'html-graph-renderer' into eagle-1089
M-Wicenec Nov 1, 2023
a05a482
fixed duplicate and add embedded apps not generating a new id
M-Wicenec Nov 1, 2023
ecc0317
fixed field ids not being generated when copying,duplicating and addi…
M-Wicenec Nov 1, 2023
fd05e93
finally inserting graphs seems to work correctly
M-Wicenec Nov 3, 2023
5f086a2
fixed an id issue with embedded apps
M-Wicenec Nov 3, 2023
dc1075d
found more key and id copying errors
M-Wicenec Nov 6, 2023
6e39cb8
center graph better
M-Wicenec Nov 7, 2023
61e1dfb
working on port titles
M-Wicenec Nov 9, 2023
4360a4b
fixed port text direction updates
M-Wicenec Nov 9, 2023
f4d94e3
selected state now shows the port names
M-Wicenec Nov 10, 2023
2d2a6d8
setting peek on a node on hover
M-Wicenec Nov 10, 2023
67e1ef6
peek is working on node hover and select now
M-Wicenec Nov 10, 2023
0f0158b
increasing the size of port names
M-Wicenec Nov 10, 2023
06e18e6
increased the thickness of the white border around port titles
M-Wicenec Nov 10, 2023
ee3ff7c
working commit
M-Wicenec Nov 14, 2023
177b2a2
fixed a merge conflict
M-Wicenec Nov 14, 2023
de63651
wfh commit
M-Wicenec Nov 15, 2023
4412741
port dragging now using the port position
M-Wicenec Nov 15, 2023
fdba6d0
spome trouble shooting and adding back in a min distance
M-Wicenec Nov 15, 2023
62989b5
port dragging with constructs seems to be fixed
M-Wicenec Nov 16, 2023
55587cf
removed some dev code and added some comments
M-Wicenec Nov 16, 2023
c154366
added the peek system for dragging ports, highlighting matching ports
M-Wicenec Nov 17, 2023
6460c52
two step port dragging now implemented
M-Wicenec Nov 17, 2023
3434c4c
fixed a bug with port dragging
M-Wicenec Nov 17, 2023
288c87c
removed some dev code
M-Wicenec Nov 17, 2023
6438b5d
Merge pull request #640 from ICRAR/eagle-1089
M-Wicenec Nov 17, 2023
337f8d4
legacy graph conversion
M-Wicenec Nov 20, 2023
7203ea8
wip commit of centering constructs
M-Wicenec Nov 21, 2023
a196f7b
translating and centering constructs for legacy
M-Wicenec Nov 22, 2023
6fa1185
correctly recognising legacy graphs
M-Wicenec Nov 23, 2023
067744f
Merge pull request #641 from ICRAR/html-translate-legacy
M-Wicenec Nov 23, 2023
67e03ce
another attempt at the center graph function
M-Wicenec Jan 9, 2024
a83c265
fixed centering graphs by removing the scaling as it was in the old v…
M-Wicenec Jan 10, 2024
2e43a5b
added eagle pi logo, working on scroll to mouse
M-Wicenec Jan 11, 2024
f1e883b
Re-added code to allow user to drag edge from port-to-port. Color of …
james-strauss-uwa Jan 11, 2024
0086b71
Merge pull request #642 from ICRAR/eagle-1142
james-strauss-uwa Jan 11, 2024
eb104a5
Minor fix
james-strauss-uwa Jan 11, 2024
60e7ecf
Disabled and hid zoom functions, snap-to-grid, and hide data nodes, s…
james-strauss-uwa Jan 11, 2024
1920961
fixed zooming to mouse position
M-Wicenec Jan 12, 2024
95cded1
im now setting the correct zoom level for the graph when centering
M-Wicenec Jan 12, 2024
936d52e
changed the call of center graph on graph load
M-Wicenec Jan 12, 2024
0c9e041
Fix for saving graph to file. Clone function did not make copies of e…
james-strauss-uwa Jan 15, 2024
faec021
Add checkGraph rule to update nodes with the the legacy 'Component' c…
james-strauss-uwa Jan 15, 2024
5b0eb1d
working on tutorial fixes
M-Wicenec Jan 16, 2024
8a27bf2
Merge branch 'html-graph-renderer' of https://github.com/icrar/EAGLE …
M-Wicenec Jan 16, 2024
06463c4
fixed a bug causing centering graph getting triggered when adding nodes
M-Wicenec Jan 16, 2024
21aa3a7
figured out tutorial highlight draw bug
M-Wicenec Jan 17, 2024
70ba3dc
Fixed bug adding output application to MKN nodes
james-strauss-uwa Jan 17, 2024
a975d46
fixed the tutorial and updated some outdate content
M-Wicenec Jan 17, 2024
17ecb1f
removed some dev code
M-Wicenec Jan 17, 2024
33ee604
extended constructbehaviour to all groups, aka exclusive force nodes
M-Wicenec Jan 19, 2024
0e7ee3c
Merge branch 'html-graph-renderer' of https://github.com/ICRAR/EAGLE …
james-strauss-uwa Jan 19, 2024
df2acab
exclusive force node styling changes
M-Wicenec Jan 19, 2024
2b69787
fixed bug with broken graph cause eagle to break
M-Wicenec Jan 19, 2024
4cfe183
Merge branch 'html-graph-renderer' of https://github.com/icrar/EAGLE …
M-Wicenec Jan 19, 2024
2bb7ce1
Start of work on ideal vs actual port angles
james-strauss-uwa Jan 19, 2024
2082050
Swapped order of args in showPort
james-strauss-uwa Jan 19, 2024
9fb3a70
Split the port position and embedded app position bindingHandlers, wip
james-strauss-uwa Jan 19, 2024
344fd09
Improvements to the embeddedAppPosition bindingHandler
james-strauss-uwa Jan 22, 2024
bf7371b
Improvements to the embeddedAppPosition bindingHandler
james-strauss-uwa Jan 22, 2024
d9638d0
Improvements to the embeddedAppPosition and portPosition bindingHandlers
james-strauss-uwa Jan 22, 2024
a6e9d07
handler seems to be working, integrated into existing click handlers
M-Wicenec Jan 23, 2024
fd18f56
dragging rectangle doing things
M-Wicenec Jan 23, 2024
02bb7b1
selection region box drawing correctly
M-Wicenec Jan 24, 2024
1c47469
now able to use shift select on top of nodes and constructs
M-Wicenec Jan 24, 2024
7e0e8c0
can now select into all directions
M-Wicenec Jan 24, 2024
ec33f83
drag select implemented
M-Wicenec Jan 24, 2024
d1e3206
checking if a node is fully inside the selection box instead of just …
M-Wicenec Jan 24, 2024
fd60ffc
fixed a typo
M-Wicenec Jan 24, 2024
1102a2f
Merge pull request #643 from ICRAR/GR2-shiftSelect
M-Wicenec Jan 24, 2024
e41e325
fixed alt plus shift selecting constructs
M-Wicenec Jan 24, 2024
7b99eab
reduced double click delay
M-Wicenec Jan 24, 2024
0f0f2ed
fixed the right click add node placement
M-Wicenec Jan 30, 2024
7ece4be
fixed drig in mouse position
M-Wicenec Jan 30, 2024
a9df89b
fixed automatic placement of nodes on graph
M-Wicenec Jan 31, 2024
d0d30e0
EAGLE-1163: fixed bug where rendered edge would remain even after inv…
james-strauss-uwa Jan 31, 2024
57b148f
Merge branch 'html-graph-renderer' of https://github.com/ICRAR/EAGLE …
james-strauss-uwa Jan 31, 2024
50807d9
Minor cleanup
james-strauss-uwa Jan 31, 2024
c32ad43
Minor cleanup
james-strauss-uwa Feb 2, 2024
fec44bd
selecting text when creating a new row in fields table
M-Wicenec Feb 2, 2024
0c4a52b
git pushMerge branch 'html-graph-renderer' of https://github.com/icra…
M-Wicenec Feb 2, 2024
1bac1f0
changed colors for groups
M-Wicenec Feb 2, 2024
3511eb3
fixed a graph loading bug, legacy graph translation alays happening
M-Wicenec Feb 5, 2024
3ce4ef2
improved the code for centering contructs and made it available in ri…
M-Wicenec Feb 5, 2024
acc7d5c
added in a graphic for event type ports
M-Wicenec Feb 7, 2024
2d67e36
cleaned up the event port syling code a little bit
M-Wicenec Feb 7, 2024
917b15b
fixed a bug with the new event port visual
M-Wicenec Feb 7, 2024
eb355f4
added a fix for selected embedded nodes edge thickness
M-Wicenec Feb 7, 2024
3920c89
Removed ideal/actual angles from this branch
james-strauss-uwa Feb 7, 2024
39bbbc3
Merge branch 'html-graph-renderer' into eagle-1157-2
james-strauss-uwa Feb 7, 2024
6fc0d25
Merge pull request #644 from ICRAR/eagle-1157-2
james-strauss-uwa Feb 7, 2024
9c4c31a
fixed an issues with inacturate edges
M-Wicenec Feb 7, 2024
a1d68d8
ports are now drawn differenlty, added angles to fields
M-Wicenec Feb 9, 2024
4bb520a
wip commit
M-Wicenec Feb 12, 2024
36548c3
wip commit
M-Wicenec Feb 13, 2024
cf1c493
wip commit
M-Wicenec Feb 16, 2024
a161e1b
its doing something
M-Wicenec Feb 16, 2024
5042cf8
connected simple ports working
M-Wicenec Feb 21, 2024
35c6174
fixed input output inaccurate
M-Wicenec Feb 21, 2024
fcd99e2
removing some dev code
M-Wicenec Feb 21, 2024
cffe411
inputoutput ports working
M-Wicenec Feb 22, 2024
fa0cd20
input output improvements
M-Wicenec Feb 22, 2024
daefd23
fiddling with ports function
M-Wicenec Feb 23, 2024
2ba28b0
working on correcting overlapslaps near the wrap around, 0, point
M-Wicenec Feb 28, 2024
6bf0540
improvements
M-Wicenec Feb 29, 2024
59f9967
its workingg
M-Wicenec Feb 29, 2024
2a531a0
fixed an issue with wrapping the comparson numbers
M-Wicenec Mar 1, 2024
33e1414
comment for finally a lead on what might be wrong
M-Wicenec Mar 7, 2024
3bf8e13
fixed an issue with input output ports
M-Wicenec Mar 8, 2024
2aa8f88
punlinked ports no longer getting lost
M-Wicenec Mar 8, 2024
d4ad12f
fixed disconnected ports getting lost
M-Wicenec Mar 8, 2024
cb16728
dangling ports almost working properly
M-Wicenec Mar 8, 2024
94e6f38
output ports that are dangling no longer stack on top of each other
M-Wicenec Mar 11, 2024
7567a21
looks like its fixed!!
M-Wicenec Mar 12, 2024
ac22255
removed not needed array on node.ts
M-Wicenec Mar 13, 2024
17939b8
Merge pull request #645 from ICRAR/html_graph_renderer_ports
M-Wicenec Mar 13, 2024
1255e46
reducing the gap between ports
M-Wicenec Mar 13, 2024
d20750b
fixed issue with node title hover becoming inverted
M-Wicenec Mar 14, 2024
c413445
added missing hover functio nto preview port names
M-Wicenec Mar 14, 2024
7f38712
hiding port titles while dragging nodes
M-Wicenec Mar 14, 2024
1a8a0cc
show port titles when selecting edges
M-Wicenec Mar 18, 2024
5c031bf
Fixed bug where default value of settings were not reset for 'Student…
james-strauss-uwa Mar 19, 2024
edb06d3
When adding node to graph, check for graph name. If unnamed, request …
james-strauss-uwa Mar 19, 2024
1331203
When saving a graph locally, check that the graph is named. Otherwise…
james-strauss-uwa Mar 19, 2024
c2787bd
Remove the requirement for a 'dropclass' field on Constructs
james-strauss-uwa Mar 20, 2024
82ab655
Merge pull request #648 from ICRAR/eagle-1168
james-strauss-uwa Mar 20, 2024
624f71d
Removed the 'Description' category from CategoryData. Graph desciptio…
james-strauss-uwa Mar 20, 2024
052d2dd
adgjusting the straight edge cutoff length, also fixing arrows being …
M-Wicenec Mar 21, 2024
17fdf0e
git Merge branch 'html-graph-renderer' of https://github.com/icrar/EA…
M-Wicenec Mar 21, 2024
716369a
improvement to node dragging
M-Wicenec Mar 21, 2024
758eb00
Factored out some common validation code into a single function withi…
james-strauss-uwa Mar 21, 2024
72bb5b7
Merge pull request #646 from ICRAR/eagle-1169
james-strauss-uwa Mar 21, 2024
c3da59c
Merge pull request #647 from ICRAR/eagle-1167
james-strauss-uwa Mar 21, 2024
94bc9a5
fixed the undo jump and multi node dragging
M-Wicenec Mar 21, 2024
e366a08
git Merge branch 'html-graph-renderer' of https://github.com/icrar/EA…
M-Wicenec Mar 21, 2024
f4143da
Fixed typescript compilation error
james-strauss-uwa Mar 21, 2024
e352705
Merge pull request #649 from ICRAR/eagle-1165
james-strauss-uwa Mar 21, 2024
d66cfb9
Merge pull request #650 from ICRAR/eagle-pi-schema-update
james-strauss-uwa Mar 21, 2024
845f7e3
Hide the 'collapse node' buttons in the navbar
james-strauss-uwa Mar 22, 2024
c48fae7
Clear undo history when loading a new graph. This will prevent the un…
james-strauss-uwa Mar 22, 2024
0e5df6e
Added undo snapshot after moving a node
james-strauss-uwa Mar 22, 2024
d03858f
Fixed bug when moving whole graph by dragging on the background
james-strauss-uwa Mar 22, 2024
2a4a500
Minor change to printout of Logical Graph Nodes Table
james-strauss-uwa Mar 22, 2024
6d30900
Fixed bug with short edges
james-strauss-uwa Mar 22, 2024
78e9f40
removed settings for snap to grid
M-Wicenec Mar 22, 2024
eb50c9d
all tests are now passing again
M-Wicenec Mar 22, 2024
dbf572b
Add new 'Impossible' value to the Eagle.LinkValid enum. These are a c…
james-strauss-uwa Mar 22, 2024
efb5652
Allow legacy 'Component' nodes to have any number of parameters, argu…
james-strauss-uwa Mar 22, 2024
2f1f817
removed all d3 stuff except in npm node modules
M-Wicenec Mar 22, 2024
48750e9
Merge pull request #652 from ICRAR/impossible-edges
M-Wicenec Mar 22, 2024
1ef9542
removed some more d3 code
M-Wicenec Mar 22, 2024
350dab7
Fix for 'double peek hover' bug
james-strauss-uwa Mar 22, 2024
e9e618c
Merge pull request #653 from ICRAR/remove_d3
M-Wicenec Mar 25, 2024
03f39bf
Merge branch 'html-graph-renderer' into eagle-1039
james-strauss-uwa Mar 25, 2024
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
467 changes: 0 additions & 467 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"dependencies": {
"@types/bootstrap": "^5.1.4",
"@types/bootstrap-notify": "^3.1.34",
"@types/d3": "^5.7.2",
"@types/jquery": "^3.3.38",
"@types/node": "^14.0.11",
"@types/showdown": "^1.9.4",
Expand Down
15 changes: 14 additions & 1 deletion resources/call_split.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 14 additions & 1 deletion resources/comment.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 14 additions & 1 deletion resources/description.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 14 additions & 1 deletion resources/group.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 14 additions & 1 deletion resources/merge_type.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 14 additions & 1 deletion resources/play_arrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 16 additions & 1 deletion resources/python.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 18 additions & 18 deletions resources/question_mark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 14 additions & 1 deletion resources/share.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 14 additions & 1 deletion resources/stop.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 14 additions & 1 deletion resources/tune.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
71 changes: 71 additions & 0 deletions src/Action.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
export class ActionMessage {
level: ActionMessage.Level;
message: string;
show: () => void;
fix: () => void;
fixDescription: string;

constructor (level: ActionMessage.Level, message: string, show: () => void, fix: () => void, fixDescription: string){
this.level = level;
this.message = message;
this.show = show;
this.fix = fix;
this.fixDescription = fixDescription;
}

static Error(message: string): ActionMessage {
return new ActionMessage(ActionMessage.Level.Error, message, null, null, "");
}
static Message(level: ActionMessage.Level, message: string): ActionMessage {
return new ActionMessage(level, message, null, null, "");
}
static Show(level: ActionMessage.Level, message: string, show: () => void): ActionMessage {
return new ActionMessage(level, message, show, null, "");
}
static Fix(level: ActionMessage.Level, message: string, fix: () => void, fixDescription: string): ActionMessage {
return new ActionMessage(level, message, null, fix, fixDescription);
}
static ShowFix(level: ActionMessage.Level, message: string, show: () => void, fix: () => void, fixDescription: string): ActionMessage {
return new ActionMessage(level, message, show, fix, fixDescription);
}

// sorting order
// 1. by level
// 2. alphabetically by message
public static actionMessageSortFunc(a : ActionMessage, b : ActionMessage) : number {
if (a.level < b.level)
return -1;

if (a.level > b.level)
return 1;

if (a.message < b.message)
return -1;

if (a.message > b.message)
return 1;

return 0;
}

// TODO: more cases?
public static levelToCss(level: ActionMessage.Level) : "danger" | "warning" | "info" | "success" {
switch (level){
case ActionMessage.Level.Error:
return "danger";
case ActionMessage.Level.Warning:
return "warning";
default:
return "info";
}
}
}

export namespace ActionMessage {
export enum Level {
Success = "Success",
Error = "Error",
Warning = "Warning",
Info = "Info"
}
}
Loading