You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spot.apache.org by le...@apache.org on 2017/04/17 16:37:45 UTC

[16/16] incubator-spot git commit: Removing confirmation message displayed after the scores are reset when the user scores againa another connection

Removing confirmation message displayed after the scores are reset when the user scores againa another connection


Project: http://git-wip-us.apache.org/repos/asf/incubator-spot/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spot/commit/208413c2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spot/tree/208413c2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spot/diff/208413c2

Branch: refs/heads/SPOT-35_graphql_api
Commit: 208413c237bc54cf71792bf98f5ef2eef62b19f0
Parents: 7450db2
Author: LedaLima <le...@apache.org>
Authored: Tue Apr 11 17:46:46 2017 -0500
Committer: LedaLima <le...@apache.org>
Committed: Tue Apr 11 17:46:46 2017 -0500

----------------------------------------------------------------------
 .../dns/ipynb_templates/Edge_Investigation_master.ipynb   | 10 ++++++++--
 .../flow/ipynb_templates/Edge_Investigation_master.ipynb  |  8 ++++++--
 .../proxy/ipynb_templates/Edge_Investigation_master.ipynb | 10 +++++++---
 3 files changed, 21 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-spot/blob/208413c2/spot-oa/oa/dns/ipynb_templates/Edge_Investigation_master.ipynb
----------------------------------------------------------------------
diff --git a/spot-oa/oa/dns/ipynb_templates/Edge_Investigation_master.ipynb b/spot-oa/oa/dns/ipynb_templates/Edge_Investigation_master.ipynb
index a07e03f..ef3e10c 100644
--- a/spot-oa/oa/dns/ipynb_templates/Edge_Investigation_master.ipynb
+++ b/spot-oa/oa/dns/ipynb_templates/Edge_Investigation_master.ipynb
@@ -90,6 +90,8 @@
     "scoring_form = widgets.HBox(width='90%', height=250)\n",
     "scoring_form.children = [client_box,query_box,actions_box]\n",
     "\n",
+    "rest_msg_box = widgets.HTML()\n",
+    "\n",
     "global score_values \n",
     "\n",
     "score_values = []\n",
@@ -184,7 +186,9 @@
     "    query_select.value = \"- Select -\"\n",
     "    quick_text.value = \"\"    \n",
     "    \n",
+    "    rest_msg_box.visible = False\n",
     "    data_loader() \n",
+    "    \n",
     "    print \"Click the 'Save' button when you're finished scoring\" \n",
     "\n",
     "        \n",
@@ -203,8 +207,10 @@
     "    ) \n",
     "     \n",
     "    if not 'errors' in response:\n",
-    "        data_loader() \n",
-    "        print \"Suspicious connects successfully updated\"\n",
+    "        rest_msg_box.value=\"Suspicious connects successfully reset\"\n",
+    "        data_loader()\n",
+    "        rest_msg_box.visible = True\n",
+    "        display(rest_msg_box)\n",
     "    else:\n",
     "        print \"An error ocurred: \" + response['errors'][0]['message']\n",
     "                \n",

http://git-wip-us.apache.org/repos/asf/incubator-spot/blob/208413c2/spot-oa/oa/flow/ipynb_templates/Edge_Investigation_master.ipynb
----------------------------------------------------------------------
diff --git a/spot-oa/oa/flow/ipynb_templates/Edge_Investigation_master.ipynb b/spot-oa/oa/flow/ipynb_templates/Edge_Investigation_master.ipynb
index 82a7c7a..278ebb7 100644
--- a/spot-oa/oa/flow/ipynb_templates/Edge_Investigation_master.ipynb
+++ b/spot-oa/oa/flow/ipynb_templates/Edge_Investigation_master.ipynb
@@ -118,6 +118,7 @@
     "bigBox = widgets.HBox(width='90%', height=250)\n",
     "bigBox.children = (srcIpBox, dstIpBox, srcPortBox, dstPortBox, actionsBox)\n",
     "\n",
+    "rest_msg_box = widgets.HTML()\n",
     "\n",
     "def fill_list(list_control,source):\n",
     "    options_list = ['- Select -'] \n",
@@ -238,6 +239,7 @@
     "        dportselect.value = \"- Select -\"\n",
     "    srctext.value = \"\"\n",
     "    \n",
+    "    rest_msg_box.visible = False\n",
     "    data_loader()\n",
     "    \n",
     "    print \"Click the 'Save' button when you're finished scoring\" \n",
@@ -258,8 +260,10 @@
     "    ) \n",
     "     \n",
     "    if not 'errors' in response :\n",
-    "        data_loader() \n",
-    "        print \"Scored connections successfully reset\"        \n",
+    "        rest_msg_box.value=\"Suspicious connects successfully reset\"\n",
+    "        data_loader()\n",
+    "        rest_msg_box.visible = True\n",
+    "        display(rest_msg_box)\n",
     "    else:\n",
     "        print \"An error ocurred: \" + response['errors'][0]['message']\n",
     "        \n",

http://git-wip-us.apache.org/repos/asf/incubator-spot/blob/208413c2/spot-oa/oa/proxy/ipynb_templates/Edge_Investigation_master.ipynb
----------------------------------------------------------------------
diff --git a/spot-oa/oa/proxy/ipynb_templates/Edge_Investigation_master.ipynb b/spot-oa/oa/proxy/ipynb_templates/Edge_Investigation_master.ipynb
index 57ac38a..36b68ff 100644
--- a/spot-oa/oa/proxy/ipynb_templates/Edge_Investigation_master.ipynb
+++ b/spot-oa/oa/proxy/ipynb_templates/Edge_Investigation_master.ipynb
@@ -82,6 +82,7 @@
     "scoring_form = widgets.HBox(width='90%', height=250)\n",
     "scoring_form.children = [uri_box, actions_box]\n",
     "\n",
+    "rest_msg_box = widgets.HTML()\n",
     "\n",
     "def data_loader(): \n",
     "    us_uris = []\n",
@@ -152,7 +153,8 @@
     "    else:\n",
     "        display(Javascript(\"$(\\\"option[data-value$='\" + uri +\"']\\\").remove();\"))\n",
     "      \n",
-    "    clear_output()\n",
+    "    clear_output()    \n",
+    "    rest_msg_box.visible = False\n",
     "    data_loader()\n",
     "    uri_select.value = \"- Select -\"\n",
     "    quick_text.value = \"\"\n",
@@ -176,8 +178,10 @@
     "    ) \n",
     "     \n",
     "    if not 'errors' in response:\n",
-    "        data_loader() \n",
-    "        print \"Suspicious connects successfully updated\"\n",
+    "        rest_msg_box.value=\"Suspicious connects successfully reset\"\n",
+    "        data_loader()\n",
+    "        rest_msg_box.visible = True\n",
+    "        display(rest_msg_box)\n",
     "    else:\n",
     "        print \"An error ocurred: \" + response['errors'][0]['message']\n",
     "             \n",