forked from p15670423/monkey
Changed node icons to be assets
This commit is contained in:
parent
2baa99b939
commit
efef30e235
|
@ -5,14 +5,19 @@ import PreviewPane from 'components/preview-pane/PreviewPane';
|
||||||
import {Link} from 'react-router-dom';
|
import {Link} from 'react-router-dom';
|
||||||
import {Icon} from 'react-fa';
|
import {Icon} from 'react-fa';
|
||||||
|
|
||||||
let groupsToGroupsOptions = (groupNames) => {
|
let groupNames = ['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'];
|
||||||
|
|
||||||
|
let getGroupsOptions = () => {
|
||||||
let groupOptions = {};
|
let groupOptions = {};
|
||||||
for (let groupName of groupNames) {
|
for (let groupName of groupNames) {
|
||||||
groupOptions[groupName] =
|
groupOptions[groupName] =
|
||||||
{
|
{
|
||||||
shape: 'image',
|
shape: 'image',
|
||||||
size: 50,
|
size: 50,
|
||||||
image: '../images/nodes/' + groupName + '.png'
|
image: require('../../images/nodes/' + groupName + '.png')
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return groupOptions;
|
return groupOptions;
|
||||||
|
@ -24,13 +29,10 @@ let options = {
|
||||||
},
|
},
|
||||||
edges: {
|
edges: {
|
||||||
smooth: {
|
smooth: {
|
||||||
type: "curvedCW"
|
type: 'curvedCW'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
groups: groupsToGroupsOptions(['clean_linux', 'clean_windows', 'exploited_linux', 'exploited_windows', 'island',
|
groups: getGroupsOptions()
|
||||||
'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'])
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class MapPageComponent extends React.Component {
|
class MapPageComponent extends React.Component {
|
||||||
|
|
Loading…
Reference in New Issue