summaryrefslogtreecommitdiffstats
path: root/uiframe-iui/src/main/resources/webroot/vendor/ict/ict-chart/demo/demo-barchart-c3.js
diff options
context:
space:
mode:
Diffstat (limited to 'uiframe-iui/src/main/resources/webroot/vendor/ict/ict-chart/demo/demo-barchart-c3.js')
-rw-r--r--uiframe-iui/src/main/resources/webroot/vendor/ict/ict-chart/demo/demo-barchart-c3.js34
1 files changed, 34 insertions, 0 deletions
diff --git a/uiframe-iui/src/main/resources/webroot/vendor/ict/ict-chart/demo/demo-barchart-c3.js b/uiframe-iui/src/main/resources/webroot/vendor/ict/ict-chart/demo/demo-barchart-c3.js
new file mode 100644
index 00000000..d5680445
--- /dev/null
+++ b/uiframe-iui/src/main/resources/webroot/vendor/ict/ict-chart/demo/demo-barchart-c3.js
@@ -0,0 +1,34 @@
+var AlarmCount_BarChart_C3 = function (placeholdeC3) {
+
+ var callbackList = [];
+ var callback = function (data) {
+ if (data.index !== undefined) {
+ var severity = data.index + 1;
+ window.open(
+ "/web/res/web-framework/default.html?showNav=false&severity="
+ + severity + "#uep-ict-fm-currentAlarm", "fm_portlet_page_title"
+ + severity, "");
+ }
+ }
+ callbackList.push(callback);
+
+ $.ajax({
+ async: false,
+ "dataType": "json",
+ "type": "GET",
+ "url": "/web/rest/web/fm/count/total",
+ "data": null,
+ "Content-Type": "application/json; charset=utf-8",
+ "success": function (json, textStatus, jqXHR) {
+ var alarmcount = json;
+ var inputData = [];
+ for (var i = 0; i < alarmcount.ackedCount.length; i++) {
+ inputData.push(alarmcount.unAckedCount[i] + alarmcount.ackedCount[i]);
+ }
+ ICT_Bar_Chart_C3(placeholdeC3, inputData, callbackList);
+ },
+ "error": function () {
+ }
+ });
+
+}