aboutsummaryrefslogtreecommitdiffstats
path: root/uiframe-iui/src/main/resources/webroot/vendor/ict/ict-chart
diff options
context:
space:
mode:
Diffstat (limited to 'uiframe-iui/src/main/resources/webroot/vendor/ict/ict-chart')
-rw-r--r--uiframe-iui/src/main/resources/webroot/vendor/ict/ict-chart/demo/demo-barchart-c3.js34
-rw-r--r--uiframe-iui/src/main/resources/webroot/vendor/ict/ict-chart/demo/demo-linechart-c3.js40
-rw-r--r--uiframe-iui/src/main/resources/webroot/vendor/ict/ict-chart/ict-barchart-c3.js68
-rw-r--r--uiframe-iui/src/main/resources/webroot/vendor/ict/ict-chart/ict-linechart-c3.js98
4 files changed, 0 insertions, 240 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
deleted file mode 100644
index d5680445..00000000
--- a/uiframe-iui/src/main/resources/webroot/vendor/ict/ict-chart/demo/demo-barchart-c3.js
+++ /dev/null
@@ -1,34 +0,0 @@
-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 () {
- }
- });
-
-}
diff --git a/uiframe-iui/src/main/resources/webroot/vendor/ict/ict-chart/demo/demo-linechart-c3.js b/uiframe-iui/src/main/resources/webroot/vendor/ict/ict-chart/demo/demo-linechart-c3.js
deleted file mode 100644
index f8aafa68..00000000
--- a/uiframe-iui/src/main/resources/webroot/vendor/ict/ict-chart/demo/demo-linechart-c3.js
+++ /dev/null
@@ -1,40 +0,0 @@
-var ICT_CPU_UsageLine_C3 = function (placeholderC3) {
-
- //取得数据系列的名称
- var seriesNames = [];
- $.ajax({
- async: false,
- dataType: "json",
- "type": "GET",
- url: "/web/rest/web/dm/dashboard/selfcpu/queryValues",
- "data": JSON.stringify(data),
- contentType: "application/json; charset=utf-8",
- "success": function (data) {
- seriesNames.push(data.deviceLabels[0]);
- }
- });
-
- var colors = ["#fc4400", '#5ab1ef', '#b6a2de'];
- var c3Line = ICT_Line_C3(placeholderC3, seriesNames, colors);
-
- var data = {};
-
- window.setInterval(function () {
-
- var newSeriesData = [];
-
- $.ajax({
- dataType: "json",
- "type": "GET",
- url: "/web/rest/web/dm/dashboard/selfcpu/queryValues",
- "data": JSON.stringify(data),
- contentType: "application/json; charset=utf-8",
- "success": function (data) {
- newSeriesData.push({name: data.deviceLabels[0], value: data.cpuUseRatios[0]});
- c3Line.setC3Data(newSeriesData);
- }
- });
-
- }, 3 * 1000);
-
-} \ No newline at end of file
diff --git a/uiframe-iui/src/main/resources/webroot/vendor/ict/ict-chart/ict-barchart-c3.js b/uiframe-iui/src/main/resources/webroot/vendor/ict/ict-chart/ict-barchart-c3.js
deleted file mode 100644
index 20f87a69..00000000
--- a/uiframe-iui/src/main/resources/webroot/vendor/ict/ict-chart/ict-barchart-c3.js
+++ /dev/null
@@ -1,68 +0,0 @@
-var ICT_Bar_Chart_C3 = function (placeholdeC3, inputData, callbackList) {
-
- var language;
- //取得国际化信息
- $.ajax({
- dataType: "json",
- url: "/web/newict/framework/thirdparty/flotchart/i18n/ict-barchart-flot-" + getLanguage() + ".json",
- async: false,
- contentType: "application/json; charset=utf-8",
- "success": function (data) {
- language = data.language;
- },
- "error": function (xhr, info) {
- alert("Communication Error! Error reason:" + info);
- }
- });
-
- var config = {};
- config.bindto = '#' + placeholdeC3;
- config.data = {};
- config.data.json = {};
- config.data.json["告警"] = inputData;
- config.axis = {};
- config.axis.x = {
- type: 'category',
- categories: [language[0].value, language[1].value, language[2].value, language[3].value]
- };
- /* config.axis.y.tick = {
- format: function(data){
- return data + "%";
- }
- }; */
- config.axis.y = {};
- config.axis.y.tick = {
- values: [0, 20, 40, 60]
- , outer: false
- };
- config.data.types = {};
- config.data.types["告警"] = "bar";
- config.data.color = function (inColor, data) {
- if (data.index !== undefined) {
- return language[data.index].color;
- }
- return inColor;
- },
- config.data.onclick = function (data, element) {
- $.each(callbackList, function (index, callback) {
- callback(data);
- });
- },
- config.legend = {
- show: false
- };
- config.bar = {
- width: {
- ratio: 0.3
- }
- };
- config.grid = {
- y: {
- show: true
- }
- };
-
- c3.generate(config);
-
-}
-
diff --git a/uiframe-iui/src/main/resources/webroot/vendor/ict/ict-chart/ict-linechart-c3.js b/uiframe-iui/src/main/resources/webroot/vendor/ict/ict-chart/ict-linechart-c3.js
deleted file mode 100644
index 23149f35..00000000
--- a/uiframe-iui/src/main/resources/webroot/vendor/ict/ict-chart/ict-linechart-c3.js
+++ /dev/null
@@ -1,98 +0,0 @@
-var ICT_Line_C3 = function (placeholderC3, seriesNames, colors) {
-
- var xkeys = {"x": "x", "value": []};
-
- //��ʼ�����
- var config = {};
- config.bindto = '#' + placeholderC3;
- config.data = {};
- config.data.keys = xkeys;
- config.data.json = [];
- config.axis = {};
- config.axis.x = {"type": "timeseries", "tick": {"format": "%H:%M:%S'", count: 5}};
- config.axis.y = {
- padding: {
- left: 0,
- right: 0,
- },
- //,inner: true
- max: 100,
- min: 0
- };
- config.axis.y.tick = {
- format: function (data) {
- return (data + "").substring(0, 4) + "%";
- }
- , values: [0, 20, 40, 60, 80, 100]
- //,centered: true
- //,fit: true
- , outer: false
- };
- config.data.colors = {};
- config.data.types = {};
- if (!colors) {
- colors = ['#ffb980', '#5ab1ef', '#b6a2de'];
- }
- if (seriesNames) {
- for (var i = 0; i < seriesNames.length; i++) {
- config.data.colors[seriesNames[i]] = colors[i];
- config.data.types[seriesNames[i]] = "spline";
- }
- }
-
- /* config.data.color = function(inColor, data) {
- if(data.index !== undefined) {
- return colors[data.index];
- }
- return inColor;
- }; */
- config.grid = {
- y: {
- show: true
- }
- }
-
- var c3Chart = c3.generate(config);
-
- var dataService = new function () {
- var data = [];
- var numDataPoints = 60;
-
- this.loadData = function (callback, newSeriesData) {
- if (data.length > numDataPoints) {
- data.shift();
- }
- var newValue = {"x": new Date()};
- for (var i = 0; i < newSeriesData.length; i++) {
- newValue[newSeriesData[i].name] = newSeriesData[i].value;
- }
- //data.push({"x":new Date(),"data1":newSeriesData.data1,"data2":newSeriesData.data2});
- data.push(newValue);
- callback(data);
- };
- //return this;
- }
-
- return {
-
- setC3Data: function (newSeriesData) {
- var values = [];
- for (var i = 0; i < newSeriesData.length; i++) {
- values.push(newSeriesData[i].name);
- }
- xkeys.value = values;
- //var dataServiceFunc = new dataService();
- dataService.loadData(function (newData) {
- var data = {};
- data.keys = xkeys;
- data.json = newData;
- //data.done = DashboardICT.removeYaxisScale;
- c3Chart.load(data);
- //c3Chart.resize();
- }, newSeriesData);
-
- }
-
- };
-
-}