From 98d886ce316c0dd0623c76b3e157b186ebfeb7a5 Mon Sep 17 00:00:00 2001
From: kongdeqiang <kongdeqiang@960204@163.com>
Date: 星期一, 01 十二月 2025 22:17:16 +0800
Subject: [PATCH] fix:sql提交

---
 src/main/resources/templates/ospfMonitor/view.html |  279 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 279 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/templates/ospfMonitor/view.html b/src/main/resources/templates/ospfMonitor/view.html
new file mode 100644
index 0000000..50a7fe2
--- /dev/null
+++ b/src/main/resources/templates/ospfMonitor/view.html
@@ -0,0 +1,279 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <div  th:replace="common/header.html"></div>
+
+
+</head>
+<body th:class="${application.sidebarCollapse}">
+<div th:replace="common/chart.html"></div>
+
+<div class="wrapper">
+
+  <div th:replace="common/navbar.html"></div>
+
+  <div th:replace="common/aside.html"></div>
+
+  <!-- Content Wrapper. Contains page content -->
+  <div class="content-wrapper"  style="font-size:0.90rem">
+    <!-- Content Header (Page header) -->
+    <section class="content-header">
+      <div class="container-fluid">
+        <div class="row mb-2">
+          <div class="col-sm-6">
+            <h1></h1>
+          </div>
+          <div class="col-sm-6">
+            <ol class="breadcrumb float-sm-right">
+              <li class="breadcrumb-item active"></li>
+            </ol>
+          </div>
+        </div>
+      </div><!-- /.container-fluid -->
+    </section>
+
+    <!-- Main content -->
+    <section class="content">
+      <div class="container-fluid">
+        <div class="row">
+
+  <div class="col-md-12">
+    <div class="card card-primary">
+      <div class="card-header">
+        <h3 class="card-title">OSPF涓昏澶囩洃娴嬩俊鎭�</h3>
+        <div class=" float-sm-right">
+          <a href="javascript:history.back()">杩斿洖</a>
+        </div>
+      </div>
+      <!-- /.card-header -->
+      <!-- form start -->
+      <form role="form">
+        <div class="card-body">
+          <div class="form-group">
+            <label>璁惧IP</label>
+              <div><span th:text="${snmpMonitor.hostname}"></span></div>
+          </div>
+        </div>
+        <!-- /.card-body -->
+      </form>
+      <!-- /.card-body -->
+
+      <div class="row">
+        <div class="col-12 table-responsive">
+          <table class="table table-striped"><tbody><tr>
+            <th:block th:each="item : ${amList}">
+              <th:block th:if="${item.code eq  am}">
+                <td width="2%" style="vertical-align:bottom;"> <button type="button" title="褰撳墠宸叉樉绀鸿鏃堕棿娈靛浘琛�" class="btn btn-block btn-outline-danger btn-sm disabled" th:text="${item.msg}">Primary</button></td>
+              </th:block>
+              <th:block th:unless="${item.code eq  am}">
+                <td width="2%" style="vertical-align:bottom;"> <button type="button"  th:onclick="viewDate([[${snmpInfo.id}]],[[${item.code}]])" class="btn btn-block btn-outline-primary btn-sm" th:text="${item.msg}">Primary</button></td>
+              </th:block>
+            </th:block>
+
+            <td width="10%">
+              <form class="form-inline ml-3   float-sm-right" action="/tssw/snmpInfo/view">
+                <input type="hidden" name="id" th:value="${snmpMonitor.id}"/>
+                <div class="input-group input-group-sm">
+                  <input type="text" autocomplete="off" value="" class="validate[maxSize[50]] form-control"  th:value="${startTime}" name="startTime" id="startTime" placeholder="寮�濮嬫椂闂�" style="margin-right:5px;">
+                  <label style="margin-right:5px;">鑷�</label>
+                  <input type="text" autocomplete="off" value="" class="validate[maxSize[50]] form-control"  th:value="${endTime}" name="endTime" id="endTime" placeholder="缁撴潫鏃堕棿" style="margin-right:5px;">
+                  <button type="submit" class="btn btn-primary btn-sm" style="margin-right:5px;">鏌ヨ</button>
+                  <button type="button" onclick="resetParam()" class="btn bg-danger btn-sm" style="margin-right:5px;">閲嶇疆</button>
+                </div>
+              </form>
+            </td>
+            <td width="2%" style="vertical-align:bottom;text-align: right"><button type="button" th:onclick="excelExport([[${snmpMonitor.id}]],[[${am}]])" class="btn btn-primary btn-sm">瀵煎嚭Excel</button></td>
+          </tr></tbody></table>
+        </div>
+        <!-- /.col -->
+      </div>
+
+    </div>
+    <!-- /.card -->
+
+
+  </div>
+
+        </div>
+      </div>
+    </section>
+  </div>
+
+
+  <div th:replace="common/footer.html"></div>
+
+</div>
+<!-- ./wrapper -->
+
+<script th:src="@{'/static/js/snmp.js?v=3.4.1'}"></script>
+
+
+<script th:inline="javascript">
+  var startTimeResponse =[[${startTime}]];
+  var endTimeResponse =[[${endTime}]];
+  $(document).ready(function(){
+    var startTime = $('#startTime');
+    if(startTime!=null && startTime != undefined){
+      startTime.daterangepicker({
+        singleDatePicker: true,
+        timePicker: true,
+        timePicker24Hour : true,
+        "opens": "center",
+        "locale": {
+          format: 'YYYY-MM-DD HH:mm',
+          applyLabel: "搴旂敤",
+          cancelLabel: "鍙栨秷",
+          daysOfWeek: ['鏃�', '涓�', '浜�', '涓�', '鍥�', '浜�', '鍏�'],
+          monthNames: ['涓�鏈�', '浜屾湀', '涓夋湀', '鍥涙湀', '浜旀湀', '鍏湀', '涓冩湀', '鍏湀', '涔濇湀', '鍗佹湀', '鍗佷竴鏈�', '鍗佷簩鏈�'],
+        }
+      });
+      if(startTimeResponse=='' || startTimeResponse==null){
+        startTime.val("");
+      }
+    }
+
+    var endTime = $('#endTime');
+    if(endTime!=null && endTime != undefined){
+      endTime.daterangepicker({
+        singleDatePicker: true,
+        timePicker: true,
+        timePicker24Hour : true,
+        "opens": "center",
+        "locale": {
+          format: 'YYYY-MM-DD HH:mm',
+          applyLabel: "搴旂敤",
+          cancelLabel: "鍙栨秷",
+          daysOfWeek: ['鏃�', '涓�', '浜�', '涓�', '鍥�', '浜�', '鍏�'],
+          monthNames: ['涓�鏈�', '浜屾湀', '涓夋湀', '鍥涙湀', '浜旀湀', '鍏湀', '涓冩湀', '鍏湀', '涔濇湀', '鍗佹湀', '鍗佷竴鏈�', '鍗佷簩鏈�'],
+        }
+      });
+      if(endTimeResponse=='' || endTimeResponse==null){
+        endTime.val("");
+      }
+    }
+  });
+
+  function resetParam(){
+    $("#startTime").val("");
+    $("#endTime").val("");
+  }
+
+    var snmpStateJson =[[${snmpStateList}]];
+    $(function() {
+      var chart = new G2.Chart({
+        container: 'snmpStateJson',
+        forceFit: true,
+        height: 400,
+        padding: [30, 40, 70, 48]
+      });
+      chart.axis('dateStr', {
+        label: {
+          textStyle: {
+            fill: '#aaaaaa'
+          }
+        }
+      });
+      chart.axis('sentAvgDouble', false);
+      chart.tooltip({
+        crosshairs: false
+      });
+      chart.legend({
+        position: 'top-center'
+      });
+      chart.source(snmpStateJson, {
+        recvAvgDouble: {
+          alias: '鍏ュ彛MB/绉�',
+          min: 0,
+          max: [[${snmpAvgMax}]]
+        },
+        sentAvgDouble: {
+          alias: '鍑哄彛MB/绉�',
+          min: 0,
+          max: [[${snmpAvgMax}]]
+        }
+      });
+      chart.scale('dateStr',{tickCount: 12,alias: '鏃堕棿'});
+      chart.line().position('dateStr*recvAvgDouble').color('#1890ff');
+      chart.line().position('dateStr*sentAvgDouble').color('#2fc25b');
+      chart.render();
+
+      var chartCpuPer = new G2.Chart({
+        container: 'cpuStateJson',
+        forceFit: true,
+        height: 400,
+        padding: [30, 40, 70, 40]
+      });
+      chartCpuPer.axis('dateStr', {
+        label: {
+          textStyle: {
+            fill: '#aaaaaa'
+          }
+        }
+      });
+      chartCpuPer.axis('cpuPerDouble', {
+        label: {
+          textStyle: {
+            fill: '#aaaaaa'
+          }
+        }
+      });
+      chartCpuPer.tooltip({
+        crosshairs: false
+      });
+      chartCpuPer.legend({
+        position: 'top-center'
+      });
+      chartCpuPer.source(snmpStateJson, {
+        cpuPerDouble: {
+          alias: 'cpu浣跨敤鐜�%'
+        }
+      });
+      chartCpuPer.scale('dateStr',{tickCount: 12,alias: '鏃堕棿'});
+      chartCpuPer.line().position('dateStr*cpuPerDouble').color('#1890ff');
+      chartCpuPer.render();
+
+      var chartMem = new G2.Chart({
+        container: 'memStateJson',
+        forceFit: true,
+        height: 400,
+        padding: [30, 40, 70, 40]
+      });
+      chartMem.axis('dateStr', {
+        label: {
+          textStyle: {
+            fill: '#aaaaaa'
+          }
+        }
+      });
+      chartMem.axis('memPerDouble', {
+        label: {
+          textStyle: {
+            fill: '#aaaaaa'
+          }
+        }
+      });
+      chartMem.tooltip({
+        crosshairs: false
+      });
+      chartMem.legend({
+        position: 'top-center'
+      });
+      chartMem.source(snmpStateJson, {
+        memPerDouble: {
+          alias: '浣跨敤鐜�%'
+        }
+      });
+      chartMem.scale('dateStr', {tickCount: 12, alias: '鏃堕棿'});
+      chartMem.line().position('dateStr*memPerDouble').color('#8B78F6');
+      chartMem.render();
+    })
+
+  var msg = [[${msg}]];
+  if(msg!='' && msg!=null){
+    toastr.info(msg);
+  }
+</script>
+
+
+</body>
+</html>

--
Gitblit v1.9.1