diff --git a/dist/CHANGELOG.md b/dist/CHANGELOG.md
new file mode 100644
index 0000000..9473875
--- /dev/null
+++ b/dist/CHANGELOG.md
@@ -0,0 +1,38 @@
+# ChangeLog
+
+| Version | Changes |
+| -------------------|-----------|
+| 1.3.1 | Tags for prometheus and influxdb (EXPERIMENTAL FEATURE) |
+| | Replaced circleci with Github Actions |
+| 1.3.0 | More options in display template (Min, Max, Avg, Current, Total etc) |
+| | Font awesome icons empty fill |
+| | Maths expression in font awesome repeat mode |
+| 1.2.1 | Time range in cell links |
+| | Time of last data point stat added |
+| | Patterns Quick Editor |
+| | Sorting Persisted |
+| | Link in first column |
+| | Option to modify font size |
+| 1.2.0 | Template variables in row name, col name, link, tooltip, thresholds, colors |
+| 1.1.0 | 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/LAST_UPDATED b/dist/LAST_UPDATED
new file mode 100644
index 0000000..2ff9126
--- /dev/null
+++ b/dist/LAST_UPDATED
@@ -0,0 +1 @@
+Mon Jun 29 17:20:36 UTC 2020
diff --git a/dist/README.md b/dist/README.md
new file mode 100644
index 0000000..51198e0
--- /dev/null
+++ b/dist/README.md
@@ -0,0 +1,440 @@
+# Boom Table Panel for Grafana
+
+![Build & Publish](https://github.com/yesoreyeram/yesoreyeram-boomtable-panel/workflows/Build%20&%20Publish/badge.svg)
+
+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)
+
+![Boom Table - Panel with Font Awesome icons](https://raw.githubusercontent.com/yesoreyeram/yesoreyeram-boomtable-panel/master/dist/src/img/panels-fa.png)
+
+
+Features :
+----------
+
+* Multi column support for graphite, InfluxDB, Prometheus & Azure Monitor
+* Individual thresholds for cells based on pattern
+* Multi level thresholds (N number of thresholds)
+* Individual aggregation method for cell based on pattern
+* Time based thresholds
+* Individual cell values can be transformed to helpful texts, based on pattern.
+* Transformed texts can also contain actual metrics
+* Icons in metrics
+* Units can be set at cell level based on pattern
+* Row/Column name based on multiple graphite/InfluxDB/Prometheus columns
+* Filter metrics
+* Debug UI to test patterns
+
+Supported / Tested Data Sources :
+--------------------------------
+
+* Graphite
+* InfluxDB
+* Prometheus
+* Azure Monitor
+* AWS Cloud Watch
+* Any datasources that returns data in timeseries format
+
+Tested Grafana versions :
+-------------------------
+
+* Grafana version 4.5.2
+* Grafana version 5.0.2
+* Grafana version 6.0.0
+
+
+Screenshots :
+-------------
+
+Pattern Editors Sample screenshots
+
+![image](https://user-images.githubusercontent.com/153843/53409051-e973f580-39b7-11e9-83e3-e1b6306abafb.png)
+
+![image](https://user-images.githubusercontent.com/153843/53409071-fa246b80-39b7-11e9-9e8e-05baa8fc1531.png)
+
+![image](https://user-images.githubusercontent.com/153843/53409114-13c5b300-39b8-11e9-9227-339dcd110276.png)
+
+Debug UI Sample screenshots
+
+![image](https://user-images.githubusercontent.com/153843/53409376-acf4c980-39b8-11e9-89bc-363822fe370d.png)
+
+
+# Setup
+
+
+Pattern Guidelines
+------------------
+
+Pattern are regular expressions / name of the metrics. If there are multiple matching patterns, first match will be considered. To see the matching patterns, enable debug mode in Options panel.
+
+Sample graphite series / Influx / Prometheus metrics
+
+ prod.server.my-app-01.sys.cpu.usage
+ prod.server.my-app-01.sys.mem.usage
+ prod.server.my-app-01.sys.hdd.c.freespace
+ prod.server.my-app-01.sys.hdd.d.freespace
+ prod.server.my-app-02.sys.cpu.usage
+ prod.server.my-app-02.sys.mem.usage
+ prod.server.my-app-02.sys.hdd.c.freespace
+ prod.server.my-app-02.sys.hdd.d.freespace
+ dev.server.my-app-01.sys.cpu.usage
+ dev.server.my-app-01.sys.mem.usage
+ dev.server.my-app-01.sys.hdd.c.freespace
+ dev.server.my-app-01.sys.hdd.d.freespace
+ prod.app.sales.usage.requests_per_sec
+ prod.app.orders.usage.requests_per_sec
+ alias(carbon.agents.a.cache.queries, 'Carbon A usage')
+ alias(carbon.agents.b.cache.queries, 'Carbon B usage')
+
+patterns and matching metrics
+
+ usage$ --> All the CPU, Memory metrics from prod and dev and also requests_per_sec metrics and also carbon usage
+ cpu.usage$ --> All the CPU metrics
+ free --> All the disk freespace metrics
+ ^prod --> All the prod metrics
+ ^dev.*.usage$ --> All the cpu, mem metrics of dev servers
+ ^prod.*.cpu.usage$ --> All the cpu metrics of prod servers
+ dev.server.my-app-01.sys.cpu.usage --> only dev.server.my-app-01.sys.cpu.usage
+ usage$ --> Carbon usage(Note the space before the pattern)
+ A usage$ --> Only carbon A usage
+
+Row and Column name guidelines
+------------------------------
+
+Row and Col names are derived from series name. If n is wrapped by "_", then that will be replaced by n-th column in graphite/influxdb/prometheus metric (seperated by delimiter). Refer below examples and screenshots to get more idea. Or use debug mode to try. (n starts from index 0)
+
+Sample graphite series / Influx / Prometheus Metrics
+
+ prod.server.my-app-01.sys.cpu.usage
+
+Pattern & Output
+
+ _4_ --> cpu
+ _4_ _5_ --> cpu usage
+ _4_ 2 _5_ --> cpu 2 usage
+ _4_ use --> cpu use
+ Production _4_ usage --> Production cpu usage
+ Production _4_ $somevar --> Production cpu value_of_somevar_variable
+ _series_ --> prod.server.my-app-01.sys.cpu.usage
+ _1_ _1_ --> server server
+ _4_ __5_ --> cpu _usage
+
+**Note** : If you prefer to change the wrapper from "_" to somthing like "~" or "__", you can do it through the option "Row / Column indentification wrapper" in options tab.
+
+
+Thresholds
+----------
+
+Thresholds are numbers seperated by comma. There can be multiple thresholds.
+
+Example:
+
+ 10,20
+ 70,90,95
+
+Time based thresholds
+---------------------
+
+Thresholds can be overriden, based on day and time of the browser.
+
+Multiple time based threshold rules can be set for any given pattern. If multiple rule matches, last rule wins. If no rule matches, default thresholds will be applicable. Example given below.
+
+Following notations should be followed when added time based threshold rule
+
+**Name** : Can be any representation in string but not more than 60 characters.
+
+**From** : in HHMM format examples: 0000 2400 1330 1250
+
+**To** : in HHMM format examples: 0000 2400 1330 1250
+
+**On** : Days seperated by comma. Order doesnt matter. Examples; "Sat,Sun", "Mon,Sun,Tue"
+
+**Threshold** : Same format as default threshold
+
+![Time based thresholds](https://raw.githubusercontent.com/yesoreyeram/yesoreyeram-boomtable-panel/master/dist/src/img/time-based-thresholds.png)
+
+**WARNING**: "From" and "To" fields will be compared against timestamp of last data received from server. If the last data point is not availble, then browser time will be considered.
+
+**TIPS** : If your threshold time rage ranges between two day, (example: 2300 of saturday to 0230 of sunday), then split the rule into two each for saturdary and sunday.
+
+**NOTE** : If you specify n number threshold levels in default pattern (ex: 20,30),then time based thresholds should also follow same number of levels.
+
+Background color based on thresholds
+------------------------------------
+
+Works the same way as single stat panel. Background color is a list of colors seperated by pipe symbol. Colors can be named or hexadecimal colors or rgb or rgba. Number of colors should be greater than the number of thresholds.
+
+Example of color patterns:
+
+ green|orange|red
+ darkred|red|orange|red
+ green|red
+ green|#797979|rgba(0, 0, 255,0.5)|rgb(0, 0, 255)|red
+
+Example of matching patterns:
+
+ 1: thresholds : 5
+ pattern : green|red
+ value : 5 output : red
+ value : 6 output : red
+ value : 4 output : green
+
+ 2: thresholds : 70,90
+ pattern : green|orange|red
+ value : 95 output : red
+ value : 85 output : orange
+ value : 65 output : green
+
+ 3: thresholds : 70,90
+ pattern : red|orange|green
+ value : 95 output : green
+ value : 85 output : orange
+ value : 65 output : red
+
+Background color overrides
+--------------------------
+
+Background colors can be overriden for specific values by using the pattern option `Enable BG Color overrides for specific value?`. Override values should be specified in the `BG Color Overrides` in the following format. If multiple matches found, first one will win.
+
+ 0->Red
+ 13->Red|8->Green
+
+Value and colors are seperated by `->`. Multiple combination of values can be given seperated by `|`.
+
+If background colors based on thresholds also specified along with this, this will be override the threshold based pattern.
+
+Value transformation based on thresholds
+----------------------------------------
+
+Logic is same as background color. But the value to be displayed can be altered here. Display value will be replaced with the value provided. Values are seperated by pipe. if the value is wrapped with _, then it will represent the actual value.
+
+`_value_` will be replaced by actual value with format and decimals
+
+`_value_raw_` will be replaced by actual value without format and decimals
+
+`_row_name_` will be replaced by row name. This will be useful when you hide the first column.
+
+`_col_name_` will be replaced by col name. This will be useful when you hide the table header.
+
+`_n_` will be replaced by nth part of the series using `_` delimiter. Same rule as row_name and col_name
+
+The following tokens can be also used in value transform / default value template
+
+`_value_min_raw_` - Min value of the series without formatting
+`_value_min_` - Min value of the series with formatting
+`_value_max_raw_`- Max value of the series without formatting
+`_value_max_` - Max value of the series with formatting
+`_value_avg_raw_`- Average value of the series without formatting
+`_value_avg_` - Average value of the series with formatting
+`_value_current_raw_`- Current value of the series without formatting
+`_value_current_` - Current value of the series with formatting
+`_value_total_raw_`- Total value of the series without formatting
+`_value_total_` - Total value of the series with formatting
+
+Example transformation patterns :
+
+ _value_|_value_|_value_
+ GOOD|BETTER|BAD
+ GOOD (_value_)|_value_|_value
+ Time to party|Ill|RIP
+ _col_name_ : _value_| _col_name_ : _value_| _col_name_ : _value_
+ _row_name_ : _value_| _row_name_ : _value_| _row_name_ : _value_
+ _row_name_ _col_name_ : _value_| _row_name_ _col_name_ : _value_| _row_name_ _col_name_ : _value_
+
+
+Sample value transformation: (Assume your metrics results, 95 and it is percentage data type)
+
+
+ _value_ --> 95%
+ GOOD (_value_) --> GOOD (95%)
+ HOT (_value_ > threshold of 80%) --> HOT (95% > threshold of 80%)
+ Contact helpdesk --> Contact helpdesk
+
+
+Transform value overrides
+--------------------------
+
+Transform values can be overriden for specific values by using the pattern option `Enable value transform overrides?`. Override values should be specified in the `Value transform Overrides` in the following format. If multiple matches found, first one will win.
+
+ 13->Evil
+ 12->good|37.50->_fa-circle_|99->Oh no...
+
+Value and transform values are seperated by `->`. Multiple combination of values can be given seperated by `|`.
+
+If transform values based on thresholds also specified along with this, this will be override the threshold based pattern.
+
+Table Cell links
+----------------
+
+Table cells can be clickable and open links in new tabs.
+
+If the URL contains `_row_name_`, it will be replaced by row name.
+
+If the URL contains `_col_name_`, it will be replaced by col name.
+
+Note : If the row_name / col_name contains font awesome keywords like `_fa-circle_`, they will be ignored.
+
+
+Example : `https://mysite.com/_row_name_/_col_name_/?foo=bar`
+
+First Column Links
+------------------
+
+To enable link for the first column, Specify link URL in options tab.
+
+First row link can have token `_row_name_` . Any other tokens will be ignored. If your row name tends to any font awesome icons or images, they will be ignored in the link's `_row_name`
+
+![image](https://user-images.githubusercontent.com/153843/61057603-8a0a0580-a3ed-11e9-9572-bd76edb0b685.png)
+
+Example : `http://google.com?q=_row_name_` will be replaced as `http://google.com?q=app_0` if the first columnn name is `app_0`
+
+Refer issue [#85](https://github.com/yesoreyeram/yesoreyeram-boomtable-panel/issues/85) for more details
+
+Filter
+------
+
+If your output have more rows and if you require to hide certain rows based on their output value, you can use the filter option to hide those rows. Series will be hidden if any one of the condition match.
+
+![Filter rows based on value](https://raw.githubusercontent.com/yesoreyeram/yesoreyeram-boomtable-panel/master/dist/src/img/filters.png)
+
+
+Repeater / Multistat Example
+-----------------
+
+You can use the boom table as multi stat panel. Refer the details given in issue [#40](https://github.com/yesoreyeram/yesoreyeram-boomtable-panel/issues/40)
+
+![Multistat panel / Repeater ](https://user-images.githubusercontent.com/153843/47859058-4fbf8180-dde5-11e8-8b27-2ef94919d1f8.png)
+
+
+Using Font Awesome icons in row /column / metric fields
+-------------------------------------------------------
+
+If your row name / col name / transform metrics contains strings that starts with `_fa-` and ends with `_`, then they will be replaced with corresponding font awesome icons grafana supported. Example usage given below.
+
+` _fa-arrow-up_ ` -> UP ARROW icon in default color
+
+` _fa-arrow-up,green_ ` -> UP ARROW icon in green color
+
+` _fa-arrow-down,red,5_ ` -> DOWN ARROW icon in red color repeated 5 times
+
+` _fa-apple,,5_ ` -> APPLE icon in default color repeated 5 times
+
+` _fa-square,red,3,gray,10_ ` -> 3 RED Square iconds and then 7 gray square icons ( only from version 1.3.0, fill icons considered )
+
+` _fa-square,red,76/10,gray,10_ ` -> 8 RED Square iconds and then 2 gray square icons ( only from version 1.3.0, math expressions are considered )
+
+` _fa-square,red,34/10,gray,10_ ` -> 3 RED Square iconds and then 7 gray square icons ( only from version 1.3.0, math expressions are considered )
+
+In summary, the format of the font awesome token should be in the following format
+
+* this token should be surrounded by one or more empty spaces.
+* this should start with `_fa-` and ends with `_`
+* should be comma seperated
+* index 0 is fa-iconname where iconname can be any valid font awesome icon
+* index 1 should be color of the icon. If empty default text color / threshold text color will be considered
+* index 2 should be repeat count ( can be simple one level math expression )
+* index 3 should be empty repeat color. If empty default text color / threshold text color will be considered
+* index 4 should be max repeat count ( can be simple one level math expression )
+* index 2 and 4 can have valid math expression like below
+ * 15 ---- valid
+ * 23+12 ---- valid and will yield 35
+ * 24-10 ---- valid and will yield 14
+ * 2.4*10 ---- valid and will yield 24
+ * 15/3 ---- valid and will yield 5
+ * 29/4 ---- valid and will yield 7
+ * 97/10 ---- valid and will yield 10
+ * 23max12 ---- valid and will yield 23
+ * 23min12 ---- valid and will yield 12
+ * 3.36max2 ---- valid and will yield 3
+
+**Example implementations of icons in metrics:** (Unlimited possibilites like heatmap)
+
+![Font Awesome Icons support](https://raw.githubusercontent.com/yesoreyeram/yesoreyeram-boomtable-panel/master/dist/src/img/font-awesome-examples.png)
+
+* Battery level indicator
+ * Thresholds : `10,75`
+ * Transform Values : `_fa-battery-empty,red_ _value_|_fa-battery-quarter,yellow_ _value_|_fa-battery-full,green_ _value_`
+* Bar chart indicator
+ * Thresholds : `10,20,30,40,50,60,70,80,90`
+ * Transform Values : `_fa-square,green,1_ _fa-square,gray,9_|_fa-square,green,2_ _fa-square,gray,8_|_fa-square,green,3_ _fa-square,gray,7_|_fa-square,green,4_ _fa-square,gray,6_|_fa-square,yellow,5_ _fa-square,gray,5_|_fa-square,yellow,6_ _fa-square,gray,4_|_fa-square,yellow,7_ _fa-square,gray,3_|_fa-square,red,8_ _fa-square,gray,2_|_fa-square,red,9_ _fa-square,gray,1_|_fa-square,red,10_ _fa-square,gray,0_`
+* Payment Gateway Status Indicator
+ * Similar threhold setup. (Note : In the example shown in the above picture each series represented by their own patterns.)
+ * Hide first column and headers
+* Heatmap
+ * Similar threshold setup
+ * First column and headers are hidden
+
+Using images as transform values
+--------------------------------
+
+If your row name / col name / transform metrics contains strings that starts with `_img-` and ends with `_`, then they will be replaced with images. Example usage given below.
+
+` _img-https://example.com/happy.gif_ ` -> happy.gif with 20px width, 20px height
+
+` _img-https://example.com/happy.gif,30px_ ` -> happy.gif with 30px width, 20px height
+
+` _img-https://example.com/happy.gif,30px,40px_ ` -> happy.gif with 30px width, 40px height
+
+` _img-https://example.com/happy.gif,30px,40px,3_ ` -> happy.gif with 30px width, 40px height repeated 3 times
+
+![Image transform](https://raw.githubusercontent.com/yesoreyeram/yesoreyeram-boomtable-panel/master/dist/src/img/img-transform-example.png)
+
+Note : When using images from other domains, please take care of CORS policy, legal and copyright polices.
+
+Options
+-------
+
+`Text alignment for first column` -> This option specify the text alignment of first column cells in the table. Can be `left`,`right` or `center`. Default is left.
+
+`Text alignment for table header` -> This option specify the text alignment of table headers excluding first column. Can be `left`,`right` or `center`. Default is left.
+
+`Text alignment for values` -> This option specify the text alignment of value cells in the table. Can be `left`,`right` or `center`. Default is left.
+
+`Non matching cells text` -> If no series matches for the given row and col match, the corresponding text can be specified using this option. This option can also contain font awesome and image replacement tokens.
+
+`Non matching cells BG Color` -> If no series matches for the given row and col match, the corresponding bg color can be specified using this option
+
+`Non matching cells Text Color` -> If no series matches for the given row and col match, the corresponding text color can be specified using this option
+
+`Font Size` -> Specify font size to be used in the table. Leave blank for default. size can be specified in css units such as `1.4rem` , `16px` etc
+
+Azure Monitor Usage
+-------------------
+
+Same as other time series data sources. You need to properly format your legend to extract the row and column name.
+
+![Azure Monitor Usage](https://raw.githubusercontent.com/yesoreyeram/yesoreyeram-boomtable-panel/master/dist/src/img/azure-monitor-usage.png)
+
+Prometheus & InfluxDB Guidelines
+---------------------
+
+Though this plugin was initially designed to support graphite, It is also capable of handling timeseries database like Prometheus & InfluxDB. In order to achieve this, you need to **alias** your timeseries/Prometheus/Infludb metrics to proper delimited format. Following screenshot explains plugin usage with Prometheus/InfluxDB where the metrics are aliased with pipe delimiter. This can be any delimiter like space, dot, etc.#
+
+![Prometheus Usage](https://raw.githubusercontent.com/yesoreyeram/yesoreyeram-boomtable-panel/master/dist/src/img/prometheus-usage.png)
+
+![InfluxDB Usage](https://raw.githubusercontent.com/yesoreyeram/yesoreyeram-boomtable-panel/master/dist/src/img/influx-usage.png)
+
+Optionally, you can experiement with the new tags feature instead of **alias** . (Not for production use)
+
+Tag delimiter for influxdb and prometheus ( Experimental Feature )
+====================================================================
+
+**WARNING** : This may have bugs. Not suitable for production.
+
+To use , tags from your series use `tag` as a delimiter as shown below. Then in the row / column, you can specify the tags surronded by double curly braces as shown below. Metric can be referred by {{metric_name}}}.
+
+Rowname, Colname, Links, Tooltips and display template can also have this tag tokens.
+
+# Influx DB
+
+![image](https://user-images.githubusercontent.com/153843/61379520-9be12200-a89f-11e9-8bcd-b55e7f86249d.png)
+![image](https://user-images.githubusercontent.com/153843/61379533-a4395d00-a89f-11e9-8fd8-b62c3df0630a.png)
+![image](https://user-images.githubusercontent.com/153843/61379567-b1eee280-a89f-11e9-81dc-f128b5ec17dd.png)
+
+
+# Prometheus
+
+![image](https://user-images.githubusercontent.com/153843/61379602-c206c200-a89f-11e9-8dfb-462e5f28965b.png)
+![image](https://user-images.githubusercontent.com/153843/61379630-cf23b100-a89f-11e9-9677-bfa05c05d7ea.png)
+![image](https://user-images.githubusercontent.com/153843/61379652-db0f7300-a89f-11e9-8cef-254e8f1a8b7a.png)
+
diff --git a/dist/app/GrafanaUtils.js b/dist/app/GrafanaUtils.js
new file mode 100644
index 0000000..9eb9494
--- /dev/null
+++ b/dist/app/GrafanaUtils.js
@@ -0,0 +1,67 @@
+System.register(["lodash", "app/core/utils/kbn"], function (exports_1, context_1) {
+ "use strict";
+ var lodash_1, kbn_1, getDecimalsForValue, get_formatted_value;
+ 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;
+ }
+ ],
+ execute: function () {
+ 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);
+ get_formatted_value = function (value, decimals, format) {
+ if (!isNaN(value)) {
+ var decimalInfo = getDecimalsForValue(value, decimals);
+ var formatFunc = kbn_1.default.valueFormats[format];
+ return formatFunc(value, decimalInfo.decimals, decimalInfo.scaledDecimals);
+ }
+ else {
+ return value;
+ }
+ };
+ exports_1("get_formatted_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9IGVsc2Uge1xyXG4gICAgcmV0dXJuIHZhbHVlO1xyXG4gIH1cclxufTtcclxuZXhwb3J0IHsgZ2V0X2Zvcm1hdHRlZF92YWx1ZSwgZ2V0RGVjaW1hbHNGb3JWYWx1ZSB9O1xyXG4iXX0=
\ No newline at end of file
diff --git a/dist/app/app.js b/dist/app/app.js
new file mode 100644
index 0000000..bf7183b
--- /dev/null
+++ b/dist/app/app.js
@@ -0,0 +1,74 @@
+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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2FwcC9hcHAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7WUFLTSxjQUFjLEdBQUcsSUFBSSxtQkFBVyxDQUFDLGdDQUF1QixDQUFDLENBQUM7O1lBRTFELGFBQWEsR0FBRyxVQUFTLFNBQXdCLEVBQUUsT0FBd0M7Z0JBQy9GLElBQUksVUFBVSxHQUFHLGdCQUFDLENBQUMsSUFBSSxDQUFDLGdCQUFDLENBQUMsR0FBRyxDQUFDLFNBQVMsRUFBRSxVQUFBLENBQUMsSUFBSSxPQUFBLENBQUMsQ0FBQyxRQUFRLEVBQVYsQ0FBVSxDQUFDLENBQUMsQ0FBQztnQkFDM0QsSUFBSSxrQkFBa0IsR0FBRyxnQkFBQyxDQUFDLElBQUksQ0FBQyxnQkFBQyxDQUFDLEdBQUcsQ0FBQyxTQUFTLEVBQUUsVUFBQSxDQUFDLElBQUksT0FBQSxDQUFDLENBQUMsWUFBWSxFQUFkLENBQWMsQ0FBQyxDQUFDLENBQUM7Z0JBQ3ZFLElBQUksVUFBVSxHQUFHLGdCQUFDLENBQUMsSUFBSSxDQUFDLGdCQUFDLENBQUMsR0FBRyxDQUFDLFNBQVMsRUFBRSxVQUFBLENBQUMsSUFBSSxPQ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G4gICAgb3V0cHV0LnB1c2goY29scyk7XG4gIH0pO1xuICByZXR1cm4ge1xuICAgIGNvbHNfZm91bmQsXG4gICAgb3V0cHV0LFxuICAgIHJvd3NfZm91bmQsXG4gICAgcm93c193aXRob3V0X3Rva2VuLFxuICB9O1xufTtcblxuZXhwb3J0IHsgZGVmYXVsdFBhdHRlcm4sIHNlcmllc1RvVGFibGUgfTtcbiJdfQ==
\ No newline at end of file
diff --git a/dist/app/boom/Boom.interface.js b/dist/app/boom/Boom.interface.js
new file mode 100644
index 0000000..1f2cc55
--- /dev/null
+++ b/dist/app/boom/Boom.interface.js
@@ -0,0 +1,10 @@
+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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQm9vbS5pbnRlcmZhY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYXBwL2Jvb20vQm9vbS5pbnRlcmZhY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImludGVyZmFjZSBJQm9vbVBhdHRlcm4ge1xyXG4gIGJnQ29sb3JzOiBzdHJpbmc7XHJcbiAgYmdDb2xvcnNfb3ZlcnJpZGVzOiBzdHJpbmc7XHJcbiAgY2xpY2thYmxlX2NlbGxzX2xpbms6IHN0cmluZztcclxuICBjb2xfbmFtZTogc3RyaW5nO1xyXG4gIGRlY2ltYWxzOiBOdW1iZXI7XHJcbiAgZGVsaW1pdGVyOiBzdHJpbmc7XHJcbiAgZW5hYmxlX2JnQ29sb3I6IEJvb2xlYW47XHJcbiAgZW5hYmxlX2JnQ29sb3Jfb3ZlcnJpZGVzOiBCb29sZWFuO1xyXG4gIGVuYWJsZV9jbGlja2FibGVfY2VsbHM6IEJvb2xlYW47XHJcbiAgZW5hYmxl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0cmluZztcclxuICBmaXJzdF9jb2x1bW5fbGluazogU3RyaW5nO1xyXG59XHJcbmludGVyZmFjZSBJQm9vbUNlbGxEZXRhaWxzIHtcclxuICBoaWRkZW46IEJvb2xlYW47XHJcbiAgY29sX25hbWU6IHN0cmluZztcclxuICByb3dfbmFtZTogc3RyaW5nO1xyXG4gIGNvbG9yX2JnOiBzdHJpbmc7XHJcbiAgY29sb3JfdGV4dDogc3RyaW5nO1xyXG4gIGRpc3BsYXlfdmFsdWU6IHN0cmluZztcclxuICBsaW5rOiBzdHJpbmc7XHJcbiAgdG9vbHRpcDogc3RyaW5nO1xyXG4gIHZhbHVlOiBudW1iZXI7XHJcbn1cclxuaW50ZXJmYWNlIElCb29tVGFibGUge1xyXG4gIHJvd3Nfd2l0aG91dF90b2tlbjogc3RyaW5nW107XHJcbiAgcm93c19mb3VuZDogc3RyaW5nW107XHJcbiAgY29sc19mb3VuZDogc3RyaW5nW107XHJcbiAgb3V0cHV0OiBJQm9vbUNlbGxEZXRhaWxzW11bXTtcclxufVxyXG5pbnRlcmZhY2UgSUJvb21IVE1MIHtcclxuICBib2R5OiBzdHJpbmc7XHJcbn1cclxuZXhwb3J0IHtcclxuICBJQm9vbVRhYmxlVHJhbnNmb3JtYXRpb25PcHRpb25zLFxyXG4gIElCb29tUmVuZGVyaW5nT3B0aW9ucyxcclxuICBJQm9vbVBhdHRlcm4sXHJcbiAgSUJvb21TZXJpZXMsXHJcbiAgSUJvb21UaW1lQmFzZWRUaHJlc2hvbGQsXHJcbiAgSUJvb21IVE1MLFxyXG4gIElCb29tVGFibGUsXHJcbiAgSUJvb21DZWxsRGV0YWlscyxcclxufTtcclxuIl19
\ No newline at end of file
diff --git a/dist/app/boom/BoomOutput.js b/dist/app/boom/BoomOutput.js
new file mode 100644
index 0000000..ac182d5
--- /dev/null
+++ b/dist/app/boom/BoomOutput.js
@@ -0,0 +1,90 @@
+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;
+ };
+ }
+ };
+});
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQm9vbU91dHB1dC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9hcHAvYm9vbS9Cb29tT3V0cHV0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7O1lBSUE7Z0JBU0Usb0JBQVksT0FBOEI7b0JBQ3hDLElBQUksQ0FBQyxzQkFBc0IsR0FBRyxPQUFPLENBQUMsc0JBQXNCLElBQUksRUFBRSxDQUFDO29CQUNuRSxJQUFJLENBQUMsaUJBQWlCLEdBQUcsT0FBTyxDQUFDLGlCQUFpQixDQUF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ZXJuLnZhbHVlTmFtZX1cIj4ke2QuZGlzcGxheV92YWx1ZX08L3RkPlxuICAgICAgICAgICAgPHRkIHN0eWxlPVwicGFkZGluZzo0cHg7dGV4dC1hbGlnbjpsZWZ0O3dpZHRoOjEwJTsgdGl0bGU9XCJSb3cgbmFtZVwiID4ke2Qucm93X25hbWV9PC90ZD5cbiAgICAgICAgICAgIDx0ZCBzdHlsZT1cInBhZGRpbmc6NHB4O3RleHQtYWxpZ246bGVmdDt3aWR0aDoxMCU7IHRpdGxlPVwiQ29sIG5hbWVcIiA+JHtkLmNvbF9uYW1lfTwvdGQ+XG4gICAgICAgICAgICA8dGQgc3R5bGU9XCJwYWRkaW5nOjRweDt0ZXh0LWFsaWduOmxlZnQ7d2lkdGg6MTAlOyB0aXRsZT1cIlRocmVzaG9sZHNcIiA+JHtkLnRocmVzaG9sZHMuam9pbignLCcpfTwvdGQ+XG4gICAgICAgICAgICA8dGQgc3R5bGU9XCJwYWRkaW5nOjRweDt0ZXh0LWFsaWduOmxlZnQ7d2lkdGg6MTAlOyB0aXRsZT1cIkJHIENvbG9yXCIgPiR7ZC5jb2xvcl9iZ308L3RkPlxuICAgICAgICAgICAgPHRkIHN0eWxlPVwicGFkZGluZzo0cHg7dGV4dC1hbGlnbjpsZWZ0O3dpZHRoOjEwJTsgdGl0bGU9XCJUZXh0IENvbG9yXCIgPiR7ZC5jb2xvcl90ZXh0fTwvdGQ+XG4gICAgICAgIDwvdHI+XG4gICAgICAgIGA7XG4gIH0pLmpvaW4oYGApO1xuICByZXR1cm4gZGVidWdkYXRhO1xufTtcbiJdfQ==
\ No newline at end of file
diff --git a/dist/app/boom/BoomPattern.js b/dist/app/boom/BoomPattern.js
new file mode 100644
index 0000000..7571e6f
--- /dev/null
+++ b/dist/app/boom/BoomPattern.js
@@ -0,0 +1,101 @@
+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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQm9vbVBhdHRlcm4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYXBwL2Jvb20vQm9vbVBhdHRlcm4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7WUFFQTtnQkE0Q0UscUJBQVksT0FBWTtvQkEzQ2hCLG9CQUFlLEdBQUcsR0FBRyxDQU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xuICAgICAgICAucmV2ZXJzZSgpXG4gICAgICAgIC5qb2luKCd8JylcbiAgICA6ICcnO1xufTtcblxuQm9vbVBhdHRlcm4ucHJvdG90eXBlLmFkZF90aW1lX2Jhc2VkX3RocmVzaG9sZHMgPSBmdW5jdGlvbigpOiB2b2lkIHtcbiAgbGV0IG5ld190aW1lX2Jhc2VkX3RocmVzaG9sZDogSUJvb21UaW1lQmFzZWRUaHJlc2hvbGQgPSBuZXcgQm9vbVRpbWVCYXNlZFRocmVzaG9sZCgpO1xuICB0aGlzLnRpbWVfYmFzZWRfdGhyZXNob2xkcyA9IHRoaXMudGltZV9iYXNlZF90aHJlc2hvbGRzIHx8IFtdO1xuICB0aGlzLnRpbWVfYmFzZWRfdGhyZXNob2xkcy5wdXNoKG5ld190aW1lX2Jhc2VkX3RocmVzaG9sZCk7XG59O1xuXG5Cb29tUGF0dGVybi5wcm90b3R5cGUucmVtb3ZlX3RpbWVfYmFzZWRfdGhyZXNob2xkcyA9IGZ1bmN0aW9uKGluZGV4OiBOdW1iZXIpOiB2b2lkIHtcbiAgaWYgKHRoaXMudGltZV9iYXNlZF90aHJlc2hvbGRzLmxlbmd0aCA+IDApIHtcbiAgICB0aGlzLnRpbWVfYmFzZWRfdGhyZXNob2xkcy5zcGxpY2UoTnVtYmVyKGluZGV4KSwgMSk7XG4gIH1cbn07XG5cbkJvb21QYXR0ZXJuLnByb3RvdHlwZS5zZXRVbml0Rm9ybWF0ID0gZnVuY3Rpb24oZm9ybWF0OiBhbnkpOiB2b2lkIHtcbiAgdGhpcy5mb3JtYXQgPSBmb3JtYXQgJiYgZm9ybWF0LnZhbHVlID8gZm9ybWF0LnZhbHVlIDogJ25vbmUnO1xufTtcblxuZXhwb3J0IHsgQm9vbVBhdHRlcm4gfTtcbiJdfQ==
\ No newline at end of file
diff --git a/dist/app/boom/BoomSeries.js b/dist/app/boom/BoomSeries.js
new file mode 100644
index 0000000..c0dcff3
--- /dev/null
+++ b/dist/app/boom/BoomSeries.js
@@ -0,0 +1,109 @@
+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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQm9vbVNlcmllcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9hcHAvYm9vbS9Cb29tU2VyaWVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O1lBVUE7Z0JBd0JJLG9CQUFZLFVBQWUsRUFBRSxtQkFBd0IsRUFBRSxhQUFvQixFQUFFLE9BQVksRUFBRSxVQUFlLEVBQUUsV0FBZ0IsRUFBRSxPQUFZO29CQXJCbEksWUFBTyxHQUFRLFNBQVMsQ0FBQztvQkFHekIsbUJBQWMsR0FBRyxFQUFFLENBQUM7b0JBQ3BCLG9CQUFlLEdBQUcsR0FBRyxDQUFDO29CQU92QixrQkFBYSxHQUFHLEdBQUcsQ0FBQztvQkFDcEIsWUFBTyxHQUFHLEdBQUcsQ0FBQztvQkFDZCxVQUFLLEdBQUcsR0FBRyxDQUFDO29CQUNaLG9CQUFlLEdBQUcsR0FBRyxDQUFDO29CQUN0QixTQUFJLEdBQUcsR0FBRyxDQUFDO29CQUVYLFd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dfbmFtZS50b1N0cmluZygpKS50cmltKCkpO1xuICAgICAgICB0aGlzLmRpc3BsYXlfdmFsdWUgPSB0aGlzLmRpc3BsYXlfdmFsdWUucmVwbGFjZShuZXcgUmVnRXhwKFwiX3Jvd19uYW1lX1wiLCBcImdcIiksIHRoaXMucm93X25hbWUudG9TdHJpbmcoKSk7XG5cbiAgICAgICAgdGhpcy5yb3dfbmFtZSA9IHRoaXMucm93X25hbWUucmVwbGFjZShuZXcgUmVnRXhwKFwiX2NvbF9uYW1lX1wiLCBcImdcIiksIHRoaXMuY29sX25hbWUudG9TdHJpbmcoKSk7XG4gICAgICAgIHRoaXMubGluayA9IHRoaXMubGluay5yZXBsYWNlKG5ldyBSZWdFeHAoXCJfY29sX25hbWVfXCIsIFwiZ1wiKSwgZ2V0QWN0dWFsTmFtZVdpdGhvdXRUb2tlbnModGhpcy5jb2xfbmFtZS50b1N0cmluZygpKS50cmltKCkpO1xuICAgICAgICB0aGlzLnRvb2x0aXAgPSB0aGlzLnRvb2x0aXAucmVwbGFjZShuZXcgUmVnRXhwKFwiX2NvbF9uYW1lX1wiLCBcImdcIiksIGdldEFjdHVhbE5hbWVXaXRob3V0VG9rZW5zKHRoaXMuY29sX25hbWUudG9TdHJpbmcoKSkudHJpbSgpKTtcbiAgICAgICAgdGhpcy5kaXNwbGF5X3ZhbHVlID0gdGhpcy5kaXNwbGF5X3ZhbHVlLnJlcGxhY2UobmV3IFJlZ0V4cChcIl9jb2xfbmFtZV9cIiwgXCJnXCIpLCB0aGlzLmNvbF9uYW1lLnRvU3RyaW5nKCkpO1xuXG4gICAgfVxuXG59XG5cbmV4cG9ydCB7XG4gICAgQm9vbVNlcmllc1xufTtcbiJdfQ==
\ No newline at end of file
diff --git a/dist/app/boom/BoomSeriesUtils.js b/dist/app/boom/BoomSeriesUtils.js
new file mode 100644
index 0000000..fb292fb
--- /dev/null
+++ b/dist/app/boom/BoomSeriesUtils.js
@@ -0,0 +1,119 @@
+System.register(["lodash", "./index", "../GrafanaUtils"], function (exports_1, context_1) {
+ "use strict";
+ var lodash_1, index_1, GrafanaUtils_1, getBGColor, getTextColor, getThresholds, getLink, GetValuesReplaced;
+ 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 (GrafanaUtils_1_1) {
+ GrafanaUtils_1 = GrafanaUtils_1_1;
+ }
+ ],
+ execute: function () {
+ exports_1("getBGColor", getBGColor = function (value, pattern, thresholds, list_of_bgColors_based_on_thresholds, bgColorOverRides) {
+ var bgColor = 'transparent';
+ if (lodash_1.default.isNaN(value) || value === null) {
+ bgColor = pattern.null_color || 'darkred';
+ if (pattern.null_color === '') {
+ bgColor = 'transparent';
+ }
+ }
+ else {
+ bgColor = pattern.defaultBGColor || bgColor;
+ if (pattern.enable_bgColor && pattern.bgColors) {
+ bgColor = index_1.getItemBasedOnThreshold(thresholds, list_of_bgColors_based_on_thresholds, value, bgColor);
+ }
+ if (pattern.enable_bgColor_overrides && pattern.bgColors_overrides !== '') {
+ var _bgColors_overrides = bgColorOverRides
+ .filter(function (con) { return con.indexOf('->'); })
+ .map(function (con) { return con.split('->'); })
+ .filter(function (con) { return +con[0] === 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);
+ });
+ exports_1("getTextColor", getTextColor = function (value, pattern, thresholds, list_of_textColors_based_on_thresholds, txtColorOverrides) {
+ var textColor = document.body.classList.contains('theme-light') ? 'black' : 'white';
+ if (lodash_1.default.isNaN(value) || value === null) {
+ textColor = pattern.null_textcolor || textColor;
+ }
+ else {
+ textColor = pattern.defaultTextColor || textColor;
+ if (pattern.enable_textColor && pattern.textColors) {
+ textColor = index_1.getItemBasedOnThreshold(thresholds, list_of_textColors_based_on_thresholds, value, textColor);
+ }
+ if (pattern.enable_textColor_overrides && pattern.textColors_overrides !== '') {
+ var _textColors_overrides = txtColorOverrides
+ .filter(function (con) { return con.indexOf('->'); })
+ .map(function (con) { return con.split('->'); })
+ .filter(function (con) { return +con[0] === 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);
+ });
+ exports_1("getThresholds", getThresholds = function (thresholdsArray, enable_time_based_thresholds, time_based_thresholds, currentTimeStamp) {
+ if (enable_time_based_thresholds) {
+ var metricrecivedTimeStamp_1 = 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(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) {
+ thresholdsArray = (tbtx.threshold + '').split(',').map(function (d) { return +d; });
+ }
+ });
+ }
+ return thresholdsArray || [];
+ });
+ exports_1("getLink", getLink = function (enable_clickable_cells, clickable_cells_link, range) {
+ var link = enable_clickable_cells ? clickable_cells_link || '#' : '#';
+ if (link && link !== '#') {
+ link += link.indexOf('?') > -1 ? "&from=" + range.from : "?from=" + range.from;
+ link += "&to=" + range.to;
+ }
+ return link;
+ });
+ exports_1("GetValuesReplaced", GetValuesReplaced = function (strToReplace, value, valueformatted, stats, decimals, format, _metricname, _tags, delimiter) {
+ var value_raw = lodash_1.default.isNaN(value) || value === null ? 'null' : value.toString().trim();
+ var value_formatted = lodash_1.default.isNaN(value) || value === null ? 'null' : valueformatted.toString().trim();
+ strToReplace = strToReplace.replace(new RegExp('_value_min_raw_', 'g'), stats.min);
+ strToReplace = strToReplace.replace(new RegExp('_value_max_raw_', 'g'), stats.max);
+ strToReplace = strToReplace.replace(new RegExp('_value_avg_raw_', 'g'), stats.avg);
+ strToReplace = strToReplace.replace(new RegExp('_value_current_raw_', 'g'), stats.current);
+ strToReplace = strToReplace.replace(new RegExp('_value_total_raw_', 'g'), stats.total);
+ strToReplace = strToReplace.replace(new RegExp('_value_raw_', 'g'), value_raw);
+ strToReplace = strToReplace.replace(new RegExp('_value_min_', 'g'), GrafanaUtils_1.get_formatted_value(stats.min, decimals, format));
+ strToReplace = strToReplace.replace(new RegExp('_value_max_', 'g'), GrafanaUtils_1.get_formatted_value(stats.max, decimals, format));
+ strToReplace = strToReplace.replace(new RegExp('_value_avg_', 'g'), GrafanaUtils_1.get_formatted_value(stats.avg, decimals, format));
+ strToReplace = strToReplace.replace(new RegExp('_value_current_', 'g'), GrafanaUtils_1.get_formatted_value(stats.current, decimals, format));
+ strToReplace = strToReplace.replace(new RegExp('_value_total_', 'g'), GrafanaUtils_1.get_formatted_value(stats.total, decimals, format));
+ strToReplace = strToReplace.replace(new RegExp('_value_', 'g'), value_formatted);
+ if (delimiter.toLowerCase() === 'tag') {
+ strToReplace = strToReplace.replace(new RegExp('{{metric_name}}', 'g'), _metricname);
+ strToReplace = index_1.replace_tags_from_field(strToReplace, _tags);
+ }
+ return strToReplace;
+ });
+ }
+ };
+});
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQm9vbVNlcmllc1V0aWxzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2FwcC9ib29tL0Jvb21TZXJpZXNVdGlscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozt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sICdtb24nLCAndHVlJywgJ3dlZCcsICd0aHUnLCAnZnJpJywgJ3NhdCddO1xyXG4gICAgXy5lYWNoKHRpbWVfYmFzZWRfdGhyZXNob2xkcywgdGJ0eCA9PiB7XHJcbiAgICAgIGlmIChcclxuICAgICAgICB0YnR4ICYmXHJcbiAgICAgICAgdGJ0eC5mcm9tICYmXHJcbiAgICAgICAgdGJ0eC50byAmJlxyXG4gICAgICAgIHRidHguZW5hYmxlZERheXMgJiZcclxuICAgICAgICBtZXRyaWNyZWNpdmVkVGltZVN0YW1wX2lubnVtYmVyID49ICt0YnR4LmZyb20gJiZcclxuICAgICAgICBtZXRyaWNyZWNpdmVkVGltZVN0YW1wX2lubnVtYmVyIDw9ICt0YnR4LnRvICYmXHJcbiAgICAgICAgdGJ0eC5lbmFibGVkRGF5cy50b0xvd2VyQ2FzZSgpLmluZGV4T2Yod2Vla2RheXNbbWV0cmljcmVjaXZlZFRpbWVTdGFtcC5nZXREYXkoKV0pID4gLTEgJiZcclxuICAgICAgICB0YnR4LnRocmVzaG9sZFxyXG4gICAgICApIHtcclxuICAgICAgICB0aHJlc2hvbGRzQXJyYXkgPSAodGJ0eC50aHJlc2hvbGQgKyAnJykuc3BsaXQoJywnKS5tYXAoZCA9PiArZCk7XHJcbiAgICAgIH1cclxuICAgIH0pO1xyXG4gIH1cclxuICByZXR1cm4gdGhyZXNob2xkc0FycmF5IHx8IFtdO1xyXG59O1xyXG5leHBvcnQgbGV0IGdldExpbmsgPSBmdW5jdGlvbihlbmFibGVfY2xpY2thYmxlX2NlbGxzOiBib29sZWFuLCBjbGlja2FibGVfY2VsbHNfbGluazogc3RyaW5nLCByYW5nZTogYW55KTogc3RyaW5nIHtcclxuICBsZXQgbGluayA9IGVuYWJsZV9jbGlja2FibGVfY2VsbHMgPyBjbGlja2FibGVfY2VsbHNfbGluayB8fCAnIycgOiAnIyc7XHJcbiAgaWYgKGxpbmsgJiYgbGluayAhPT0gJyMnKSB7XHJcbiAgICBsaW5rICs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ZhbHVlKHN0YXRzLmN1cnJlbnQsIGRlY2ltYWxzLCBmb3JtYXQpKTtcclxuICBzdHJUb1JlcGxhY2UgPSBzdHJUb1JlcGxhY2UucmVwbGFjZShuZXcgUmVnRXhwKCdfdmFsdWVfdG90YWxfJywgJ2cnKSwgZ2V0X2Zvcm1hdHRlZF92YWx1ZShzdGF0cy50b3RhbCwgZGVjaW1hbHMsIGZvcm1hdCkpO1xyXG4gIHN0clRvUmVwbGFjZSA9IHN0clRvUmVwbGFjZS5yZXBsYWNlKG5ldyBSZWdFeHAoJ192YWx1ZV8nLCAnZycpLCB2YWx1ZV9mb3JtYXR0ZWQpO1xyXG5cclxuICBpZiAoZGVsaW1pdGVyLnRvTG93ZXJDYXNlKCkgPT09ICd0YWcnKSB7XHJcbiAgICBzdHJUb1JlcGxhY2UgPSBzdHJUb1JlcGxhY2UucmVwbGFjZShuZXcgUmVnRXhwKCd7e21ldHJpY19uYW1lfX0nLCAnZycpLCBfbWV0cmljbmFtZSk7XHJcbiAgICBzdHJUb1JlcGxhY2UgPSByZXBsYWNlX3RhZ3NfZnJvbV9maWVsZChzdHJUb1JlcGxhY2UsIF90YWdzKTtcclxuICB9XHJcblxyXG4gIHJldHVybiBzdHJUb1JlcGxhY2U7XHJcbn07XHJcbiJdfQ==
\ No newline at end of file
diff --git a/dist/app/boom/BoomTimeBasedThreshold.js b/dist/app/boom/BoomTimeBasedThreshold.js
new file mode 100644
index 0000000..1a54655
--- /dev/null
+++ b/dist/app/boom/BoomTimeBasedThreshold.js
@@ -0,0 +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);
+ }
+ };
+});
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQm9vbVRpbWVCYXNlZFRocmVzaG9sZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9hcHAvYm9vbS9Cb29tVGltZUJhc2VkVGhyZXNob2xkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7WUFFQTtnQkFNRTtvQkFDRSxJQUFJLENBQUMsV0FBVyxHQUFHLDZCQUE2QixDQUFDO29CQUNqRCxJQUFJLENBQUMsSUFBSSxHQUFHLE1BQU0sQ0FBQztvQkFDbkIsSUFBSSxDQUFDLElBQUksR0FBRywyQkFBMkIsQ0FBQztvQkFDeEMsSUFBSSxDQUFDLFNBQVMsR0FBRyxPQUFPLENBQUM7b0JBQ3pCLElBQUksQ0FBQyxFQUFFLEdBQUcsTUFBTSxDQUFDO2dCQUNuQixDQUFDO2dCQUNILDZCQUFDO1lBQUQsQ0FBQyxBQWJELElBYUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBJQm9vbVRpbWVCYXNlZFRocmVzaG9sZCB9IGZyb20gJy4vaW5kZXgnO1xuXG5jbGFzcyBCb29tVGltZUJhc2VkVGhyZXNob2xkIGltcGxlbWVudHMgSUJvb21UaW1lQmFzZWRUaHJlc2hvbGQge1xuICBwdWJsaWMgZW5hYmxlZERheXM6IHN0cmluZztcbiAgcHVibGljIGZyb206IHN0cmluZztcbiAgcHVibGljIG5hbWU6IHN0cmluZztcbiAgcHVibGljIHRocmVzaG9sZDogc3RyaW5nO1xuICBwdWJsaWMgdG86IHN0cmluZztcbiAgY29uc3RydWN0b3IoKSB7XG4gICAgdGhpcy5lbmFibGVkRGF5cyA9ICdTdW4sTW9uLFR1ZSxXZWQsVGh1LEZyaSxTYXQnO1xuICAgIHRoaXMuZnJvbSA9ICcwMDAwJztcbiAgICB0aGlzLm5hbWUgPSAnRWFybHkgbW9ybmluZyBvZiBldmVyeWRheSc7XG4gICAgdGhpcy50aHJlc2hvbGQgPSAnNzAsOTAnO1xuICAgIHRoaXMudG8gPSAnMDUzMCc7XG4gIH1cbn1cblxuZXhwb3J0IHsgQm9vbVRpbWVCYXNlZFRocmVzaG9sZCB9O1xuIl19
\ No newline at end of file
diff --git a/dist/app/boom/BoomUtils.js b/dist/app/boom/BoomUtils.js
new file mode 100644
index 0000000..367e7d9
--- /dev/null
+++ b/dist/app/boom/BoomUtils.js
@@ -0,0 +1,300 @@
+System.register(["lodash"], function (exports_1, context_1) {
+ "use strict";
+ var lodash_1, normalizeColor, parseMath, parseMathExpression, getColor, replaceTokens, getActualNameWithoutTokens, getItemBasedOnThreshold, getMetricNameFromTaggedAlias, getLablesFromTaggedAlias, replace_tags_from_field, getSeriesValue, getCurrentTimeStamp, replaceDelimitedColumns, getRowName, getColName, getDisplayValueTemplate, doesValueNeedsToHide;
+ var __moduleName = context_1 && context_1.id;
+ return {
+ setters: [
+ function (lodash_1_1) {
+ lodash_1 = lodash_1_1;
+ }
+ ],
+ execute: function () {
+ exports_1("normalizeColor", 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.trim();
+ }
+ });
+ exports_1("parseMath", parseMath = function (valuestring) {
+ var returnvalue = 0;
+ if (valuestring.indexOf('+') > -1) {
+ returnvalue = +valuestring.split('+')[0] + +valuestring.split('+')[1];
+ }
+ else if (valuestring.indexOf('-') > -1) {
+ returnvalue = +valuestring.split('-')[0] - +valuestring.split('-')[1];
+ }
+ else if (valuestring.indexOf('*') > -1) {
+ returnvalue = +valuestring.split('*')[0] * +valuestring.split('*')[1];
+ }
+ else if (valuestring.indexOf('/') > -1) {
+ returnvalue = +valuestring.split('/')[0] / +valuestring.split('/')[1];
+ }
+ else if (valuestring.indexOf('min') > -1) {
+ returnvalue = lodash_1.default.min([+valuestring.split('min')[0], +valuestring.split('min')[1]]) || 0;
+ }
+ else if (valuestring.indexOf('max') > -1) {
+ returnvalue = lodash_1.default.max([+valuestring.split('max')[0], +valuestring.split('max')[1]]) || 0;
+ }
+ else if (valuestring.indexOf('mean') > -1) {
+ returnvalue = lodash_1.default.mean([+valuestring.split('avg')[0], +valuestring.split('avg')[1]]) || 0;
+ }
+ else {
+ returnvalue = +valuestring;
+ }
+ return Math.round(+returnvalue);
+ });
+ exports_1("parseMathExpression", parseMathExpression = function (expression, index) {
+ var valuestring = expression.replace(/\_/g, '').split(',')[index];
+ return +parseMath(valuestring);
+ });
+ exports_1("getColor", getColor = function (expression, index) {
+ var returnValue = (expression || '').split(',').length > index ? " style=\"color:" + normalizeColor(expression.replace(/\_/g, '').split(',')[index]) + "\" " : '';
+ return returnValue;
+ });
+ exports_1("replaceTokens", replaceTokens = function (value) {
+ if (!value) {
+ return value;
+ }
+ value = value + '';
+ value = value
+ .split(' ')
+ .map(function (a) {
+ if (a.startsWith('_fa-') && a.endsWith('_')) {
+ var returnvalue = '';
+ var icon = a.replace(/\_/g, '').split(',')[0];
+ var color = getColor(a, 1);
+ var repeatCount = a.split(',').length >= 3 ? parseMathExpression(a, 2) : 1;
+ returnvalue = (" ").repeat(repeatCount);
+ if (a.split(',').length >= 4) {
+ var maxColor = getColor(a, 3);
+ var maxLength = a.split(',').length >= 5 ? parseMathExpression(a, 4) : 0;
+ returnvalue += (" ").repeat(lodash_1.default.max([maxLength - repeatCount, 0]) || 0);
+ }
+ return returnvalue;
+ }
+ 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("getActualNameWithoutTokens", 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("getItemBasedOnThreshold", 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("getMetricNameFromTaggedAlias", getMetricNameFromTaggedAlias = function (target) {
+ target = target.trim();
+ var _metricname = target;
+ if (target.indexOf('{') > -1 && target.indexOf('}') > -1 && target[target.length - 1] === '}') {
+ _metricname = target.split('{')[0].trim();
+ }
+ else {
+ _metricname = target;
+ }
+ return _metricname;
+ });
+ exports_1("getLablesFromTaggedAlias", getLablesFromTaggedAlias = function (target, label) {
+ var _tags = [];
+ target = target.trim();
+ var tagsstring = target.replace(label, '').trim();
+ if (tagsstring.startsWith('{') && tagsstring.endsWith('}')) {
+ var parsePrometheusLabels = function (labels) {
+ var labelsByKey = {};
+ labels.replace(/\b(\w+)(!?=~?)"([^"\n]*?)"/g, function (__, key, operator, value) {
+ if (!operator) {
+ console.log(operator);
+ }
+ labelsByKey[key] = value;
+ return '';
+ });
+ return labelsByKey;
+ };
+ lodash_1.default.each(parsePrometheusLabels(tagsstring), function (k, v) {
+ _tags.push({ tag: v, value: k });
+ });
+ if (tagsstring.indexOf(':') > -1 && _tags.length === 0) {
+ var label_values = tagsstring
+ .slice(1)
+ .trim()
+ .slice(0, -1)
+ .trim() || '';
+ _tags = label_values
+ .split(',')
+ .map(function (item) { return (item || '').trim(); })
+ .filter(function (item) { return item && item.indexOf(':') > -1; })
+ .map(function (item) {
+ if (item.split(':').length === 2) {
+ var ret = {};
+ ret.tag = item.split(':')[0].trim();
+ ret.value = item.split(':')[1].trim();
+ return ret;
+ }
+ else {
+ return null;
+ }
+ })
+ .filter(function (item) { return item; });
+ }
+ }
+ return _tags;
+ });
+ exports_1("replace_tags_from_field", replace_tags_from_field = function (field, tags) {
+ if (tags && tags.length > 0) {
+ field = tags.reduce(function (r, it) {
+ return r.replace(new RegExp('{{' + it.tag.trim() + '}}', 'g'), it.value).replace(/\"/g, '');
+ }, field);
+ }
+ return field;
+ });
+ exports_1("getSeriesValue", getSeriesValue = function (series, statType) {
+ var value = NaN;
+ statType = (statType || '').toLowerCase();
+ if (series) {
+ if (statType === 'last_time' && series.datapoints && series.datapoints.length > 0) {
+ if (lodash_1.default.last(series.datapoints)) {
+ value = lodash_1.default.last(series.datapoints)[1];
+ }
+ }
+ else if (statType === 'last_time_nonnull') {
+ var non_null_data = series.datapoints.filter(function (s) { return s[0]; });
+ if (lodash_1.default.last(non_null_data) && lodash_1.default.last(non_null_data)[1]) {
+ value = lodash_1.default.last(non_null_data)[1];
+ }
+ }
+ else if (series.stats) {
+ value = series.stats[statType] || null;
+ }
+ }
+ return value;
+ });
+ exports_1("getCurrentTimeStamp", getCurrentTimeStamp = function (dataPoints) {
+ var currentTimeStamp = new Date();
+ if (dataPoints && dataPoints.length > 0 && lodash_1.default.last(dataPoints).length === 2) {
+ currentTimeStamp = new Date(lodash_1.default.last(dataPoints)[1]);
+ }
+ return currentTimeStamp;
+ });
+ exports_1("replaceDelimitedColumns", replaceDelimitedColumns = function (inputstring, seriesName, delimiter, row_col_wrapper) {
+ var outputString = seriesName.split(delimiter || '.').reduce(function (r, it, i) {
+ return r.replace(new RegExp(row_col_wrapper + i + row_col_wrapper, 'g'), it);
+ }, inputstring);
+ return outputString;
+ });
+ exports_1("getRowName", getRowName = function (row_name, delimiter, row_col_wrapper, seriesName, _metricname, _tags) {
+ if (delimiter.toLowerCase() === 'tag') {
+ row_name = row_name.replace(new RegExp('{{metric_name}}', 'g'), _metricname);
+ row_name = replace_tags_from_field(row_name, _tags);
+ }
+ else {
+ row_name = replaceDelimitedColumns(row_name, seriesName, delimiter, row_col_wrapper);
+ if (seriesName.split(delimiter || '.').length === 1) {
+ row_name = seriesName;
+ }
+ }
+ return row_name.replace(new RegExp('_series_', 'g'), seriesName.toString());
+ });
+ exports_1("getColName", getColName = function (col_name, delimiter, row_col_wrapper, seriesName, row_name, _metricname, _tags) {
+ if (delimiter.toLowerCase() === 'tag') {
+ col_name = col_name.replace(new RegExp('{{metric_name}}', 'g'), _metricname);
+ row_name = replace_tags_from_field(col_name, _tags);
+ }
+ else {
+ col_name = replaceDelimitedColumns(col_name, seriesName, delimiter, row_col_wrapper);
+ if (seriesName.split(delimiter || '.').length === 1 || row_name === seriesName) {
+ col_name = col_name || 'Value';
+ }
+ }
+ return col_name.replace(new RegExp('_series_', 'g'), seriesName.toString());
+ });
+ exports_1("getDisplayValueTemplate", getDisplayValueTemplate = function (value, pattern, seriesName, row_col_wrapper, thresholds) {
+ var template = '_value_';
+ if (lodash_1.default.isNaN(value) || value === null) {
+ template = pattern.null_value || 'No data';
+ if (pattern.null_value === '') {
+ template = '';
+ }
+ }
+ else {
+ template = pattern.displayTemplate || template;
+ if (pattern.enable_transform) {
+ var transform_values = pattern.transform_values.split('|');
+ template = getItemBasedOnThreshold(thresholds, transform_values, value, template);
+ }
+ if (pattern.enable_transform_overrides && pattern.transform_values_overrides !== '') {
+ var _transform_values_overrides = pattern.transform_values_overrides
+ .split('|')
+ .filter(function (con) { return con.indexOf('->'); })
+ .map(function (con) { return con.split('->'); })
+ .filter(function (con) { return +con[0] === value; })
+ .map(function (con) { return con[1]; });
+ if (_transform_values_overrides.length > 0 && _transform_values_overrides[0] !== '') {
+ template = ('' + _transform_values_overrides[0]).trim();
+ }
+ }
+ if (pattern.enable_transform || pattern.enable_transform_overrides) {
+ template = replaceDelimitedColumns(template, seriesName, pattern.delimiter, row_col_wrapper);
+ }
+ }
+ return template;
+ });
+ exports_1("doesValueNeedsToHide", doesValueNeedsToHide = function (value, filter) {
+ var hidden = false;
+ if ((value || value === 0) && filter && (filter.value_below !== '' || filter.value_above !== '')) {
+ if (filter.value_below !== '' && value < +filter.value_below) {
+ hidden = true;
+ }
+ if (filter.value_above !== '' && value > +filter.value_above) {
+ hidden = true;
+ }
+ }
+ return hidden;
+ });
+ }
+ };
+});
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQm9vbVV0aWxzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2FwcC9ib29tL0Jvb21VdGlscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztZQUdBLDRCQUFhLGNBQWMsR0FBRyxVQUFVLEtBQWE7Z0JBQ25ELElBQUksS0FBSyxDQUFDLFdBQVcsRUFBRSxLQUFLLE9BQU8sRUFBRTtvQkFDbkMsT0FBTyx5QkFBeUIsQ0FBQztpQkFDbEM7cUJBQU0sSUFBSSxLQUFLLENBQUMsV0FBVyxFQUFFLEtBQUssUUFBUSxFQUFFO29CQUMzQyxPQUFPLDBCQUEwQixDQUFDO2lCQUNuQztxQkFBTSxJQUFJLEtBQUssQ0FBQyxXQUFXLEVBQUUsS0FBSyxLQUFLLEVBQUU7b0JBQ3hDLE9BQU8s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HVlOiBrIH0pO1xyXG4gICAgfSk7XHJcbiAgICBpZiAodGFnc3N0cmluZy5pbmRleE9mKCc6JykgPiAtMSAmJiBfdGFncy5sZW5ndGggPT09IDApIHtcclxuICAgICAgbGV0IGxhYmVsX3ZhbHVlcyA9XHJcbiAgICAgICAgdGFnc3N0cmluZ1xyXG4gICAgICAgICAgLnNsaWNlKDEpXHJcbiAgICAgICAgICAudHJpbSgpXHJcbiAgICAgICAgICAuc2xpY2UoMCwgLTEpXHJcbiAgICAgICAgICAudHJpbSgpIHx8ICcnO1xyXG4gICAgICBfdGFncyA9IGxhYmVsX3ZhbHVlc1xyXG4gICAgICAgIC5zcGxpdCgnLCcpXHJcbiAgICAgICAgLm1hcChpdGVtID0+IChpdGVtIHx8ICcnKS50cmltKCkpXHJcbiAgICAgICAgLmZpbHRlcihpdGVtID0+IGl0ZW0gJiYgaXRlbS5pbmRleE9mKCc6JykgPiAtMSlcclxuICAgICAgICAubWFwKGl0ZW0gPT4ge1xyXG4gICAgICAgICAgaWYgKGl0ZW0uc3BsaXQoJzonKS5sZW5ndGggPT09IDIpIHtcclxuICAgICAgICAgICAgbGV0IHJldDogYW55ID0ge307XHJcbiAgICAgICAgICAgIHJldC50YWcgPSBpdGVtLnNwbGl0KCc6JylbMF0udHJpbSgpO1xyXG4gICAgICAgICAgICByZXQudmFsdWUgPSBpdGVtLnNwbGl0KCc6JylbMV0udHJpbSgpO1xyXG4gICAgICAgICAgICByZXR1cm4gcmV0O1xyXG4gICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgcmV0dXJuIG51bGw7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgfSlcclxuICAgICAgICAuZmlsdGVyKGl0ZW0gPT4gaXRlbSk7XHJcbiAgICB9XHJcbiAgfVxyXG4gIHJldHVybiBfdGFncztcclxufTtcclxuZXhwb3J0IGNvbnN0IHJlcGxhY2VfdGFnc19mcm9tX2ZpZWxkID0gZnVuY3Rpb24gKGZpZWxkOiBzdH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VfYWJvdmUpIHtcclxuICAgICAgaGlkZGVuID0gdHJ1ZTtcclxuICAgIH1cclxuICB9XHJcbiAgcmV0dXJuIGhpZGRlbjtcclxufTtcclxuIl19
\ No newline at end of file
diff --git a/dist/app/boom/index.js b/dist/app/boom/index.js
new file mode 100644
index 0000000..535e6f3
--- /dev/null
+++ b/dist/app/boom/index.js
@@ -0,0 +1,45 @@
+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"],
+ "getItemBasedOnThreshold": BoomUtils_1_1["getItemBasedOnThreshold"],
+ "getMetricNameFromTaggedAlias": BoomUtils_1_1["getMetricNameFromTaggedAlias"],
+ "getLablesFromTaggedAlias": BoomUtils_1_1["getLablesFromTaggedAlias"],
+ "replace_tags_from_field": BoomUtils_1_1["replace_tags_from_field"],
+ "parseMath": BoomUtils_1_1["parseMath"],
+ "parseMathExpression": BoomUtils_1_1["parseMathExpression"],
+ "getColor": BoomUtils_1_1["getColor"]
+ });
+ },
+ 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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.js
new file mode 100644
index 0000000..ecbbfc3
--- /dev/null
+++ b/dist/app/config.js
@@ -0,0 +1,78 @@
+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=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2FwcC9jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7OztZQUFNLFNBQVMsR0FBRyw2QkFBNkIsQ0FBQzs7WUFDMUMsa0JBQWtCLEdBQUc7Z0JBQ3pCLEVBQUUsSUFBSSxFQUFFLEtBQUssRUFBRSxLQUFLLEVBQUUsS0FBSyxFQUFFO2dCQUM3QixFQUFFLElBQUksRUFBRSxLQUFLLEVBQUUsS0FBSyxFQUFFLEtBQUssRUFBRTtnQkFDN0IsRUFBRSxJQUFJLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBRSxLQUFLLEVBQUU7Z0JBQ2pDLEVBQUUsSUFBSSxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQUUsU0FBUyxFQUFFO2dCQUNyQyxFQUFFLElBQUksRUFBRSx5QkFBeUIsRUFBRSxLQUFLLEVBQUUsV0FBVyxFQUFFO2dCQUN2RCxFQUFFLElBQUksRUFBRSxrQ0FBa0MsRUFBRSxLQUFLLEVBQUUsbUJBQW1CLEVBQUU7Z0JBQ3hFLEVBQUUsSUFBSSxFQUFFLE9BQU8sRUFBRSxLQUFLLEVBQUUsT0FBTyxFQUFFO2FBQ2xDLENBQUM7O1lBQ0ksb0JBQW9CLEdBQUcsQ0FBQyxNQUFNLEVBQUUsT0FBTyxFQUFFLFFBQVEsQ0FBQyxDQUFDOztZQUNuRCxNQUFNLEdBQVE7Z0JBQ2xCLFVBQVUsRUFBRSxLQUFLO2dCQUNqQixLQUFLLEVBQUUsU0FBUzt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YmxlX3RyYW5zZm9ybTogZmFsc2UsXHJcbiAgZW5hYmxlX3RyYW5zZm9ybV9vdmVycmlkZXM6IGZhbHNlLFxyXG4gIGZpbHRlcjoge1xyXG4gICAgdmFsdWVfYWJvdmU6ICcnLFxyXG4gICAgdmFsdWVfYmVsb3c6ICcnLFxyXG4gIH0sXHJcbiAgZm9ybWF0OiAnbm9uZScsXHJcbiAgbmFtZTogJ0RlZmF1bHQgUGF0dGVybicsXHJcbiAgbnVsbF9jb2xvcjogJ2RhcmtyZWQnLFxyXG4gIG51bGxfdGV4dGNvbG9yOiAnd2hpdGUnLFxyXG4gIG51bGxfdmFsdWU6ICdObyBkYXRhJyxcclxuICBwYXR0ZXJuOiAnKicsXHJcbiAgcm93X25hbWU6ICdfc2VyaWVzXycsXHJcbiAgdGV4dENvbG9yczogJ3JlZHxvcmFuZ2V8Z3JlZW4nLFxyXG4gIHRleHRDb2xvcnNfb3ZlcnJpZGVzOiAnMC0+cmVkfDItPmdyZWVufDEtPnllbGxvdycsXHJcbiAgdGhyZXNob2xkczogJzcwLDkwJyxcclxuICB0aW1lX2Jhc2VkX3RocmVzaG9sZHM6IFtdLFxyXG4gIHRvb2x0aXBUZW1wbGF0ZTogJycsXHJcbiAgdHJhbnNmb3JtX3ZhbHVlczogJ192YWx1ZV98X3ZhbHVlX3xfdmFsdWVfJyxcclxuICB0cmFuc2Zvcm1fdmFsdWVzX292ZXJyaWRlczogJzAtPmRvd258MS0+dXAnLFxyXG4gIHZhbHVlTmFtZTogJ2F2ZycsXHJcbn07XHJcbmV4cG9ydCB7IHBsdWdpbl9pZCwgZGVmYXVsdF9wYXR0ZXJuX29wdGlvbnMsIHZhbHVlX25hbWVfb3B0aW9ucywgdGV4dEFsaWdubWVudE9wdGlvbnMsIGNvbmZpZyB9O1xyXG4iXX0=
\ No newline at end of file
diff --git a/dist/css/default.dark.css b/dist/css/default.dark.css
new file mode 100644
index 0000000..25330c6
--- /dev/null
+++ b/dist/css/default.dark.css
@@ -0,0 +1,45 @@
+.boom-table .mini-split {
+ margin-right: 10px; }
+
+.boom-table .split {
+ margin-right: 20px; }
+
+.boom-table .boom-btn {
+ padding: 10px;
+ margin-right: 10px;
+ min-width: 200px;
+ text-transform: lowercase; }
+
+.boom-table h6.text-header {
+ padding: 0 0 10px 0;
+ font-weight: bolder; }
+ .boom-table h6.text-header i {
+ font-weight: 100; }
+
+.boom-table .debug {
+ margin-top: 30px; }
+
+.boom-table .boom-label {
+ padding-left: 10px; }
+
+.boom-table .debug table tr {
+ border: 2px solid red; }
+
+.boom-table .inline-form-control {
+ display: inline-block;
+ margin: 10px 20px 10px 0px;
+ padding: 5px; }
+
+.boom-table .btn-small {
+ margin-left: 20px; }
+
+.boom-table .btn-small .fa {
+ margin-right: 5px; }
+
+.boom-table h6.text-header {
+ color: cadetblue; }
+ .boom-table h6.text-header i {
+ color: darkcyan; }
+
+.boom-table .sortarrows {
+ color: darkcyan; }
diff --git a/dist/css/default.light.css b/dist/css/default.light.css
new file mode 100644
index 0000000..862cae4
--- /dev/null
+++ b/dist/css/default.light.css
@@ -0,0 +1,45 @@
+.boom-table .mini-split {
+ margin-right: 10px; }
+
+.boom-table .split {
+ margin-right: 20px; }
+
+.boom-table .boom-btn {
+ padding: 10px;
+ margin-right: 10px;
+ min-width: 200px;
+ text-transform: lowercase; }
+
+.boom-table h6.text-header {
+ padding: 0 0 10px 0;
+ font-weight: bolder; }
+ .boom-table h6.text-header i {
+ font-weight: 100; }
+
+.boom-table .debug {
+ margin-top: 30px; }
+
+.boom-table .boom-label {
+ padding-left: 10px; }
+
+.boom-table .debug table tr {
+ border: 2px solid red; }
+
+.boom-table .inline-form-control {
+ display: inline-block;
+ margin: 10px 20px 10px 0px;
+ padding: 5px; }
+
+.boom-table .btn-small {
+ margin-left: 20px; }
+
+.boom-table .btn-small .fa {
+ margin-right: 5px; }
+
+.boom-table h6.text-header {
+ color: darkmagenta; }
+ .boom-table h6.text-header i {
+ color: darksalmon; }
+
+.boom-table .sortarrows {
+ color: darksalmon; }
diff --git a/dist/module.js b/dist/module.js
new file mode 100644
index 0000000..aa87c1e
--- /dev/null
+++ b/dist/module.js
@@ -0,0 +1,195 @@
+System.register(["lodash", "app/core/utils/kbn", "app/plugins/sdk", "./app/boom/index", "./app/app", "./app/config"], 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, app_1, config_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 (app_1_1) {
+ app_1 = app_1_1;
+ },
+ function (config_1_1) {
+ config_1 = config_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;
+ lodash_1.default.defaults(_this.panel, config_1.config.panelDefaults);
+ _this.panel.defaultPattern = _this.panel.defaultPattern || app_1.defaultPattern;
+ _this.$sce = $sce;
+ _this.templateSrv = $injector.get('templateSrv');
+ _this.timeSrv = $injector.get('timeSrv');
+ _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/editor.html", 2);
+ };
+ 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.activePatternIndex === -2 ? -2 : this.panel.patterns.length - 1;
+ this.render();
+ };
+ GrafanaBoomTableCtrl.prototype.removePattern = function (index) {
+ this.panel.patterns.splice(index, 1);
+ this.panel.activePatternIndex =
+ this.panel.activePatternIndex === -2 ? -2 : 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 = this.panel.activePatternIndex === -2 ? -2 : 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 = this.panel.activePatternIndex === -2 ? -2 : 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.panel.sorting_props = this.panel.sorting_props || {
+ col_index: -1,
+ direction: 'desc',
+ };
+ this.panel.sorting_props.col_index = headerIndex;
+ this.panel.sorting_props.direction = this.panel.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.adjustScrollBar = function () {
+ var rootElem = this.elem.find('.table-panel-scroll');
+ var originalHeight = this.ctrl.height;
+ if (isNaN(originalHeight)) {
+ if (this.ctrl && this.ctrl.elem && this.ctrl.elem[0] && this.ctrl.elem[0].clientHeight) {
+ originalHeight = this.ctrl.elem[0].clientHeight;
+ }
+ }
+ var maxheightofpanel = this.panel.debug_mode ? originalHeight - 111 : originalHeight - 31;
+ rootElem.css({ 'max-height': maxheightofpanel + 'px' });
+ };
+ GrafanaBoomTableCtrl.prototype.link = function (scope, elem, attrs, ctrl) {
+ this.scope = scope;
+ this.elem = elem;
+ this.attrs = attrs;
+ this.ctrl = ctrl;
+ this.panel = ctrl.panel;
+ this.panel.sorting_props = this.panel.sorting_props || {
+ col_index: -1,
+ direction: 'desc',
+ };
+ };
+ 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, _this.panel.scopedVars, _this.templateSrv, _this.timeSrv);
+ });
+ 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,
+ first_column_link: this.panel.first_column_link || '#',
+ 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.panel.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',
+ });
+ this.adjustScrollBar();
+ this.renderingCompleted();
+ }
+ };
+ }
+ };
+});
+//# sourceMappingURL=data:application/json;base64,eyJ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cclxuXHJcbmV4cG9ydCB7IEdyYWZhbmFCb29tVGFibGVDdHJsIGFzIFBhbmVsQ3RybCB9O1xyXG4iXX0=
\ No newline at end of file
diff --git a/dist/partials/editor.html b/dist/partials/editor.html
new file mode 100644
index 0000000..862195c
--- /dev/null
+++ b/dist/partials/editor.html
@@ -0,0 +1,605 @@
+
+
+
diff --git a/dist/partials/module.html b/dist/partials/module.html
new file mode 100644
index 0000000..46caba6
--- /dev/null
+++ b/dist/partials/module.html
@@ -0,0 +1,40 @@
+
+
+
WARNING: Panel running in debug mode
+
+
+
\ No newline at end of file
diff --git a/dist/plugin.json b/dist/plugin.json
new file mode 100644
index 0000000..5a5bcdf
--- /dev/null
+++ b/dist/plugin.json
@@ -0,0 +1,37 @@
+{
+ "type": "panel",
+ "name": "Boom Table",
+ "id": "yesoreyeram-boomtable-panel",
+ "dataFormats": [
+ "time_series"
+ ],
+ "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.4.0"
+ },
+ "dependencies": {
+ "grafanaVersion": "4.x.x",
+ "plugins": []
+ }
+}
\ No newline at end of file
diff --git a/dist/src/img/azure-monitor-usage.png b/dist/src/img/azure-monitor-usage.png
new file mode 100644
index 0000000..a5711e6
Binary files /dev/null and b/dist/src/img/azure-monitor-usage.png differ
diff --git a/dist/src/img/debug-ui.png b/dist/src/img/debug-ui.png
new file mode 100644
index 0000000..cea9fe1
Binary files /dev/null and b/dist/src/img/debug-ui.png differ
diff --git a/dist/src/img/editor-1.png b/dist/src/img/editor-1.png
new file mode 100644
index 0000000..bdb908f
Binary files /dev/null and b/dist/src/img/editor-1.png differ
diff --git a/dist/src/img/editor-2.png b/dist/src/img/editor-2.png
new file mode 100644
index 0000000..7939100
Binary files /dev/null and b/dist/src/img/editor-2.png differ
diff --git a/dist/src/img/editor-default.png b/dist/src/img/editor-default.png
new file mode 100644
index 0000000..742684f
Binary files /dev/null and b/dist/src/img/editor-default.png differ
diff --git a/dist/src/img/filters.png b/dist/src/img/filters.png
new file mode 100644
index 0000000..ab0386c
Binary files /dev/null and b/dist/src/img/filters.png differ
diff --git a/dist/src/img/font-awesome-examples.png b/dist/src/img/font-awesome-examples.png
new file mode 100644
index 0000000..a27b938
Binary files /dev/null and b/dist/src/img/font-awesome-examples.png differ
diff --git a/dist/src/img/img-transform-example.png b/dist/src/img/img-transform-example.png
new file mode 100644
index 0000000..d67daae
Binary files /dev/null and b/dist/src/img/img-transform-example.png differ
diff --git a/dist/src/img/influx-usage.png b/dist/src/img/influx-usage.png
new file mode 100644
index 0000000..97ec213
Binary files /dev/null and b/dist/src/img/influx-usage.png differ
diff --git a/dist/src/img/metrics.png b/dist/src/img/metrics.png
new file mode 100644
index 0000000..2a24005
Binary files /dev/null and b/dist/src/img/metrics.png differ
diff --git a/dist/src/img/panel.png b/dist/src/img/panel.png
new file mode 100644
index 0000000..916ba8b
Binary files /dev/null and b/dist/src/img/panel.png differ
diff --git a/dist/src/img/panels-fa.png b/dist/src/img/panels-fa.png
new file mode 100644
index 0000000..120a061
Binary files /dev/null and b/dist/src/img/panels-fa.png differ
diff --git a/dist/src/img/prometheus-usage.png b/dist/src/img/prometheus-usage.png
new file mode 100644
index 0000000..151f2c6
Binary files /dev/null and b/dist/src/img/prometheus-usage.png differ
diff --git a/dist/src/img/time-based-thresholds.png b/dist/src/img/time-based-thresholds.png
new file mode 100644
index 0000000..3a263e5
Binary files /dev/null and b/dist/src/img/time-based-thresholds.png differ
diff --git a/dist/src/img/version-5.0.2.png b/dist/src/img/version-5.0.2.png
new file mode 100644
index 0000000..277535e
Binary files /dev/null and b/dist/src/img/version-5.0.2.png differ
diff --git a/dist/tests/BoomSeries.spec.js b/dist/tests/BoomSeries.spec.js
new file mode 100644
index 0000000..cb8d51c
--- /dev/null
+++ b/dist/tests/BoomSeries.spec.js
@@ -0,0 +1,227 @@
+System.register(["./../app/boom/BoomUtils"], function (exports_1, context_1) {
+ "use strict";
+ var BoomUtils_1, dummy_series_1, dummy_series_2;
+ var __moduleName = context_1 && context_1.id;
+ return {
+ setters: [
+ function (BoomUtils_1_1) {
+ BoomUtils_1 = BoomUtils_1_1;
+ }
+ ],
+ execute: function () {
+ dummy_series_1 = {
+ stats: {
+ "avg": 9.077777777777778,
+ "count": 360,
+ "current": 6,
+ "delta": 1396,
+ "diff": 4,
+ "first": 2,
+ "logmin": 1,
+ "max": 24,
+ "min": 0,
+ "range": 24,
+ "timeStep": 60000,
+ "total": 3268,
+ }
+ };
+ dummy_series_2 = {
+ "alias": "COM # count",
+ "aliasEscaped": "COM # count",
+ "datapoints": [
+ [
+ 108,
+ 1575198840000
+ ],
+ [
+ 86,
+ 1575198900000
+ ],
+ [
+ 93,
+ 1575198960000
+ ],
+ [
+ 48,
+ 1575199020000
+ ],
+ [
+ null,
+ 1575199080000
+ ],
+ [
+ null,
+ 1575199140000
+ ],
+ [
+ null,
+ 1575199200000
+ ],
+ [
+ null,
+ 1575199260000
+ ]
+ ],
+ "id": "COM # count",
+ "label": "COM # count",
+ "stats": {
+ "avg": 41.875,
+ "count": 8,
+ "current": 0,
+ "delta": 93,
+ "diff": -108,
+ "first": 108,
+ "logmin": 48,
+ "max": 108,
+ "min": 0,
+ "range": 108,
+ "timeStep": 60000,
+ "total": 335,
+ }
+ };
+ describe("Boom Series", function () {
+ it("getSeriesValue", function () {
+ expect(BoomUtils_1.getSeriesValue({}, "total")).toBe(NaN);
+ expect(BoomUtils_1.getSeriesValue({}, "foo")).toBe(NaN);
+ expect(BoomUtils_1.getSeriesValue(dummy_series_1, "foo")).toBe(null);
+ expect(BoomUtils_1.getSeriesValue(dummy_series_1, "total")).toBe(3268);
+ expect(BoomUtils_1.getSeriesValue(dummy_series_1, "TOTAL")).toBe(3268);
+ expect(BoomUtils_1.getSeriesValue(dummy_series_1, "last_time")).toBe(null);
+ expect(BoomUtils_1.getSeriesValue(dummy_series_1, "LAST_TIME")).toBe(null);
+ expect(BoomUtils_1.getSeriesValue(dummy_series_2, "total")).toBe(dummy_series_2.stats.total);
+ expect(BoomUtils_1.getSeriesValue(dummy_series_2, "last_time_nonnull")).toBe(1575199020000);
+ expect(BoomUtils_1.getSeriesValue(dummy_series_2, "last_time")).toBe(1575199260000);
+ });
+ it("getCurrentTimeStamp", function () {
+ expect(BoomUtils_1.getCurrentTimeStamp(dummy_series_2.datapoints)).toStrictEqual(new Date(1575199260000));
+ });
+ it("replaceDelimitedColumns", function () {
+ expect(BoomUtils_1.replaceDelimitedColumns("Hello _0_ is _1_", "foo.bar.baz", ".", "_")).toBe("Hello foo is bar");
+ expect(BoomUtils_1.replaceDelimitedColumns("Hello _0__1_", "foo.bar.baz", ".", "_")).toBe("Hello foobar");
+ expect(BoomUtils_1.replaceDelimitedColumns("Hello _0__1__1_", "foo.bar.baz", ".", "_")).toBe("Hello foobarbar");
+ expect(BoomUtils_1.replaceDelimitedColumns("Hello _0__1__3_", "foo.bar.baz", ".", "_")).toBe("Hello foobar_3_");
+ expect(BoomUtils_1.replaceDelimitedColumns("Hello _0__1__1_", "foo bar baz", " ", "_")).toBe("Hello foobarbar");
+ expect(BoomUtils_1.replaceDelimitedColumns("Hello #0##1##1#", "foo bar baz", " ", "#")).toBe("Hello foobarbar");
+ });
+ it("getRowName", function () {
+ expect(BoomUtils_1.getRowName("Hello _0_ is _1_", ".", "_", "foo.bar.baz", "", [])).toBe("Hello foo is bar");
+ expect(BoomUtils_1.getRowName("Hello _0_ is _1_ _series_ _series_", ".", "_", "foo.bar.baz", "", [])).toBe("Hello foo is bar foo.bar.baz foo.bar.baz");
+ });
+ it("getColName", function () {
+ expect(BoomUtils_1.getColName("Hello _0_ is _1_", ".", "_", "foo.bar.baz", "rowName", "", [])).toBe("Hello foo is bar");
+ expect(BoomUtils_1.getColName("foo.bar", ".", "_", "foo.bar", "foo.bar", "", [])).toBe("foo.bar");
+ });
+ });
+ describe("Normalize Color", function () {
+ it("Normalize Named Colors", function () {
+ expect(BoomUtils_1.normalizeColor("Green")).toBe("rgba(50, 172, 45, 0.97)");
+ expect(BoomUtils_1.normalizeColor("Orange")).toBe("rgba(237, 129, 40, 0.89)");
+ expect(BoomUtils_1.normalizeColor("Red")).toBe("rgba(245, 54, 54, 0.9)");
+ expect(BoomUtils_1.normalizeColor("Purple")).toBe("Purple");
+ });
+ });
+ describe("Get Color", function () {
+ it("Color Strings", function () {
+ expect(BoomUtils_1.getColor("Green", 0)).toBe(" style=\"color:rgba(50, 172, 45, 0.97)\" ");
+ expect(BoomUtils_1.getColor("Orange", 0)).toBe(" style=\"color:rgba(237, 129, 40, 0.89)\" ");
+ expect(BoomUtils_1.getColor("Red", 0)).toBe(" style=\"color:rgba(245, 54, 54, 0.9)\" ");
+ expect(BoomUtils_1.getColor("Purple", 0)).toBe(" style=\"color:Purple\" ");
+ });
+ });
+ describe("Parse Math Tokens", function () {
+ it("Sum", function () {
+ expect(BoomUtils_1.parseMathExpression("15+5", 0)).toBe(20);
+ expect(BoomUtils_1.parseMathExpression("0.2+2.3", 0)).toBe(3);
+ });
+ it("Substraction", function () {
+ expect(BoomUtils_1.parseMathExpression("15-5", 0)).toBe(10);
+ expect(BoomUtils_1.parseMathExpression("0.2-2.3", 0)).toBe(-2);
+ });
+ it("Multiplication", function () {
+ expect(BoomUtils_1.parseMathExpression("3*5", 0)).toBe(15);
+ expect(BoomUtils_1.parseMathExpression("0.2*2", 0)).toBe(0);
+ expect(BoomUtils_1.parseMathExpression("0.3*2", 0)).toBe(1);
+ });
+ it("Division", function () {
+ expect(BoomUtils_1.parseMathExpression("9/5", 0)).toBe(2);
+ expect(BoomUtils_1.parseMathExpression("0.2/2", 0)).toBe(0);
+ expect(BoomUtils_1.parseMathExpression("2.3/2", 0)).toBe(1);
+ });
+ it("Min", function () {
+ expect(BoomUtils_1.parseMathExpression("9min5", 0)).toBe(5);
+ expect(BoomUtils_1.parseMathExpression("5min9", 0)).toBe(5);
+ expect(BoomUtils_1.parseMathExpression("9min0.4", 0)).toBe(0);
+ expect(BoomUtils_1.parseMathExpression("5min0.9", 0)).toBe(1);
+ });
+ });
+ describe("Get Actial name without tokens", function () {
+ it("Row and colname", function () {
+ expect(BoomUtils_1.getActualNameWithoutTokens("hello")).toBe("hello");
+ expect(BoomUtils_1.getActualNameWithoutTokens("hello how are you!")).toBe("hello how are you!");
+ expect(BoomUtils_1.getActualNameWithoutTokens("hello _fa-circle_ how are you")).toBe("hello how are you");
+ });
+ });
+ describe("Threshold Validator", function () {
+ it("BG Colors", function () {
+ expect(BoomUtils_1.getItemBasedOnThreshold([10, 20], ["green", "orange", "red"], 5, "black")).toBe("green");
+ expect(BoomUtils_1.getItemBasedOnThreshold([10, 20], ["green", "orange", "red"], 10, "black")).toBe("orange");
+ expect(BoomUtils_1.getItemBasedOnThreshold([10, 20], ["green", "orange", "red"], 15, "black")).toBe("orange");
+ expect(BoomUtils_1.getItemBasedOnThreshold([10, 20], ["green", "orange", "red", "blue"], 15, "black")).toBe("orange");
+ expect(BoomUtils_1.getItemBasedOnThreshold([10, 20], ["green", "orange", "red"], 20, "black")).toBe("red");
+ expect(BoomUtils_1.getItemBasedOnThreshold([10, 20], ["green", "orange", "red"], 25, "black")).toBe("red");
+ expect(BoomUtils_1.getItemBasedOnThreshold([10, 20], ["green", "orange", "red"], 20, "black")).toBe("red");
+ expect(BoomUtils_1.getItemBasedOnThreshold([10, 20], ["green", "orange"], 25, "black")).toBe("black");
+ });
+ });
+ describe("Mertic Name from prometheus / influxdb Alias", function () {
+ it("Prometheus Format", function () {
+ expect(BoomUtils_1.getMetricNameFromTaggedAlias("container_cpu_load_average_10s")).toBe("container_cpu_load_average_10s");
+ expect(BoomUtils_1.getMetricNameFromTaggedAlias("container_cpu_load_average_10s ")).toBe("container_cpu_load_average_10s");
+ expect(BoomUtils_1.getMetricNameFromTaggedAlias("container_cpu_load_average_10s {}")).toBe("container_cpu_load_average_10s");
+ expect(BoomUtils_1.getMetricNameFromTaggedAlias(" container_cpu_load_average_10s {}")).toBe("container_cpu_load_average_10s");
+ expect(BoomUtils_1.getMetricNameFromTaggedAlias("container_cpu_load_average_10s{agentpool=\"agentpool1\"}")).toBe("container_cpu_load_average_10s");
+ expect(BoomUtils_1.getMetricNameFromTaggedAlias("container_cpu_load_average_10s {agentpool=\"agentpool1\"}")).toBe("container_cpu_load_average_10s");
+ expect(BoomUtils_1.getMetricNameFromTaggedAlias(" container_cpu_load_average_10s { agentpool = \"agentpool1\" } ")).toBe("container_cpu_load_average_10s");
+ expect(BoomUtils_1.getMetricNameFromTaggedAlias(" container_cpu_load_average_10s { image = \"abc:cba12:hello\" } ")).toBe("container_cpu_load_average_10s");
+ expect(BoomUtils_1.getMetricNameFromTaggedAlias("container_memory_usage_bytes{beta_kubernetes_io_arch=\"amd64\",beta_kubernetes_io_instance_type=\"Standard_D2_v2\"}")).toBe("container_memory_usage_bytes");
+ });
+ it("InfluxDB Format", function () {
+ expect(BoomUtils_1.getMetricNameFromTaggedAlias("CPU.CPU TIme")).toBe("CPU.CPU TIme");
+ expect(BoomUtils_1.getMetricNameFromTaggedAlias("CPU.CPU TIme ")).toBe("CPU.CPU TIme");
+ expect(BoomUtils_1.getMetricNameFromTaggedAlias("CPU.CPU TIme {} ")).toBe("CPU.CPU TIme");
+ expect(BoomUtils_1.getMetricNameFromTaggedAlias("CPU.CPU TIme {environment: 279, instance: _Total}")).toBe("CPU.CPU TIme");
+ expect(BoomUtils_1.getMetricNameFromTaggedAlias(" CPU.CPU TIme { environment: 279, instance: _Total}")).toBe("CPU.CPU TIme");
+ expect(BoomUtils_1.getMetricNameFromTaggedAlias(" CPU.CPU TIme { environment: 279, equation: `_Tota=l`}")).toBe("CPU.CPU TIme");
+ });
+ });
+ describe("Value needs to hidden", function () {
+ it("Default Values", function () {
+ expect(BoomUtils_1.doesValueNeedsToHide(10, undefined)).toBe(false);
+ expect(BoomUtils_1.doesValueNeedsToHide(0, { value_below: "5" })).toBe(true);
+ expect(BoomUtils_1.doesValueNeedsToHide(-2, { value_below: "-1" })).toBe(true);
+ expect(BoomUtils_1.doesValueNeedsToHide(2, { value_below: "10" })).toBe(true);
+ expect(BoomUtils_1.doesValueNeedsToHide(10, { value_below: "5" })).toBe(false);
+ expect(BoomUtils_1.doesValueNeedsToHide(2, { value_below: "-1" })).toBe(false);
+ expect(BoomUtils_1.doesValueNeedsToHide(15, { value_above: "10" })).toBe(true);
+ expect(BoomUtils_1.doesValueNeedsToHide(15, { value_above: "0" })).toBe(true);
+ expect(BoomUtils_1.doesValueNeedsToHide(10, { value_above: "15" })).toBe(false);
+ expect(BoomUtils_1.doesValueNeedsToHide(0, { value_above: "15" })).toBe(false);
+ expect(BoomUtils_1.doesValueNeedsToHide(0, { value_below: "5", value_above: "-5" })).toBe(true);
+ expect(BoomUtils_1.doesValueNeedsToHide(10, { value_below: "15", value_above: "30" })).toBe(true);
+ expect(BoomUtils_1.doesValueNeedsToHide(10, { value_below: "5", value_above: "5" })).toBe(true);
+ expect(BoomUtils_1.doesValueNeedsToHide(10, { value_below: "15", value_above: "5" })).toBe(true);
+ expect(BoomUtils_1.doesValueNeedsToHide(10, { value_below: "015", value_above: "05" })).toBe(true);
+ expect(BoomUtils_1.doesValueNeedsToHide(0, { value_below: "5", value_above: "2" })).toBe(true);
+ expect(BoomUtils_1.doesValueNeedsToHide(0, { value_below: "2", value_above: "5" })).toBe(true);
+ expect(BoomUtils_1.doesValueNeedsToHide(10, { value_below: " 015 ", value_above: " 05 " })).toBe(true);
+ expect(BoomUtils_1.doesValueNeedsToHide(10, { value_below: " 5 ", value_above: "-5 " })).toBe(true);
+ expect(BoomUtils_1.doesValueNeedsToHide(10, { value_below: "15", value_above: "5 " })).toBe(true);
+ expect(BoomUtils_1.doesValueNeedsToHide(10, { value_below: "5", value_above: "30" })).toBe(false);
+ expect(BoomUtils_1.doesValueNeedsToHide(10, { value_below: " 5 ", value_above: " 30 " })).toBe(false);
+ expect(BoomUtils_1.doesValueNeedsToHide(0, { value_below: "-2", value_above: "5" })).toBe(false);
+ });
+ });
+ }
+ };
+});
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQm9vbVNlcmllcy5zcGVjLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3Rlc3RzL0Jvb21TZXJpZXMuc3BlYy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztZQUVNLGNBQWMsR0FBRztnQkFDbkIsS0FBSyxFQUFFO29CQUNILEtBQUssRUFBRSxpQkFBaUI7b0JBQ3hCLE9BQU8sRUFBRSxHQUFHO29CQUNaLFNBQVMsRUFBRSxDQUFDO29CQUNaLE9BQU8sRUFBRSxJQUFJO29CQUNiLE1BQU0sRUFBRSxDQUFDO29CQUNULE9BQU8sRUFBRSxDQUFDO29CQUNWLFFBQVEsRUFBRSxDQUFDO29CQUNYLEtBQUssRUFBRSxFQUFFO29CQUNULEtBQUssRUFBRSxDQUFDO29CQUNSLE9BQU8sRUFBRSxFQUFFO29CQUNYLFVBQVUsRUFBRSxLQUFLO29CQUNqQixPQUFPLEVBQUUsSUFBSTtpQkFDaEI7YUFDSixDQUFDO1lBQ0ksY0FBYyxHQUFHO2dCQUNuQixPQUFPLEVBQUUsYUFBYTtnQkFDdEIsY0FBYyxFQUFFLGFBQWE7Z0JBQzdCLFlBQVksRUFBRTtvQkFDVjt3QkFDSSxHQUFHO3dCQUNILGFBQWE7cUJBQ2hCO29CQUNEO3dCQUNJLEVBQUU7d0JBQ0YsYUFBYTtxQkFDaEI7b0JBQ0Q7d0JBQ0ksRUFBRTt3QkFDRixhQUFh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Y291bnRcIixcbiAgICBcImRhdGFwb2ludHNcIjogW1xuICAgICAgICBbXG4gICAgICAgICAgICAxMDgsXG4gICAgICAgICAgICAxNTc1MTk4ODQwMDAwXG4gICAgICAgIF0sXG4gICAgICAgIFtcbiAgICAgICAgICAgIDg2LFxuICAgICAgICAgICAgMTU3NTE5ODkwMDAwMFxuICAgICAgICBdLFxuICAgICAgICBbXG4gICAgICAgICAgICA5MyxcbiAgICAgICAgICAgIDE1NzUxOTg5NjAwMDBcbiAgICAgICAgXSxcbiAgICAgICAgW1xuICAgICAgICAgICAgNDgsXG4gICAgICAgICAgICAxNTc1MTk5MDIwMDAwXG4gICAgICAgIF0sXG4gICAgICAgIFtcbiAgICAgICAgICAgIG51bGwsXG4gICAgICAgICAgICAxNTc1MTk5MDgwMDAwXG4gICAgICAgIF0sXG4gICAgICAgIFtcbiAgICAgICAgICAgIG51bGwsXG4gICAgICAgICAgICAxNTc1MTk5MTQwMDAwXG4gICAgICAgIF0sXG4gICAgICAgIFtcbiAgICAgICAgICAgIG51bGwsXG4gICAgICAgICAgICAxNTc1MTk5MjAwMDAwXG4gICAgICAgIF0sXG4gICAgICAgIFtcbiAgICAgICAgICAgIG51bGwsXG4gICAgICAgICAgICAxNTc1MTk5MjYwMDAwXG4gICAgICAgIF1cbiAgICBdLFxuICAgIFwiaWRcIjogXCJDT00gIyBjb3VudFwiLFxuICAgIFwibGFiZWxcIjogXCJDT00gIyBjb3VudFwiLFxuICAgIFwic3RhdHNcIjoge1xuICAgICAgICBcImF2Z1wiOiA0MS44NzUsXG4gICAgICAgIFwiY291bnRcIjogOCxcbiAgICAgICAgXCJjdXJyZW50XCI6IDAsXG4gICAgICAgIFwiZGVsdGFcIjogOTMsXG4gICAgICAgIFwiZGlmZlwiOiAtMTA4LFxuICAgICAgICBcImZpcnN0XCI6IDEwOCxcbiAgICAgICAgXCJsb2dtaW5cIjogNDgsXG4gICAgICAgIFwibWF4XCI6IDEwOCxcbiAgICAgICAgXCJtaW5cIj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