diff --git a/monkey_island/cc/resources/edge.py b/monkey_island/cc/resources/edge.py index 8aee77638..2ef0c15bc 100644 --- a/monkey_island/cc/resources/edge.py +++ b/monkey_island/cc/resources/edge.py @@ -1,8 +1,6 @@ -from bson import ObjectId from flask import request import flask_restful -from cc.database import mongo from cc.services.edge import EdgeService __author__ = 'Barak' @@ -11,7 +9,6 @@ __author__ = 'Barak' class Edge(flask_restful.Resource): def get(self): edge_id = request.args.get('id') - if edge_id: return {"edge": EdgeService.get_displayed_edge_by_id(edge_id)} diff --git a/monkey_island/cc/resources/node.py b/monkey_island/cc/resources/node.py index d3c61f76f..5a6c52e1b 100644 --- a/monkey_island/cc/resources/node.py +++ b/monkey_island/cc/resources/node.py @@ -1,9 +1,6 @@ -from bson import ObjectId from flask import request import flask_restful -from cc.database import mongo -from cc.services.edge import EdgeService from cc.services.node import NodeService __author__ = 'Barak' diff --git a/monkey_island/cc/services/edge.py b/monkey_island/cc/services/edge.py index edadb1322..7f93205f4 100644 --- a/monkey_island/cc/services/edge.py +++ b/monkey_island/cc/services/edge.py @@ -169,11 +169,11 @@ class EdgeService: @staticmethod def get_edge_group(edge): - if edge["exploited"]: + if edge.get("exploited"): return "exploited" - if edge["tunnel"]: + if edge.get("tunnel"): return "tunnel" - if (len(edge["scans"]) > 0) or (len(edge["exploits"]) > 0): + if (len(edge.get("scans", [])) > 0) or (len(edge.get("exploits", [])) > 0): return "scan" return "empty" diff --git a/monkey_island/cc/services/node.py b/monkey_island/cc/services/node.py index ed626eb5c..ca2288974 100644 --- a/monkey_island/cc/services/node.py +++ b/monkey_island/cc/services/node.py @@ -101,10 +101,7 @@ class NodeService: @staticmethod def get_node_group(node): - if node["exploited"]: - return "exploited" - else: - return "clean" + return "exploited" if node.get("exploited") else "clean" @staticmethod def monkey_to_net_node(monkey): diff --git a/monkey_island/cc/ui/package.json b/monkey_island/cc/ui/package.json index a7375ab3a..73d84fa6b 100644 --- a/monkey_island/cc/ui/package.json +++ b/monkey_island/cc/ui/package.json @@ -70,8 +70,6 @@ "react-bootstrap": "^0.31.2", "react-copy-to-clipboard": "^5.0.0", "react-data-components": "^1.1.1", - "react-data-grid": "^2.0.58", - "react-data-grid-addons": "^2.0.58", "react-dom": "^15.6.1", "react-fa": "^4.2.0", "react-graph-vis": "^0.1.3", diff --git a/monkey_island/cc/ui/src/components/Main.js b/monkey_island/cc/ui/src/components/Main.js index 11c7f1115..598f0e1a6 100644 --- a/monkey_island/cc/ui/src/components/Main.js +++ b/monkey_island/cc/ui/src/components/Main.js @@ -14,6 +14,7 @@ require('react-data-components/css/table-twbs.css'); require('styles/App.css'); let logoImage = require('../images/monkey-logo.png'); +let guardicoreLogoImage = require('../images/guardicore-logo.png'); class AppComponent extends React.Component { render() { @@ -24,52 +25,56 @@ class AppComponent extends React.Component {