diff --git a/server/web/templates/Index.html b/server/web/templates/Index.html index 4b88971..55a7097 100644 --- a/server/web/templates/Index.html +++ b/server/web/templates/Index.html @@ -22,6 +22,7 @@ + @@ -40,8 +41,8 @@
-

dDDos安全态势感知平台

-

基于区块链及分布式机器学习的物联网设备安全态势感知及控制平台

+

基于区块链的DDoS物联网设备威胁感知与防护系统

+
@@ -72,7 +73,7 @@

dDDos安全态势感知平台

@@ -132,21 +133,17 @@

{{.Total_stream}}Mb


-

5986

区块链节点数 +

150

区块链节点数

-

3

IP所属国家数 +

4

IP所属国家数
-
-
-
-

一键启动模拟攻击 -

-
-
+
+
+ 一键启动模拟攻击
@@ -164,7 +161,7 @@

3

IP所属国家数
-
全网防御情况
+
全网设备情况
-
+ +
+
-

2

1正遭受攻击数
-

86

200全网总设备数
-

79

169正常运行数
@@ -250,45 +341,10 @@

79

diff --git a/server/web/templates/assets/img/conditioner.png b/server/web/templates/assets/img/conditioner.png new file mode 100644 index 0000000..b2751ec Binary files /dev/null and b/server/web/templates/assets/img/conditioner.png differ diff --git a/server/web/templates/assets/img/favicon.png b/server/web/templates/assets/img/favicon.png index 99fbeea..f838365 100644 Binary files a/server/web/templates/assets/img/favicon.png and b/server/web/templates/assets/img/favicon.png differ diff --git a/server/web/templates/assets/img/tx2.jpg b/server/web/templates/assets/img/tx2.jpg new file mode 100644 index 0000000..9c30c73 Binary files /dev/null and b/server/web/templates/assets/img/tx2.jpg differ diff --git a/server/web/templates/assets/js/modules.js b/server/web/templates/assets/js/modules.js index 4d1eb23..4f3e6e6 100644 --- a/server/web/templates/assets/js/modules.js +++ b/server/web/templates/assets/js/modules.js @@ -2157,7 +2157,7 @@ function chartJSInit() { label: '总在线设备数', color: 'rgba(255,255,255, .98)', formatter: function (w) { - w = 5 + w = 169 return w } } @@ -2178,11 +2178,11 @@ function chartJSInit() { stops: [0, 100] } }, - series: [98, 19.7, 70], + series: [5, 10, 76], stroke: { lineCap: 'round' }, - labels: ['全期抵御成功率', '正在遭受攻击率', '正在防御数'], + labels: ['移动性物联网终端', '非移动性小数据物联网终端', '非移动性大数据物联网终端'], responsive: [{ breakpoint: 480, options: { @@ -2239,7 +2239,7 @@ function chartJSInit() { dataLabels: { name: { - show: false + show: true }, value: { formatter: function (val) { @@ -2266,7 +2266,8 @@ function chartJSInit() { stops: [0, 100] } }, - series: [Math.random() * 100], + series: [92], + labels:["当前在线节点数"], stroke: { lineCap: 'round' } @@ -2339,7 +2340,7 @@ function chartJSInit() { /* dateRangePicker */ if ($('#_DateRangeJS_min').length > 0) { - let start = moment().subtract(29, 'days'), + let start = moment(), end = moment(); function cb(start, end) { diff --git a/server/web/templates/controller.html b/server/web/templates/controller.html index a357bda..3092486 100644 --- a/server/web/templates/controller.html +++ b/server/web/templates/controller.html @@ -84,7 +84,7 @@
物联网设备状态概览
空气净化器 - 219.217.199.12 + 112.32.197.79
Run @@ -107,7 +107,7 @@
物联网设备状态概览
扫地机器人 - 219.217.199.13 + 112.32.197.80 Run @@ -122,39 +122,17 @@
物联网设备状态概览
+ 3 - -
- 2021003 -
- - 智能灯具 - 219.217.199.14 - Run - - - - - - - 4
2021004
智能微波炉 - 219.217.199.15 - 112.32.197.81 + Under Attack @@ -169,14 +147,14 @@
物联网设备状态概览
- 5 + 4
2021004
物联网空调 - 219.217.199.16 + 112.32.197.82 Offline diff --git a/server/web/templates/devices.html b/server/web/templates/devices.html index 564a900..25aa31b 100644 --- a/server/web/templates/devices.html +++ b/server/web/templates/devices.html @@ -88,7 +88,7 @@
实景图渲染
设备名称:扫地机器人
-  设备IP:219.217.199.12
+  设备IP:112.32.197.79
 当前状态:正常运行
@@ -100,7 +100,7 @@
实景图渲染
设备名称:空气净化器
-  设备IP:219.217.199.14
+  设备IP:112.32.197.80
 当前状态:正常运行
@@ -112,11 +112,23 @@
实景图渲染
设备名称:智能微波炉
-  设备IP:219.217.199.15
+  设备IP:112.32.197.81
 当前状态:检测到异常,等待其他节点进行验证 + + @@ -215,6 +227,13 @@
实景图渲染
node3.alarm = '发现异常流量'; scene.add(node3); + var node4 = new JTopo.Node("物联网空调"); + node4.setLocation(530, 210); + node4.setImage('img/conditioner.png'); + node4.alarm = '已停运'; + node4.fontColor = "000000"; + scene.add(node4); + setInterval(function () { if (node3.alarm == '发现异常流量') { node3.alarm = null; @@ -252,12 +271,12 @@
实景图渲染
$("#robotmenu").hide(); } } - function handlery(event, id) { + function handlery(event, id,x) { if (event.button == 0) {// 右键 // 当前位置弹出菜单(div) $("#" + id).css({ top: event.pageY - 152.4 - 20, - left: event.pageX - 240 + 100 + left: event.pageX - 240 + 100+x }).show(); } if (event.button == 2) {// 右键 @@ -273,13 +292,22 @@
实景图渲染
node2.addEventListener('mouseup', function (event) { currentNode = this; var id = "airmenu"; - handlery(event, id); + var x=0; + handlery(event, id,x); }); node3.addEventListener('mouseup', function (event) { currentNode = this; var id = "ovenmenu"; - handlery(event, id); + var x=0; + handlery(event, id,x); + }); + + node4.addEventListener('mouseup', function (event) { + currentNode = this; + var id = "conmenu"; + var x=50; + handlery(event, id,x); }); function newLink(nodeA, nodeZ, text, dashedPattern) { diff --git a/server/web/templates/header.html b/server/web/templates/header.html index c3c41e9..fa4187e 100644 --- a/server/web/templates/header.html +++ b/server/web/templates/header.html @@ -2,45 +2,54 @@ - -
- - + +
+ + {{end}} \ No newline at end of file diff --git a/server/web/templates/log.html b/server/web/templates/log.html index a2b1223..c42fb7e 100644 --- a/server/web/templates/log.html +++ b/server/web/templates/log.html @@ -85,41 +85,41 @@
防御日志
-
@@ -156,29 +156,21 @@
攻击日志
Successfully attack
-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

+
diff --git a/server/web/templates/logg.html b/server/web/templates/logg.html new file mode 100644 index 0000000..8c827c6 --- /dev/null +++ b/server/web/templates/logg.html @@ -0,0 +1,251 @@ +{{define "logg.html"}} + + + + + + + + dDDos + + + + + + + + + + + + + + + + + + + + + + {{template "/header" .}} + + +
+ + {{template "/sidebar" .}} + +
+
+
+ +
+
+
+

日志记录

+ +
+
+
+
+
+
+
 
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
防御日志
+
+
+ + + +
+
+
+
+
+ +
+
+
+
+
+ + +
+
+
+
+
攻击日志
+
+
+ + + +
+
+
+
+
+ + +
+
+
+ 所辖设备暂无被攻击记录
+

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +{{end}} \ No newline at end of file diff --git a/server/web/templates/sidebar.html b/server/web/templates/sidebar.html index bcd6521..c45918f 100644 --- a/server/web/templates/sidebar.html +++ b/server/web/templates/sidebar.html @@ -10,7 +10,7 @@ @@ -45,6 +45,9 @@ $("li#mainmenu1").addClass("active"); $("li#mainmenu2").removeClass("active"); } + if(path[1]=="logg"){ + $("li#log").addClass("active"); + } }) {{end}} \ No newline at end of file diff --git a/server/web/web.go b/server/web/web.go index 66a4529..27227b4 100644 --- a/server/web/web.go +++ b/server/web/web.go @@ -63,6 +63,15 @@ func RunWeb() { }) + router.GET("/logg", func(c *gin.Context) { + + c.HTML(http.StatusOK, "logg.html", gin.H{ + "title": "Main website2", + + }) + + }) + router.GET("/ping", func(c *gin.Context) { c.JSON(200, gin.H{ "message": "pong",