From 005f0d3aefdde85740dcbdd7d5681ee0e4488146 Mon Sep 17 00:00:00 2001 From: melin Date: Fri, 5 Apr 2013 14:42:40 +0800 Subject: [PATCH] add wall.html page --- .../resources/support/http/resources/api.html | 2 +- .../support/http/resources/js/common.js | 355 +++++++++--------- .../support/http/resources/spring.html | 194 +++++----- .../support/http/resources/wall.html | 149 ++++++++ .../support/http/resources/webapp.html | 314 ++++++++-------- .../support/http/resources/websession.html | 214 +++++------ .../support/http/resources/weburi.html | 196 +++++----- 7 files changed, 787 insertions(+), 637 deletions(-) create mode 100644 src/main/resources/support/http/resources/wall.html diff --git a/src/main/resources/support/http/resources/api.html b/src/main/resources/support/http/resources/api.html index 727d9dbfa1..fbef262b6d 100644 --- a/src/main/resources/support/http/resources/api.html +++ b/src/main/resources/support/http/resources/api.html @@ -9,7 +9,7 @@ diff --git a/src/main/resources/support/http/resources/js/common.js b/src/main/resources/support/http/resources/js/common.js index 6c47acc295..b3d40f7777 100644 --- a/src/main/resources/support/http/resources/js/common.js +++ b/src/main/resources/support/http/resources/js/common.js @@ -1,177 +1,178 @@ -$.namespace("druid.common"); -druid.common = function () { - var statViewOrderBy = ''; - var statViewOrderBy_old = ''; - var statViewOrderType = 'asc'; - - // only one page for now - var sqlViewPage = 1; - var sqlViewPerPageCount = 1000000; - - return { - init : function() { - this.buildFooter(); - }, - - buildHead : function(index) { - var html = ''; - $(document.body).prepend(html); - $(".navbar .nav li").eq(index).addClass("active"); - }, - - buildFooter : function() { - var html = ''; - $(document.body).append(html); - }, - - ajaxRequestForReset : function() { - if(!confirm("Are you sure to reset all stat? It'll clear all stat data !")){ - return; - } - - $.ajax({ - type: 'POST', - url: "reset-all.json", - success: function(data) { - if (data.ResultCode == 1) { - alert("already reset all stat"); - } - }, - dataType: "json" - }); - }, - - getAjaxUrl : function(uri) { - var result = uri; - - if (statViewOrderBy != undefined) - result += 'orderBy=' + statViewOrderBy + '&'; - - if (statViewOrderType != undefined) - result += 'orderType=' + statViewOrderType + '&'; - - if (sqlViewPage != undefined) - result += 'page=' + sqlViewPage + '&'; - - if (sqlViewPerPageCount != undefined) - result += 'perPageCount=' + sqlViewPerPageCount + '&'; - - return result; - }, - - resetSortMark : function() { - var divObj = document.getElementById('th-' + statViewOrderBy); - var old_divObj = document.getElementById('th-' + statViewOrderBy_old); - var replaceToStr = ''; - if (old_divObj) { - var html = old_divObj.innerHTML; - if (statViewOrderBy_old.indexOf('[') > 0) - replaceToStr = '-'; - html = html.replace('▲', replaceToStr); - html = html.replace('▼', replaceToStr); - old_divObj.innerHTML = html - } - if (divObj) { - var html = divObj.innerHTML; - if (statViewOrderBy.indexOf('[') > 0) - html = ''; - - if (statViewOrderType == 'asc') { - html += '▲'; - } else if (statViewOrderType == 'desc') { - html += '▼'; - } - divObj.innerHTML = html; - } - - this.ajaxRequestForBasicInfo(); - }, - - setOrderBy : function(orderBy) { - if (statViewOrderBy != orderBy) { - statViewOrderBy_old = statViewOrderBy; - statViewOrderBy = orderBy; - statViewOrderType = 'desc'; - druid.common.resetSortMark(); - return; - } - - statViewOrderBy_old = statViewOrderBy; - - if (statViewOrderType == 'asc') - statViewOrderType = 'desc' - else - statViewOrderType = 'asc'; - - druid.common.resetSortMark(); - }, - - ajaxuri : "", - handleAjaxResult : null, - ajaxRequestForBasicInfo : function() { - $.ajax({ - type: 'POST', - url: druid.common.getAjaxUrl(druid.common.ajaxuri), - success: function(data) { - druid.common.handleAjaxResult(data); - }, - dataType: "json" - }); - }, - - subSqlString : function(sql, len) { - if (sql == undefined || sql == null) { - return ''; - } - - if (sql.length <= len) - return sql; - return sql.substr(0, len) + '...'; - }, - - stripes : function() { - $("#dataTable tbody tr").each(function () { - $(this).removeClass("striped"); - }); - $("#dataTable tbody tr:even").each(function () { - $(this).addClass("striped"); - }); - }, - - getUrlVar : function(name) { - var vars = {}; - var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) { - vars[key] = value; - }); - return vars[name]; - } - } -}(); - -$(document).ready(function() { - druid.common.init(); -}); +$.namespace("druid.common"); +druid.common = function () { + var statViewOrderBy = ''; + var statViewOrderBy_old = ''; + var statViewOrderType = 'asc'; + + // only one page for now + var sqlViewPage = 1; + var sqlViewPerPageCount = 1000000; + + return { + init : function() { + this.buildFooter(); + }, + + buildHead : function(index) { + var html = ''; + $(document.body).prepend(html); + $(".navbar .nav li").eq(index).addClass("active"); + }, + + buildFooter : function() { + var html = ''; + $(document.body).append(html); + }, + + ajaxRequestForReset : function() { + if(!confirm("Are you sure to reset all stat? It'll clear all stat data !")){ + return; + } + + $.ajax({ + type: 'POST', + url: "reset-all.json", + success: function(data) { + if (data.ResultCode == 1) { + alert("already reset all stat"); + } + }, + dataType: "json" + }); + }, + + getAjaxUrl : function(uri) { + var result = uri; + + if (statViewOrderBy != undefined) + result += 'orderBy=' + statViewOrderBy + '&'; + + if (statViewOrderType != undefined) + result += 'orderType=' + statViewOrderType + '&'; + + if (sqlViewPage != undefined) + result += 'page=' + sqlViewPage + '&'; + + if (sqlViewPerPageCount != undefined) + result += 'perPageCount=' + sqlViewPerPageCount + '&'; + + return result; + }, + + resetSortMark : function() { + var divObj = document.getElementById('th-' + statViewOrderBy); + var old_divObj = document.getElementById('th-' + statViewOrderBy_old); + var replaceToStr = ''; + if (old_divObj) { + var html = old_divObj.innerHTML; + if (statViewOrderBy_old.indexOf('[') > 0) + replaceToStr = '-'; + html = html.replace('▲', replaceToStr); + html = html.replace('▼', replaceToStr); + old_divObj.innerHTML = html + } + if (divObj) { + var html = divObj.innerHTML; + if (statViewOrderBy.indexOf('[') > 0) + html = ''; + + if (statViewOrderType == 'asc') { + html += '▲'; + } else if (statViewOrderType == 'desc') { + html += '▼'; + } + divObj.innerHTML = html; + } + + this.ajaxRequestForBasicInfo(); + }, + + setOrderBy : function(orderBy) { + if (statViewOrderBy != orderBy) { + statViewOrderBy_old = statViewOrderBy; + statViewOrderBy = orderBy; + statViewOrderType = 'desc'; + druid.common.resetSortMark(); + return; + } + + statViewOrderBy_old = statViewOrderBy; + + if (statViewOrderType == 'asc') + statViewOrderType = 'desc' + else + statViewOrderType = 'asc'; + + druid.common.resetSortMark(); + }, + + ajaxuri : "", + handleAjaxResult : null, + ajaxRequestForBasicInfo : function() { + $.ajax({ + type: 'POST', + url: druid.common.getAjaxUrl(druid.common.ajaxuri), + success: function(data) { + druid.common.handleAjaxResult(data); + }, + dataType: "json" + }); + }, + + subSqlString : function(sql, len) { + if (sql == undefined || sql == null) { + return ''; + } + + if (sql.length <= len) + return sql; + return sql.substr(0, len) + '...'; + }, + + stripes : function() { + $("#dataTable tbody tr").each(function () { + $(this).removeClass("striped"); + }); + $("#dataTable tbody tr:even").each(function () { + $(this).addClass("striped"); + }); + }, + + getUrlVar : function(name) { + var vars = {}; + var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) { + vars[key] = value; + }); + return vars[name]; + } + } +}(); + +$(document).ready(function() { + druid.common.init(); +}); diff --git a/src/main/resources/support/http/resources/spring.html b/src/main/resources/support/http/resources/spring.html index 00b6250563..ba4dc8076c 100644 --- a/src/main/resources/support/http/resources/spring.html +++ b/src/main/resources/support/http/resources/spring.html @@ -1,97 +1,97 @@ - - - - Druid Spring Stat - - - - - - - -
- -
- - - + + + + Druid Spring Stat + + + + + + + +
+ +
+ + + diff --git a/src/main/resources/support/http/resources/wall.html b/src/main/resources/support/http/resources/wall.html new file mode 100644 index 0000000000..a5f0ab0761 --- /dev/null +++ b/src/main/resources/support/http/resources/wall.html @@ -0,0 +1,149 @@ + + + + Druid DataSourceStat + + + + + + + + +
+
+
+

+ Wall Stat + View JSON API +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CheckCount
ViolationCount
BlackListHitCount
BlackListSize
WhiteListHitCount
WhiteListSize
SyntaxErrrorCount
+ + + + + + + + + + + + + + + + +
Table NameSelectCountSelectIntoCountInsertCountUpdateCountDeleteCountTruncateCountCreateCountAlterCountDropCount
+ + + + + + + + +
Function NameInvokeCount
+
+
+
+ + + diff --git a/src/main/resources/support/http/resources/webapp.html b/src/main/resources/support/http/resources/webapp.html index 9037e290cc..65054db973 100644 --- a/src/main/resources/support/http/resources/webapp.html +++ b/src/main/resources/support/http/resources/webapp.html @@ -1,157 +1,157 @@ - - - - Druid WebApp Stat - - - - - - - - -
-
-
-

- WebAppStat List - View JSON API -

-
-
-
- - - + + + + Druid WebApp Stat + + + + + + + + +
+
+
+

+ WebAppStat List + View JSON API +

+
+
+
+ + + diff --git a/src/main/resources/support/http/resources/websession.html b/src/main/resources/support/http/resources/websession.html index 6e1845a049..317eafb1ea 100644 --- a/src/main/resources/support/http/resources/websession.html +++ b/src/main/resources/support/http/resources/websession.html @@ -1,107 +1,107 @@ - - - - Druid Web Session Stat - - - - - - - -
- -
- - - + + + + Druid Web Session Stat + + + + + + + +
+ +
+ + + diff --git a/src/main/resources/support/http/resources/weburi.html b/src/main/resources/support/http/resources/weburi.html index 9295409150..7bfe9db263 100644 --- a/src/main/resources/support/http/resources/weburi.html +++ b/src/main/resources/support/http/resources/weburi.html @@ -1,98 +1,98 @@ - - - - Druid Web URI Stat - - - - - - - -
- -
- - - + + + + Druid Web URI Stat + + + + + + + +
+ +
+ + +