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:41 UTC

[12/16] incubator-spot git commit: Removing extra lines of code to prevent displaying the scoring form twice

Removing extra lines of code to prevent displaying the scoring form twice


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

Branch: refs/heads/SPOT-35_graphql_api
Commit: 8286cb2f41ae3b09f50888a31cbf3d32385d01de
Parents: a4dc15d
Author: LedaLima <le...@apache.org>
Authored: Sun Apr 9 21:25:59 2017 -0500
Committer: LedaLima <le...@apache.org>
Committed: Sun Apr 9 21:26:10 2017 -0500

----------------------------------------------------------------------
 .../Edge_Investigation_master.ipynb                | 17 +++++++----------
 .../Edge_Investigation_master.ipynb                |  3 ---
 .../Edge_Investigation_master.ipynb                |  4 ----
 3 files changed, 7 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-spot/blob/8286cb2f/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 0acd9ac..a07e03f 100644
--- a/spot-oa/oa/dns/ipynb_templates/Edge_Investigation_master.ipynb
+++ b/spot-oa/oa/dns/ipynb_templates/Edge_Investigation_master.ipynb
@@ -118,12 +118,13 @@
     "    \n",
     "    response = GraphQLClient.request(query, variables)\n",
     "  \n",
-    "    for row in response['data']['dns']['suspicious']:           \n",
-    "        if row['clientIp'] not in us_ips and row['clientIp'] not in scored: \n",
-    "            us_ips.append(row['clientIp'])\n",
-    "        if row['dnsQuery'] not in us_dns and row['dnsQuery'] not in scored:\n",
-    "            us_dns.append(row['dnsQuery'])  \n",
-    "            \n",
+    "    if not 'errors' in response:\n",
+    "        for row in response['data']['dns']['suspicious']:           \n",
+    "            if row['clientIp'] not in us_ips and row['clientIp'] not in scored: \n",
+    "                us_ips.append(row['clientIp'])\n",
+    "            if row['dnsQuery'] not in us_dns and row['dnsQuery'] not in scored:\n",
+    "                us_dns.append(row['dnsQuery'])  \n",
+    "\n",
     "    fill_list(client_select,us_ips)\n",
     "    fill_list(query_select,us_dns)\n",
     "    client_select.value = \"- Select -\"\n",
@@ -202,11 +203,7 @@
     "    ) \n",
     "     \n",
     "    if not 'errors' in response:\n",
-    "        clear_output()    \n",
-    "        display(Javascript(\"$('.widget-area > .widget-subarea > *').remove();\"))\n",
     "        data_loader() \n",
-    "        display(scoring_form)\n",
-    "        display(Javascript('reloadParentData();')) \n",
     "        print \"Suspicious connects successfully updated\"\n",
     "    else:\n",
     "        print \"An error ocurred: \" + response['errors'][0]['message']\n",

http://git-wip-us.apache.org/repos/asf/incubator-spot/blob/8286cb2f/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 ffa6b31..82a7c7a 100644
--- a/spot-oa/oa/flow/ipynb_templates/Edge_Investigation_master.ipynb
+++ b/spot-oa/oa/flow/ipynb_templates/Edge_Investigation_master.ipynb
@@ -258,10 +258,7 @@
     "    ) \n",
     "     \n",
     "    if not 'errors' in response :\n",
-    "        display(Javascript(\"$('.widget-area > .widget-subarea > *').remove();\"))\n",
     "        data_loader() \n",
-    "        display(bigBox)\n",
-    "        display(Javascript('reloadParentData();'))         \n",
     "        print \"Scored connections successfully reset\"        \n",
     "    else:\n",
     "        print \"An error ocurred: \" + response['errors'][0]['message']\n",

http://git-wip-us.apache.org/repos/asf/incubator-spot/blob/8286cb2f/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 209e741..57ac38a 100644
--- a/spot-oa/oa/proxy/ipynb_templates/Edge_Investigation_master.ipynb
+++ b/spot-oa/oa/proxy/ipynb_templates/Edge_Investigation_master.ipynb
@@ -176,11 +176,7 @@
     "    ) \n",
     "     \n",
     "    if not 'errors' in response:\n",
-    "        clear_output()    \n",
-    "        display(Javascript(\"$('.widget-area > .widget-subarea > *').remove();\"))\n",
     "        data_loader() \n",
-    "        display(scoring_form)\n",
-    "        display(Javascript('reloadParentData();')) \n",
     "        print \"Suspicious connects successfully updated\"\n",
     "    else:\n",
     "        print \"An error ocurred: \" + response['errors'][0]['message']\n",