From 12fe3f30f247c1316092dfe654e67d69d6abdf95 Mon Sep 17 00:00:00 2001 From: Keshav Goel Date: Sun, 3 May 2020 19:14:29 +0100 Subject: [PATCH] Added a feature to enable/disbale Opening cell links in a new tab --- dist/app/app.js | 150 +++++++++++----------- dist/app/boom/BoomOutput.js | 183 +++++++++++++-------------- dist/app/boom/BoomPattern.js | 203 +++++++++++++++--------------- dist/app/boom/BoomSeries.js | 220 +++++++++++++++++---------------- dist/app/config.js | 157 +++++++++++------------ dist/partials/editor.html | 16 ++- src/app/app.ts | 2 + src/app/boom/Boom.interface.ts | 2 + src/app/boom/BoomOutput.ts | 5 +- src/app/boom/BoomPattern.ts | 2 + src/app/boom/BoomSeries.ts | 3 + src/app/config.ts | 1 + src/partials/editor.html | 4 + 13 files changed, 489 insertions(+), 459 deletions(-) diff --git a/dist/app/app.js b/dist/app/app.js index b0977ce..a9e838a 100644 --- a/dist/app/app.js +++ b/dist/app/app.js @@ -1,74 +1,76 @@ -System.register(["lodash", "./boom/index", "./config"], function (exports_1, context_1) { - "use strict"; - var lodash_1, index_1, config_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; - }, - function (config_1_1) { - config_1 = config_1_1; - } - ], - execute: function () { - defaultPattern = new index_1.BoomPattern(config_1.default_pattern_options); - 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 rows_without_token = lodash_1.default.uniq(lodash_1.default.map(inputdata, function (d) { return d.row_name_raw; })); - 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.sort(), function (row_name) { - var cols = []; - lodash_1.default.each(cols_found.sort(), 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, - rows_without_token: rows_without_token, - }; - }; - exports_1("seriesToTable", seriesToTable); - } - }; -}); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2FwcC9hcHAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7WUFLTSxjQUFjLEdBQUcsSUFBSSxtQkFBVyxDQUFDLGdDQUF1QixDQUFDLENBQUM7O1lBRTFELGFBQWEsR0FBRyxVQUFTLFNBQXdCLEVBQUUsT0FBd0M7Z0JBQy9GLElBQUksVUFBVSxHQUFHLGdCQUFDLENBQUMsSUFBSSxDQUFDLGdCQUFDLENBQUMsR0FBRyxDQUFDLFNBQVMsRUFBRSxVQUFBLENBQUMsSUFBSSxPQUFBLENBQUMsQ0FBQyxRQUFRLEVBQVYsQ0FBVSxDQUFDLENBQUMsQ0FBQztnQkFDM0QsSUFBSSxrQkFBa0IsR0FBRyxnQkFBQyxDQUFDLElBQUksQ0FBQyxnQkFBQyxDQUFDLEdBQUcsQ0FBQyxTQUFTLEVBQUUsVUFBQSxDQUFDLElBQUksT0FBQSxDQUFDLENBQUMsWUFBWSxFQUFkLENBQWMsQ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GluazogJy0nLFxuICAgICAgICAgIHJvd19uYW1lOiByb3dfbmFtZSxcbiAgICAgICAgICB0b29sdGlwOiAnLScsXG4gICAgICAgICAgdmFsdWU6IE5hTixcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgfSk7XG4gICAgb3V0cHV0LnB1c2goY29scyk7XG4gIH0pO1xuICByZXR1cm4ge1xuICAgIGNvbHNfZm91bmQsXG4gICAgb3V0cHV0LFxuICAgIHJvd3NfZm91bmQsXG4gICAgcm93c193aXRob3V0X3Rva2VuLFxuICB9O1xufTtcblxuZXhwb3J0IHsgZGVmYXVsdFBhdHRlcm4sIHNlcmllc1RvVGFibGUgfTtcbiJdfQ== \ No newline at end of file +System.register(["lodash", "./boom/index", "./config"], function (exports_1, context_1) { + "use strict"; + var lodash_1, index_1, config_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; + }, + function (config_1_1) { + config_1 = config_1_1; + } + ], + execute: function () { + defaultPattern = new index_1.BoomPattern(config_1.default_pattern_options); + 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 rows_without_token = lodash_1.default.uniq(lodash_1.default.map(inputdata, function (d) { return d.row_name_raw; })); + 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.sort(), function (row_name) { + var cols = []; + lodash_1.default.each(cols_found.sort(), 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: '-', + open_link_new_tab: false, + 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: '-', + open_link_new_tab: false, + row_name: row_name, + tooltip: '-', + value: NaN, + }); + } + }); + output.push(cols); + }); + return { + cols_found: cols_found, + output: output, + rows_found: rows_found, + rows_without_token: rows_without_token, + }; + }; + exports_1("seriesToTable", seriesToTable); + } + }; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2FwcC9hcHAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7WUFLTSxjQUFjLEdBQUcsSUFBSSxtQkFBVyxDQUFDLGdDQUF1QixDQUFDLENBQUM7O1lBRTFELGFBQWEsR0FBRyxVQUFTLFNBQXdCLEVBQUUsT0FBd0M7Z0JBQy9GLElBQUksVUFBVSxHQUFHLGdCQUFDLENBQUMsSUFBSSxDQUFDLGdCQUFDLENBQUMsR0FBRyxDQUFDLFNBQVMsRUFBRSxVQUFBLENBQUMsSUFBSSxPQUFBLENBQUMsQ0FBQyxRQUFRLEVBQVYsQ0FBVSxDQUFDLENBQUMsQ0FBQztnQkFDM0QsSUFBSSxrQkFBa0IsR0FBRyxnQkFBQyxDQUFDLElBQUksQ0FBQyxnQkFBQyxDQUFDLEdBQUcsQ0FBQyxTQUFTLEVBQUUsVUFBQSxDQUFDLElBQUksT0FBQSxDQUFDLENBQUMsWUFBWSxFQUFkLENBQWMsQ0FBQyxDQUFDLENBQUM7Z0JBQ3ZFLElBQUksVUFBVSxHQUFHLGdCQUFDLENBQUMsSUFBSSxDQUFDLGdCQUFDLENBQUMsR0FBRyxDQUFDLFNBQVMsRUFBRSx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xcbiAgICAgICAgICBvcGVuX2xpbmtfbmV3X3RhYjogZmFsc2UsXG4gICAgICAgICAgcm93X25hbWU6IHJvd19uYW1lLFxuICAgICAgICAgIHRvb2x0aXA6ICctJyxcbiAgICAgICAgICB2YWx1ZTogTmFOLFxuICAgICAgICB9KTtcbiAgICAgIH1cbiAgICB9KTtcbiAgICBvdXRwdXQucHVzaChjb2xzKTtcbiAgfSk7XG4gIHJldHVybiB7XG4gICAgY29sc19mb3VuZCxcbiAgICBvdXRwdXQsXG4gICAgcm93c19mb3VuZCxcbiAgICByb3dzX3dpdGhvdXRfdG9rZW4sXG4gIH07XG59O1xuXG5leHBvcnQgeyBkZWZhdWx0UGF0dGVybiwgc2VyaWVzVG9UYWJsZSB9O1xuIl19 \ No newline at end of file diff --git a/dist/app/boom/BoomOutput.js b/dist/app/boom/BoomOutput.js index eba1164..ac1f97d 100644 --- a/dist/app/boom/BoomOutput.js +++ b/dist/app/boom/BoomOutput.js @@ -1,90 +1,93 @@ -System.register(["lodash", "./BoomUtils"], function (exports_1, context_1) { - "use strict"; - var lodash_1, BoomUtils_1, BoomOutput; - var __moduleName = context_1 && context_1.id; - return { - setters: [ - function (lodash_1_1) { - lodash_1 = lodash_1_1; - }, - function (BoomUtils_1_1) { - BoomUtils_1 = BoomUtils_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 || ''; - this.first_column_link = options.first_column_link || '#'; - } - return BoomOutput; - }()); - exports_1("BoomOutput", BoomOutput); - BoomOutput.prototype.getDataAsHTML = function (data, sorting_props) { - var _this = this; - var getLinkifiedColumn = function (rowName, first_column_link, raw_rowName) { - if (first_column_link !== '#') { - first_column_link = first_column_link.replace(new RegExp('_row_name_', 'g'), BoomUtils_1.getActualNameWithoutTokens(raw_rowName).trim()); - rowName = "" + rowName + ""; - } - return rowName; - }; - var output = { - body: '', - }; - if (sorting_props && - sorting_props.col_index !== undefined && - sorting_props.col_index > -1 && - data && - data.output && - data.output.length >= sorting_props.col_index) { - 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) { - var raw_rowName = lodash_1.default.first(o.map(function (item) { return item.row_name_raw; })); - output.body += "\n \n " + getLinkifiedColumn(lodash_1.default.first(o.map(function (item) { return item.row_name; })), String(_this.first_column_link), raw_rowName) + "\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; -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o0cHg7dGV4dC1hbGlnbjpsZWZ0O3dpZHRoOjEwJTsgdGl0bGU9XCJUZXh0IENvbG9yXCIgPiR7ZC5jb2xvcl90ZXh0fTwvdGQ+XG4gICAgICAgIDwvdHI+XG4gICAgICAgIGA7XG4gIH0pLmpvaW4oYGApO1xuICByZXR1cm4gZGVidWdkYXRhO1xufTtcbiJdfQ== \ No newline at end of file +System.register(["lodash", "./BoomUtils"], function (exports_1, context_1) { + "use strict"; + var lodash_1, BoomUtils_1, BoomOutput; + var __moduleName = context_1 && context_1.id; + return { + setters: [ + function (lodash_1_1) { + lodash_1 = lodash_1_1; + }, + function (BoomUtils_1_1) { + BoomUtils_1 = BoomUtils_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 || ''; + this.first_column_link = options.first_column_link || '#'; + } + return BoomOutput; + }()); + exports_1("BoomOutput", BoomOutput); + BoomOutput.prototype.getDataAsHTML = function (data, sorting_props) { + var _this = this; + var getLinkifiedColumn = function (rowName, first_column_link, raw_rowName) { + if (first_column_link !== '#') { + first_column_link = first_column_link.replace(new RegExp('_row_name_', 'g'), BoomUtils_1.getActualNameWithoutTokens(raw_rowName).trim()); + rowName = "" + rowName + ""; + } + return rowName; + }; + var output = { + body: '', + }; + if (sorting_props && + sorting_props.col_index !== undefined && + sorting_props.col_index > -1 && + data && + data.output && + data.output.length >= sorting_props.col_index) { + 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) { + var raw_rowName = lodash_1.default.first(o.map(function (item) { return item.row_name_raw; })); + output.body += "\n \n " + getLinkifiedColumn(lodash_1.default.first(o.map(function (item) { return item.row_name; })), String(_this.first_column_link), raw_rowName) + "\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_link_value = item.open_link_new_tab + ? "" + item.display_value + "" + : "" + item.display_value + ""; + var item_display = item.link === '#' + ? item.display_value + : item_link_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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQm9vbU91dHB1dC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9hcHAvYm9vbS9Cb29tT3V0cHV0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7O1lBSUE7Z0JBU0Usb0JBQVksT0FBOEI7b0JBQ3hDLElBQUksQ0FBQyx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ICAgICAgPHRkIHN0eWxlPVwicGFkZGluZzo0cHg7dGV4dC1hbGlnbjpsZWZ0O3dpZHRoOjEwJTsgdGl0bGU9XCJCRyBDb2xvclwiID4ke2QuY29sb3JfYmd9PC90ZD5cbiAgICAgICAgICAgIDx0ZCBzdHlsZT1cInBhZGRpbmc6NHB4O3RleHQtYWxpZ246bGVmdDt3aWR0aDoxMCU7IHRpdGxlPVwiVGV4dCBDb2xvclwiID4ke2QuY29sb3JfdGV4dH08L3RkPlxuICAgICAgICA8L3RyPlxuICAgICAgICBgO1xuICB9KS5qb2luKGBgKTtcbiAgcmV0dXJuIGRlYnVnZGF0YTtcbn07XG4iXX0= \ No newline at end of file diff --git a/dist/app/boom/BoomPattern.js b/dist/app/boom/BoomPattern.js index ba3cded..901377d 100644 --- a/dist/app/boom/BoomPattern.js +++ b/dist/app/boom/BoomPattern.js @@ -1,101 +1,102 @@ -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.displayTemplate = options && options.displayTemplate ? options.displayTemplate : '_value_'; - this.defaultBGColor = options && options.defaultBGColor ? options.defaultBGColor : ''; - this.defaultTextColor = options && options.defaultTextColor ? options.defaultTextColor : ''; - 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQm9vbVBhdHRlcm4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYXBwL2Jvb20vQm9vbVBhdHRlcm4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7WUFFQTtnQkE0Q0UscUJBQVksT0FBWTtvQkEzQ2hCLG9CQUFlLEdBQUcsR0FBRyxDQUFDO29CQTRDNUIsSUFBSSxPQUFPLElBQUksT0FBTyxDQUFDLGVBQWUsRUFBRTt3QkFDdEMsSUFBSSxDQUFDLGVBQWUsR0FBRyxPQUFPLENBQUMsZUFBZSxDQUFDO3FCQUNoRDtvQkFDRCxJQUFJLENBQUMsUUFBUSxHQUFHLE9BQU8sSUFBSSxPQUFPLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQyxPQUFPLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQyxrQkFBa0IsQ0FBQztvQkFDcEYsSUFBSSxDQUFDLGtCQUFrQixHQUFHLE9BQU8sSUFBSSxPQUFPLENBQUMsa0JBQWtCLENBQUMsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxrQkFBa0IsQ0FBQyxDQUFDLENBQUMsMkJBQTJCLENBQUM7b0JBQzNILElBQUksQ0FBQyxVQUFVLEdBQUcsT0FBTyxJQUFJLE9BQU8sQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDLGtCQUFrQixDQUFDO29CQUMxRixJQUFJLENBQUMsb0JBQW9CLEdBQUcsT0FBTyxJQUFJLE9BQU8sQ0FBQyxvQkFBb0IsQ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GhyZXNob2xkcy5zcGxpY2UoTnVtYmVyKGluZGV4KSwgMSk7XG4gIH1cbn07XG5cbkJvb21QYXR0ZXJuLnByb3RvdHlwZS5zZXRVbml0Rm9ybWF0ID0gZnVuY3Rpb24oZm9ybWF0OiBhbnkpOiB2b2lkIHtcbiAgdGhpcy5mb3JtYXQgPSBmb3JtYXQgJiYgZm9ybWF0LnZhbHVlID8gZm9ybWF0LnZhbHVlIDogJ25vbmUnO1xufTtcblxuZXhwb3J0IHsgQm9vbVBhdHRlcm4gfTtcbiJdfQ== \ No newline at end of file +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.displayTemplate = options && options.displayTemplate ? options.displayTemplate : '_value_'; + this.defaultBGColor = options && options.defaultBGColor ? options.defaultBGColor : ''; + this.defaultTextColor = options && options.defaultTextColor ? options.defaultTextColor : ''; + this.enable_bgColor = false; + this.enable_bgColor_overrides = false; + this.enable_textColor = false; + this.enable_textColor_overrides = false; + this.enable_clickable_cells = false; + this.open_link_new_tab = 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,eyJ2ZXJzaW9uIjozLC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2UoTnVtYmVyKGluZGV4KSwgMSk7XG4gIH1cbn07XG5cbkJvb21QYXR0ZXJuLnByb3RvdHlwZS5zZXRVbml0Rm9ybWF0ID0gZnVuY3Rpb24oZm9ybWF0OiBhbnkpOiB2b2lkIHtcbiAgdGhpcy5mb3JtYXQgPSBmb3JtYXQgJiYgZm9ybWF0LnZhbHVlID8gZm9ybWF0LnZhbHVlIDogJ25vbmUnO1xufTtcblxuZXhwb3J0IHsgQm9vbVBhdHRlcm4gfTtcbiJdfQ== \ No newline at end of file diff --git a/dist/app/boom/BoomSeries.js b/dist/app/boom/BoomSeries.js index becc0f5..906cf77 100644 --- a/dist/app/boom/BoomSeries.js +++ b/dist/app/boom/BoomSeries.js @@ -1,109 +1,111 @@ -System.register(["app/core/time_series2", "lodash", "./index", "./BoomSeriesUtils", "./BoomUtils", "./../GrafanaUtils"], function (exports_1, context_1) { - "use strict"; - var time_series2_1, lodash_1, index_1, BoomSeriesUtils_1, BoomUtils_1, GrafanaUtils_1, BoomSeries; - var __moduleName = context_1 && context_1.id; - return { - setters: [ - 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; - }, - function (BoomSeriesUtils_1_1) { - BoomSeriesUtils_1 = BoomSeriesUtils_1_1; - }, - function (BoomUtils_1_1) { - BoomUtils_1 = BoomUtils_1_1; - }, - function (GrafanaUtils_1_1) { - GrafanaUtils_1 = GrafanaUtils_1_1; - } - ], - execute: function () { - BoomSeries = (function () { - function BoomSeries(seriesData, panelDefaultPattern, panelPatterns, options, scopedVars, templateSrv, timeSrv) { - this.pattern = undefined; - this.template_value = ""; - this.row_col_wrapper = "_"; - this.display_value = "-"; - this.tooltip = "-"; - this.value = NaN; - this.value_formatted = "-"; - this.link = "-"; - this.hidden = false; - this._metricname = ""; - this._tags = []; - var series = new time_series2_1.default({ - alias: seriesData.target, - datapoints: seriesData.datapoints || [] - }); - series.flotpairs = series.getFlotPairs("connected"); - this.debug_mode = options && options.debug_mode === true ? true : false; - this.row_col_wrapper = options && options.row_col_wrapper ? options.row_col_wrapper : this.row_col_wrapper; - this.currentTimeStamp = BoomUtils_1.getCurrentTimeStamp(series.dataPoints); - this.seriesName = series.alias || series.aliasEscaped || series.label || series.id || ""; - var getMatchingAndEnabledPattern = function (patterns, seriesName) { return patterns.find(function (p) { return seriesName.match(p.pattern) && p.disabled !== true; }); }; - this.pattern = getMatchingAndEnabledPattern(panelPatterns, this.seriesName) || panelDefaultPattern; - this.decimals = this.pattern.decimals || panelDefaultPattern.decimals || 2; - this.value = BoomUtils_1.getSeriesValue(series, this.pattern.valueName); - this.value_formatted = GrafanaUtils_1.get_formatted_value(this.value, this.decimals, this.pattern.format); - this.display_value = ((lodash_1.default.isNaN(this.value) || this.value === null) ? this.pattern.null_value : String(this.value)).toString(); - this.hidden = BoomUtils_1.doesValueNeedsToHide(this.value, this.pattern.filter); - this._metricname = this.pattern.delimiter.toLowerCase() === "tag" ? index_1.getMetricNameFromTaggedAlias(seriesData.target) : ""; - this._tags = this.pattern.delimiter.toLowerCase() === "tag" ? index_1.getLablesFromTaggedAlias(seriesData.target, this._metricname) : []; - this.row_name = BoomUtils_1.getRowName(this.pattern.row_name, this.pattern.delimiter, this.row_col_wrapper, this.seriesName, this._metricname, this._tags); - this.row_name_raw = BoomUtils_1.getRowName(this.pattern.row_name, this.pattern.delimiter, this.row_col_wrapper, this.seriesName, this._metricname, this._tags); - this.col_name = BoomUtils_1.getColName(this.pattern.col_name, this.pattern.delimiter, this.row_col_wrapper, this.seriesName, this.row_name, this._metricname, this._tags); - this.thresholds = BoomSeriesUtils_1.getThresholds(templateSrv.replace(this.pattern.thresholds, scopedVars).split(",").map(function (d) { return +d; }), this.pattern.enable_time_based_thresholds, this.pattern.time_based_thresholds, this.currentTimeStamp); - this.color_bg = BoomSeriesUtils_1.getBGColor(this.value, this.pattern, this.thresholds, templateSrv.replace(this.pattern.bgColors, scopedVars).split("|"), templateSrv.replace(this.pattern.bgColors_overrides, scopedVars).split("|")); - this.color_text = BoomSeriesUtils_1.getTextColor(this.value, this.pattern, this.thresholds, templateSrv.replace(this.pattern.textColors, scopedVars).split("|"), templateSrv.replace(this.pattern.textColors_overrides, scopedVars).split("|")); - this.template_value = BoomUtils_1.getDisplayValueTemplate(this.value, this.pattern, this.seriesName, this.row_col_wrapper, this.thresholds); - this.link = BoomSeriesUtils_1.getLink(this.pattern.enable_clickable_cells, this.pattern.clickable_cells_link, timeSrv.timeRangeForUrl()); - this.link = BoomUtils_1.replaceDelimitedColumns(this.link, this.seriesName, this.pattern.delimiter, this.row_col_wrapper); - this.tooltip = this.pattern.tooltipTemplate || "Series : _series_
Row Name : _row_name_
Col Name : _col_name_
Value : _value_"; - this.replaceSeriesRowColTokens(); - this.link = BoomSeriesUtils_1.GetValuesReplaced(this.link, this.value, this.value_formatted, series.stats, this.decimals, this.pattern.format, this._metricname, this._tags, this.pattern.delimiter || ""); - this.tooltip = BoomSeriesUtils_1.GetValuesReplaced(this.tooltip, this.value, this.value_formatted, series.stats, this.decimals, this.pattern.format, this._metricname, this._tags, this.pattern.delimiter || ""); - this.display_value = BoomSeriesUtils_1.GetValuesReplaced(this.display_value, this.value, this.value_formatted, series.stats, this.decimals, this.pattern.format, this._metricname, this._tags, this.pattern.delimiter || ""); - 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); - this.row_name = templateSrv.replace(this.row_name, scopedVars); - this.col_name = templateSrv.replace(this.col_name, scopedVars); - this.display_value = templateSrv.replace(this.display_value, scopedVars); - this.tooltip = templateSrv.replace(this.tooltip, scopedVars); - this.link = templateSrv.replace(this.link, scopedVars); - if (this.debug_mode !== true) { - delete this.seriesName; - delete this.pattern; - delete this.thresholds; - delete this.decimals; - delete this.template_value; - delete this.value_formatted; - delete this.currentTimeStamp; - } - } - BoomSeries.prototype.replaceSeriesRowColTokens = function () { - 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()); - }; - return BoomSeries; - }()); - exports_1("BoomSeries", BoomSeries); - } - }; -}); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQm9vbVNlcmllcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9hcHAvYm9vbS9Cb29tU2VyaWVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O1lBVUE7Z0JBd0JJLG9CQUFZLFVBQWUsRUFBRSxtQkFBd0IsRUFBRSxhQUFvQixFQUFFLE9BQVksRUFBRSxVQUFlLEVBQUUsV0FBZ0IsRUFBRSxPQUFZO29CQXJCbEksWUFBTyxHQUFRLFNBQVMsQ0FBQztvQkFHekIsbUJBQWMsR0FBRyxFQUFFLENBQUM7b0JBQ3BCLG9CQUFlLEdBQUc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XG59XG5cbmV4cG9ydCB7XG4gICAgQm9vbVNlcmllc1xufTtcbiJdfQ== \ No newline at end of file +System.register(["app/core/time_series2", "lodash", "./index", "./BoomSeriesUtils", "./BoomUtils", "./../GrafanaUtils"], function (exports_1, context_1) { + "use strict"; + var time_series2_1, lodash_1, index_1, BoomSeriesUtils_1, BoomUtils_1, GrafanaUtils_1, BoomSeries; + var __moduleName = context_1 && context_1.id; + return { + setters: [ + 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; + }, + function (BoomSeriesUtils_1_1) { + BoomSeriesUtils_1 = BoomSeriesUtils_1_1; + }, + function (BoomUtils_1_1) { + BoomUtils_1 = BoomUtils_1_1; + }, + function (GrafanaUtils_1_1) { + GrafanaUtils_1 = GrafanaUtils_1_1; + } + ], + execute: function () { + BoomSeries = (function () { + function BoomSeries(seriesData, panelDefaultPattern, panelPatterns, options, scopedVars, templateSrv, timeSrv) { + this.pattern = undefined; + this.template_value = ""; + this.row_col_wrapper = "_"; + this.display_value = "-"; + this.tooltip = "-"; + this.value = NaN; + this.value_formatted = "-"; + this.link = "-"; + this.open_link_new_tab = false; + this.hidden = false; + this._metricname = ""; + this._tags = []; + var series = new time_series2_1.default({ + alias: seriesData.target, + datapoints: seriesData.datapoints || [] + }); + series.flotpairs = series.getFlotPairs("connected"); + this.debug_mode = options && options.debug_mode === true ? true : false; + this.row_col_wrapper = options && options.row_col_wrapper ? options.row_col_wrapper : this.row_col_wrapper; + this.currentTimeStamp = BoomUtils_1.getCurrentTimeStamp(series.dataPoints); + this.seriesName = series.alias || series.aliasEscaped || series.label || series.id || ""; + var getMatchingAndEnabledPattern = function (patterns, seriesName) { return patterns.find(function (p) { return seriesName.match(p.pattern) && p.disabled !== true; }); }; + this.pattern = getMatchingAndEnabledPattern(panelPatterns, this.seriesName) || panelDefaultPattern; + this.decimals = this.pattern.decimals || panelDefaultPattern.decimals || 2; + this.value = BoomUtils_1.getSeriesValue(series, this.pattern.valueName); + this.value_formatted = GrafanaUtils_1.get_formatted_value(this.value, this.decimals, this.pattern.format); + this.display_value = ((lodash_1.default.isNaN(this.value) || this.value === null) ? this.pattern.null_value : String(this.value)).toString(); + this.hidden = BoomUtils_1.doesValueNeedsToHide(this.value, this.pattern.filter); + this._metricname = this.pattern.delimiter.toLowerCase() === "tag" ? index_1.getMetricNameFromTaggedAlias(seriesData.target) : ""; + this._tags = this.pattern.delimiter.toLowerCase() === "tag" ? index_1.getLablesFromTaggedAlias(seriesData.target, this._metricname) : []; + this.row_name = BoomUtils_1.getRowName(this.pattern.row_name, this.pattern.delimiter, this.row_col_wrapper, this.seriesName, this._metricname, this._tags); + this.row_name_raw = BoomUtils_1.getRowName(this.pattern.row_name, this.pattern.delimiter, this.row_col_wrapper, this.seriesName, this._metricname, this._tags); + this.col_name = BoomUtils_1.getColName(this.pattern.col_name, this.pattern.delimiter, this.row_col_wrapper, this.seriesName, this.row_name, this._metricname, this._tags); + this.thresholds = BoomSeriesUtils_1.getThresholds(templateSrv.replace(this.pattern.thresholds, scopedVars).split(",").map(function (d) { return +d; }), this.pattern.enable_time_based_thresholds, this.pattern.time_based_thresholds, this.currentTimeStamp); + this.color_bg = BoomSeriesUtils_1.getBGColor(this.value, this.pattern, this.thresholds, templateSrv.replace(this.pattern.bgColors, scopedVars).split("|"), templateSrv.replace(this.pattern.bgColors_overrides, scopedVars).split("|")); + this.color_text = BoomSeriesUtils_1.getTextColor(this.value, this.pattern, this.thresholds, templateSrv.replace(this.pattern.textColors, scopedVars).split("|"), templateSrv.replace(this.pattern.textColors_overrides, scopedVars).split("|")); + this.template_value = BoomUtils_1.getDisplayValueTemplate(this.value, this.pattern, this.seriesName, this.row_col_wrapper, this.thresholds); + this.link = BoomSeriesUtils_1.getLink(this.pattern.enable_clickable_cells, this.pattern.clickable_cells_link, timeSrv.timeRangeForUrl()); + this.link = BoomUtils_1.replaceDelimitedColumns(this.link, this.seriesName, this.pattern.delimiter, this.row_col_wrapper); + this.open_link_new_tab = this.pattern.open_link_new_tab; + this.tooltip = this.pattern.tooltipTemplate || "Series : _series_
Row Name : _row_name_
Col Name : _col_name_
Value : _value_"; + this.replaceSeriesRowColTokens(); + this.link = BoomSeriesUtils_1.GetValuesReplaced(this.link, this.value, this.value_formatted, series.stats, this.decimals, this.pattern.format, this._metricname, this._tags, this.pattern.delimiter || ""); + this.tooltip = BoomSeriesUtils_1.GetValuesReplaced(this.tooltip, this.value, this.value_formatted, series.stats, this.decimals, this.pattern.format, this._metricname, this._tags, this.pattern.delimiter || ""); + this.display_value = BoomSeriesUtils_1.GetValuesReplaced(this.display_value, this.value, this.value_formatted, series.stats, this.decimals, this.pattern.format, this._metricname, this._tags, this.pattern.delimiter || ""); + 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); + this.row_name = templateSrv.replace(this.row_name, scopedVars); + this.col_name = templateSrv.replace(this.col_name, scopedVars); + this.display_value = templateSrv.replace(this.display_value, scopedVars); + this.tooltip = templateSrv.replace(this.tooltip, scopedVars); + this.link = templateSrv.replace(this.link, scopedVars); + if (this.debug_mode !== true) { + delete this.seriesName; + delete this.pattern; + delete this.thresholds; + delete this.decimals; + delete this.template_value; + delete this.value_formatted; + delete this.currentTimeStamp; + } + } + BoomSeries.prototype.replaceSeriesRowColTokens = function () { + 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()); + }; + return BoomSeries; + }()); + exports_1("BoomSeries", BoomSeries); + } + }; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQm9vbVNlcmllcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9hcHAvYm9vbS9Cb29tU2VyaWVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O1lBVUE7Z0JBeUJJLG9CQUFZLFVBQWUsRUFBRSxtQkFBd0IsRUFBRSxhQUFvQixFQUFFLE9BQVksRUFBRSxVQUFlLEVBQUUsV0FBZ0IsRUFBRSxPQUFZO29CQXRCbEksWUFBTyxHQUFRLFNBQVMsQ0FBQztvQkFHekIsbUJBQWMsR0FBRyxFQUFFLENBQUM7b0JBQ3BCLG9CQUFlLEdBQUcsR0FBRyxDQUFDO29CQU92QixrQkFBYSxHQUFHLEdBQUcsQ0FBQztvQkFDcEIsWUFBTyxHQUFHLEdBQUcsQ0FBQztvQkFDZCxVQUFLLEdBQUcsR0FBRyxDQUFDO29CQUNaLG9CQUFlLEdBQUcsR0FBRyxDQUFDO29CQUN0QixTQUFJLEdBQUcsR0FBRyxDQUFDO29CQUNYLHNCQUFpQixHQUFHLEtBQUssQ0FBQztvQkFFMUIsV0FBTSxHQUFZLEtBQUssQ0FBQztvQkFDeEIsZ0JBQVcsR0FBRyx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sdGlwLnJlcGxhY2UobmV3IFJlZ0V4cChcIl9yb3dfbmFtZV9cIiwgXCJnXCIpLCBnZXRBY3R1YWxOYW1lV2l0aG91dFRva2Vucyh0aGlzLnJvd19uYW1lLnRvU3RyaW5nKCkpLnRyaW0oKSk7XG4gICAgICAgIHRoaXMuZGlzcGxheV92YWx1ZSA9IHRoaXMuZGlzcGxheV92YWx1ZS5yZXBsYWNlKG5ldyBSZWdFeHAoXCJfcm93X25hbWVfXCIsIFwiZ1wiKSwgdGhpcy5yb3dfbmFtZS50b1N0cmluZygpKTtcblxuICAgICAgICB0aGlzLnJvd19uYW1lID0gdGhpcy5yb3dfbmFtZS5yZXBsYWNlKG5ldyBSZWdFeHAoXCJfY29sX25hbWVfXCIsIFwiZ1wiKSwgdGhpcy5jb2xfbmFtZS50b1N0cmluZygpKTtcbiAgICAgICAgdGhpcy5saW5rID0gdGhpcy5saW5rLnJlcGxhY2UobmV3IFJlZ0V4cChcIl9jb2xfbmFtZV9cIiwgXCJnXCIpLCBnZXRBY3R1YWxOYW1lV2l0aG91dFRva2Vucyh0aGlzLmNvbF9uYW1lLnRvU3RyaW5nKCkpLnRyaW0oKSk7XG4gICAgICAgIHRoaXMudG9vbHRpcCA9IHRoaXMudG9vbHRpcC5yZXBsYWNlKG5ldyBSZWdFeHAoXCJfY29sX25hbWVfXCIsIFwiZ1wiKSwgZ2V0QWN0dWFsTmFtZVdpdGhvdXRUb2tlbnModGhpcy5jb2xfbmFtZS50b1N0cmluZygpKS50cmltKCkpO1xuICAgICAgICB0aGlzLmRpc3BsYXlfdmFsdWUgPSB0aGlzLmRpc3BsYXlfdmFsdWUucmVwbGFjZShuZXcgUmVnRXhwKFwiX2NvbF9uYW1lX1wiLCBcImdcIiksIHRoaXMuY29sX25hbWUudG9TdHJpbmcoKSk7XG5cbiAgICB9XG5cbn1cblxuZXhwb3J0IHtcbiAgICBCb29tU2VyaWVzXG59O1xuIl19 \ No newline at end of file diff --git a/dist/app/config.js b/dist/app/config.js index e939867..97ccc7c 100644 --- a/dist/app/config.js +++ b/dist/app/config.js @@ -1,78 +1,79 @@ -System.register([], function (exports_1, context_1) { - "use strict"; - var plugin_id, value_name_options, textAlignmentOptions, config, default_pattern_options; - 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: 'Time of last data point', value: 'last_time' }, - { text: 'Time of last non null data point', value: 'last_time_nonnull' }, - { 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); - default_pattern_options = { - bgColors: 'green|orange|red', - bgColors_overrides: '0->green|2->red|1->yellow', - clickable_cells_link: '', - col_name: 'Value', - decimals: 2, - defaultBGColor: 'transparent', - defaultTextColor: '', - delimiter: '.', - displayTemplate: '_value_', - enable_bgColor: false, - enable_bgColor_overrides: false, - enable_clickable_cells: false, - enable_textColor: false, - enable_textColor_overrides: false, - enable_time_based_thresholds: false, - enable_transform: false, - enable_transform_overrides: false, - filter: { - value_above: '', - value_below: '', - }, - format: 'none', - name: 'Default Pattern', - null_color: 'darkred', - null_textcolor: 'white', - null_value: 'No data', - pattern: '*', - row_name: '_series_', - textColors: 'red|orange|green', - textColors_overrides: '0->red|2->green|1->yellow', - thresholds: '70,90', - time_based_thresholds: [], - tooltipTemplate: '', - transform_values: '_value_|_value_|_value_', - transform_values_overrides: '0->down|1->up', - valueName: 'avg', - }; - exports_1("default_pattern_options", default_pattern_options); - } - }; -}); -//# sourceMappingURL=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mFsdWVfYmVsb3c6ICcnLFxyXG4gIH0sXHJcbiAgZm9ybWF0OiAnbm9uZScsXHJcbiAgbmFtZTogJ0RlZmF1bHQgUGF0dGVybicsXHJcbiAgbnVsbF9jb2xvcjogJ2RhcmtyZWQnLFxyXG4gIG51bGxfdGV4dGNvbG9yOiAnd2hpdGUnLFxyXG4gIG51bGxfdmFsdWU6ICdObyBkYXRhJyxcclxuICBwYXR0ZXJuOiAnKicsXHJcbiAgcm93X25hbWU6ICdfc2VyaWVzXycsXHJcbiAgdGV4dENvbG9yczogJ3JlZHxvcmFuZ2V8Z3JlZW4nLFxyXG4gIHRleHRDb2xvcnNfb3ZlcnJpZGVzOiAnMC0+cmVkfDItPmdyZWVufDEtPnllbGxvdycsXHJcbiAgdGhyZXNob2xkczogJzcwLDkwJyxcclxuICB0aW1lX2Jhc2VkX3RocmVzaG9sZHM6IFtdLFxyXG4gIHRvb2x0aXBUZW1wbGF0ZTogJycsXHJcbiAgdHJhbnNmb3JtX3ZhbHVlczogJ192YWx1ZV98X3ZhbHVlX3xfdmFsdWVfJyxcclxuICB0cmFuc2Zvcm1fdmFsdWVzX292ZXJyaWRlczogJzAtPmRvd258MS0+dXAnLFxyXG4gIHZhbHVlTmFtZTogJ2F2ZycsXHJcbn07XHJcbmV4cG9ydCB7IHBsdWdpbl9pZCwgZGVmYXVsdF9wYXR0ZXJuX29wdGlvbnMsIHZhbHVlX25hbWVfb3B0aW9ucywgdGV4dEFsaWdubWVudE9wdGlvbnMsIGNvbmZpZyB9O1xyXG4iXX0= \ No newline at end of file +System.register([], function (exports_1, context_1) { + "use strict"; + var plugin_id, value_name_options, textAlignmentOptions, config, default_pattern_options; + 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: 'Time of last data point', value: 'last_time' }, + { text: 'Time of last non null data point', value: 'last_time_nonnull' }, + { 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); + default_pattern_options = { + bgColors: 'green|orange|red', + bgColors_overrides: '0->green|2->red|1->yellow', + clickable_cells_link: '', + col_name: 'Value', + decimals: 2, + defaultBGColor: 'transparent', + defaultTextColor: '', + delimiter: '.', + displayTemplate: '_value_', + enable_bgColor: false, + enable_bgColor_overrides: false, + enable_clickable_cells: false, + enable_textColor: false, + enable_textColor_overrides: false, + enable_time_based_thresholds: false, + enable_transform: false, + enable_transform_overrides: false, + filter: { + value_above: '', + value_below: '', + }, + format: 'none', + name: 'Default Pattern', + null_color: 'darkred', + null_textcolor: 'white', + null_value: 'No data', + open_link_new_tab: false, + pattern: '*', + row_name: '_series_', + textColors: 'red|orange|green', + textColors_overrides: '0->red|2->green|1->yellow', + thresholds: '70,90', + time_based_thresholds: [], + tooltipTemplate: '', + transform_values: '_value_|_value_|_value_', + transform_values_overrides: '0->down|1->up', + valueName: 'avg', + }; + exports_1("default_pattern_options", default_pattern_options); + } + }; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2FwcC9jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7OztZQUFNLFNBQVMsR0FBRyw2QkFBNkIsQ0FBQzs7WUFDMUMsa0JBQWtCLEdBQUc7Z0JBQ3pCLEVBQUUsSUFBSSxFQUFFLEtBQUssRUFBRSxLQUFL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hYjogZmFsc2UsXHJcbiAgcGF0dGVybjogJyonLFxyXG4gIHJvd19uYW1lOiAnX3Nlcmllc18nLFxyXG4gIHRleHRDb2xvcnM6ICdyZWR8b3JhbmdlfGdyZWVuJyxcclxuICB0ZXh0Q29sb3JzX292ZXJyaWRlczogJzAtPnJlZHwyLT5ncmVlbnwxLT55ZWxsb3cnLFxyXG4gIHRocmVzaG9sZHM6ICc3MCw5MCcsXHJcbiAgdGltZV9iYXNlZF90aHJlc2hvbGRzOiBbXSxcclxuICB0b29sdGlwVGVtcGxhdGU6ICcnLFxyXG4gIHRyYW5zZm9ybV92YWx1ZXM6ICdfdmFsdWVffF92YWx1ZV98X3ZhbHVlXycsXHJcbiAgdHJhbnNmb3JtX3ZhbHVlc19vdmVycmlkZXM6ICcwLT5kb3dufDEtPnVwJyxcclxuICB2YWx1ZU5hbWU6ICdhdmcnLFxyXG59O1xyXG5leHBvcnQgeyBwbHVnaW5faWQsIGRlZmF1bHRfcGF0dGVybl9vcHRpb25zLCB2YWx1ZV9uYW1lX29wdGlvbnMsIHRleHRBbGlnbm1lbnRPcHRpb25zLCBjb25maWcgfTtcclxuIl19 \ No newline at end of file diff --git a/dist/partials/editor.html b/dist/partials/editor.html index 77eaf46..2d3fe16 100644 --- a/dist/partials/editor.html +++ b/dist/partials/editor.html @@ -180,7 +180,7 @@
Thresholds
+ bs-tooltip="'Comma separated thresholds'" ng-blur="ctrl.render()" data-ng-change="ctrl.render();">
@@ -193,7 +193,7 @@
Thresholds
@@ -208,7 +208,7 @@
Thresholds
@@ -372,6 +372,10 @@
Cell Links & Tooltip
+ + + @@ -485,7 +489,7 @@
Options
- +
@@ -586,7 +590,7 @@
Other Optons
- +
@@ -594,7 +598,7 @@
Other Optons
- +
diff --git a/src/app/app.ts b/src/app/app.ts index f3c455b..7177584 100644 --- a/src/app/app.ts +++ b/src/app/app.ts @@ -24,6 +24,7 @@ const seriesToTable = function(inputdata: IBoomSeries[], options: IBoomTableTran display_value: replaceTokens(options.non_matching_cells_text), hidden: false, link: '-', + open_link_new_tab: false, row_name: row_name, tooltip: '-', value: NaN, @@ -38,6 +39,7 @@ const seriesToTable = function(inputdata: IBoomSeries[], options: IBoomTableTran display_value: 'Duplicate matches', hidden: false, link: '-', + open_link_new_tab: false, row_name: row_name, tooltip: '-', value: NaN, diff --git a/src/app/boom/Boom.interface.ts b/src/app/boom/Boom.interface.ts index d16d800..7516a4f 100644 --- a/src/app/boom/Boom.interface.ts +++ b/src/app/boom/Boom.interface.ts @@ -25,6 +25,7 @@ interface IBoomPattern { null_color: string; null_value: string; null_textcolor: string; + open_link_new_tab: Boolean; pattern: string; row_name: string; textColors: string; @@ -78,6 +79,7 @@ interface IBoomCellDetails { color_text: string; display_value: string; link: string; + open_link_new_tab: Boolean; tooltip: string; value: number; } diff --git a/src/app/boom/BoomOutput.ts b/src/app/boom/BoomOutput.ts index a9654d5..aab69f3 100644 --- a/src/app/boom/BoomOutput.ts +++ b/src/app/boom/BoomOutput.ts @@ -63,10 +63,13 @@ BoomOutput.prototype.getDataAsHTML = function(data: IBoomTable, sorting_props): } _.each(o, item => { let item_style = `padding:4px;background-color:${item.color_bg};color:${item.color_text};text-align:${this.text_alignment_values}`; + let item_link_value = item.open_link_new_tab + ? `${item.display_value}` + : `${item.display_value}`; let item_display = item.link === '#' ? item.display_value - : `${item.display_value}`; + : item_link_value; let tooltip = !item.tooltip || item.tooltip === '-' ? undefined diff --git a/src/app/boom/BoomPattern.ts b/src/app/boom/BoomPattern.ts index 4cf6249..550ff95 100644 --- a/src/app/boom/BoomPattern.ts +++ b/src/app/boom/BoomPattern.ts @@ -14,6 +14,7 @@ class BoomPattern implements IBoomPattern { public enable_bgColor: Boolean; public enable_bgColor_overrides: Boolean; public enable_clickable_cells: Boolean; + public open_link_new_tab: Boolean; public enable_textColor: Boolean; public enable_textColor_overrides: Boolean; public enable_time_based_thresholds: Boolean; @@ -64,6 +65,7 @@ class BoomPattern implements IBoomPattern { this.enable_textColor = false; this.enable_textColor_overrides = false; this.enable_clickable_cells = false; + this.open_link_new_tab = false; this.enable_time_based_thresholds = false; this.enable_transform = false; this.enable_transform_overrides = false; diff --git a/src/app/boom/BoomSeries.ts b/src/app/boom/BoomSeries.ts index f39e742..78fafa9 100644 --- a/src/app/boom/BoomSeries.ts +++ b/src/app/boom/BoomSeries.ts @@ -27,6 +27,7 @@ class BoomSeries implements IBoomSeries { public value = NaN; public value_formatted = "-"; public link = "-"; + public open_link_new_tab = false; public thresholds: Number[]; public hidden: Boolean = false; public _metricname = ""; @@ -68,6 +69,8 @@ class BoomSeries implements IBoomSeries { this.link = getLink(this.pattern.enable_clickable_cells, this.pattern.clickable_cells_link, timeSrv.timeRangeForUrl()); this.link = replaceDelimitedColumns(this.link, this.seriesName, this.pattern.delimiter, this.row_col_wrapper); + this.open_link_new_tab = this.pattern.open_link_new_tab; + this.tooltip = this.pattern.tooltipTemplate || "Series : _series_
Row Name : _row_name_
Col Name : _col_name_
Value : _value_"; this.replaceSeriesRowColTokens(); diff --git a/src/app/config.ts b/src/app/config.ts index f059461..770b360 100644 --- a/src/app/config.ts +++ b/src/app/config.ts @@ -49,6 +49,7 @@ const default_pattern_options: any = { null_color: 'darkred', null_textcolor: 'white', null_value: 'No data', + open_link_new_tab: false, pattern: '*', row_name: '_series_', textColors: 'red|orange|green', diff --git a/src/partials/editor.html b/src/partials/editor.html index 862195c..2d3fe16 100644 --- a/src/partials/editor.html +++ b/src/partials/editor.html @@ -372,6 +372,10 @@
Cell Links & Tooltip
+ + +