From 8d3bf36ae59994c1920c8af45c53eda6488e8912 Mon Sep 17 00:00:00 2001 From: wenshao Date: Thu, 1 Aug 2013 09:32:56 +0800 Subject: [PATCH] improve wall.html --- .../support/http/resources/wall.html | 567 ++++++++++-------- 1 file changed, 317 insertions(+), 250 deletions(-) diff --git a/src/main/resources/support/http/resources/wall.html b/src/main/resources/support/http/resources/wall.html index 5ce348b08e..ad7540f972 100644 --- a/src/main/resources/support/http/resources/wall.html +++ b/src/main/resources/support/http/resources/wall.html @@ -1,266 +1,333 @@ - - Druid DataSourceStat - - - - - - - - - - -
-
-
-

- Wall Stat - View JSON API -

- - - - - - + +Druid DataSourceStat + + + + + + + + + + +
+
+
+

+ Wall Stat View JSON API +

+
CheckCount
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ CheckCount
+ HardCheckCount
+ ViolationCount
+ BlackListHitCount
+ BlackListSize
+ WhiteListHitCount
+ WhiteListSize
+ SyntaxErrrorCount
+ +

Table Stat

+ + - - - + + + + + + + + + + + + + + + + +
HardCheckCount TableNameSelectCountSelectCountInsertCountUpdateCountDeleteCountTruncateCountCreateCountAlterCountDropCountReplaceCountDeleteDataCountUpdateDataCountFetchRowCount
+ +

Function Stat

+ + - - - + + + + +
ViolationCount Function NameInvokeCount
+ +

SQL Stat - White List

+ + - - - + + + + + + + +
BlackListHitCount sqlsampleexecuteCountfetchRowCountupdateCount
+ +

SQL Stat - Black List

+ + - - - + + + + + - - - - - - - - - - - - - - - -
BlackListSize sqlsampleexecuteCountfetchRowCountupdateCount
WhiteListHitCount
WhiteListSize
SyntaxErrrorCount
- - - - - - - - - - - - - - - - - - - - -
TableNameSelectCountSelectCountInsertCountUpdateCountDeleteCountTruncateCountCreateCountAlterCountDropCountReplaceCountDeleteDataCountUpdateDataCountFetchRowCount
- - - - - - - - -
Function NameInvokeCount
- - - - - - - - - - - -
sqlsampleexecuteCountfetchRowCountupdateCount
- - - - - - - - - - - -
sqlsampleexecuteCountfetchRowCountupdateCount
-
-
-
- - + if (white.executeCount === undefined) { + html += ""; + } else { + html += "" + white.executeCount + ""; + } + + if (white.fetchRowCount === undefined) { + html += ""; + } else { + html += "" + white.fetchRowCount + ""; + } + + if (white.updateCount === undefined) { + html += ""; + } else { + html += "" + white.updateCount + ""; + } + html += ""; + } + $("#dataTable3 tbody").html(html); + } + + html = ""; + var blackList = data.Content.blackList; + if (blackList) { + for ( var i = 0; i < blackList.length; ++i) { + var black = blackList[i]; + html += ""; + html += "" + black.sql + ""; + + if (black.sample === undefined) { + html += ""; + } else { + html += '' + + black.sample + ""; + } + + if (black.executeCount === undefined) { + html += ""; + } else { + html += "" + black.executeCount + ""; + } + + if (black.fetchRowCount === undefined) { + html += ""; + } else { + html += "" + black.fetchRowCount + ""; + } + + if (black.updateCount === undefined) { + html += ""; + } else { + html += "" + black.updateCount + ""; + } + } + $("#dataTable4 tbody").html(html); + } + } + } + }(); + + $(document).ready(function() { + druid.wall.init(); + }); + +