diff --git a/dist/CHANGELOG.md b/dist/CHANGELOG.md index 4ac738e..4f5c627 100644 --- a/dist/CHANGELOG.md +++ b/dist/CHANGELOG.md @@ -1,26 +1,26 @@ -# ChangeLog - -| Version | Changes | -| -------------------|-----------| -| 1.1.0 (unreleased) | Colnames in the link | -| 1.0.0 | Typescript & TSLint implementation | -| | Jest testcases implemented | -| | SASS implementation for stylesheets | -| | Display options improved | -| | Display values can have part of series name | -| 0.5.1 | Images as values based on thresholds | -| 0.5.0 | Background Color & Transform value overrides | -| | Bug fixes #43 #44 #45 | -| 0.4.7 | Links in cells i.e., Clickable cells | -| 0.4.6 | Font Awesome icons as values base on thresholds | -| 0.4.x | Time based thresholds | -| | Filter option to hide rows based on value | -| | Option to hide the first column and table header | -| 0.3.x | Options to name the pattern, disable the pattern | -| | Reverse the background colors and transform values in pattern | -| | Removed output data from panel model | -| | Bug fixes | -| 0.2.x | Build script changed from babel to typescript | -| | Assign series alias as row to the default pattern | -| | Bug fixes | -| 0.1.0 | First working Version | +# ChangeLog + +| Version | Changes | +| -------------------|-----------| +| 1.1.0 (unreleased) | Colnames in the link | +| 1.0.0 | Typescript & TSLint implementation | +| | Jest testcases implemented | +| | SASS implementation for stylesheets | +| | Display options improved | +| | Display values can have part of series name | +| 0.5.1 | Images as values based on thresholds | +| 0.5.0 | Background Color & Transform value overrides | +| | Bug fixes #43 #44 #45 | +| 0.4.7 | Links in cells i.e., Clickable cells | +| 0.4.6 | Font Awesome icons as values base on thresholds | +| 0.4.x | Time based thresholds | +| | Filter option to hide rows based on value | +| | Option to hide the first column and table header | +| 0.3.x | Options to name the pattern, disable the pattern | +| | Reverse the background colors and transform values in pattern | +| | Removed output data from panel model | +| | Bug fixes | +| 0.2.x | Build script changed from babel to typescript | +| | Assign series alias as row to the default pattern | +| | Bug fixes | +| 0.1.0 | First working Version | diff --git a/dist/README.md b/dist/README.md index b1a1c9a..fd7ad2b 100644 --- a/dist/README.md +++ b/dist/README.md @@ -3,7 +3,7 @@ [![CircleCI](https://circleci.com/gh/yesoreyeram/yesoreyeram-boomtable-panel.svg?style=svg)](https://circleci.com/gh/yesoreyeram/yesoreyeram-boomtable-panel) -Boom Table Panel for Grafana. Table/MultiStat plugin with multiple columns for Graphite, InfluDB, Prometheus, Azure Monitor. +Boom Table Panel for Grafana. Table/MultiStat plugin with multiple columns for Graphite, InfluxDB, Prometheus, Azure Monitor. ![Boom Table - Sample Panel](https://raw.githubusercontent.com/yesoreyeram/yesoreyeram-boomtable-panel/master/dist/src/img/panel.png) diff --git a/dist/app/app.js b/dist/app/app.js index 0c946fb..3ffb8da 100644 --- a/dist/app/app.js +++ b/dist/app/app.js @@ -1,90 +1,90 @@ -System.register(["lodash", "./boom/index"], function (exports_1, context_1) { - "use strict"; - var lodash_1, index_1, defaultPattern, seriesToTable; - var __moduleName = context_1 && context_1.id; - return { - setters: [ - function (lodash_1_1) { - lodash_1 = lodash_1_1; - }, - function (index_1_1) { - index_1 = index_1_1; - } - ], - execute: function () { - defaultPattern = new index_1.BoomPattern({ - bgColors: "green|orange|red", - bgColors_overrides: "0->green|2->red|1->yellow", - clickable_cells_link: "", - col_name: "Value", - decimals: 2, - delimiter: ".", - format: "none", - name: "Default Pattern", - null_color: "darkred", - null_textcolor: "white", - null_value: "No data", - pattern: "*", - row_name: "_series_", - textColor: "red|orange|green", - textColors_overrides: "0->red|2->green|1->yellow", - thresholds: "70,90", - time_based_thresholds: [], - transform_values: "_value_|_value_|_value_", - transform_values_overrides: "0->down|1->up", - valueName: "avg" - }); - exports_1("defaultPattern", defaultPattern); - seriesToTable = function (inputdata, options) { - var rows_found = lodash_1.default.uniq(lodash_1.default.map(inputdata, function (d) { return d.row_name; })); - var cols_found = lodash_1.default.uniq(lodash_1.default.map(inputdata, function (d) { return d.col_name; })); - var output = []; - lodash_1.default.each(rows_found, function (row_name) { - var cols = []; - lodash_1.default.each(cols_found, function (col_name) { - var matched_items = lodash_1.default.filter(inputdata, function (o) { - return o.row_name === row_name && o.col_name === col_name; - }); - if (!matched_items || matched_items.length === 0) { - cols.push({ - "col_name": col_name, - "color_bg": options.non_matching_cells_color_bg, - "color_text": options.non_matching_cells_color_text, - "display_value": index_1.replaceTokens(options.non_matching_cells_text), - "hidden": false, - "link": "-", - "row_name": row_name, - "tooltip": "-", - "value": NaN - }); - } - else if (matched_items && matched_items.length === 1) { - cols.push(matched_items[0]); - } - else if (matched_items && matched_items.length > 1) { - cols.push({ - "col_name": col_name, - "color_bg": "darkred", - "color_text": "white", - "display_value": "Duplicate matches", - "hidden": false, - "link": "-", - "row_name": row_name, - "tooltip": "-", - "value": NaN - }); - } - }); - output.push(cols); - }); - return { - cols_found: cols_found, - output: output, - rows_found: rows_found, - }; - }; - exports_1("seriesToTable", seriesToTable); - } - }; -}); +System.register(["lodash", "./boom/index"], function (exports_1, context_1) { + "use strict"; + var lodash_1, index_1, defaultPattern, seriesToTable; + var __moduleName = context_1 && context_1.id; + return { + setters: [ + function (lodash_1_1) { + lodash_1 = lodash_1_1; + }, + function (index_1_1) { + index_1 = index_1_1; + } + ], + execute: function () { + defaultPattern = new index_1.BoomPattern({ + bgColors: "green|orange|red", + bgColors_overrides: "0->green|2->red|1->yellow", + clickable_cells_link: "", + col_name: "Value", + decimals: 2, + delimiter: ".", + format: "none", + name: "Default Pattern", + null_color: "darkred", + null_textcolor: "white", + null_value: "No data", + pattern: "*", + row_name: "_series_", + textColor: "red|orange|green", + textColors_overrides: "0->red|2->green|1->yellow", + thresholds: "70,90", + time_based_thresholds: [], + transform_values: "_value_|_value_|_value_", + transform_values_overrides: "0->down|1->up", + valueName: "avg" + }); + exports_1("defaultPattern", defaultPattern); + seriesToTable = function (inputdata, options) { + var rows_found = lodash_1.default.uniq(lodash_1.default.map(inputdata, function (d) { return d.row_name; })); + var cols_found = lodash_1.default.uniq(lodash_1.default.map(inputdata, function (d) { return d.col_name; })); + var output = []; + lodash_1.default.each(rows_found, function (row_name) { + var cols = []; + lodash_1.default.each(cols_found, function (col_name) { + var matched_items = lodash_1.default.filter(inputdata, function (o) { + return o.row_name === row_name && o.col_name === col_name; + }); + if (!matched_items || matched_items.length === 0) { + cols.push({ + "col_name": col_name, + "color_bg": options.non_matching_cells_color_bg, + "color_text": options.non_matching_cells_color_text, + "display_value": index_1.replaceTokens(options.non_matching_cells_text), + "hidden": false, + "link": "-", + "row_name": row_name, + "tooltip": "-", + "value": NaN + }); + } + else if (matched_items && matched_items.length === 1) { + cols.push(matched_items[0]); + } + else if (matched_items && matched_items.length > 1) { + cols.push({ + "col_name": col_name, + "color_bg": "darkred", + "color_text": "white", + "display_value": "Duplicate matches", + "hidden": false, + "link": "-", + "row_name": row_name, + "tooltip": "-", + "value": NaN + }); + } + }); + output.push(cols); + }); + return { + cols_found: cols_found, + output: output, + rows_found: rows_found, + }; + }; + exports_1("seriesToTable", seriesToTable); + } + }; +}); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2FwcC9hcHAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7WUFJTSxjQUFjLEdBQUcsSUFBSSxtQkFBVyxDQUFDO2dCQUNuQyxRQUFRLEVBQUUsa0JBQWtCO2dCQUM1QixrQkFBa0IsRUFBRSwyQkFBMkI7Z0JBQy9DLG9CQUFvQixFQUFFLEVBQUU7Z0JBQ3hCLFFBQVEsRUFBRSxPQUFPO2dCQUNqQixRQUFRLEVBQUUsQ0FBQztnQkFDWCxTQUFTLEVBQUUsR0FBRztnQkFDZCxNQUFNLEVBQUUsTUFBTTtnQkFDZCxJQUFJLEVBQUUsaUJBQWlCO2dCQUN2QixVQUFVLEVBQUUsU0FBUztnQkFDckIsY0FBYyxFQUFFLE9BQU87Z0JBQ3ZCLFVBQVUsRUFBRSxTQUFTO2dCQUNyQixPQUFPLEVBQUUsR0FBRztnQkFDWixRQUFRLEVBQ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yA9IF8uZmlsdGVyKGlucHV0ZGF0YSwgbyA9PiB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gby5yb3dfbmFtZSA9PT0gcm93X25hbWUgJiYgby5jb2xfbmFtZSA9PT0gY29sX25hbWU7XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICBpZiAoIW1hdGNoZWRfaXRlbXMgfHwgbWF0Y2hlZF9pdGVtcy5sZW5ndGggPT09IDApIHtcclxuICAgICAgICAgICAgICAgIGNvbHMucHVzaCh7XHJcbiAgICAgICAgICAgICAgICAgICAgXCJjb2xfbmFtZVwiOiBjb2xfbmFtZSxcclxuICAgICAgICAgICAgICAgICAgICBcImNvbG9yX2JnXCI6IG9wdGlvbnMubm9uX21hdGNoaW5nX2NlbGxzX2NvbG9yX2JnLFxyXG4gICAgICAgICAgICAgICAgICAgIFwiY29sb3JfdGV4dFwiOiBvcHRpb25zLm5vbl9tYXRjaGluZ19jZWxsc19jb2xvcl90ZXh0LFxyXG4gICAgICAgICAgICAgICAgICAgIFwiZGlzcGxheV92YWx1ZVwiOiByZXBsYWNlVG9rZW5zKG9wdGlvbnMubm9uX21hdGNoaW5nX2NlbGxzX3RleHQpLFxyXG4gICAgICAgICAgICAgICAgICAgIFwiaGlkZGVuXCI6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgICAgIFwibGlua1wiOiBcIi1cIixcclxuICAgICAgICAgICAgICAgICAgICBcInJvd19uYW1lXCI6IHJvd19uYW1lLFxyXG4gICAgICAgICAgICAgICAgICAgIFwidG9vbHRpcFwiOiBcIi1cIixcclxuICAgICAgICAgICAgICAgICAgICBcInZhbHVlXCI6IE5hTlxyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobWF0Y2hlZF9pdGVtcyAmJiBtYXRjaGVkX2l0ZW1zLmxlbmd0aCA9PT0gMSkge1xyXG4gICAgICAgICAgICAgICAgY29scy5wdXNoKG1hdGNoZWRfaXRlbXNbMF0pO1xyXG4gICAgICAgICAgICB9IGVsc2UgaWYgKG1hdGNoZWRfaXRlbXMgJiYgbWF0Y2hlZF9pdGVtcy5sZW5ndGggPiAxKSB7XHJcbiAgICAgICAgICAgICAgICBjb2xzLnB1c2goe1xyXG4gICAgICAgICAgICAgICAgICAgIFwiY29sX25hbWVcIjogY29sX25hbWUsXHJcbiAgICAgICAgICAgICAgICAgICAgXCJjb2xvcl9iZ1wiOiBcImRhcmtyZWRcIixcclxuICAgICAgICAgICAgICAgICAgICBcImNvbG9yX3RleHRcIjogXCJ3aGl0ZVwiLFxyXG4gICAgICAgICAgICAgICAgICAgIFwiZGlzcGxheV92YWx1ZVwiOiBcIkR1cGxpY2F0ZSBtYXRjaGVzXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgXCJoaWRkZW5cIjogZmFsc2UsXHJcbiAgICAgICAgICAgICAgICAgICAgXCJsaW5rXCI6IFwiLVwiLFxyXG4gICAgICAgICAgICAgICAgICAgIFwicm93X25hbWVcIjogcm93X25hbWUsXHJcbiAgICAgICAgICAgICAgICAgICAgXCJ0b29sdGlwXCI6IFwiLVwiLFxyXG4gICAgICAgICAgICAgICAgICAgIFwidmFsdWVcIjogTmFOXHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgICAgIG91dHB1dC5wdXNoKGNvbHMpO1xyXG4gICAgfSk7XHJcbiAgICByZXR1cm4ge1xyXG4gICAgICAgIGNvbHNfZm91bmQsXHJcbiAgICAgICAgb3V0cHV0LFxyXG4gICAgICAgIHJvd3NfZm91bmQsXHJcbiAgICB9O1xyXG59O1xyXG5cclxuZXhwb3J0IHtcclxuICAgIGRlZmF1bHRQYXR0ZXJuLFxyXG4gICAgc2VyaWVzVG9UYWJsZVxyXG59O1xyXG4iXX0= \ No newline at end of file diff --git a/dist/app/boom/Boom.interface.js b/dist/app/boom/Boom.interface.js index 9c63e17..85eb880 100644 --- a/dist/app/boom/Boom.interface.js +++ b/dist/app/boom/Boom.interface.js @@ -1,10 +1,10 @@ -System.register([], function (exports_1, context_1) { - "use strict"; - var __moduleName = context_1 && context_1.id; - return { - setters: [], - execute: function () { - } - }; -}); +System.register([], function (exports_1, context_1) { + "use strict"; + var __moduleName = context_1 && context_1.id; + return { + setters: [], + execute: function () { + } + }; +}); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQm9vbS5pbnRlcmZhY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYXBwL2Jvb20vQm9vbS5pbnRlcmZhY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImludGVyZmFjZSBJQm9vbVBhdHRlcm4ge1xyXG4gICAgYmdDb2xvcnM6IHN0cmluZztcclxuICAgIGJnQ29sb3JzX292ZXJyaWRlczogc3RyaW5nO1xyXG4gICAgY2xpY2thYmxlX2NlbGxzX2xpbms6IHN0cmluZztcclxuICAgIGNvbF9uYW1lOiBzdHJpbmc7XHJcbiAgICBkZWNpbWFsczogTnVtYmVyO1xyXG4gICAgZGVsaW1pdGVyOiBzdHJpbmc7XHJcbiAgICBlbmFibGVfYmdDb2xvcjogQm9vbGVhbjtcclxuICAgIGVuYWJsZV9iZ0NvbG9yX292ZXJyaWRlczogQm9vbGVhbjtcclxuICAgIGVuYWJsZV9jbGlja2FibGVfY2VsbHM6IEJvb2xlYW47XHJcbiAgICBlbmFibGVfdGV4dENvbG9yOiBCb29sZWFuO1xyXG4gICAgZW5hYmxlX3RleHRDb2xvcl9vdmVycmlkZXM6IEJvb2xlYW47XHJcbiAgICBlbmFibGVfdGltZV9iYXNlZF90aHJlc2hvbGRzOiBCb29sZWFuO1xyXG4gICAgZW5hYmxlX3RyYW5zZm9ybTogQm9vbGVhbjtcclxuICAgIGVuYWJsZV90cmFuc2Zvcm1fb3ZlcnJpZGVzOiBCb29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yXG59XHJcbmludGVyZmFjZSBJQm9vbVRhYmxlIHtcclxuICAgIHJvd3NfZm91bmQ6IHN0cmluZ1tdO1xyXG4gICAgY29sc19mb3VuZDogc3RyaW5nW107XHJcbiAgICBvdXRwdXQ6IElCb29tQ2VsbERldGFpbHNbXVtdO1xyXG59XHJcbmludGVyZmFjZSBJQm9vbUhUTUwge1xyXG4gICAgYm9keTogc3RyaW5nO1xyXG59XHJcbmV4cG9ydCB7XHJcbiAgICBJQm9vbVRhYmxlVHJhbnNmb3JtYXRpb25PcHRpb25zLFxyXG4gICAgSUJvb21SZW5kZXJpbmdPcHRpb25zLFxyXG4gICAgSUJvb21QYXR0ZXJuLFxyXG4gICAgSUJvb21TZXJpZXMsXHJcbiAgICBJQm9vbVRpbWVCYXNlZFRocmVzaG9sZCxcclxuICAgIElCb29tSFRNTCxcclxuICAgIElCb29tVGFibGUsXHJcbiAgICBJQm9vbUNlbGxEZXRhaWxzXHJcbn07XHJcbiJdfQ== \ No newline at end of file diff --git a/dist/app/boom/BoomOutput.js b/dist/app/boom/BoomOutput.js index b8c3a2a..4fb23c7 100644 --- a/dist/app/boom/BoomOutput.js +++ b/dist/app/boom/BoomOutput.js @@ -1,73 +1,73 @@ -System.register(["lodash"], function (exports_1, context_1) { - "use strict"; - var lodash_1, BoomOutput; - var __moduleName = context_1 && context_1.id; - return { - setters: [ - function (lodash_1_1) { - lodash_1 = lodash_1_1; - } - ], - execute: function () { - BoomOutput = (function () { - function BoomOutput(options) { - this.default_title_for_rows = options.default_title_for_rows || ""; - this.hide_first_column = options.hide_first_column; - this.hide_headers = options.hide_headers; - this.text_alignment_firstcolumn = options.text_alignment_firstcolumn || ""; - this.text_alignment_values = options.text_alignment_values || ""; - } - return BoomOutput; - }()); - exports_1("BoomOutput", BoomOutput); - BoomOutput.prototype.getDataAsHTML = function (data, sorting_props) { - var _this = this; - var output = { - body: "" - }; - if (sorting_props && sorting_props.col_index !== undefined && sorting_props.col_index > -1) { - var sortFunction_1 = function (a, b, sortMethod) { - if (sortMethod === "asc") { - return a[sorting_props.col_index].value - b[sorting_props.col_index].value; - } - else { - return b[sorting_props.col_index].value - a[sorting_props.col_index].value; - } - }; - data.output = data.output - .filter(function (a) { return !isNaN(a[sorting_props.col_index].value); }) - .concat(data.output.filter(function (a) { return isNaN(a[sorting_props.col_index].value); })) - .sort(function (a, b) { return sortFunction_1(a, b, sorting_props.direction); }); - } - lodash_1.default.each(data.output, function (o) { - if (o.map(function (item) { return item.hidden.toString(); }).indexOf("false") > -1) { - output.body += ""; - if (_this.hide_first_column !== true) { - output.body += "\n \n " + lodash_1.default.first(o.map(function (item) { return item.row_name; })) + "\n "; - } - lodash_1.default.each(o, function (item) { - var item_style = "padding:4px;background-color:" + item.color_bg + ";color:" + item.color_text + ";text-align:" + _this.text_alignment_values; - var item_display = item.link === "#" - ? item.display_value - : "" + item.display_value + ""; - var tooltip = !item.tooltip || item.tooltip === "-" - ? undefined - : " data-toggle=\"tooltip\" data-html=\"true\" data-placement=\"auto\" title=\"" + item.tooltip + "\" "; - output.body += "\n \n " + (tooltip ? "" : "") + "\n " + item_display + "\n " + (tooltip ? "" : "") + "\n \n "; - }); - output.body += ""; - } - }); - return output; - }; - BoomOutput.prototype.getDataAsDebugHTML = function (data) { - var debugdata = ""; - debugdata = lodash_1.default.map(data, function (d) { - return "\n \n " + d.seriesName + "\n " + (d.pattern.name || d.pattern.pattern || "Default") + "\n " + d.display_value + "\n " + d.row_name + "\n " + d.col_name + "\n " + d.thresholds.join(",") + "\n " + d.color_bg + "\n " + d.color_text + "\n \n "; - }).join(""); - return debugdata; - }; - } - }; -}); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQm9vbU91dHB1dC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9hcHAvYm9vbS9Cb29tT3V0cHV0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Oz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RhcmdldD1cIl9ibGFua1wiIHN0eWxlPVwiY29sb3I6JHtcclxuICAgICAgICAgICAgICAgIGl0ZW0uY29sb3JfdGV4dFxyXG4gICAgICAgICAgICAgIH1cIj4ke2l0ZW0uZGlzcGxheV92YWx1ZX08L2E+YDtcclxuICAgICAgICBsZXQgdG9vbHRpcCA9XHJcbiAgICAgICAgICAhaXRlbS50b29sdGlwIHx8IGl0ZW0udG9vbHRpcCA9PT0gXCItXCJcclxuICAgICAgICAgICAgPyB1bmRlZmluZWRcclxuICAgICAgICAgICAgOiBgIGRhdGEtdG9nZ2xlPVwidG9vbHRpcFwiIGRhdGEtaHRtbD1cInRydWVcIiBkYXRhLXBsYWNlbWVudD1cImF1dG9cIiB0aXRsZT1cIiR7XHJcbiAgICAgICAgICAgICAgICBpdGVtLnRvb2x0aXBcclxuICAgICAgICAgICAgICB9XCIgYDtcclxuICAgICAgICBvdXRwdXQuYm9keSArPSBgXHJcbiAgICAgICAgICAgICAgICAgICAgPHRkIHN0eWxlPVwiJHtpdGVtX3N0eWxlfVwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAke3Rvb2x0aXAgPyBgPHNwYW4gJHt0b29sdGlwfT5gIDogXCJcIn1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICR7aXRlbV9kaXNwbGF5fVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAke3Rvb2x0aXAgPyBgPC9zcGFuPmAgOiBcIlwifVxyXG4gICAgICAgICAgICAgICAgICAgIDwvdGQ+XHJcbiAgICAgICAgICAgICAgICBgO1xyXG4gICAgICB9KTtcclxuICAgICAgb3V0cHV0LmJvZHkgKz0gXCI8L3RyPlwiO1xyXG4gICAgfVxyXG4gIH0pO1xyXG4gIHJldHVybiBvdXRwdXQ7XHJcbn07XHJcbkJvb21PdXRwdXQucHJvdG90eXBlLmdldERhdGFBc0RlYnVnSFRNTCA9IGZ1bmN0aW9uKGRhdGE6IElCb29tU2VyaWVzW10gKTogc3RyaW5nIHtc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ICAgICAgICA8dGQgc3R5bGU9XCJwYWRkaW5nOjRweDt0ZXh0LWFsaWduOmxlZnQ7d2lkdGg6MTAlOyB0aXRsZT1cIlRocmVzaG9sZHNcIiA+JHtkLnRocmVzaG9sZHMuam9pbihcIixcIil9PC90ZD5cclxuICAgICAgICAgICAgPHRkIHN0eWxlPVwicGFkZGluZzo0cHg7dGV4dC1hbGlnbjpsZWZ0O3dpZHRoOjEwJTsgdGl0bGU9XCJCRyBDb2xvclwiID4ke2QuY29sb3JfYmd9PC90ZD5cclxuICAgICAgICAgICAgPHRkIHN0eWxlPVwicGFkZGluZzo0cHg7dGV4dC1hbGlnbjpsZWZ0O3dpZHRoOjEwJTsgdGl0bGU9XCJUZXh0IENvbG9yXCIgPiR7ZC5jb2xvcl90ZXh0fTwvdGQ+XHJcbiAgICAgICAgPC90cj5cclxuICAgICAgICBgO1xyXG4gICAgfSkuam9pbihgYCk7XHJcbiAgICByZXR1cm4gZGVidWdkYXRhO1xyXG59O1xyXG4iXX0= \ No newline at end of file +System.register(["lodash"], function (exports_1, context_1) { + "use strict"; + var lodash_1, BoomOutput; + var __moduleName = context_1 && context_1.id; + return { + setters: [ + function (lodash_1_1) { + lodash_1 = lodash_1_1; + } + ], + execute: function () { + BoomOutput = (function () { + function BoomOutput(options) { + this.default_title_for_rows = options.default_title_for_rows || ""; + this.hide_first_column = options.hide_first_column; + this.hide_headers = options.hide_headers; + this.text_alignment_firstcolumn = options.text_alignment_firstcolumn || ""; + this.text_alignment_values = options.text_alignment_values || ""; + } + return BoomOutput; + }()); + exports_1("BoomOutput", BoomOutput); + BoomOutput.prototype.getDataAsHTML = function (data, sorting_props) { + var _this = this; + var output = { + body: "" + }; + if (sorting_props && sorting_props.col_index !== undefined && sorting_props.col_index > -1) { + var sortFunction_1 = function (a, b, sortMethod) { + if (sortMethod === "asc") { + return a[sorting_props.col_index].value - b[sorting_props.col_index].value; + } + else { + return b[sorting_props.col_index].value - a[sorting_props.col_index].value; + } + }; + data.output = data.output + .filter(function (a) { return !isNaN(a[sorting_props.col_index].value); }) + .concat(data.output.filter(function (a) { return isNaN(a[sorting_props.col_index].value); })) + .sort(function (a, b) { return sortFunction_1(a, b, sorting_props.direction); }); + } + lodash_1.default.each(data.output, function (o) { + if (o.map(function (item) { return item.hidden.toString(); }).indexOf("false") > -1) { + output.body += ""; + if (_this.hide_first_column !== true) { + output.body += "\n \n " + lodash_1.default.first(o.map(function (item) { return item.row_name; })) + "\n "; + } + lodash_1.default.each(o, function (item) { + var item_style = "padding:4px;background-color:" + item.color_bg + ";color:" + item.color_text + ";text-align:" + _this.text_alignment_values; + var item_display = item.link === "#" + ? item.display_value + : "" + item.display_value + ""; + var tooltip = !item.tooltip || item.tooltip === "-" + ? undefined + : " data-toggle=\"tooltip\" data-html=\"true\" data-placement=\"auto\" title=\"" + item.tooltip + "\" "; + output.body += "\n \n " + (tooltip ? "" : "") + "\n " + item_display + "\n " + (tooltip ? "" : "") + "\n \n "; + }); + output.body += ""; + } + }); + return output; + }; + BoomOutput.prototype.getDataAsDebugHTML = function (data) { + var debugdata = ""; + debugdata = lodash_1.default.map(data, function (d) { + return "\n \n " + d.seriesName + "\n " + (d.pattern.name || d.pattern.pattern || "Default") + "\n " + d.display_value + "\n " + d.row_name + "\n " + d.col_name + "\n " + d.thresholds.join(",") + "\n " + d.color_bg + "\n " + d.color_text + "\n \n "; + }).join(""); + return debugdata; + }; + } + }; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQm9vbU91dHB1dC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9hcHAvYm9vbS9Cb29tT3V0cHV0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O1lBR0E7Z0JBUUUsb0JBQVksT0FBOEI7b0JBQ3hDLElBQUksQ0FBQyxzQkFBc0IsR0FBRyxPQUFPLENBQUMsc0JBQXN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XRwdXQuYm9keSArPSBcIjx0cj5cIjtcbiAgICAgIGlmICh0aGlzLmhpZGVfZmlyc3RfY29sdW1uICE9PSB0cnVlKSB7XG4gICAgICAgIG91dHB1dC5ib2R5ICs9IGBcbiAgICAgICAgICAgICAgICAgICAgPHRkIHN0eWxlPVwicGFkZGluZzo0cHg7dGV4dC1hbGlnbjoke1xuICAgICAgICAgICAgICAgICAgICAgIHRoaXMudGV4dF9hbGlnbm1lbnRfZmlyc3Rjb2x1bW5cbiAgICAgICAgICAgICAgICAgICAgfVwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgJHtfLmZpcnN0KG8ubWFwKGl0ZW0gPT4gaXRlbS5yb3dfbmFtZSkpfVxuICAgICAgICAgICAgICAgICAgICA8L3RkPmA7XG4gICAgICB9XG4gICAgICBfLmVhY2gobywgaXRlbSA9PiB7XG4gICAgICAgIGxldCBpdGVtX3N0eWxlID0gYHBhZGRpbmc6NHB4O2JhY2tncm91bmQtY29sb3I6JHtpdGVtLmNvbG9yX2JnfTtjb2xvcjoke1xuICAgICAgICAgIGl0ZW0uY29sb3JfdGV4dFxuICAgICAgICB9O3RleHQtYWxpZ246JHt0aGlzLnRleHRfYWxpZ25tZW50X3ZhbHVlc31gO1xuICAgICAgICBsZXQgaXRlbV9kaXNwbGF5ID1cbiAgICAgICAgICBpdGVtLmxpbmsgPT09IFwiI1wiXG4gICAgICAgICAgICA/IGl0ZW0uZGlzcGxheV92YWx1ZVxuICAgICAgICAgICAgOiBgPGEgaHJlZj1cIiR7aXRlbS5saW5rfVwiIHRhcmdldD1cIl9ibGFua1wiIHN0eWxlPVwiY29sb3I6JHtcbiAgICAgICAgICAgICAgICBpdGVtLmNvbG9yX3RleHRcbiAgICAgICAgICAgICAgfVwiPiR7aXRlbS5kaXNwbGF5X3ZhbHVlfTwvYT5gO1xuICAgICAgICBsZXQgdG9vbHRpcCA9XG4gICAgICAgICAgIWl0ZW0udG9vbHRpcCB8fCBpdGVtLnRvb2x0aXAgPT09I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ZCBzdHlsZT1cInBhZGRpbmc6NHB4O3RleHQtYWxpZ246bGVmdDt3aWR0aDoxMCU7IHRpdGxlPVwiVGV4dCBDb2xvclwiID4ke2QuY29sb3JfdGV4dH08L3RkPlxuICAgICAgICA8L3RyPlxuICAgICAgICBgO1xuICAgIH0pLmpvaW4oYGApO1xuICAgIHJldHVybiBkZWJ1Z2RhdGE7XG59O1xuIl19 \ No newline at end of file diff --git a/dist/app/boom/BoomPattern.js b/dist/app/boom/BoomPattern.js index f5f4e8f..4e192b8 100644 --- a/dist/app/boom/BoomPattern.js +++ b/dist/app/boom/BoomPattern.js @@ -1,80 +1,80 @@ -System.register(["./index"], function (exports_1, context_1) { - "use strict"; - var index_1, BoomPattern; - var __moduleName = context_1 && context_1.id; - return { - setters: [ - function (index_1_1) { - index_1 = index_1_1; - } - ], - execute: function () { - BoomPattern = (function () { - function BoomPattern(options) { - this.row_col_wrapper = "_"; - if (options && options.row_col_wrapper) { - this.row_col_wrapper = options.row_col_wrapper; - } - this.bgColors = options && options.bgColors ? options.bgColors : "green|orange|red"; - this.bgColors_overrides = options && options.bgColors_overrides ? options.bgColors_overrides : "0->green|2->red|1->yellow"; - this.textColors = options && options.textColors ? options.textColors : "red|orange|green"; - this.textColors_overrides = options && options.textColors_overrides ? options.textColors_overrides : "0->red|2->green|1->yellow"; - this.clickable_cells_link = options && options.clickable_cells_link ? options.clickable_cells_link : ""; - this.col_name = options && options.col_name ? options.col_name : this.row_col_wrapper + "1" + this.row_col_wrapper; - this.decimals = options && options.decimals ? options.decimals : 2; - this.delimiter = options && options.delimiter ? options.delimiter : "."; - this.enable_bgColor = false; - this.enable_bgColor_overrides = false; - this.enable_textColor = false; - this.enable_textColor_overrides = false; - this.enable_clickable_cells = false; - this.enable_time_based_thresholds = false; - this.enable_transform = false; - this.enable_transform_overrides = false; - this.filter = { - value_above: "", - value_below: "", - }; - this.format = options && options.format ? options.format : "none"; - this.name = options && options.name ? options.name : "New Pattern"; - this.null_color = options && options.null_color ? options.null_color : "darkred"; - this.null_textcolor = options && options.null_Textcolor ? options.null_Textcolor : "black"; - this.null_value = options && options.null_value ? options.null_value : "No data"; - this.pattern = options && options.pattern ? options.pattern : "^server.*cpu$"; - this.row_name = options && options.row_name ? options.row_name : this.row_col_wrapper + "0" + this.row_col_wrapper; - this.thresholds = options && options.thresholds ? options.thresholds : "70,90"; - this.time_based_thresholds = []; - this.transform_values = options && options.transform_values ? options.transform_values : "_value_|_value_|_value_"; - this.transform_values_overrides = options && options.transform_values_overrides ? options.transform_values_overrides : "0->down|1->up"; - this.tooltipTemplate = options && options.tooltipTemplate ? options.tooltipTemplate : "Series : _series_
Row Name : _row_name_
Col Name : _col_name_
Value : _value_"; - this.valueName = options && options.valueName ? options.valueName : "avg"; - } - return BoomPattern; - }()); - exports_1("BoomPattern", BoomPattern); - BoomPattern.prototype.inverseBGColors = function () { - this.bgColors = this.bgColors ? this.bgColors.split("|").reverse().join("|") : ""; - }; - BoomPattern.prototype.inverseTextColors = function () { - this.textColors = this.textColors ? this.textColors.split("|").reverse().join("|") : ""; - }; - BoomPattern.prototype.inverseTransformValues = function () { - this.transform_values = this.transform_values ? this.transform_values.split("|").reverse().join("|") : ""; - }; - BoomPattern.prototype.add_time_based_thresholds = function () { - var new_time_based_threshold = new index_1.BoomTimeBasedThreshold(); - this.time_based_thresholds = this.time_based_thresholds || []; - this.time_based_thresholds.push(new_time_based_threshold); - }; - BoomPattern.prototype.remove_time_based_thresholds = function (index) { - if (this.time_based_thresholds.length > 0) { - this.time_based_thresholds.splice(Number(index), 1); - } - }; - BoomPattern.prototype.setUnitFormat = function (format) { - this.format = format && format.value ? format.value : "none"; - }; - } - }; -}); +System.register(["./index"], function (exports_1, context_1) { + "use strict"; + var index_1, BoomPattern; + var __moduleName = context_1 && context_1.id; + return { + setters: [ + function (index_1_1) { + index_1 = index_1_1; + } + ], + execute: function () { + BoomPattern = (function () { + function BoomPattern(options) { + this.row_col_wrapper = "_"; + if (options && options.row_col_wrapper) { + this.row_col_wrapper = options.row_col_wrapper; + } + this.bgColors = options && options.bgColors ? options.bgColors : "green|orange|red"; + this.bgColors_overrides = options && options.bgColors_overrides ? options.bgColors_overrides : "0->green|2->red|1->yellow"; + this.textColors = options && options.textColors ? options.textColors : "red|orange|green"; + this.textColors_overrides = options && options.textColors_overrides ? options.textColors_overrides : "0->red|2->green|1->yellow"; + this.clickable_cells_link = options && options.clickable_cells_link ? options.clickable_cells_link : ""; + this.col_name = options && options.col_name ? options.col_name : this.row_col_wrapper + "1" + this.row_col_wrapper; + this.decimals = options && options.decimals ? options.decimals : 2; + this.delimiter = options && options.delimiter ? options.delimiter : "."; + this.enable_bgColor = false; + this.enable_bgColor_overrides = false; + this.enable_textColor = false; + this.enable_textColor_overrides = false; + this.enable_clickable_cells = false; + this.enable_time_based_thresholds = false; + this.enable_transform = false; + this.enable_transform_overrides = false; + this.filter = { + value_above: "", + value_below: "", + }; + this.format = options && options.format ? options.format : "none"; + this.name = options && options.name ? options.name : "New Pattern"; + this.null_color = options && options.null_color ? options.null_color : "darkred"; + this.null_textcolor = options && options.null_Textcolor ? options.null_Textcolor : "black"; + this.null_value = options && options.null_value ? options.null_value : "No data"; + this.pattern = options && options.pattern ? options.pattern : "^server.*cpu$"; + this.row_name = options && options.row_name ? options.row_name : this.row_col_wrapper + "0" + this.row_col_wrapper; + this.thresholds = options && options.thresholds ? options.thresholds : "70,90"; + this.time_based_thresholds = []; + this.transform_values = options && options.transform_values ? options.transform_values : "_value_|_value_|_value_"; + this.transform_values_overrides = options && options.transform_values_overrides ? options.transform_values_overrides : "0->down|1->up"; + this.tooltipTemplate = options && options.tooltipTemplate ? options.tooltipTemplate : "Series : _series_
Row Name : _row_name_
Col Name : _col_name_
Value : _value_"; + this.valueName = options && options.valueName ? options.valueName : "avg"; + } + return BoomPattern; + }()); + exports_1("BoomPattern", BoomPattern); + BoomPattern.prototype.inverseBGColors = function () { + this.bgColors = this.bgColors ? this.bgColors.split("|").reverse().join("|") : ""; + }; + BoomPattern.prototype.inverseTextColors = function () { + this.textColors = this.textColors ? this.textColors.split("|").reverse().join("|") : ""; + }; + BoomPattern.prototype.inverseTransformValues = function () { + this.transform_values = this.transform_values ? this.transform_values.split("|").reverse().join("|") : ""; + }; + BoomPattern.prototype.add_time_based_thresholds = function () { + var new_time_based_threshold = new index_1.BoomTimeBasedThreshold(); + this.time_based_thresholds = this.time_based_thresholds || []; + this.time_based_thresholds.push(new_time_based_threshold); + }; + BoomPattern.prototype.remove_time_based_thresholds = function (index) { + if (this.time_based_thresholds.length > 0) { + this.time_based_thresholds.splice(Number(index), 1); + } + }; + BoomPattern.prototype.setUnitFormat = function (format) { + this.format = format && format.value ? format.value : "none"; + }; + } + }; +}); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQm9vbVBhdHRlcm4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYXBwL2Jvb20vQm9vbVBhdHRlcm4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7WUFFQTtnQkF5Q0kscUJBQVksT0FBWTtvQkF4Q2hCLG9CQUFlLEdBQUcsR0FBRyxDQUFDO29CQXlDMUIsSUFBSSxPQUFPLElBQUksT0FBTyxDQUFDLGVBQWUsRUFBRTt3QkFDcEMsSUFBSSxDQUFDLGVBQWUsR0FBRyxPQUFPLENBQUMsZUFBZSxDQUFDO3FCQUNsRDtvQkFDRCxJQUFJLENBQUMsUUFBUSxHQUFHLE9BQU8sSUFBSSxPQUFPLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQyxPQUFPLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQyxrQkFBa0IsQ0FBQztvQkFDcEYsSUFBSSxDQUFDLGtCQUFrQixHQUFHLE9BQU8sSUFBSSxPQUFPLENBQUMsa0JBQWtCLENBQUMsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxrQkFBa0Is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TtcclxuIl19 \ No newline at end of file diff --git a/dist/app/boom/BoomSeries.js b/dist/app/boom/BoomSeries.js index e8221ba..40bf736 100644 --- a/dist/app/boom/BoomSeries.js +++ b/dist/app/boom/BoomSeries.js @@ -1,245 +1,245 @@ -System.register(["app/core/utils/kbn", "app/core/time_series2", "lodash", "./index"], function (exports_1, context_1) { - "use strict"; - var kbn_1, time_series2_1, lodash_1, index_1, BoomSeries; - var __moduleName = context_1 && context_1.id; - return { - setters: [ - function (kbn_1_1) { - kbn_1 = kbn_1_1; - }, - function (time_series2_1_1) { - time_series2_1 = time_series2_1_1; - }, - function (lodash_1_1) { - lodash_1 = lodash_1_1; - }, - function (index_1_1) { - index_1 = index_1_1; - } - ], - execute: function () { - BoomSeries = (function () { - function BoomSeries(seriesData, panelDefaultPattern, panelPatterns, options) { - var _this = this; - this.display_value = "-"; - this.tooltip = "-"; - this.value = NaN; - this.value_formatted = "-"; - this.link = "-"; - this.debug_mode = options && options.debug_mode === true ? true : false; - var nullPointMode = options && options.nullPointMode ? options.nullPointMode : "connected"; - this.row_col_wrapper = options && options.row_col_wrapper ? options.row_col_wrapper : "_"; - this.seriesName = ""; - this.template_row_name = ""; - this.template_col_name = ""; - this.template_value = ""; - this.hidden = false; - this.pattern = undefined; - var series = new time_series2_1.default({ - alias: seriesData.target, - datapoints: seriesData.datapoints || [] - }); - series.flotpairs = series.getFlotPairs(nullPointMode); - this.seriesName = series.alias || series.aliasEscaped || series.label || series.id; - this.currentTimeStamp = new Date(); - if (series.dataPoints && series.dataPoints.length > 0 && lodash_1.default.last(series.dataPoints).length === 2) { - this.currentTimeStamp = new Date(lodash_1.default.last(series.dataPoints)[1]); - } - this.pattern = lodash_1.default.find(panelPatterns.filter(function (p) { return p.disabled !== true; }), function (p) { return _this.seriesName.match(p.pattern); }) || panelDefaultPattern; - this.decimals = this.pattern.decimals || panelDefaultPattern.decimals || 2; - if (series.stats) { - this.value = series.stats[this.pattern.valueName]; - if (lodash_1.default.isNaN(this.value) || this.value === null) { - this.display_value = this.pattern.null_value; - } - else { - this.display_value = String(this.value); - } - if (!isNaN(this.value)) { - var decimalInfo = index_1.getDecimalsForValue(this.value, this.decimals); - var formatFunc = kbn_1.default.valueFormats[this.pattern.format]; - this.value_formatted = formatFunc(this.value, decimalInfo.decimals, decimalInfo.scaledDecimals); - this.display_value = String(this.value_formatted); - } - this.template_value = this.display_value; - } - if (this.value && this.pattern && this.pattern.filter && (this.pattern.filter.value_below !== "" || this.pattern.filter.value_above !== "")) { - if (this.pattern.filter.value_below !== "" && this.value < +(this.pattern.filter.value_below)) { - this.hidden = true; - } - if (this.pattern.filter.value_above !== "" && this.value > +(this.pattern.filter.value_above)) { - this.hidden = true; - } - } - this.row_name = this.getRowName(this.pattern, this.row_col_wrapper, this.seriesName.toString()); - this.col_name = this.getColName(this.pattern, this.row_col_wrapper, this.seriesName.toString(), this.row_name); - this.thresholds = this.getThresholds(); - this.color_bg = this.getBGColor(); - this.color_text = this.getTextColor(); - this.template_value = this.getDisplayValueTemplate(); - this.tooltip = this.pattern.tooltipTemplate || "Series : _series_
Row Name : _row_name_
Col Name : _col_name_
Value : _value_"; - this.link = this.pattern.enable_clickable_cells ? this.pattern.clickable_cells_link || "#" : "#"; - this.replaceTokens(); - this.cleanup(); - } - BoomSeries.prototype.getThresholds = function () { - var thresholds = this.pattern.thresholds.split(",").map(function (d) { return +d; }); - if (this.pattern.enable_time_based_thresholds) { - var metricrecivedTimeStamp_1 = this.currentTimeStamp || new Date(); - var metricrecivedTimeStamp_innumber_1 = metricrecivedTimeStamp_1.getHours() * 100 + metricrecivedTimeStamp_1.getMinutes(); - var weekdays_1 = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"]; - lodash_1.default.each(this.pattern.time_based_thresholds, function (tbtx) { - if (tbtx && tbtx.from && tbtx.to && tbtx.enabledDays && - (metricrecivedTimeStamp_innumber_1 >= +(tbtx.from)) && - (metricrecivedTimeStamp_innumber_1 <= +(tbtx.to)) && - (tbtx.enabledDays.toLowerCase().indexOf(weekdays_1[metricrecivedTimeStamp_1.getDay()]) > -1) && - tbtx.threshold) { - thresholds = (tbtx.threshold + "").split(",").map(function (d) { return +d; }); - } - }); - } - return thresholds; - }; - BoomSeries.prototype.getBGColor = function () { - var _this = this; - var bgColor = "transparent"; - if (lodash_1.default.isNaN(this.value) || this.value === null) { - bgColor = this.pattern.null_color || "darkred"; - if (this.pattern.null_color === "") { - bgColor = "transparent"; - } - } - else { - if (this.pattern.enable_bgColor && this.pattern.bgColors) { - var list_of_bgColors_based_on_thresholds = this.pattern.bgColors.split("|"); - bgColor = index_1.getItemBasedOnThreshold(this.thresholds, list_of_bgColors_based_on_thresholds, this.value, bgColor); - } - if (this.pattern.enable_bgColor_overrides && this.pattern.bgColors_overrides !== "") { - var _bgColors_overrides = this.pattern.bgColors_overrides.split("|").filter(function (con) { return con.indexOf("->"); }).map(function (con) { return con.split("->"); }).filter(function (con) { return +(con[0]) === _this.value; }).map(function (con) { return con[1]; }); - if (_bgColors_overrides.length > 0 && _bgColors_overrides[0] !== "") { - bgColor = ("" + _bgColors_overrides[0]).trim(); - } - } - } - return index_1.normalizeColor(bgColor); - }; - BoomSeries.prototype.getTextColor = function () { - var _this = this; - var textColor = "white"; - if (lodash_1.default.isNaN(this.value) || this.value === null) { - textColor = this.pattern.null_textcolor || "white"; - } - else { - if (this.pattern.enable_textColor && this.pattern.textColors) { - var list_of_textColors_based_on_thresholds = this.pattern.textColors.split("|"); - textColor = index_1.getItemBasedOnThreshold(this.thresholds, list_of_textColors_based_on_thresholds, this.value, textColor); - } - if (this.pattern.enable_textColor_overrides && this.pattern.textColors_overrides !== "") { - var _textColors_overrides = this.pattern.textColors_overrides.split("|").filter(function (con) { return con.indexOf("->"); }).map(function (con) { return con.split("->"); }).filter(function (con) { return +(con[0]) === _this.value; }).map(function (con) { return con[1]; }); - if (_textColors_overrides.length > 0 && _textColors_overrides[0] !== "") { - textColor = ("" + _textColors_overrides[0]).trim(); - } - } - } - return index_1.normalizeColor(textColor); - }; - BoomSeries.prototype.getDisplayValueTemplate = function () { - var _this = this; - var template = this.template_value; - if (lodash_1.default.isNaN(this.value) || this.value === null) { - template = this.pattern.null_value || "No data"; - if (this.pattern.null_value === "") { - template = ""; - } - } - else { - if (this.pattern.enable_transform) { - var transform_values = this.pattern.transform_values.split("|"); - template = index_1.getItemBasedOnThreshold(this.thresholds, transform_values, this.value, template); - } - if (this.pattern.enable_transform_overrides && this.pattern.transform_values_overrides !== "") { - var _transform_values_overrides = this.pattern.transform_values_overrides.split("|").filter(function (con) { return con.indexOf("->"); }).map(function (con) { return con.split("->"); }).filter(function (con) { return +(con[0]) === _this.value; }).map(function (con) { return con[1]; }); - if (_transform_values_overrides.length > 0 && _transform_values_overrides[0] !== "") { - template = ("" + _transform_values_overrides[0]).trim(); - } - } - if (this.pattern.enable_transform || this.pattern.enable_transform_overrides) { - template = this.seriesName.split(this.pattern.delimiter || ".").reduce(function (r, it, i) { - return r.replace(new RegExp(_this.row_col_wrapper + i + _this.row_col_wrapper, "g"), it); - }, template); - } - } - return template; - }; - BoomSeries.prototype.cleanup = function () { - if (this.debug_mode !== true) { - delete this.seriesName; - delete this.pattern; - delete this.thresholds; - delete this.decimals; - delete this.template_col_name; - delete this.template_row_name; - delete this.template_value; - delete this.value_formatted; - delete this.currentTimeStamp; - } - }; - BoomSeries.prototype.getRowName = function (pattern, row_col_wrapper, seriesName) { - var row_name = pattern.row_name; - row_name = seriesName.split(pattern.delimiter || ".").reduce(function (r, it, i) { - return r.replace(new RegExp(row_col_wrapper + i + row_col_wrapper, "g"), it); - }, row_name); - if (seriesName.split(pattern.delimiter || ".").length === 1) { - row_name = seriesName; - } - this.template_row_name = row_name; - return row_name; - }; - BoomSeries.prototype.getColName = function (pattern, row_col_wrapper, seriesName, row_name) { - var col_name = pattern.col_name; - col_name = seriesName.split(pattern.delimiter || ".").reduce(function (r, it, i) { - return r.replace(new RegExp(row_col_wrapper + i + row_col_wrapper, "g"), it); - }, col_name); - if (seriesName.split(pattern.delimiter || ".").length === 1 || row_name === seriesName) { - col_name = pattern.col_name || "Value"; - } - this.template_col_name = col_name; - return col_name; - }; - BoomSeries.prototype.replaceTokens = function () { - var _this = this; - this.link = this.seriesName.split(this.pattern.delimiter || ".").reduce(function (r, it, i) { - return r.replace(new RegExp(_this.row_col_wrapper + i + _this.row_col_wrapper, "g"), it); - }, this.link); - this.row_name = this.template_row_name.replace(new RegExp("_series_", "g"), this.seriesName.toString()); - this.col_name = this.template_col_name.replace(new RegExp("_series_", "g"), this.seriesName.toString()); - this.link = this.link.replace(new RegExp("_series_", "g"), this.seriesName.toString().trim()); - this.tooltip = this.tooltip.replace(new RegExp("_series_", "g"), this.seriesName.toString().trim()); - this.display_value = this.template_value.replace(new RegExp("_series_", "g"), this.seriesName.toString()); - this.col_name = this.col_name.replace(new RegExp("_row_name_", "g"), this.row_name.toString()); - this.link = this.link.replace(new RegExp("_row_name_", "g"), index_1.getActualNameWithoutTokens(this.row_name.toString()).trim()); - this.tooltip = this.tooltip.replace(new RegExp("_row_name_", "g"), index_1.getActualNameWithoutTokens(this.row_name.toString()).trim()); - this.display_value = this.display_value.replace(new RegExp("_row_name_", "g"), this.row_name.toString()); - this.row_name = this.row_name.replace(new RegExp("_col_name_", "g"), this.col_name.toString()); - this.link = this.link.replace(new RegExp("_col_name_", "g"), index_1.getActualNameWithoutTokens(this.col_name.toString()).trim()); - this.tooltip = this.tooltip.replace(new RegExp("_col_name_", "g"), index_1.getActualNameWithoutTokens(this.col_name.toString()).trim()); - this.display_value = this.display_value.replace(new RegExp("_col_name_", "g"), this.col_name.toString()); - var value_raw = lodash_1.default.isNaN(this.value) || this.value === null ? "null" : this.value.toString().trim(); - this.link = this.link.replace(new RegExp("_value_raw_", "g"), value_raw); - this.tooltip = this.tooltip.replace(new RegExp("_value_raw_", "g"), value_raw); - this.display_value = this.display_value.replace(new RegExp("_value_raw_", "g"), value_raw); - var value_formatted = lodash_1.default.isNaN(this.value) || this.value === null ? "null" : this.value_formatted.toString().trim(); - this.link = this.link.replace(new RegExp("_value_", "g"), value_formatted); - this.tooltip = this.tooltip.replace(new RegExp("_value_", "g"), value_formatted); - this.display_value = this.display_value.replace(new RegExp("_value_", "g"), value_formatted); - this.row_name = index_1.replaceTokens(this.row_name); - this.col_name = index_1.replaceTokens(this.col_name); - this.display_value = index_1.replaceTokens(this.display_value); - }; - return BoomSeries; - }()); - exports_1("BoomSeries", BoomSeries); - } - }; -}); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQm9vbVNlcmllcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9hcHAvYm9vbS9Cb29tU2VyaWVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O1lBT0E7Z0JBcUJJLG9CQUFZLFVBQWUsRUFBRSxtQkFBd0IsRUFBRSxhQUFvQixFQUFFLE9BQVk7b0JBQXpGLGlCQXVEQztvQkE5RE0sa0JBQWEsR0FBRyxHQUFHLENBQUM7b0JBQ3BCLFlBQU8sR0FBRyxHQUFHLENBQUM7b0JBQ2QsVUFBSyxHQUFHLEdBQUcsQ0FBQztvQkFDWixvQkFBZSxHQUFHLEdBQUcsQ0FBQztvQkFDdEIsU0FBSSxHQUFHLEdBQUcsQ0FBQztvQkFJZCxJQUFJLENBQUMsVUFBVSxHQUFHLE9BQU8sSUFBSSxPQUFPLENBQUMsVUFBVSxLQUFLLElBQUksQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUM7b0JBQ3hFLElBQUksYUFBYSxHQUFHLE9BQU8sSUFBSSxPQUFPLENBQUMsYUFBYSxDQUFDLENBQUMsQ0FBQyxPQUFPLENBQUMsYUFBYSxDQUFDLENBQUMsQ0FBQyxXQUFXLENBQUM7b0JBQzNGLElBQUksQ0FBQyxlQUFlLE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W5kZXhPZih3ZWVrZGF5c1ttZXRyaWNyZWNpdmVkVGltZVN0YW1wLmdldERheSgpXSkgPiAtMSkgJiZcclxuICAgICAgICAgICAgICAgICAgICB0YnR4LnRocmVzaG9sZFxyXG4gICAgICAgICAgICAgICAgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhyZXNob2xkcyA9ICh0YnR4LnRocmVzaG9sZCArIFwiXCIpLnNwbGl0KFwiLFwiKS5tYXAoZCA9PiArZCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gdGhyZXNob2xkcztcclxuICAgIH1cclxuICAgIHByaXZhdGUgZ2V0QkdDb2xvcigpOiBzdHJpbmcge1xyXG4gICAgICAgIGxldCBiZ0NvbG9yID0gXCJ0cmFuc3BhcmVudFwiO1xyXG4gICAgICAgIGlmIChfLmlzTmFOKHRoaXMudmFsdWUpIHx8IHRoaXMudmFsdWUgPT09IG51bGwpIHtcclxuICAgICAgICAgICAgYmdDb2xvciA9IHRoaXMucGF0dGVybi5udWxsX2NvbG9yIHx8IFwiZGFya3JlZFwiO1xyXG4gICAgICAgICAgICBpZiAodGhpcy5wYXR0ZXJuLm51bGxfY29sb3IgPT09IFwiXCIpIHtcclxuICAgICAgICAgICAgICAgIGJnQ29sb3IgPSBcInRyYW5zcGFyZW50XCI7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBpZiAodGhpcy5wYXR0ZXJuLmVuYWJsZV9iZ0NvbG9yICYmIHRoaXMucGF0dGVybi5iZ0NvbG9ycykge1xyXG4gICAgICAgICAgICAgICAgbGV0IGxpc3Rfb2ZfYmdDb2xvcnNfYmFzZWRfb25fdGhyZXNob2xkcyA9IHRoaXMucGF0dGVybi5iZ0NvbG9ycy5zcGxpdChcInxcIik7XHJcbiAgICAgICAgICAgICAgICBiZ0NvbG9yID0gZ2V0SXRlbU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lzLnJvd19jb2xfd3JhcHBlciwgXCJnXCIpLCBpdCk7XHJcbiAgICAgICAgICAgICAgICB9LCB0ZW1wbGF0ZSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIHRlbXBsYXRlO1xyXG4gICAgfVxyXG4gICAgcHJpdmF0ZSBjbGVhbnVwKCkge1xyXG4gICAgICAgIGlmICh0aGlzLmRlYnVnX21vZGUgIT09IHRydWUpIHtcclxuICAgICAgICAgICAgZGVsZXRlIHRoaXMuc2VyaWVzTmFtZTtcclxuICAgICAgICAgICAgZGVsZXRlIHRoaXMucGF0dGVybjtcclxuICAgICAgICAgICAgZGVsZXRlIHRoaXMudGhyZXNob2xkcztcclxuICAgICAgICAgICAgZGVsZXRlIHRoaXMuZGVjaW1hbHM7XHJcbiAgICAgICAgICAgIGRlbGV0ZSB0aGlzLnRlbXBsYXRlX2NvbF9uYW1lO1xyXG4gICAgICAgICAgICBkZWxldGUgdGhpcy50ZW1wbGF0ZV9yb3dfbmFtZTtcclxuICAgICAgICAgICAgZGVsZXRlIHRoaXMudGVtcGxhdGVfdmFsdWU7XHJcbiAgICAgICAgICAgIGRlbGV0ZSB0aGlzLnZhbHVlX2Zvcm1hdHRlZDtcclxuICAgICAgICAgICAgZGVsZXRlIHRoaXMuY3VycmVudFRpbWVTdGFtcDtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbiAgICBwcml2YXRlIGdldFJvd05hbWUocGF0dGVybiwgcm93X2NvbF93cmFwcGVyOiBzdHJpbmcsIHNlcmllc05hbWU6IHN0cmluZyk6IHN0cmluZyB7XHJcbiAgICAgICAgbGV0IHJvd19uYW1lID0gcGF0dGVybi5yb3dfbmFtZTtcclxuICAgICAgICByb3dfbmFtZSA9IHNlcmllc05hbWUuc3BsaXQocGF0dGVybi5kZWxpbWl0ZXIgfHwgXCIuXCIpLnJlZHVjZSgociwgaXQsIGkpID0+IHtcclxuICAgICAgICAgICAgcmV0dXJuIHI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yBjYW4gYmUgc3BlY2lmaWVkIGluIFJvdywgQ29sICYgRGlzcGxheSBWYWx1ZVxyXG4gICAgICAgIHRoaXMucm93X25hbWUgPSByZXBsYWNlVG9rZW5zKHRoaXMucm93X25hbWUpO1xyXG4gICAgICAgIHRoaXMuY29sX25hbWUgPSByZXBsYWNlVG9rZW5zKHRoaXMuY29sX25hbWUpO1xyXG4gICAgICAgIHRoaXMuZGlzcGxheV92YWx1ZSA9IHJlcGxhY2VUb2tlbnModGhpcy5kaXNwbGF5X3ZhbHVlKTtcclxuICAgIH1cclxufVxyXG5cclxuZXhwb3J0IHtcclxuICAgIEJvb21TZXJpZXNcclxufTtcclxuIl19 \ No newline at end of file +System.register(["app/core/utils/kbn", "app/core/time_series2", "lodash", "./index"], function (exports_1, context_1) { + "use strict"; + var kbn_1, time_series2_1, lodash_1, index_1, BoomSeries; + var __moduleName = context_1 && context_1.id; + return { + setters: [ + function (kbn_1_1) { + kbn_1 = kbn_1_1; + }, + function (time_series2_1_1) { + time_series2_1 = time_series2_1_1; + }, + function (lodash_1_1) { + lodash_1 = lodash_1_1; + }, + function (index_1_1) { + index_1 = index_1_1; + } + ], + execute: function () { + BoomSeries = (function () { + function BoomSeries(seriesData, panelDefaultPattern, panelPatterns, options) { + var _this = this; + this.display_value = "-"; + this.tooltip = "-"; + this.value = NaN; + this.value_formatted = "-"; + this.link = "-"; + this.debug_mode = options && options.debug_mode === true ? true : false; + var nullPointMode = options && options.nullPointMode ? options.nullPointMode : "connected"; + this.row_col_wrapper = options && options.row_col_wrapper ? options.row_col_wrapper : "_"; + this.seriesName = ""; + this.template_row_name = ""; + this.template_col_name = ""; + this.template_value = ""; + this.hidden = false; + this.pattern = undefined; + var series = new time_series2_1.default({ + alias: seriesData.target, + datapoints: seriesData.datapoints || [] + }); + series.flotpairs = series.getFlotPairs(nullPointMode); + this.seriesName = series.alias || series.aliasEscaped || series.label || series.id; + this.currentTimeStamp = new Date(); + if (series.dataPoints && series.dataPoints.length > 0 && lodash_1.default.last(series.dataPoints).length === 2) { + this.currentTimeStamp = new Date(lodash_1.default.last(series.dataPoints)[1]); + } + this.pattern = lodash_1.default.find(panelPatterns.filter(function (p) { return p.disabled !== true; }), function (p) { return _this.seriesName.match(p.pattern); }) || panelDefaultPattern; + this.decimals = this.pattern.decimals || panelDefaultPattern.decimals || 2; + if (series.stats) { + this.value = series.stats[this.pattern.valueName]; + if (lodash_1.default.isNaN(this.value) || this.value === null) { + this.display_value = this.pattern.null_value; + } + else { + this.display_value = String(this.value); + } + if (!isNaN(this.value)) { + var decimalInfo = index_1.getDecimalsForValue(this.value, this.decimals); + var formatFunc = kbn_1.default.valueFormats[this.pattern.format]; + this.value_formatted = formatFunc(this.value, decimalInfo.decimals, decimalInfo.scaledDecimals); + this.display_value = String(this.value_formatted); + } + this.template_value = this.display_value; + } + if (this.value && this.pattern && this.pattern.filter && (this.pattern.filter.value_below !== "" || this.pattern.filter.value_above !== "")) { + if (this.pattern.filter.value_below !== "" && this.value < +(this.pattern.filter.value_below)) { + this.hidden = true; + } + if (this.pattern.filter.value_above !== "" && this.value > +(this.pattern.filter.value_above)) { + this.hidden = true; + } + } + this.row_name = this.getRowName(this.pattern, this.row_col_wrapper, this.seriesName.toString()); + this.col_name = this.getColName(this.pattern, this.row_col_wrapper, this.seriesName.toString(), this.row_name); + this.thresholds = this.getThresholds(); + this.color_bg = this.getBGColor(); + this.color_text = this.getTextColor(); + this.template_value = this.getDisplayValueTemplate(); + this.tooltip = this.pattern.tooltipTemplate || "Series : _series_
Row Name : _row_name_
Col Name : _col_name_
Value : _value_"; + this.link = this.pattern.enable_clickable_cells ? this.pattern.clickable_cells_link || "#" : "#"; + this.replaceTokens(); + this.cleanup(); + } + BoomSeries.prototype.getThresholds = function () { + var thresholds = this.pattern.thresholds.split(",").map(function (d) { return +d; }); + if (this.pattern.enable_time_based_thresholds) { + var metricrecivedTimeStamp_1 = this.currentTimeStamp || new Date(); + var metricrecivedTimeStamp_innumber_1 = metricrecivedTimeStamp_1.getHours() * 100 + metricrecivedTimeStamp_1.getMinutes(); + var weekdays_1 = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"]; + lodash_1.default.each(this.pattern.time_based_thresholds, function (tbtx) { + if (tbtx && tbtx.from && tbtx.to && tbtx.enabledDays && + (metricrecivedTimeStamp_innumber_1 >= +(tbtx.from)) && + (metricrecivedTimeStamp_innumber_1 <= +(tbtx.to)) && + (tbtx.enabledDays.toLowerCase().indexOf(weekdays_1[metricrecivedTimeStamp_1.getDay()]) > -1) && + tbtx.threshold) { + thresholds = (tbtx.threshold + "").split(",").map(function (d) { return +d; }); + } + }); + } + return thresholds; + }; + BoomSeries.prototype.getBGColor = function () { + var _this = this; + var bgColor = "transparent"; + if (lodash_1.default.isNaN(this.value) || this.value === null) { + bgColor = this.pattern.null_color || "darkred"; + if (this.pattern.null_color === "") { + bgColor = "transparent"; + } + } + else { + if (this.pattern.enable_bgColor && this.pattern.bgColors) { + var list_of_bgColors_based_on_thresholds = this.pattern.bgColors.split("|"); + bgColor = index_1.getItemBasedOnThreshold(this.thresholds, list_of_bgColors_based_on_thresholds, this.value, bgColor); + } + if (this.pattern.enable_bgColor_overrides && this.pattern.bgColors_overrides !== "") { + var _bgColors_overrides = this.pattern.bgColors_overrides.split("|").filter(function (con) { return con.indexOf("->"); }).map(function (con) { return con.split("->"); }).filter(function (con) { return +(con[0]) === _this.value; }).map(function (con) { return con[1]; }); + if (_bgColors_overrides.length > 0 && _bgColors_overrides[0] !== "") { + bgColor = ("" + _bgColors_overrides[0]).trim(); + } + } + } + return index_1.normalizeColor(bgColor); + }; + BoomSeries.prototype.getTextColor = function () { + var _this = this; + var textColor = document.body.classList.contains("theme-light") ? "black" : "white"; + if (lodash_1.default.isNaN(this.value) || this.value === null) { + textColor = this.pattern.null_textcolor || textColor; + } + else { + if (this.pattern.enable_textColor && this.pattern.textColors) { + var list_of_textColors_based_on_thresholds = this.pattern.textColors.split("|"); + textColor = index_1.getItemBasedOnThreshold(this.thresholds, list_of_textColors_based_on_thresholds, this.value, textColor); + } + if (this.pattern.enable_textColor_overrides && this.pattern.textColors_overrides !== "") { + var _textColors_overrides = this.pattern.textColors_overrides.split("|").filter(function (con) { return con.indexOf("->"); }).map(function (con) { return con.split("->"); }).filter(function (con) { return +(con[0]) === _this.value; }).map(function (con) { return con[1]; }); + if (_textColors_overrides.length > 0 && _textColors_overrides[0] !== "") { + textColor = ("" + _textColors_overrides[0]).trim(); + } + } + } + return index_1.normalizeColor(textColor); + }; + BoomSeries.prototype.getDisplayValueTemplate = function () { + var _this = this; + var template = this.template_value; + if (lodash_1.default.isNaN(this.value) || this.value === null) { + template = this.pattern.null_value || "No data"; + if (this.pattern.null_value === "") { + template = ""; + } + } + else { + if (this.pattern.enable_transform) { + var transform_values = this.pattern.transform_values.split("|"); + template = index_1.getItemBasedOnThreshold(this.thresholds, transform_values, this.value, template); + } + if (this.pattern.enable_transform_overrides && this.pattern.transform_values_overrides !== "") { + var _transform_values_overrides = this.pattern.transform_values_overrides.split("|").filter(function (con) { return con.indexOf("->"); }).map(function (con) { return con.split("->"); }).filter(function (con) { return +(con[0]) === _this.value; }).map(function (con) { return con[1]; }); + if (_transform_values_overrides.length > 0 && _transform_values_overrides[0] !== "") { + template = ("" + _transform_values_overrides[0]).trim(); + } + } + if (this.pattern.enable_transform || this.pattern.enable_transform_overrides) { + template = this.seriesName.split(this.pattern.delimiter || ".").reduce(function (r, it, i) { + return r.replace(new RegExp(_this.row_col_wrapper + i + _this.row_col_wrapper, "g"), it); + }, template); + } + } + return template; + }; + BoomSeries.prototype.cleanup = function () { + if (this.debug_mode !== true) { + delete this.seriesName; + delete this.pattern; + delete this.thresholds; + delete this.decimals; + delete this.template_col_name; + delete this.template_row_name; + delete this.template_value; + delete this.value_formatted; + delete this.currentTimeStamp; + } + }; + BoomSeries.prototype.getRowName = function (pattern, row_col_wrapper, seriesName) { + var row_name = pattern.row_name; + row_name = seriesName.split(pattern.delimiter || ".").reduce(function (r, it, i) { + return r.replace(new RegExp(row_col_wrapper + i + row_col_wrapper, "g"), it); + }, row_name); + if (seriesName.split(pattern.delimiter || ".").length === 1) { + row_name = seriesName; + } + this.template_row_name = row_name; + return row_name; + }; + BoomSeries.prototype.getColName = function (pattern, row_col_wrapper, seriesName, row_name) { + var col_name = pattern.col_name; + col_name = seriesName.split(pattern.delimiter || ".").reduce(function (r, it, i) { + return r.replace(new RegExp(row_col_wrapper + i + row_col_wrapper, "g"), it); + }, col_name); + if (seriesName.split(pattern.delimiter || ".").length === 1 || row_name === seriesName) { + col_name = pattern.col_name || "Value"; + } + this.template_col_name = col_name; + return col_name; + }; + BoomSeries.prototype.replaceTokens = function () { + var _this = this; + this.link = this.seriesName.split(this.pattern.delimiter || ".").reduce(function (r, it, i) { + return r.replace(new RegExp(_this.row_col_wrapper + i + _this.row_col_wrapper, "g"), it); + }, this.link); + this.row_name = this.template_row_name.replace(new RegExp("_series_", "g"), this.seriesName.toString()); + this.col_name = this.template_col_name.replace(new RegExp("_series_", "g"), this.seriesName.toString()); + this.link = this.link.replace(new RegExp("_series_", "g"), this.seriesName.toString().trim()); + this.tooltip = this.tooltip.replace(new RegExp("_series_", "g"), this.seriesName.toString().trim()); + this.display_value = this.template_value.replace(new RegExp("_series_", "g"), this.seriesName.toString()); + this.col_name = this.col_name.replace(new RegExp("_row_name_", "g"), this.row_name.toString()); + this.link = this.link.replace(new RegExp("_row_name_", "g"), index_1.getActualNameWithoutTokens(this.row_name.toString()).trim()); + this.tooltip = this.tooltip.replace(new RegExp("_row_name_", "g"), index_1.getActualNameWithoutTokens(this.row_name.toString()).trim()); + this.display_value = this.display_value.replace(new RegExp("_row_name_", "g"), this.row_name.toString()); + this.row_name = this.row_name.replace(new RegExp("_col_name_", "g"), this.col_name.toString()); + this.link = this.link.replace(new RegExp("_col_name_", "g"), index_1.getActualNameWithoutTokens(this.col_name.toString()).trim()); + this.tooltip = this.tooltip.replace(new RegExp("_col_name_", "g"), index_1.getActualNameWithoutTokens(this.col_name.toString()).trim()); + this.display_value = this.display_value.replace(new RegExp("_col_name_", "g"), this.col_name.toString()); + var value_raw = lodash_1.default.isNaN(this.value) || this.value === null ? "null" : this.value.toString().trim(); + this.link = this.link.replace(new RegExp("_value_raw_", "g"), value_raw); + this.tooltip = this.tooltip.replace(new RegExp("_value_raw_", "g"), value_raw); + this.display_value = this.display_value.replace(new RegExp("_value_raw_", "g"), value_raw); + var value_formatted = lodash_1.default.isNaN(this.value) || this.value === null ? "null" : this.value_formatted.toString().trim(); + this.link = this.link.replace(new RegExp("_value_", "g"), value_formatted); + this.tooltip = this.tooltip.replace(new RegExp("_value_", "g"), value_formatted); + this.display_value = this.display_value.replace(new RegExp("_value_", "g"), value_formatted); + this.row_name = index_1.replaceTokens(this.row_name); + this.col_name = index_1.replaceTokens(this.col_name); + this.display_value = index_1.replaceTokens(this.display_value); + }; + return BoomSeries; + }()); + exports_1("BoomSeries", BoomSeries); + } + }; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQm9vbVNlcmllcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9hcHAvYm9vbS9Cb29tU2VyaWVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O1lBT0E7Z0JBcUJJLG9CQUFZLFVBQWUsRUFBRSxtQkFBd0IsRUFBRSxhQUFvQixFQUFFLE9BQVk7b0JBQXpGLGlCQXVEQztvQkE5RE0sa0JBQWEsR0FBRyxHQUFHLENBQUM7b0JBQ3BCLFlBQU8sR0FBRyxHQUFHLENBQUM7b0JBQ2QsVUFBSyxHQUFHLEdBQUcsQ0FBQztvQkFDWixvQkFBZSxHQUFHLEdBQUcsQ0FBQztvQkFDdEIsU0FBSSxHQUFHLEdBQUcsQ0FBQztvQkFJZCxJQUFJLENBQUMsVUFBVSxHQUFHLE9BQU8sSUFBSSxPQ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JlY2l2ZWRUaW1lU3RhbXBfaW5udW1iZXIgPD0gKyh0YnR4LnRvKSkgJiZcbiAgICAgICAgICAgICAgICAgICAgKHRidHguZW5hYmxlZERheXMudG9Mb3dlckNhc2UoKS5pbmRleE9mKHdlZWtkYXlzW21ldHJpY3JlY2l2ZWRUaW1lU3RhbXAuZ2V0RGF5KCldKSA+IC0xKSAmJlxuICAgICAgICAgICAgICAgICAgICB0YnR4LnRocmVzaG9sZFxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICB0aHJlc2hvbGRzID0gKHRidHgudGhyZXNob2xkICsgXCJcIikuc3BsaXQoXCIsXCIpLm1hcChkID0+ICtkKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdGhyZXNob2xkcztcbiAgICB9XG4gICAgcHJpdmF0ZSBnZXRCR0NvbG9yKCk6IHN0cmluZyB7XG4gICAgICAgIGxldCBiZ0NvbG9yID0gXCJ0cmFuc3BhcmVudFwiO1xuICAgICAgICBpZiAoXy5pc05hTih0aGlzLnZhbHVlKSB8fCB0aGlzLnZhbHVlID09PSBudWxsKSB7XG4gICAgICAgICAgICBiZ0NvbG9yID0gdGhpcy5wYXR0ZXJuLm51bGxfY29sb3IgfHwgXCJkYXJrcmVkXCI7XG4gICAgICAgICAgICBpZiAodGhpcy5wYXR0ZXJuLm51bGxfY29sb3IgPT09IFwiXCIpIHtcbiAgICAgICAgICAgICAgICBiZ0NvbG9yID0gXCJ0cmFuc3BhcmVudFwiO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaWYgKHRoaXMucGF0dGVybi5lbmFibGVfYmdDb2xvciAmJiB0aGlzLnBhdHRlcm4uYmdDb2xvcnMpIHtcbiAgICAgICAgICAgICAgICBsZXQgbGlzdF9vZl9iZ0NvbG9yc19iYXNlZF9vbl90aHJlc2hvbGRzID0gdGhpcy5wYXR0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wbGFjZVRva2Vucyh0aGlzLnJvd19uYW1lKTtcbiAgICAgICAgdGhpcy5jb2xfbmFtZSA9IHJlcGxhY2VUb2tlbnModGhpcy5jb2xfbmFtZSk7XG4gICAgICAgIHRoaXMuZGlzcGxheV92YWx1ZSA9IHJlcGxhY2VUb2tlbnModGhpcy5kaXNwbGF5X3ZhbHVlKTtcbiAgICB9XG59XG5cbmV4cG9ydCB7XG4gICAgQm9vbVNlcmllc1xufTtcbiJdfQ== \ No newline at end of file diff --git a/dist/app/boom/BoomTimeBasedThreshold.js b/dist/app/boom/BoomTimeBasedThreshold.js index 254ca0e..71369e5 100644 --- a/dist/app/boom/BoomTimeBasedThreshold.js +++ b/dist/app/boom/BoomTimeBasedThreshold.js @@ -1,22 +1,22 @@ -System.register([], function (exports_1, context_1) { - "use strict"; - var BoomTimeBasedThreshold; - var __moduleName = context_1 && context_1.id; - return { - setters: [], - execute: function () { - BoomTimeBasedThreshold = (function () { - function BoomTimeBasedThreshold() { - this.enabledDays = "Sun,Mon,Tue,Wed,Thu,Fri,Sat"; - this.from = "0000"; - this.name = "Early morning of everyday"; - this.threshold = "70,90"; - this.to = "0530"; - } - return BoomTimeBasedThreshold; - }()); - exports_1("BoomTimeBasedThreshold", BoomTimeBasedThreshold); - } - }; -}); +System.register([], function (exports_1, context_1) { + "use strict"; + var BoomTimeBasedThreshold; + var __moduleName = context_1 && context_1.id; + return { + setters: [], + execute: function () { + BoomTimeBasedThreshold = (function () { + function BoomTimeBasedThreshold() { + this.enabledDays = "Sun,Mon,Tue,Wed,Thu,Fri,Sat"; + this.from = "0000"; + this.name = "Early morning of everyday"; + this.threshold = "70,90"; + this.to = "0530"; + } + return BoomTimeBasedThreshold; + }()); + exports_1("BoomTimeBasedThreshold", BoomTimeBasedThreshold); + } + }; +}); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQm9vbVRpbWVCYXNlZFRocmVzaG9sZC5qcyIsInNvdXJjZVJvb3QiO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cbiAgICAgICAgdGhpcy50aHJlc2hvbGQgPSBcIjcwLDkwXCI7XHJcbiAgICAgICAgdGhpcy50byA9IFwiMDUzMFwiO1xyXG4gICAgfVxyXG59XHJcblxyXG5leHBvcnQge1xyXG4gICAgQm9vbVRpbWVCYXNlZFRocmVzaG9sZFxyXG59O1xyXG4iXX0= \ No newline at end of file diff --git a/dist/app/boom/BoomUtils.js b/dist/app/boom/BoomUtils.js index 07770a7..d4ef348 100644 --- a/dist/app/boom/BoomUtils.js +++ b/dist/app/boom/BoomUtils.js @@ -1,126 +1,126 @@ -System.register(["lodash"], function (exports_1, context_1) { - "use strict"; - var lodash_1, normalizeColor, replaceTokens, getActualNameWithoutTokens, getDecimalsForValue, getItemBasedOnThreshold; - var __moduleName = context_1 && context_1.id; - return { - setters: [ - function (lodash_1_1) { - lodash_1 = lodash_1_1; - } - ], - execute: function () { - normalizeColor = function (color) { - if (color.toLowerCase() === "green") { - return "rgba(50, 172, 45, 0.97)"; - } - else if (color.toLowerCase() === "orange") { - return "rgba(237, 129, 40, 0.89)"; - } - else if (color.toLowerCase() === "red") { - return "rgba(245, 54, 54, 0.9)"; - } - else { - return color.toLowerCase(); - } - }; - exports_1("normalizeColor", normalizeColor); - replaceTokens = function (value) { - if (!value) { - return value; - } - value = value + ""; - value = value.split(" ").map(function (a) { - if (a.startsWith("_fa-") && a.endsWith("_")) { - var icon = a.replace(/\_/g, "").split(",")[0]; - var color = a.indexOf(",") > -1 ? " style=\"color:" + normalizeColor(a.replace(/\_/g, "").split(",")[1]) + "\" " : ""; - var repeatCount = a.split(",").length > 2 ? +(a.replace(/\_/g, "").split(",")[2]) : 1; - a = (" ").repeat(repeatCount); - } - else if (a.startsWith("_img-") && a.endsWith("_")) { - a = a.slice(0, -1); - var imgUrl = a.replace("_img-", "").split(",")[0]; - var imgWidth = a.split(",").length > 1 ? a.replace("_img-", "").split(",")[1] : "20px"; - var imgHeight = a.split(",").length > 2 ? a.replace("_img-", "").split(",")[2] : "20px"; - var repeatCount = a.split(",").length > 3 ? +(a.replace("_img-", "").split(",")[3]) : 1; - a = ("").repeat(repeatCount); - } - return a; - }).join(" "); - return value; - }; - exports_1("replaceTokens", replaceTokens); - getActualNameWithoutTokens = function (value) { - if (!value) { - return value + ""; - } - value = value + ""; - return value.split(" ").map(function (a) { - if (a.startsWith("_fa-") && a.endsWith("_")) { - a = ""; - } - else if (a.startsWith("_img-") && a.endsWith("_")) { - a = ""; - } - return a; - }).join(" "); - }; - exports_1("getActualNameWithoutTokens", getActualNameWithoutTokens); - getDecimalsForValue = function (value, _decimals) { - if (lodash_1.default.isNumber(+_decimals)) { - var o = { - decimals: _decimals, - scaledDecimals: null - }; - return o; - } - var delta = value / 2; - var dec = -Math.floor(Math.log(delta) / Math.LN10); - var magn = Math.pow(10, -dec), norm = delta / magn, size; - if (norm < 1.5) { - size = 1; - } - else if (norm < 3) { - size = 2; - if (norm > 2.25) { - size = 2.5; - ++dec; - } - } - else if (norm < 7.5) { - size = 5; - } - else { - size = 10; - } - size *= magn; - if (Math.floor(value) === value) { - dec = 0; - } - var result = { - decimals: Math.max(0, dec), - scaledDecimals: Math.max(0, dec) - Math.floor(Math.log(size) / Math.LN10) + 2 - }; - return result; - }; - exports_1("getDecimalsForValue", getDecimalsForValue); - getItemBasedOnThreshold = function (thresholds, ranges, value, defaultValue) { - var c = defaultValue; - if (thresholds && ranges && typeof value === "number" && thresholds.length + 1 <= ranges.length) { - ranges = lodash_1.default.dropRight(ranges, ranges.length - thresholds.length - 1); - if (ranges[ranges.length - 1] === "") { - ranges[ranges.length - 1] = defaultValue; - } - for (var i = thresholds.length; i > 0; i--) { - if (value >= thresholds[i - 1]) { - return ranges[i]; - } - } - return lodash_1.default.first(ranges); - } - return c; - }; - exports_1("getItemBasedOnThreshold", getItemBasedOnThreshold); - } - }; -}); +System.register(["lodash"], function (exports_1, context_1) { + "use strict"; + var lodash_1, normalizeColor, replaceTokens, getActualNameWithoutTokens, getDecimalsForValue, getItemBasedOnThreshold; + var __moduleName = context_1 && context_1.id; + return { + setters: [ + function (lodash_1_1) { + lodash_1 = lodash_1_1; + } + ], + execute: function () { + normalizeColor = function (color) { + if (color.toLowerCase() === "green") { + return "rgba(50, 172, 45, 0.97)"; + } + else if (color.toLowerCase() === "orange") { + return "rgba(237, 129, 40, 0.89)"; + } + else if (color.toLowerCase() === "red") { + return "rgba(245, 54, 54, 0.9)"; + } + else { + return color.toLowerCase(); + } + }; + exports_1("normalizeColor", normalizeColor); + replaceTokens = function (value) { + if (!value) { + return value; + } + value = value + ""; + value = value.split(" ").map(function (a) { + if (a.startsWith("_fa-") && a.endsWith("_")) { + var icon = a.replace(/\_/g, "").split(",")[0]; + var color = a.indexOf(",") > -1 ? " style=\"color:" + normalizeColor(a.replace(/\_/g, "").split(",")[1]) + "\" " : ""; + var repeatCount = a.split(",").length > 2 ? +(a.replace(/\_/g, "").split(",")[2]) : 1; + a = (" ").repeat(repeatCount); + } + else if (a.startsWith("_img-") && a.endsWith("_")) { + a = a.slice(0, -1); + var imgUrl = a.replace("_img-", "").split(",")[0]; + var imgWidth = a.split(",").length > 1 ? a.replace("_img-", "").split(",")[1] : "20px"; + var imgHeight = a.split(",").length > 2 ? a.replace("_img-", "").split(",")[2] : "20px"; + var repeatCount = a.split(",").length > 3 ? +(a.replace("_img-", "").split(",")[3]) : 1; + a = ("").repeat(repeatCount); + } + return a; + }).join(" "); + return value; + }; + exports_1("replaceTokens", replaceTokens); + getActualNameWithoutTokens = function (value) { + if (!value) { + return value + ""; + } + value = value + ""; + return value.split(" ").map(function (a) { + if (a.startsWith("_fa-") && a.endsWith("_")) { + a = ""; + } + else if (a.startsWith("_img-") && a.endsWith("_")) { + a = ""; + } + return a; + }).join(" "); + }; + exports_1("getActualNameWithoutTokens", getActualNameWithoutTokens); + getDecimalsForValue = function (value, _decimals) { + if (lodash_1.default.isNumber(+_decimals)) { + var o = { + decimals: _decimals, + scaledDecimals: null + }; + return o; + } + var delta = value / 2; + var dec = -Math.floor(Math.log(delta) / Math.LN10); + var magn = Math.pow(10, -dec), norm = delta / magn, size; + if (norm < 1.5) { + size = 1; + } + else if (norm < 3) { + size = 2; + if (norm > 2.25) { + size = 2.5; + ++dec; + } + } + else if (norm < 7.5) { + size = 5; + } + else { + size = 10; + } + size *= magn; + if (Math.floor(value) === value) { + dec = 0; + } + var result = { + decimals: Math.max(0, dec), + scaledDecimals: Math.max(0, dec) - Math.floor(Math.log(size) / Math.LN10) + 2 + }; + return result; + }; + exports_1("getDecimalsForValue", getDecimalsForValue); + getItemBasedOnThreshold = function (thresholds, ranges, value, defaultValue) { + var c = defaultValue; + if (thresholds && ranges && typeof value === "number" && thresholds.length + 1 <= ranges.length) { + ranges = lodash_1.default.dropRight(ranges, ranges.length - thresholds.length - 1); + if (ranges[ranges.length - 1] === "") { + ranges[ranges.length - 1] = defaultValue; + } + for (var i = thresholds.length; i > 0; i--) { + if (value >= thresholds[i - 1]) { + return ranges[i]; + } + } + return lodash_1.default.first(ranges); + } + return c; + }; + exports_1("getItemBasedOnThreshold", getItemBasedOnThreshold); + } + }; +}); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQm9vbVV0aWxzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2FwcC9ib29tL0Jvb21VdGlscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztZQUVNLGNBQWMsR0FBRyxVQUFVLEtBQUs7Z0JBQ2xDLElBQUksS0FBSyxDQUFDLFdBQVcsRUFBRSxLQUFLLE9BQU8sRUFBRTtvQkFDakMsT0FBTyx5QkFBeUIsQ0FBQztpQkFDcEM7cUJBQU0sSUFBSSxLQUFLLENBQUMsV0FBVyxFQUFFLEtBQUssUUFBUSxFQUFFO29CQUN6QyxPQUFPLDBCQUEwQixDQUFDO2lCQUNyQztxQkFBTSxJQUFJLEtBQUssQ0FBQyxXQUFXLEVBQUUs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XG4gICAgICAgIHJhbmdlcyA9IF8uZHJvcFJpZ2h0KHJhbmdlcywgcmFuZ2VzLmxlbmd0aCAtIHRocmVzaG9sZHMubGVuZ3RoIC0gMSk7XHJcbiAgICAgICAgaWYgKHJhbmdlc1tyYW5nZXMubGVuZ3RoIC0gMV0gPT09IFwiXCIpIHtcclxuICAgICAgICAgICAgcmFuZ2VzW3Jhbmdlcy5sZW5ndGggLSAxXSA9IGRlZmF1bHRWYWx1ZTtcclxuICAgICAgICB9XHJcbiAgICAgICAgZm9yIChsZXQgaSA9IHRocmVzaG9sZHMubGVuZ3RoOyBpID4gMDsgaS0tKSB7XHJcbiAgICAgICAgICAgIGlmICh2YWx1ZSA+PSB0aHJlc2hvbGRzW2kgLSAxXSkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHJhbmdlc1tpXTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gXy5maXJzdChyYW5nZXMpO1xyXG4gICAgfVxyXG4gICAgcmV0dXJuIGM7XHJcblxyXG59O1xyXG5leHBvcnQge1xyXG4gICAgbm9ybWFsaXplQ29sb3IsXHJcbiAgICByZXBsYWNlVG9rZW5zLFxyXG4gICAgZ2V0QWN0dWFsTmFtZVdpdGhvdXRUb2tlbnMsXHJcbiAgICBnZXREZWNpbWFsc0ZvclZhbHVlLFxyXG4gICAgZ2V0SXRlbUJhc2VkT25UaHJlc2hvbGRcclxufTtcclxuIl19 \ No newline at end of file diff --git a/dist/app/boom/index.js b/dist/app/boom/index.js index 48479ff..a9b36cd 100644 --- a/dist/app/boom/index.js +++ b/dist/app/boom/index.js @@ -1,40 +1,40 @@ -System.register(["./BoomUtils", "./BoomTimeBasedThreshold", "./BoomPattern", "./BoomSeries", "./BoomOutput"], function (exports_1, context_1) { - "use strict"; - var __moduleName = context_1 && context_1.id; - return { - setters: [ - function (BoomUtils_1_1) { - exports_1({ - "normalizeColor": BoomUtils_1_1["normalizeColor"], - "replaceTokens": BoomUtils_1_1["replaceTokens"], - "getActualNameWithoutTokens": BoomUtils_1_1["getActualNameWithoutTokens"], - "getDecimalsForValue": BoomUtils_1_1["getDecimalsForValue"], - "getItemBasedOnThreshold": BoomUtils_1_1["getItemBasedOnThreshold"] - }); - }, - function (BoomTimeBasedThreshold_1_1) { - exports_1({ - "BoomTimeBasedThreshold": BoomTimeBasedThreshold_1_1["BoomTimeBasedThreshold"] - }); - }, - function (BoomPattern_1_1) { - exports_1({ - "BoomPattern": BoomPattern_1_1["BoomPattern"] - }); - }, - function (BoomSeries_1_1) { - exports_1({ - "BoomSeries": BoomSeries_1_1["BoomSeries"] - }); - }, - function (BoomOutput_1_1) { - exports_1({ - "BoomOutput": BoomOutput_1_1["BoomOutput"] - }); - } - ], - execute: function () { - } - }; -}); +System.register(["./BoomUtils", "./BoomTimeBasedThreshold", "./BoomPattern", "./BoomSeries", "./BoomOutput"], function (exports_1, context_1) { + "use strict"; + var __moduleName = context_1 && context_1.id; + return { + setters: [ + function (BoomUtils_1_1) { + exports_1({ + "normalizeColor": BoomUtils_1_1["normalizeColor"], + "replaceTokens": BoomUtils_1_1["replaceTokens"], + "getActualNameWithoutTokens": BoomUtils_1_1["getActualNameWithoutTokens"], + "getDecimalsForValue": BoomUtils_1_1["getDecimalsForValue"], + "getItemBasedOnThreshold": BoomUtils_1_1["getItemBasedOnThreshold"] + }); + }, + function (BoomTimeBasedThreshold_1_1) { + exports_1({ + "BoomTimeBasedThreshold": BoomTimeBasedThreshold_1_1["BoomTimeBasedThreshold"] + }); + }, + function (BoomPattern_1_1) { + exports_1({ + "BoomPattern": BoomPattern_1_1["BoomPattern"] + }); + }, + function (BoomSeries_1_1) { + exports_1({ + "BoomSeries": BoomSeries_1_1["BoomSeries"] + }); + }, + function (BoomOutput_1_1) { + exports_1({ + "BoomOutput": BoomOutput_1_1["BoomOutput"] + }); + } + ], + execute: function () { + } + }; +}); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYXBwL2Jvb20vaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB7IElCb29tUGF0dGVybiwgSUJvb21TZXJpZXMsIElCb29tVGltZUJhc2VkVGhyZXNob2xkLCBJQm9vbVJlbmRlcmluZ09wdGlvbnMsIElCb29tVGFibGUsIElCb29tSFRNTCwgSUJvb21DZWxsRGV0YWlscywgSUJvb21UYWJsZVRyYW5zZm9ybWF0aW9uT3B0aW9ucyB9IGZyb20gXCIuL0Jvb20uaW50ZXJmYWNlXCI7XHJcbmV4cG9ydCB7IG5vcm1hbGl6ZUNvbG9yLCByZXBsYWNlVG9rZW5zLCBnZXRBY3R1YWxOYW1lV2l0aG91dFRva2VucywgZ2V0RGVjaW1hbHNGb3JWYWx1ZSwgZ2V0SXRlbUJhc2VkT25UaHJlc2hvbGQgfSBmcm9tIFwiLi9Cb29tVXRpbHNcIjtcclxuZXhwb3J0IHsgQm9vbVRpbWVCYXNlZFRocmVzaG9sZCB9IGZyb20gXCIuL0Jvb21UaW1lQmFzZWRUaHJlc2hvbGRcIjtcclxuZXhwb3J0IHsgQm9vbVBhdHRlcm4gfSBmcm9tIFwiLi9Cb29tUGF0dGVyblwiO1xyXG5leHBvcnQgeyBCb29tU2VyaWVzIH0gZnJvbSBcIi4vQm9vbVNlcmllc1wiO1xyXG5leHBvcnQgeyBCb29tT3V0cHV0IH0gZnJvbSBcIi4vQm9vbU91dHB1dFwiO1xyXG4iXX0= \ No newline at end of file diff --git a/dist/app/config.js b/dist/app/config.js index f239f21..05eafc4 100644 --- a/dist/app/config.js +++ b/dist/app/config.js @@ -1,37 +1,37 @@ -System.register([], function (exports_1, context_1) { - "use strict"; - var plugin_id, value_name_options, textAlignmentOptions, config; - var __moduleName = context_1 && context_1.id; - return { - setters: [], - execute: function () { - plugin_id = "yesoreyeram-boomtable-panel"; - exports_1("plugin_id", plugin_id); - value_name_options = [ - { text: "Min", value: "min" }, - { text: "Max", value: "max" }, - { text: "Average", value: "avg" }, - { text: "Current", value: "current" }, - { text: "Total", value: "total" } - ]; - exports_1("value_name_options", value_name_options); - textAlignmentOptions = ["left", "right", "center"]; - exports_1("textAlignmentOptions", textAlignmentOptions); - config = { - debug_mode: false, - error: undefined, - groupedData: undefined, - hide_first_column: false, - hide_headers: false, - panelDefaults: { - activePatternIndex: -1, - default_title_for_rows: "Metric", - patterns: [], - row_col_wrapper: "_", - } - }; - exports_1("config", config); - } - }; -}); +System.register([], function (exports_1, context_1) { + "use strict"; + var plugin_id, value_name_options, textAlignmentOptions, config; + var __moduleName = context_1 && context_1.id; + return { + setters: [], + execute: function () { + plugin_id = "yesoreyeram-boomtable-panel"; + exports_1("plugin_id", plugin_id); + value_name_options = [ + { text: "Min", value: "min" }, + { text: "Max", value: "max" }, + { text: "Average", value: "avg" }, + { text: "Current", value: "current" }, + { text: "Total", value: "total" } + ]; + exports_1("value_name_options", value_name_options); + textAlignmentOptions = ["left", "right", "center"]; + exports_1("textAlignmentOptions", textAlignmentOptions); + config = { + debug_mode: false, + error: undefined, + groupedData: undefined, + hide_first_column: false, + hide_headers: false, + panelDefaults: { + activePatternIndex: -1, + default_title_for_rows: "Metric", + patterns: [], + row_col_wrapper: "_", + } + }; + exports_1("config", config); + } + }; +}); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2FwcC9jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7OztZQUFNLFNBQVMsR0FBRyw2QkFBNkIsQ0FBQzs7WUFDMUMsa0JBQWtCLEdBQUc7Z0JBQ3ZCLEVBQUUsSUFBSSxFQUFFLEtBQUssRUFBRSxLQUFLLEVBQUUsS0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iQ3VycmVudFwiLCB2YWx1ZTogXCJjdXJyZW50XCIgfSxcclxuICAgIHsgdGV4dDogXCJUb3RhbFwiLCB2YWx1ZTogXCJ0b3RhbFwiIH1cclxuXTtcclxuY29uc3QgdGV4dEFsaWdubWVudE9wdGlvbnMgPSBbXCJsZWZ0XCIsIFwicmlnaHRcIiwgXCJjZW50ZXJcIl07XHJcbmNvbnN0IGNvbmZpZzogYW55ID0ge1xyXG4gICAgZGVidWdfbW9kZTogZmFsc2UsXHJcbiAgICBlcnJvcjogdW5kZWZpbmVkLFxyXG4gICAgZ3JvdXBlZERhdGE6IHVuZGVmaW5lZCxcclxuICAgIGhpZGVfZmlyc3RfY29sdW1uOiBmYWxzZSxcclxuICAgIGhpZGVfaGVhZGVyczogZmFsc2UsXHJcbiAgICBwYW5lbERlZmF1bHRzOiB7XHJcbiAgICAgICAgYWN0aXZlUGF0dGVybkluZGV4OiAtMSxcclxuICAgICAgICBkZWZhdWx0X3RpdGxlX2Zvcl9yb3dzOiBcIk1ldHJpY1wiLFxyXG4gICAgICAgIHBhdHRlcm5zOiBbXSxcclxuICAgICAgICByb3dfY29sX3dyYXBwZXI6IFwiX1wiLFxyXG4gICAgfVxyXG59O1xyXG5cclxuZXhwb3J0IHtcclxuICAgIHBsdWdpbl9pZCxcclxuICAgIHZhbHVlX25hbWVfb3B0aW9ucyxcclxuICAgIHRleHRBbGlnbm1lbnRPcHRpb25zLFxyXG4gICAgY29uZmlnXHJcbn07XHJcbiJdfQ== \ No newline at end of file diff --git a/dist/module.js b/dist/module.js index 6401cbd..e61e7a4 100644 --- a/dist/module.js +++ b/dist/module.js @@ -1,175 +1,175 @@ -System.register(["lodash", "app/core/utils/kbn", "app/plugins/sdk", "./app/boom/index", "./app/config", "./app/app"], function (exports_1, context_1) { - "use strict"; - var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; - })(); - var lodash_1, kbn_1, sdk_1, index_1, config_1, app_1, GrafanaBoomTableCtrl; - var __moduleName = context_1 && context_1.id; - return { - setters: [ - function (lodash_1_1) { - lodash_1 = lodash_1_1; - }, - function (kbn_1_1) { - kbn_1 = kbn_1_1; - }, - function (sdk_1_1) { - sdk_1 = sdk_1_1; - }, - function (index_1_1) { - index_1 = index_1_1; - }, - function (config_1_1) { - config_1 = config_1_1; - }, - function (app_1_1) { - app_1 = app_1_1; - } - ], - execute: function () { - sdk_1.loadPluginCss({ - dark: "plugins/" + config_1.plugin_id + "/css/default.dark.css", - light: "plugins/" + config_1.plugin_id + "/css/default.light.css" - }); - GrafanaBoomTableCtrl = (function (_super) { - __extends(GrafanaBoomTableCtrl, _super); - function GrafanaBoomTableCtrl($scope, $injector, $sce) { - var _this = _super.call(this, $scope, $injector) || this; - _this.unitFormats = kbn_1.default.getUnitFormats(); - _this.valueNameOptions = config_1.value_name_options; - _this.textAlignmentOptions = config_1.textAlignmentOptions; - _this.sorting_props = { - col_index: -1, - direction: "desc" - }; - lodash_1.default.defaults(_this.panel, config_1.config.panelDefaults); - _this.panel.defaultPattern = _this.panel.defaultPattern || app_1.defaultPattern; - _this.$sce = $sce; - _this.updatePrototypes(); - _this.events.on("data-received", _this.onDataReceived.bind(_this)); - _this.events.on("data-snapshot-load", _this.onDataReceived.bind(_this)); - _this.events.on("init-edit-mode", _this.onInitEditMode.bind(_this)); - _this.panel.activePatternIndex = _this.panel.activePatternIndex === -1 ? _this.panel.patterns.length : _this.panel.activePatternIndex; - return _this; - } - GrafanaBoomTableCtrl.prototype.updatePrototypes = function () { - Object.setPrototypeOf(this.panel.defaultPattern, index_1.BoomPattern.prototype); - this.panel.patterns.map(function (pattern) { - Object.setPrototypeOf(pattern, index_1.BoomPattern.prototype); - return pattern; - }); - }; - GrafanaBoomTableCtrl.prototype.onDataReceived = function (data) { - this.dataReceived = data; - this.render(); - }; - GrafanaBoomTableCtrl.prototype.onInitEditMode = function () { - this.addEditorTab("Patterns", "public/plugins/" + config_1.plugin_id + "/partials/patterns.html", 2); - this.addEditorTab("Options", "public/plugins/" + config_1.plugin_id + "/partials/options.html", 3); - }; - GrafanaBoomTableCtrl.prototype.addPattern = function () { - var newPattern = new index_1.BoomPattern({ - row_col_wrapper: this.panel.row_col_wrapper - }); - this.panel.patterns.push(newPattern); - this.panel.activePatternIndex = this.panel.patterns.length - 1; - this.render(); - }; - GrafanaBoomTableCtrl.prototype.removePattern = function (index) { - this.panel.patterns.splice(index, 1); - this.panel.activePatternIndex = (this.panel.patterns && this.panel.patterns.length > 0) ? (this.panel.patterns.length - 1) : -1; - this.render(); - }; - GrafanaBoomTableCtrl.prototype.movePattern = function (direction, index) { - var tempElement = this.panel.patterns[Number(index)]; - if (direction === "UP") { - this.panel.patterns[Number(index)] = this.panel.patterns[Number(index) - 1]; - this.panel.patterns[Number(index) - 1] = tempElement; - this.panel.activePatternIndex = Number(index) - 1; - } - if (direction === "DOWN") { - this.panel.patterns[Number(index)] = this.panel.patterns[Number(index) + 1]; - this.panel.patterns[Number(index) + 1] = tempElement; - this.panel.activePatternIndex = Number(index) + 1; - } - this.render(); - }; - GrafanaBoomTableCtrl.prototype.clonePattern = function (index) { - var copiedPattern = Object.assign({}, this.panel.patterns[Number(index)]); - Object.setPrototypeOf(copiedPattern, index_1.BoomPattern.prototype); - this.panel.patterns.push(copiedPattern); - this.render(); - }; - GrafanaBoomTableCtrl.prototype.sortByHeader = function (headerIndex) { - this.sorting_props.col_index = headerIndex; - this.sorting_props.direction = this.sorting_props.direction === "asc" ? "desc" : "asc"; - this.render(); - }; - GrafanaBoomTableCtrl.prototype.limitText = function (text, maxlength) { - if (text.split('').length > maxlength) { - text = text.substring(0, Number(maxlength) - 3) + "..."; - } - return text; - }; - GrafanaBoomTableCtrl.prototype.link = function (scope, elem, attrs, ctrl) { - this.scope = scope; - this.elem = elem; - this.attrs = attrs; - this.ctrl = ctrl; - }; - GrafanaBoomTableCtrl.templateUrl = "partials/module.html"; - return GrafanaBoomTableCtrl; - }(sdk_1.MetricsPanelCtrl)); - exports_1("PanelCtrl", GrafanaBoomTableCtrl); - GrafanaBoomTableCtrl.prototype.render = function () { - var _this = this; - if (this.dataReceived) { - var outputdata = this.dataReceived.map(function (seriesData) { - var seriesOptions = { - debug_mode: _this.panel.debug_mode, - row_col_wrapper: _this.panel.row_col_wrapper || "_" - }; - return new index_1.BoomSeries(seriesData, _this.panel.defaultPattern, _this.panel.patterns, seriesOptions); - }); - var boomTableTransformationOptions = { - non_matching_cells_color_bg: this.panel.non_matching_cells_color_bg, - non_matching_cells_color_text: this.panel.non_matching_cells_color_text, - non_matching_cells_text: this.panel.non_matching_cells_text, - }; - var boomtabledata = app_1.seriesToTable(outputdata, boomTableTransformationOptions); - var renderingOptions = { - default_title_for_rows: this.panel.default_title_for_rows || config_1.config.default_title_for_rows, - hide_first_column: this.panel.hide_first_column, - hide_headers: this.panel.hide_headers, - text_alignment_firstcolumn: this.panel.text_alignment_firstcolumn, - text_alignment_values: this.panel.text_alignment_values - }; - var boom_output = new index_1.BoomOutput(renderingOptions); - this.outdata = { - cols_found: boomtabledata.cols_found.map(function (col) { return _this.$sce.trustAsHtml(col); }) - }; - var renderingdata = boom_output.getDataAsHTML(boomtabledata, this.sorting_props); - this.elem.find('#boomtable_output_body').html("" + renderingdata.body); - this.elem.find('#boomtable_output_body_debug').html(this.panel.debug_mode ? boom_output.getDataAsDebugHTML(outputdata) : ""); - this.elem.find("[data-toggle='tooltip']").tooltip({ - boundary: "scrollParent" - }); - var rootElem = this.elem.find('.table-panel-scroll'); - var maxheightofpanel = this.panel.debug_mode ? this.ctrl.height - 111 : this.ctrl.height - 31; - rootElem.css({ 'max-height': maxheightofpanel + "px" }); - } - }; - } - }; -}); +System.register(["lodash", "app/core/utils/kbn", "app/plugins/sdk", "./app/boom/index", "./app/config", "./app/app"], function (exports_1, context_1) { + "use strict"; + var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + var lodash_1, kbn_1, sdk_1, index_1, config_1, app_1, GrafanaBoomTableCtrl; + var __moduleName = context_1 && context_1.id; + return { + setters: [ + function (lodash_1_1) { + lodash_1 = lodash_1_1; + }, + function (kbn_1_1) { + kbn_1 = kbn_1_1; + }, + function (sdk_1_1) { + sdk_1 = sdk_1_1; + }, + function (index_1_1) { + index_1 = index_1_1; + }, + function (config_1_1) { + config_1 = config_1_1; + }, + function (app_1_1) { + app_1 = app_1_1; + } + ], + execute: function () { + sdk_1.loadPluginCss({ + dark: "plugins/" + config_1.plugin_id + "/css/default.dark.css", + light: "plugins/" + config_1.plugin_id + "/css/default.light.css" + }); + GrafanaBoomTableCtrl = (function (_super) { + __extends(GrafanaBoomTableCtrl, _super); + function GrafanaBoomTableCtrl($scope, $injector, $sce) { + var _this = _super.call(this, $scope, $injector) || this; + _this.unitFormats = kbn_1.default.getUnitFormats(); + _this.valueNameOptions = config_1.value_name_options; + _this.textAlignmentOptions = config_1.textAlignmentOptions; + _this.sorting_props = { + col_index: -1, + direction: "desc" + }; + lodash_1.default.defaults(_this.panel, config_1.config.panelDefaults); + _this.panel.defaultPattern = _this.panel.defaultPattern || app_1.defaultPattern; + _this.$sce = $sce; + _this.updatePrototypes(); + _this.events.on("data-received", _this.onDataReceived.bind(_this)); + _this.events.on("data-snapshot-load", _this.onDataReceived.bind(_this)); + _this.events.on("init-edit-mode", _this.onInitEditMode.bind(_this)); + _this.panel.activePatternIndex = _this.panel.activePatternIndex === -1 ? _this.panel.patterns.length : _this.panel.activePatternIndex; + return _this; + } + GrafanaBoomTableCtrl.prototype.updatePrototypes = function () { + Object.setPrototypeOf(this.panel.defaultPattern, index_1.BoomPattern.prototype); + this.panel.patterns.map(function (pattern) { + Object.setPrototypeOf(pattern, index_1.BoomPattern.prototype); + return pattern; + }); + }; + GrafanaBoomTableCtrl.prototype.onDataReceived = function (data) { + this.dataReceived = data; + this.render(); + }; + GrafanaBoomTableCtrl.prototype.onInitEditMode = function () { + this.addEditorTab("Patterns", "public/plugins/" + config_1.plugin_id + "/partials/patterns.html", 2); + this.addEditorTab("Options", "public/plugins/" + config_1.plugin_id + "/partials/options.html", 3); + }; + GrafanaBoomTableCtrl.prototype.addPattern = function () { + var newPattern = new index_1.BoomPattern({ + row_col_wrapper: this.panel.row_col_wrapper + }); + this.panel.patterns.push(newPattern); + this.panel.activePatternIndex = this.panel.patterns.length - 1; + this.render(); + }; + GrafanaBoomTableCtrl.prototype.removePattern = function (index) { + this.panel.patterns.splice(index, 1); + this.panel.activePatternIndex = (this.panel.patterns && this.panel.patterns.length > 0) ? (this.panel.patterns.length - 1) : -1; + this.render(); + }; + GrafanaBoomTableCtrl.prototype.movePattern = function (direction, index) { + var tempElement = this.panel.patterns[Number(index)]; + if (direction === "UP") { + this.panel.patterns[Number(index)] = this.panel.patterns[Number(index) - 1]; + this.panel.patterns[Number(index) - 1] = tempElement; + this.panel.activePatternIndex = Number(index) - 1; + } + if (direction === "DOWN") { + this.panel.patterns[Number(index)] = this.panel.patterns[Number(index) + 1]; + this.panel.patterns[Number(index) + 1] = tempElement; + this.panel.activePatternIndex = Number(index) + 1; + } + this.render(); + }; + GrafanaBoomTableCtrl.prototype.clonePattern = function (index) { + var copiedPattern = Object.assign({}, this.panel.patterns[Number(index)]); + Object.setPrototypeOf(copiedPattern, index_1.BoomPattern.prototype); + this.panel.patterns.push(copiedPattern); + this.render(); + }; + GrafanaBoomTableCtrl.prototype.sortByHeader = function (headerIndex) { + this.sorting_props.col_index = headerIndex; + this.sorting_props.direction = this.sorting_props.direction === "asc" ? "desc" : "asc"; + this.render(); + }; + GrafanaBoomTableCtrl.prototype.limitText = function (text, maxlength) { + if (text.split('').length > maxlength) { + text = text.substring(0, Number(maxlength) - 3) + "..."; + } + return text; + }; + GrafanaBoomTableCtrl.prototype.link = function (scope, elem, attrs, ctrl) { + this.scope = scope; + this.elem = elem; + this.attrs = attrs; + this.ctrl = ctrl; + }; + GrafanaBoomTableCtrl.templateUrl = "partials/module.html"; + return GrafanaBoomTableCtrl; + }(sdk_1.MetricsPanelCtrl)); + exports_1("PanelCtrl", GrafanaBoomTableCtrl); + GrafanaBoomTableCtrl.prototype.render = function () { + var _this = this; + if (this.dataReceived) { + var outputdata = this.dataReceived.map(function (seriesData) { + var seriesOptions = { + debug_mode: _this.panel.debug_mode, + row_col_wrapper: _this.panel.row_col_wrapper || "_" + }; + return new index_1.BoomSeries(seriesData, _this.panel.defaultPattern, _this.panel.patterns, seriesOptions); + }); + var boomTableTransformationOptions = { + non_matching_cells_color_bg: this.panel.non_matching_cells_color_bg, + non_matching_cells_color_text: this.panel.non_matching_cells_color_text, + non_matching_cells_text: this.panel.non_matching_cells_text, + }; + var boomtabledata = app_1.seriesToTable(outputdata, boomTableTransformationOptions); + var renderingOptions = { + default_title_for_rows: this.panel.default_title_for_rows || config_1.config.default_title_for_rows, + hide_first_column: this.panel.hide_first_column, + hide_headers: this.panel.hide_headers, + text_alignment_firstcolumn: this.panel.text_alignment_firstcolumn, + text_alignment_values: this.panel.text_alignment_values + }; + var boom_output = new index_1.BoomOutput(renderingOptions); + this.outdata = { + cols_found: boomtabledata.cols_found.map(function (col) { return _this.$sce.trustAsHtml(col); }) + }; + var renderingdata = boom_output.getDataAsHTML(boomtabledata, this.sorting_props); + this.elem.find('#boomtable_output_body').html("" + renderingdata.body); + this.elem.find('#boomtable_output_body_debug').html(this.panel.debug_mode ? boom_output.getDataAsDebugHTML(outputdata) : ""); + this.elem.find("[data-toggle='tooltip']").tooltip({ + boundary: "scrollParent" + }); + var rootElem = this.elem.find('.table-panel-scroll'); + var maxheightofpanel = this.panel.debug_mode ? this.ctrl.height - 111 : this.ctrl.height - 31; + rootElem.css({ 'max-height': maxheightofpanel + "px" }); + } + }; + } + }; +}); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL21vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7WUFVQSxtQkFBYSxDQUFDO2dCQUNaLElBQUksRUFBRSxhQUFXLGtCQUFTLDBCQUF1QjtnQkFDakQsS0FBSyxFQUFFLGFBQVcsa0JBQVMsMkJBQXdCO2FBQ3BELENBQUMsQ0FBQzs7Z0JBRWdDLHdDQUFnQjtnQkFlakQsOEJBQVksTUFBTSxFQUFFLFNBQVMsRUFBRSxJQUFJO29CQUFuQyxZQUNFLGtCQUFNLE1BQU0sRUFBRSxTQUFTLENBQUMsU0FTekI7b0JBdkJNLGlCQUFXLEdBQUcsYUFBRyxDQUFDLGNBQWMsRUFBRSxDQUFDO29CQUNuQyxzQkFBZ0IsR0FBRywyQkFBa0IsQ0FBQztvQkFDdEMsMEJBQW9CLEdBQUcsNkJBQW9CLENBQUM7b0JBRTVDLG1CQUFhLEdBQUc7d0JBQ3JCLFNBQVMsRUFBRSxDQUFDLENBQUM7d0JBQ2IsU0FBUyxFQUFFLE1BQU07cUJBQ2xCLENBQUM7b0JBUUEsZ0JBQUMsQ0FBQyxRQUFRLENBQUMsS0FBSSxDQUFDLEtBQUssRUFBRSxlQUFNLENBQUMsYUFBYSxDQUFDLENBQUM7b0JBQzdDLEtBQUksQ0FBQyxLQUFLLENBQ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b3V0cHV0X2JvZHlfZGVidWcnKS5odG1sKHRoaXMucGFuZWwuZGVidWdfbW9kZSA/IGJvb21fb3V0cHV0LmdldERhdGFBc0RlYnVnSFRNTChvdXRwdXRkYXRhKSA6IGBgKTtcclxuICAgIHRoaXMuZWxlbS5maW5kKFwiW2RhdGEtdG9nZ2xlPSd0b29sdGlwJ11cIikudG9vbHRpcCh7XHJcbiAgICAgIGJvdW5kYXJ5OiBcInNjcm9sbFBhcmVudFwiXHJcbiAgICB9KTtcclxuICAgIGxldCByb290RWxlbSA9IHRoaXMuZWxlbS5maW5kKCcudGFibGUtcGFuZWwtc2Nyb2xsJyk7XHJcbiAgICBsZXQgbWF4aGVpZ2h0b2ZwYW5lbCA9IHRoaXMucGFuZWwuZGVidWdfbW9kZSA/IHRoaXMuY3RybC5oZWlnaHQgLSAxMTEgOiB0aGlzLmN0cmwuaGVpZ2h0IC0gMzE7XHJcbiAgICByb290RWxlbS5jc3MoeyAnbWF4LWhlaWdodCc6IG1heGhlaWdodG9mcGFuZWwgKyBcInB4XCIgfSk7XHJcbiAgfVxyXG59O1xyXG5cclxuZXhwb3J0IHtcclxuICBHcmFmYW5hQm9vbVRhYmxlQ3RybCBhcyBQYW5lbEN0cmxcclxufTtcclxuIl19 \ No newline at end of file diff --git a/dist/partials/options.html b/dist/partials/options.html index ad94e81..e0e18de 100644 --- a/dist/partials/options.html +++ b/dist/partials/options.html @@ -1,128 +1,128 @@ -
-
-
-
-
-
Options
-
-
-
-
-
- - -
-
-
-
-
-
- - -
-
-
-
-
-
- - -
-
-
-
-
-
- - -
-
-
-
-
-
- - -
-
-
-
-
-
- - -
-
-
-
-
-
- - -
-
-
-
-
-
- - -
-
-
-
-
-
- - -
-
-
-
-
-
-
-
-
-
Non matching series
-
-
-
-
-
- - -
-
-
-
-
-
- - -
-
-
-
-
-
- - -
-
-
-
-
+
+
+
+
+
+
Options
+
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
Non matching series
+
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/dist/partials/patterns.html b/dist/partials/patterns.html index 51a8dab..41fa11d 100644 --- a/dist/partials/patterns.html +++ b/dist/partials/patterns.html @@ -1,376 +1,376 @@ -
-
- -
-
-
-
-
Warning : This pattern is currently Disabled
-
-
-
-
-
-
-
-
Pattern
-
-
-
-
- - - - - - - - - - -
-
-
-
- - - - - -
-
-
-
-
-
-
-
-
Stats
-
-
-
-
- - - - -
- - - -
-
-
-
-
-
-
-
-
Thresholds
-
-
-
-
- - -
-
- -
-
- - - - - - -
-
-
-
- - - - - - -
-
-
-
- - - - - - -
-
-
-
-
-
-
-
-
Dynamic Thresholds
-
-
-
-
- - - - -
-
-
-
-
- - - - - - - - - - - - - - - -
-
-
-
-
-
-
-
-
-
Overrides
-
-
-
- - - - - -
-
-
-
- - - - - -
-
-
-
- - - - - -
-
-
-
-
-
-
-
-
Null Handling
-
-
-
-
- - - - - - - - -
-
-
-
- -
-
-
-
-
Hide Series
-
-
-
-
- - - - - -
-
-
-
-
-
-
-
-
Pattern Management
-
-
-
-
- - - - - Currently Enabled - Currently Disabled -
-
-
-
- - - -
-
-
-
- - - -
-
-
-
-
-
+
+
+ +
+
+
+
+
Warning : This pattern is currently Disabled
+
+
+
+
+
+
+
+
Pattern
+
+
+
+
+ + + + + + + + + + +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
Stats
+
+
+
+
+ + + + +
+ + + +
+
+
+
+
+
+
+
+
Thresholds
+
+
+
+
+ + +
+
+ +
+
+ + + + + + +
+
+
+
+ + + + + + +
+
+
+
+ + + + + + +
+
+
+
+
+
+
+
+
Dynamic Thresholds
+
+
+
+
+ + + + +
+
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+
+
+
+
+
+
Overrides
+
+
+
+ + + + + +
+
+
+
+ + + + + +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
Null Handling
+
+
+
+
+ + + + + + + + +
+
+
+
+ +
+
+
+
+
Hide Series
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
Pattern Management
+
+
+
+
+ + + + + Currently Enabled + Currently Disabled +
+
+
+
+ + + +
+
+
+
+ + + +
+
+
+
+
+
\ No newline at end of file diff --git a/dist/plugin.json b/dist/plugin.json index 8ed1a6b..e461fdb 100644 --- a/dist/plugin.json +++ b/dist/plugin.json @@ -1,34 +1,34 @@ -{ - "type": "panel", - "name": "Boom Table", - "id": "yesoreyeram-boomtable-panel", - "info": { - "description": "Boom table panel for Graphite, InfluxDB, Prometheus", - "author": { - "name": "Sriramajeyam Sugumaran", - "url": "https://www.google.com/search?q=Sriramajeyam+Sugumaran" - }, - "keywords": [ - "grafana", - "plugin", - "panel", - "table", - "graphite", - "influxdb", - "prometheus", - "multi column", - "time based thresholds" - ], - "links": [ - { - "name": "Github", - "url": "https://github.com/yesoreyeram/yesoreyeram-boomtable-panel" - } - ], - "version": "1.1.0-unreleased" - }, - "dependencies": { - "grafanaVersion": "4.x.x", - "plugins": [] - } -} +{ + "type": "panel", + "name": "Boom Table", + "id": "yesoreyeram-boomtable-panel", + "info": { + "description": "Boom table panel for Graphite, InfluxDB, Prometheus", + "author": { + "name": "Sriramajeyam Sugumaran", + "url": "https://www.google.com/search?q=Sriramajeyam+Sugumaran" + }, + "keywords": [ + "grafana", + "plugin", + "panel", + "table", + "graphite", + "influxdb", + "prometheus", + "multi column", + "time based thresholds" + ], + "links": [ + { + "name": "Github", + "url": "https://github.com/yesoreyeram/yesoreyeram-boomtable-panel" + } + ], + "version": "1.1.0-unreleased" + }, + "dependencies": { + "grafanaVersion": "4.x.x", + "plugins": [] + } +} diff --git a/src/app/boom/BoomSeries.ts b/src/app/boom/BoomSeries.ts index 512fc97..48b95fb 100644 --- a/src/app/boom/BoomSeries.ts +++ b/src/app/boom/BoomSeries.ts @@ -124,9 +124,9 @@ class BoomSeries implements IBoomSeries { return normalizeColor(bgColor); } private getTextColor(): string { - let textColor = "white"; + let textColor = document.body.classList.contains("theme-light") ? "black" : "white"; if (_.isNaN(this.value) || this.value === null) { - textColor = this.pattern.null_textcolor || "white"; + textColor = this.pattern.null_textcolor || textColor; } else { if (this.pattern.enable_textColor && this.pattern.textColors) { let list_of_textColors_based_on_thresholds = this.pattern.textColors.split("|");