You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kibble.apache.org by hu...@apache.org on 2017/10/25 10:51:05 UTC

[kibble] branch master updated (53aaa66 -> 916d6d6)

This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/kibble.git.


    from 53aaa66  this api has distinguishable categories
     new b04ec2c  add a gauge for overall mood, change to new indicator
     new e6d4652  add relative as an accepted api arg
     new 6c060f6  also add it here, doofus
     new e3bca3c  make a gauge widget
     new 7f818a6  add gauge and relative mode to chart wrapper
     new 9bd04f1  add gauge into widgets and page loader
     new b6f0e3a  add gauge to mood page, shrink bar chart
     new 916d6d6  regen JS

The 8 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 api/pages/mail/mood.py                             |  19 +++-
 api/yaml/openapi.yaml                              |   5 +
 .../components/schemas/defaultWidgetArgs.yaml      |   5 +
 api/yaml/widgets.yaml                              |   7 +-
 ui/js/coffee/charts_gauge.coffee                   |  37 ++++++
 ui/js/coffee/charts_wrapper.coffee                 |  32 ++++++
 ui/js/coffee/datepicker.coffee                     |   1 +
 ui/js/coffee/explorer.coffee                       |  11 ++
 ui/js/coffee/pageloader.coffee                     |   1 +
 ui/js/coffee/widget.coffee                         |   1 +
 ui/js/kibble.v1.js                                 | 126 ++++++++++++++++++++-
 11 files changed, 235 insertions(+), 10 deletions(-)
 create mode 100644 ui/js/coffee/charts_gauge.coffee

-- 
To stop receiving notification emails like this one, please contact
['"commits@kibble.apache.org" <co...@kibble.apache.org>'].

[kibble] 07/08: add gauge to mood page, shrink bar chart

Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kibble.git

commit b6f0e3a2b363938c2f532622c364edd3db970ca7
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Wed Oct 25 12:50:53 2017 +0200

    add gauge to mood page, shrink bar chart
---
 api/yaml/widgets.yaml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/api/yaml/widgets.yaml b/api/yaml/widgets.yaml
index 6ca57af..a1572ce 100644
--- a/api/yaml/widgets.yaml
+++ b/api/yaml/widgets.yaml
@@ -666,7 +666,12 @@ widgets:
                         type:   "line"
                         source: "mail/mood"
                         name:   "Overall mail mood"
-                        blocks: 12
+                        blocks: 6
+                    -
+                        type:   "gauge"
+                        source: "mail/mood"
+                        name:   "Mood gauge"
+                        blocks: 6
             -
                 name: "Mood over time"
                 children:

-- 
To stop receiving notification emails like this one, please contact
"commits@kibble.apache.org" <co...@kibble.apache.org>.

[kibble] 08/08: regen JS

Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kibble.git

commit 916d6d647bcc469955b9cee236670ed12a274725
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Wed Oct 25 12:50:57 2017 +0200

    regen JS
---
 ui/js/kibble.v1.js | 126 ++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 121 insertions(+), 5 deletions(-)

diff --git a/ui/js/kibble.v1.js b/ui/js/kibble.v1.js
index 8f116fb..d34ebf4 100644
--- a/ui/js/kibble.v1.js
+++ b/ui/js/kibble.v1.js
@@ -1,5 +1,5 @@
 // Generated by CoffeeScript 1.9.3
-var API, APIVERSION, Chart, HTML, Row, Widget, aSourceTypes, accountCallback, addSourceType, addSources, addorguser, addsources, affiliate, affiliation, affiliationWizard, altemail, app, badModal, bio, chartOnclick, chartToSvg, chartWrapperButtons, charts_donutchart, charts_linechart, charts_linechart_stacked, charts_linked, charts_radarchart, cog, comstat, copyCSS, currentSources, dataTable, datepicker, datepickers, defaultOrgChanged, deletesource, doResetPass, donut, downloadBlob, expl [...]
+var API, APIVERSION, Chart, HTML, Row, Widget, aSourceTypes, accountCallback, addSourceType, addSources, addorguser, addsources, affiliate, affiliation, affiliationWizard, altemail, app, badModal, bio, chartOnclick, chartToSvg, chartWrapperButtons, charts_donutchart, charts_gaugechart, charts_linechart, charts_linechart_stacked, charts_linked, charts_radarchart, cog, comstat, copyCSS, currentSources, dataTable, datepicker, datepickers, defaultOrgChanged, deletesource, doResetPass, donut, [...]
   indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
 
 signup = function(form) {
@@ -186,6 +186,48 @@ charts_donutchart = function(obj, data, maxN) {
   return [c, config];
 };
 
+charts_gaugechart = function(obj, data) {
+  var c, config;
+  if (data.gauge) {
+    data = data.gauge;
+  }
+  config = {
+    bindto: obj,
+    data: {
+      columns: [[data.key || 'value', data.value || data]],
+      type: 'gauge'
+    },
+    gauge: {
+      min: 0,
+      max: 100
+    },
+    color: {
+      pattern: ['#FF0000', '#F97600', '#F6C600', '#60B044'],
+      threshold: {
+        values: [30, 60, 90, 100]
+      }
+    },
+    tooltip: {
+      format: {
+        value: (function(_this) {
+          return function(val) {
+            return d3.format(',')(val);
+          };
+        })(this)
+      }
+    }
+  };
+  c = c3.generate(config);
+  return [c, config];
+};
+
+gauge = function(json, state) {
+  var gaugeChart, lmain;
+  lmain = new HTML('div');
+  state.widget.inject(lmain, true);
+  return gaugeChart = new Chart(lmain, 'gauge', json);
+};
+
 charts_linechart_stacked = (function(_this) {
   return function(o, d) {
     return charts_linechart(o, d, 'area-spline', true);
@@ -1068,7 +1110,7 @@ stackChart = function(o, config, chart) {
 
 Chart = (function() {
   function Chart(parent, type, data, options) {
-    var btn, btnDiv, btns, chartWrapperColors, chk, cid, el, hObj, i, id, inner, label, len, len1, q, ref, ref1, ref2, ref3, ref4, u;
+    var btn, btnDiv, btns, chartWrapperColors, chk, cid, el, hObj, i, id, inner, label, len, len1, q, ref, ref1, ref2, ref3, ref4, ref5, u;
     cid = parseInt(Math.random() * 1000000).toString(16);
     this.cid = cid;
     xxCharts[cid] = this;
@@ -1147,11 +1189,14 @@ Chart = (function() {
     if (type === 'donut') {
       ref2 = charts_donutchart(this.chartdiv, data, 15), this.chartobj = ref2[0], this.config = ref2[1];
     }
+    if (type === 'gauge') {
+      ref3 = charts_gaugechart(this.chartdiv, data), this.chartobj = ref3[0], this.config = ref3[1];
+    }
     if (type === 'radar') {
-      ref3 = charts_radarchart(this.chartdiv, data), this.chartobj = ref3[0], this.config = ref3[1];
+      ref4 = charts_radarchart(this.chartdiv, data), this.chartobj = ref4[0], this.config = ref4[1];
     }
     if (type === 'relationship') {
-      ref4 = charts_linked(this.chartdiv, data.nodes, data.links, options), this.chartobj = ref4[0], this.config = ref4[1];
+      ref5 = charts_linked(this.chartdiv, data.nodes, data.links, options), this.chartobj = ref5[0], this.config = ref5[1];
     }
     if (data.distinguishable) {
       id = Math.floor(Math.random() * 987654321).toString(16);
@@ -1169,7 +1214,10 @@ Chart = (function() {
           distinguish = 'true';
           globArgs['distinguish'] = 'true';
         }
-        return updateWidgets('line', null, {
+        updateWidgets('line', null, {
+          distinguish: distinguish
+        });
+        return updateWidgets('gauge', null, {
           distinguish: distinguish
         });
       });
@@ -1183,6 +1231,39 @@ Chart = (function() {
       label.appendChild(document.createTextNode('Toggle category breakdown'));
       this.main.inject(label);
     }
+    if (data.relativeMode) {
+      id = Math.floor(Math.random() * 987654321).toString(16);
+      chk = document.createElement('input');
+      chk.setAttribute("type", "checkbox");
+      chk.setAttribute("id", id);
+      chk.style.marginLeft = '10px';
+      if (globArgs.relative && globArgs.relative === 'true') {
+        chk.checked = true;
+      }
+      chk.addEventListener("change", function() {
+        var relative;
+        relative = null;
+        if (this.checked) {
+          relative = 'true';
+          globArgs['relative'] = 'true';
+        }
+        updateWidgets('line', null, {
+          relative: relative
+        });
+        return updateWidgets('gauge', null, {
+          relative: relative
+        });
+      });
+      this.main.inject(mk('br'));
+      this.main.inject(chk);
+      label = document.createElement('label');
+      label.setAttribute("for", id);
+      label.setAttribute("title", "Check this box to use relative weighting");
+      chk.setAttribute("title", "Check this box to use relative weighting");
+      label.style.paddingLeft = '5px';
+      label.appendChild(document.createTextNode('Toggle relative/comparative mode'));
+      this.main.inject(label);
+    }
     return this.main;
   }
 
@@ -1343,6 +1424,10 @@ updateTimeseriesWidgets = function(range) {
       to: to,
       from: from
     });
+    updateWidgets('gauge', null, {
+      to: to,
+      from: from
+    });
     updateWidgets('radar', null, {
       to: to,
       from: from
@@ -1551,6 +1636,9 @@ explorer = function(json, state) {
     updateWidgets('donut', null, {
       source: source
     });
+    updateWidgets('gauge', null, {
+      source: source
+    });
     updateWidgets('line', null, {
       source: source
     });
@@ -1591,6 +1679,9 @@ explorer = function(json, state) {
     updateWidgets('donut', null, {
       author: author
     });
+    updateWidgets('gauge', null, {
+      author: author
+    });
     updateWidgets('line', null, {
       author: author
     });
@@ -1694,6 +1785,9 @@ sourceexplorer = function(json, state) {
     updateWidgets('donut', null, {
       source: source
     });
+    updateWidgets('gauge', null, {
+      source: source
+    });
     updateWidgets('line', null, {
       source: source
     });
@@ -1782,6 +1876,9 @@ mailexplorer = function(json, state) {
     updateWidgets('donut', null, {
       source: source
     });
+    updateWidgets('gauge', null, {
+      source: source
+    });
     updateWidgets('line', null, {
       source: source
     });
@@ -1867,6 +1964,9 @@ logexplorer = function(json, state) {
     updateWidgets('donut', null, {
       source: source
     });
+    updateWidgets('gauge', null, {
+      source: source
+    });
     updateWidgets('line', null, {
       source: source
     });
@@ -1952,6 +2052,9 @@ issueexplorer = function(json, state) {
     updateWidgets('donut', null, {
       source: source
     });
+    updateWidgets('gauge', null, {
+      source: source
+    });
     updateWidgets('line', null, {
       source: source
     });
@@ -2037,6 +2140,9 @@ imexplorer = function(json, state) {
     updateWidgets('donut', null, {
       source: source
     });
+    updateWidgets('gauge', null, {
+      source: source
+    });
     updateWidgets('line', null, {
       source: source
     });
@@ -2118,6 +2224,7 @@ multiviewexplorer = function(json, state) {
           x = {};
           x[tName] = source;
           updateWidgets('donut', null, x);
+          updateWidgets('gauge', null, x);
           updateWidgets('line', null, x);
           updateWidgets('contacts', null, x);
           updateWidgets('top5', null, x);
@@ -2150,6 +2257,7 @@ subFilter = function() {
   updateWidgets('mailpicker', null, x);
   updateWidgets('logpicker', null, x);
   updateWidgets('donut', null, x);
+  updateWidgets('gauge', null, x);
   updateWidgets('line', null, x);
   updateWidgets('contacts', null, x);
   updateWidgets('top5', null, x);
@@ -2242,6 +2350,7 @@ viewexplorer = function(json, state) {
     updateWidgets('mailpicker', null, x);
     updateWidgets('logpicker', null, x);
     updateWidgets('donut', null, x);
+    updateWidgets('gauge', null, x);
     updateWidgets('line', null, x);
     updateWidgets('contacts', null, x);
     updateWidgets('top5', null, x);
@@ -2398,6 +2507,7 @@ widgetexplorer = function(json, state) {
     x[tName] = source;
     updateWidgets('widget', null, x);
     updateWidgets('donut', null, x);
+    updateWidgets('gauge', null, x);
     updateWidgets('line', null, x);
     updateWidgets('contacts', null, x);
     updateWidgets('top5', null, x);
@@ -3480,6 +3590,9 @@ setupPage = function(json, state) {
           case 'donut':
             results1.push(widget.load(donut));
             break;
+          case 'gauge':
+            results1.push(widget.load(gauge));
+            break;
           case 'widget':
             results1.push(widget.load(publisher));
             break;
@@ -4864,6 +4977,9 @@ updateWidgets = function(type, target, eargs) {
         case 'donut':
           results.push(widget.load(donut));
           break;
+        case 'gauge':
+          results.push(widget.load(gauge));
+          break;
         case 'radar':
           results.push(widget.load(radar));
           break;

-- 
To stop receiving notification emails like this one, please contact
"commits@kibble.apache.org" <co...@kibble.apache.org>.

[kibble] 05/08: add gauge and relative mode to chart wrapper

Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kibble.git

commit 7f818a63452c836ddbf74ec4733f70b422e72c0f
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Wed Oct 25 12:50:25 2017 +0200

    add gauge and relative mode to chart wrapper
---
 ui/js/coffee/charts_wrapper.coffee | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/ui/js/coffee/charts_wrapper.coffee b/ui/js/coffee/charts_wrapper.coffee
index cc929b7..83ecd8a 100644
--- a/ui/js/coffee/charts_wrapper.coffee
+++ b/ui/js/coffee/charts_wrapper.coffee
@@ -292,6 +292,8 @@ class Chart
             [@chartobj, @config] = charts_linechart(@chartdiv, data, options)
         if type == 'donut'
             [@chartobj, @config] = charts_donutchart(@chartdiv, data, 15)
+         if type == 'gauge'
+            [@chartobj, @config] = charts_gaugechart(@chartdiv, data)
         if type == 'radar'
             [@chartobj, @config] = charts_radarchart(@chartdiv, data)
          if type == 'relationship'
@@ -314,6 +316,7 @@ class Chart
                           globArgs['distinguish'] = 'true'
                   
                   updateWidgets('line', null, { distinguish: distinguish })
+                  updateWidgets('gauge', null, { distinguish: distinguish })
                   )
           @main.inject(mk('br'))
           @main.inject(chk)
@@ -324,6 +327,35 @@ class Chart
           label.style.paddingLeft = '5px'
           label.appendChild(document.createTextNode('Toggle category breakdown'))
           @main.inject(label)
+        
+        # If this data source has relative weightings
+        # show a checkbox to toggle it.
+        if data.relativeMode
+          id = Math.floor(Math.random() * 987654321).toString(16)
+          chk = document.createElement('input')
+          chk.setAttribute("type", "checkbox")
+          chk.setAttribute("id", id)
+          chk.style.marginLeft = '10px'
+          if globArgs.relative and globArgs.relative == 'true'
+                  chk.checked = true
+          chk.addEventListener("change", () ->
+                  relative = null
+                  if this.checked
+                          relative = 'true'
+                          globArgs['relative'] = 'true'
+                  
+                  updateWidgets('line', null, { relative: relative })
+                  updateWidgets('gauge', null, { relative: relative })
+                  )
+          @main.inject(mk('br'))
+          @main.inject(chk)
+          label = document.createElement('label')
+          label.setAttribute("for", id)
+          label.setAttribute("title", "Check this box to use relative weighting")
+          chk.setAttribute("title", "Check this box to use relative weighting")
+          label.style.paddingLeft = '5px'
+          label.appendChild(document.createTextNode('Toggle relative/comparative mode'))
+          @main.inject(label)
           
         return @main
     
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
"commits@kibble.apache.org" <co...@kibble.apache.org>.

[kibble] 02/08: add relative as an accepted api arg

Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kibble.git

commit e6d4652c46a566dbf8398a6d5ba9f41a2715bbc6
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Wed Oct 25 12:49:41 2017 +0200

    add relative as an accepted api arg
---
 api/yaml/openapi.yaml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/api/yaml/openapi.yaml b/api/yaml/openapi.yaml
index 11ed592..cf97c90 100644
--- a/api/yaml/openapi.yaml
+++ b/api/yaml/openapi.yaml
@@ -462,6 +462,11 @@ components:
             data (thus less traffic)
           example: false
           type: boolean
+        relative:
+          description: Enables relative comparison mode for API endpoints that have
+            this feature.
+          example: false
+          type: boolean
         search:
           description: for some widgets, this enables sub-filtering based on searches
           type: string

-- 
To stop receiving notification emails like this one, please contact
"commits@kibble.apache.org" <co...@kibble.apache.org>.

[kibble] 03/08: also add it here, doofus

Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kibble.git

commit 6c060f64fa90533cdf319146ef438af144d8bec4
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Wed Oct 25 12:49:52 2017 +0200

    also add it here, doofus
---
 api/yaml/openapi/components/schemas/defaultWidgetArgs.yaml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/api/yaml/openapi/components/schemas/defaultWidgetArgs.yaml b/api/yaml/openapi/components/schemas/defaultWidgetArgs.yaml
index a4fa80c..5facff9 100644
--- a/api/yaml/openapi/components/schemas/defaultWidgetArgs.yaml
+++ b/api/yaml/openapi/components/schemas/defaultWidgetArgs.yaml
@@ -72,3 +72,8 @@ properties:
     description: Enables distinguishing different types of data objects, subject to the individual API endpoint
     type: boolean
     example: false
+  relative:
+    description: Enables relative comparison mode for API endpoints that have this feature.
+    type: boolean
+    example: false
+    
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
"commits@kibble.apache.org" <co...@kibble.apache.org>.

[kibble] 01/08: add a gauge for overall mood, change to new indicator

Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kibble.git

commit b04ec2cdb8a058b84a8dbd8a371517cb6d556947
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Wed Oct 25 12:49:30 2017 +0200

    add a gauge for overall mood, change to new indicator
    
    - add weighted guess of overall moode
    - change indicator to 'relativeMode' to distinguish from..distinguish!
---
 api/pages/mail/mood.py | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/api/pages/mail/mood.py b/api/pages/mail/mood.py
index 852e7b6..07a21cb 100644
--- a/api/pages/mail/mood.py
+++ b/api/pages/mail/mood.py
@@ -165,10 +165,12 @@ def run(API, environ, indata, session):
     global_mood_compiled = {}
     mood_compiled = {}
     txt = "This chart shows the seven mood types as they average on the emails in this period. A score of 100 means a sentiment is highly visible in most emails."
+    gtxt = "This shows the overall estimated mood as a gauage from terrible to good."
     # If we're comparing against all lists, first do a global query
     # and compile moods overall
-    if indata.get('distinguish'):
+    if indata.get('relative'):
         txt = "This chart shows the seven mood types on the selected lists as they compare against all mailing lists in the database. A score of 100 here means the sentiment conforms to averages across all lists."
+        gtxt = "This shows the overall estimated mood copmpared to all lists, as a gauage from terrible to good."
         global_moods = {}
         
         gres = session.DB.ES.search(
@@ -217,11 +219,20 @@ def run(API, environ, indata, session):
             mood_compiled[k] = int(100 * int( (v / max(1,emls)) * 100) / max(1, global_mood_compiled.get(k, 100)))
     else:
         mood_compiled = global_mood_compiled
-        
+    bads = (mood_compiled.get('anger', 0)*1.25 + mood_compiled.get('fear', 0)*1.25 + mood_compiled.get('sadness', 0) + mood_compiled.get('disgust', 0)*1.5) / 4
+    neutrals = (mood_compiled.get('tentative', 0) + mood_compiled.get('analytical', 0) /2)
+    goods = (mood_compiled.get('joy', 0)*1.5 + mood_compiled.get('confident', 0)) / 2
+    swingometer = max(0, min(100, 50 + goods - bads))
+    
     JSON_OUT = {
-        'distinguishable': True,
+        'relativeMode': True,
         'text': txt,
         'counts': mood_compiled,
-        'okay': True
+        'okay': True,
+        'gauge': {
+            'key': 'Happiness',
+            'value': swingometer,
+            'text': gtxt
+        }
     }
     yield json.dumps(JSON_OUT)

-- 
To stop receiving notification emails like this one, please contact
"commits@kibble.apache.org" <co...@kibble.apache.org>.

[kibble] 04/08: make a gauge widget

Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kibble.git

commit e3bca3c8a7c40c9c6b044fade013a81187d25833
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Wed Oct 25 12:50:09 2017 +0200

    make a gauge widget
---
 ui/js/coffee/charts_gauge.coffee | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/ui/js/coffee/charts_gauge.coffee b/ui/js/coffee/charts_gauge.coffee
new file mode 100644
index 0000000..868d67c
--- /dev/null
+++ b/ui/js/coffee/charts_gauge.coffee
@@ -0,0 +1,37 @@
+charts_gaugechart = (obj, data) ->
+    if data.gauge
+        data = data.gauge
+    
+    config = {
+        bindto: obj,
+        data: {
+          columns: [[data.key or 'value', data.value or data]],
+          type: 'gauge'
+        },
+        gauge: {
+            min: 0,
+            max: 100
+            },
+        color: {
+            pattern: ['#FF0000', '#F97600', '#F6C600', '#60B044'],
+            threshold: {
+                values: [30, 60, 90, 100]
+            }
+        },
+        tooltip: {
+            format: {
+                value: (val) => d3.format(',')(val)
+            }
+        }
+    }
+    c = c3.generate(config)
+    return [c, config]
+
+
+gauge = (json, state) ->
+        
+    lmain = new HTML('div')
+    state.widget.inject(lmain, true)
+    
+    gaugeChart = new Chart(lmain, 'gauge', json)
+

-- 
To stop receiving notification emails like this one, please contact
"commits@kibble.apache.org" <co...@kibble.apache.org>.

[kibble] 06/08: add gauge into widgets and page loader

Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kibble.git

commit 9bd04f13dab3e0fbe0765bde3fbce3d9e2f57205
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Wed Oct 25 12:50:40 2017 +0200

    add gauge into widgets and page loader
---
 ui/js/coffee/datepicker.coffee |  1 +
 ui/js/coffee/explorer.coffee   | 11 +++++++++++
 ui/js/coffee/pageloader.coffee |  1 +
 ui/js/coffee/widget.coffee     |  1 +
 4 files changed, 14 insertions(+)

diff --git a/ui/js/coffee/datepicker.coffee b/ui/js/coffee/datepicker.coffee
index 9e674b4..4464a64 100644
--- a/ui/js/coffee/datepicker.coffee
+++ b/ui/js/coffee/datepicker.coffee
@@ -28,6 +28,7 @@ updateTimeseriesWidgets = (range) ->
             updateWidgets('factors', null, { to: to, from: from})
             updateWidgets('trends', null, { to: to, from: from})
             updateWidgets('donut', null, { to: to, from: from})
+            updateWidgets('gauge', null, { to: to, from: from})
             updateWidgets('radar', null, { to: to, from: from})
             updateWidgets('relationship', null, { to: to, from: from})
             updateWidgets('treemap', null, { to: to, from: from})
diff --git a/ui/js/coffee/explorer.coffee b/ui/js/coffee/explorer.coffee
index 3741377..99d2fde 100644
--- a/ui/js/coffee/explorer.coffee
+++ b/ui/js/coffee/explorer.coffee
@@ -56,6 +56,7 @@ explorer = (json, state) ->
                         source = null
                 globArgs.source = source
                 updateWidgets('donut', null, { source: source })
+                updateWidgets('gauge', null, { source: source })
                 updateWidgets('line', null, { source: source })
                 updateWidgets('contacts', null, { source: source })
                 updateWidgets('top5', null, { source: source })
@@ -82,6 +83,7 @@ explorer = (json, state) ->
                         globArgs['author'] = 'true'
                 
                 updateWidgets('donut', null, { author: author })
+                updateWidgets('gauge', null, { author: author })
                 updateWidgets('line', null, { author: author })
                 updateWidgets('contacts', null, { author: author })
                 updateWidgets('top5', null, { author: author })
@@ -145,6 +147,7 @@ sourceexplorer = (json, state) ->
                         source = null
                 globArgs.source = source
                 updateWidgets('donut', null, { source: source })
+                updateWidgets('gauge', null, { source: source })
                 updateWidgets('line', null, { source: source })
                 updateWidgets('contacts', null, { source: source })
                 updateWidgets('top5', null, { source: source })
@@ -200,6 +203,7 @@ mailexplorer = (json, state) ->
                         source = null
                 globArgs.source = source
                 updateWidgets('donut', null, { source: source })
+                updateWidgets('gauge', null, { source: source })
                 updateWidgets('line', null, { source: source })
                 updateWidgets('contacts', null, { source: source })
                 updateWidgets('top5', null, { source: source })
@@ -253,6 +257,7 @@ logexplorer = (json, state) ->
                         source = null
                 globArgs.source = source
                 updateWidgets('donut', null, { source: source })
+                updateWidgets('gauge', null, { source: source })
                 updateWidgets('line', null, { source: source })
                 updateWidgets('worldmap', null, { source: source })
                 updateWidgets('top5', null, { source: source })
@@ -307,6 +312,7 @@ issueexplorer = (json, state) ->
                         source = null
                 globArgs.source = source
                 updateWidgets('donut', null, { source: source })
+                updateWidgets('gauge', null, { source: source })
                 updateWidgets('line', null, { source: source })
                 updateWidgets('contacts', null, { source: source })
                 updateWidgets('top5', null, { source: source })
@@ -364,6 +370,7 @@ imexplorer = (json, state) ->
                         source = null
                 globArgs.source = source
                 updateWidgets('donut', null, { source: source })
+                updateWidgets('gauge', null, { source: source })
                 updateWidgets('line', null, { source: source })
                 updateWidgets('contacts', null, { source: source })
                 updateWidgets('top5', null, { source: source })
@@ -418,6 +425,7 @@ multiviewexplorer = (json, state) ->
                     x = {}
                     x[tName] = source
                     updateWidgets('donut', null, x)
+                    updateWidgets('gauge', null, x)
                     updateWidgets('line', null, x)
                     updateWidgets('contacts', null, x)
                     updateWidgets('top5', null, x)
@@ -441,6 +449,7 @@ subFilter = () ->
         updateWidgets('mailpicker', null, x)
         updateWidgets('logpicker', null, x)
         updateWidgets('donut', null, x)
+        updateWidgets('gauge', null, x)
         updateWidgets('line', null, x)
         updateWidgets('contacts', null, x)
         updateWidgets('top5', null, x)
@@ -514,6 +523,7 @@ viewexplorer = (json, state) ->
                 updateWidgets('mailpicker', null, x)
                 updateWidgets('logpicker', null, x)
                 updateWidgets('donut', null, x)
+                updateWidgets('gauge', null, x)
                 updateWidgets('line', null, x)
                 updateWidgets('contacts', null, x)
                 updateWidgets('top5', null, x)
@@ -638,6 +648,7 @@ widgetexplorer = (json, state) ->
                 x[tName] = source
                 updateWidgets('widget', null, x)
                 updateWidgets('donut', null, x)
+                updateWidgets('gauge', null, x)
                 updateWidgets('line', null, x)
                 updateWidgets('contacts', null, x)
                 updateWidgets('top5', null, x)
diff --git a/ui/js/coffee/pageloader.coffee b/ui/js/coffee/pageloader.coffee
index 26f3700..fe00cca 100644
--- a/ui/js/coffee/pageloader.coffee
+++ b/ui/js/coffee/pageloader.coffee
@@ -83,6 +83,7 @@ setupPage = (json, state) ->
                 when 'widgetpicker' then widget.load(widgetexplorer)
                 when 'multiviewpicker' then widget.load(multiviewexplorer)
                 when 'donut' then widget.load(donut)
+                when 'gauge' then widget.load(gauge)
                 when 'widget' then widget.load(publisher)
                 when 'radar' then widget.load(radar)
                 when 'top5' then widget.load(top5)
diff --git a/ui/js/coffee/widget.coffee b/ui/js/coffee/widget.coffee
index cb78095..b46afab 100644
--- a/ui/js/coffee/widget.coffee
+++ b/ui/js/coffee/widget.coffee
@@ -110,6 +110,7 @@ updateWidgets = (type, target, eargs) ->
                         delete widget.args.eargs[k]
             switch widget.args.type
                 when 'donut' then widget.load(donut)
+                when 'gauge' then widget.load(gauge)
                 when 'radar' then widget.load(radar)
                 when 'paragraph' then widget.load(paragraph)
                 when 'line' then widget.load(linechart)

-- 
To stop receiving notification emails like this one, please contact
"commits@kibble.apache.org" <co...@kibble.apache.org>.