From 70c4a99e83b725da5a5da891e86a8b60ae9b1c98 Mon Sep 17 00:00:00 2001 From: Itay Mizeretz Date: Wed, 4 Oct 2017 14:08:43 +0300 Subject: [PATCH] Add clean node image --- .../cc/ui/src/components/pages/MapPage.js | 8 ++++---- .../cc/ui/src/images/nodes/clean_unknown.png | Bin 0 -> 19466 bytes 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 monkey_island/cc/ui/src/images/nodes/clean_unknown.png diff --git a/monkey_island/cc/ui/src/components/pages/MapPage.js b/monkey_island/cc/ui/src/components/pages/MapPage.js index 65c407102..a418cc05f 100644 --- a/monkey_island/cc/ui/src/components/pages/MapPage.js +++ b/monkey_island/cc/ui/src/components/pages/MapPage.js @@ -5,7 +5,7 @@ import PreviewPane from 'components/preview-pane/PreviewPane'; import {Link} from 'react-router-dom'; import {Icon} from 'react-fa'; -let groupNames = ['clean_linux', 'clean_windows', 'exploited_linux', 'exploited_windows', 'island', +let groupNames = ['clean_unknown', 'clean_linux', 'clean_windows', 'exploited_linux', 'exploited_windows', 'island', 'island_monkey_linux', 'island_monkey_linux_running', 'island_monkey_windows', 'island_monkey_windows_running', 'manual_linux', 'manual_linux_running', 'manual_windows', 'manual_windows_running', 'monkey_linux', 'monkey_linux_running', 'monkey_windows', 'monkey_windows_running']; @@ -59,7 +59,7 @@ class MapPageComponent extends React.Component { select: event => this.selectionChanged(event) }; - edgeGroupToColor(group) { + static edgeGroupToColor(group) { switch (group) { case 'exploited': return '#c00'; @@ -87,7 +87,7 @@ class MapPageComponent extends React.Component { .then(res => res.json()) .then(res => { res.edges.forEach(edge => { - edge.color = this.edgeGroupToColor(edge.group); + edge.color = MapPageComponent.edgeGroupToColor(edge.group); }); this.setState({graph: res}); this.props.onStatusChange(); @@ -106,7 +106,7 @@ class MapPageComponent extends React.Component { function(edge) { return edge['id'] === event.edges[0]; }); - if (displayedEdge['group'] == 'island') { + if (displayedEdge['group'] === 'island') { this.setState({selected: displayedEdge, selectedType: 'island_edge'}); } else { fetch('/api/netmap/edge?id='+event.edges[0]) diff --git a/monkey_island/cc/ui/src/images/nodes/clean_unknown.png b/monkey_island/cc/ui/src/images/nodes/clean_unknown.png new file mode 100644 index 0000000000000000000000000000000000000000..3b1e9b6387377d9fc2e39d7bede361041f3b6104 GIT binary patch literal 19466 zcmeHPc~q0vwm%6VAWCootCZBKT1LkbYX~Y@Ku|kxJa)z-WL~5D!_<+l?E&zUgpGj-e&lZxs1g6zizpG1u?dc`dlNoe>A2K! zne&R+>~9eAO7h&WZaXcs@9C}^%-8-canAIdHz5nxUs!+Tzy7@Ti(8DpBk|#mWBD6` zW=>vqb=9&vW=p=Faqqiz3$V7cb9{5QdlEP9nz7mYp5^A|NzsqyZa25No6@LQ?`uCN z*XW-Iyl)366+L8`miFfg@vna>8ycL)I;P0(53yRTYuYqF<5;6$F+#zI-QZvLid6lN z-Ua$7&`*T_>|9WzdSj*T75AU(_NvF*k?pi4Fqp0485Z%vf&`-GjmyxIw$E$Wy$zI z2cIocFEB(%!faRk8pEaUZBt7~sWlbbw1=~7$@b!aM%OPvnN1#RSLfEOO{&j2oa1O^ zO5;-X;!V|M<6Awo#n4P6j@J!djdVVwT4T+TQlN#viNTF`lr6r?u;92~ zW6k!-a1CM>7GZh|uvpAZ=@aQe=*L$>KI#nJ##(=1aWa^$;v;UgA_OzAO z1W?IX^4>PPE{{0=t)w?$tB6d%X!DML-f^AK;pZ~wgtu`4B%zYjcaCz1(Bb9sHei-E za}i)2zwvykm-k(u#KiGANzJa@(XblOA6}~vWDUhPb(*%!w**t*}3T*u6PvQKR60kZCLnSde!Tpl!7+t}%#o)t~i zlMAKAg*Go<|HRR4Lfn%=+5#f{t-pUj#^N7KYO-~?S#U`jS~v(h}+?j(9AEq zYa=bTbD4N*)IaGxLHJh`l!U3yJE{7eHLU{39BK0N;$gb<;?NTXr!3&au?pKa^UNz6 z-4@Z+0UC``u-r3!p=VM;yXJ&qa*6HR8^!Y{TH}}gvd}ZV`Hwq$w#=gL2%N?V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