| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- var errorTable;
- var sites = {};
- $.ajaxSettings.async = false;
- var jqxhr = $.getJSON("/BIM-Monitor/assets/errorTable.json", function (json) {
- errorTable = json;
- });
- var C3Json = $.getJSON("/BIM-Monitor/assets/json/c3-monitorList.json", function (json) {
- sites["c3"] = json;
- });
- var R03Json = $.getJSON("/BIM-Monitor/assets/json/r03-monitorList.json", function (json) {
- sites["r03"] = json;
- });
- $.ajaxSettings.async = true;
- var lastNode;
- var errorArray = [];
- function GetCheckAllAJAXValue() {
- errorArray = [];
- var phase
- if(document.getElementById("phase") !== null){
- phase = document.getElementById("phase").value;
- }else{
- phase = 7;
- }
- for (i = 0; i < errorTable.length; i++) {
- var method = errorTable[i].method;
- var option = errorTable[i].table_name;
- var table_name = errorTable[i].table_name + "data";
- var warning1 = errorTable[i].warning1;
- var warning2 = errorTable[i].warning2;
- var warning_Count = errorTable[i].warning_Count;
- $.ajax({
- url: "/BIM-Monitor/script/php/checkValue2.php",
- data: {
- method: method,
- table_name: table_name,
- warning1: warning1,
- warning2: warning2,
- warning_Count: warning_Count,
- phase: phase
- },
- async: false,
- contentType: "application/json",
- dataType: "json"
- })
- .success(function (response) {
- var normal_count = response['normal_count'];
- var abnormal_count = response['abnormal_count'];
- var all_count = 0 + normal_count + abnormal_count;
- document.getElementById(option).innerHTML = "(<font color='#FF0000'>" + abnormal_count + "</font>/" + all_count + ")";
- errorArray.push(abnormal_count);
- })
- .error(function () {
- alert("錯誤統計未正常獲取");
- })
- .complete(function () {});
- }
- }
- $(document).ready(function() {
- $(".monitor").on('click', function() {
- let site = $(this).parent().parent().parent().attr("monitor");
- location.href = `./${site}/Index.php`;
- });
- })
|