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 2018/02/16 21:27:00 UTC

[kibble] branch master updated (5ab76f5 -> e04740c)

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 5ab76f5  let the UI gather up 'others'
     new fde6ffe  guard against no data available
     new bb379bf  allow finer histograms, upon request
     new 7872cbb  set wargs if defined in widgets.yaml (histogram changes etc)
     new c673aa4  properly format hourly histograms by adding HH:MM
     new 661a863  add in hourly histograms for CI queues
     new e04740c  regen JS

The 6 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/ci/queue.py                |  1 +
 api/yaml/widgets.yaml                |  2 ++
 ui/js/coffee/charts_linechart.coffee |  2 ++
 ui/js/coffee/pageloader.coffee       |  4 ++++
 ui/js/coffee/widget_linechart.coffee |  6 +++++-
 ui/js/kibble.v1.js                   | 26 ++++++++++++++++++++------
 6 files changed, 34 insertions(+), 7 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
humbedooh@apache.org.

[kibble] 02/06: allow finer histograms, upon request

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 bb379bffb2578cc44864216ce6bec85fc8bb196e
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Fri Feb 16 22:25:57 2018 +0100

    allow finer histograms, upon request
---
 ui/js/coffee/widget_linechart.coffee | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ui/js/coffee/widget_linechart.coffee b/ui/js/coffee/widget_linechart.coffee
index 0df7c2d..ab91a00 100644
--- a/ui/js/coffee/widget_linechart.coffee
+++ b/ui/js/coffee/widget_linechart.coffee
@@ -155,7 +155,11 @@ linechart = (json, state) ->
           state.widget.inject(mk('br'))
           state.widget.inject(txt("Select interval: "))
           state.widget.inject(list)
-          for item in ['day','week','month','quarter','year']
+          histograms = ['day','week','month','quarter','year']
+          # Some charts may require finer grained precision (CI Queues etc)
+          if state.widget.wargs and state.widget.wargs.histogram == 'hour'
+                histograms.unshift('hour')
+          for item in histograms
               opt = document.createElement('option')
               opt.value = item
               opt.text = item

-- 
To stop receiving notification emails like this one, please contact
humbedooh@apache.org.

[kibble] 05/06: add in hourly histograms for CI queues

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 661a8637fcd99b8e0f9be524b6b0ecb0a9f1c71b
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Fri Feb 16 22:26:45 2018 +0100

    add in hourly histograms for CI queues
---
 api/yaml/widgets.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/api/yaml/widgets.yaml b/api/yaml/widgets.yaml
index 37e9ec8..4aec0ba 100644
--- a/api/yaml/widgets.yaml
+++ b/api/yaml/widgets.yaml
@@ -740,6 +740,8 @@ widgets:
                         type:   "line"
                         source: "ci/queue"
                         name:   "CI Queue"
+                        wargs:
+                            histogram: hour
                         blocks: 6
                     -
                         type:   "line"

-- 
To stop receiving notification emails like this one, please contact
humbedooh@apache.org.

[kibble] 06/06: 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 e04740c5565d806478e72e6e829bb81e80b2562d
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Fri Feb 16 22:26:52 2018 +0100

    regen JS
---
 ui/js/kibble.v1.js | 26 ++++++++++++++++++++------
 1 file changed, 20 insertions(+), 6 deletions(-)

diff --git a/ui/js/kibble.v1.js b/ui/js/kibble.v1.js
index 44bc59c..21d2745 100644
--- a/ui/js/kibble.v1.js
+++ b/ui/js/kibble.v1.js
@@ -267,6 +267,9 @@ charts_linechart = function(obj, data, options) {
     if (data.histogram && data.histogram === 'monthly') {
       dateFormat = '%b, %Y';
     }
+    if (data.interval && data.interval === 'hour') {
+      dateFormat = '%Y-%m-%d %H:%M';
+    }
     if (data.histogram && data.histogram === 'yearly') {
       dateFormat = '%Y';
     }
@@ -3636,7 +3639,7 @@ setupPage = function(json, state) {
     r = ref[q];
     row = new Row();
     results.push((function() {
-      var len1, ref1, ref2, ref3, ref4, results1, u;
+      var len1, ref1, ref2, ref3, ref4, ref5, results1, u;
       ref1 = r.children;
       results1 = [];
       for (u = 0, len1 = ref1.length; u < len1; u++) {
@@ -3659,7 +3662,15 @@ setupPage = function(json, state) {
             widget.args.eargs[k] = v;
           }
         }
-        if ((ref4 = child.type) !== 'views' && ref4 !== 'sourcelist') {
+        if (child.wargs) {
+          widget.wargs = {};
+          ref4 = child.wargs;
+          for (k in ref4) {
+            v = ref4[k];
+            widget.wargs[k] = v;
+          }
+        }
+        if ((ref5 = child.type) !== 'views' && ref5 !== 'sourcelist') {
           widget.args.eargs.quick = 'true';
         }
         switch (child.type) {
@@ -5919,7 +5930,7 @@ jsondump = function(json, state) {
 };
 
 linechart = function(json, state) {
-  var aa, ab, cat, catdata, cats, catseries, chartBox, chk, dates, div, filled, from, id, item, key, label, len, len1, len2, len3, list, m, opt, point, q, range, ref, ref1, ref2, ref3, rv, stack, tName, to, type, u, val;
+  var aa, ab, cat, catdata, cats, catseries, chartBox, chk, dates, div, filled, from, histograms, id, item, key, label, len, len1, len2, len3, list, m, opt, point, q, range, ref, ref1, ref2, rv, stack, tName, to, type, u, val;
   div = document.createElement('div');
   if (json.text) {
     div.inject(new HTML('p', {}, json.text));
@@ -6098,9 +6109,12 @@ linechart = function(json, state) {
     state.widget.inject(mk('br'));
     state.widget.inject(txt("Select interval: "));
     state.widget.inject(list);
-    ref3 = ['day', 'week', 'month', 'quarter', 'year'];
-    for (ab = 0, len3 = ref3.length; ab < len3; ab++) {
-      item = ref3[ab];
+    histograms = ['day', 'week', 'month', 'quarter', 'year'];
+    if (state.widget.wargs && state.widget.wargs.histogram === 'hour') {
+      histograms.unshift('hour');
+    }
+    for (ab = 0, len3 = histograms.length; ab < len3; ab++) {
+      item = histograms[ab];
       opt = document.createElement('option');
       opt.value = item;
       opt.text = item;

-- 
To stop receiving notification emails like this one, please contact
humbedooh@apache.org.

[kibble] 04/06: properly format hourly histograms by adding HH:MM

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 c673aa435032d69ec2d34a594d9b8dadc33549d1
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Fri Feb 16 22:26:35 2018 +0100

    properly format hourly histograms by adding HH:MM
---
 ui/js/coffee/charts_linechart.coffee | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ui/js/coffee/charts_linechart.coffee b/ui/js/coffee/charts_linechart.coffee
index b985494..969c53d 100644
--- a/ui/js/coffee/charts_linechart.coffee
+++ b/ui/js/coffee/charts_linechart.coffee
@@ -39,6 +39,8 @@ charts_linechart = (obj, data, options) ->
             dateFormat = (x) => "Q" + ([1,2,3,4][Math.floor(x.getMonth()/3)]) + ", " + x.getFullYear()
         if data.histogram and data.histogram == 'monthly'
             dateFormat = '%b, %Y'
+        if data.interval and data.interval == 'hour'
+            dateFormat = '%Y-%m-%d %H:%M'
         if data.histogram and data.histogram == 'yearly'
             dateFormat = '%Y'
         ts = [

-- 
To stop receiving notification emails like this one, please contact
humbedooh@apache.org.

[kibble] 01/06: guard against no data available

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 fde6ffe3722ed4b593e873518c43559e86474927
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Fri Feb 16 22:23:09 2018 +0100

    guard against no data available
---
 api/pages/ci/queue.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/api/pages/ci/queue.py b/api/pages/ci/queue.py
index 70b77d7..960be94 100644
--- a/api/pages/ci/queue.py
+++ b/api/pages/ci/queue.py
@@ -162,6 +162,7 @@ def run(API, environ, indata, session):
     timeseries = []
     for bucket in res['aggregations']['timeseries']['buckets']:
         ts = int(bucket['key'] / 1000)
+        bucket['wait']['value'] = bucket['wait'].get('value', 0) or 0
         timeseries.append({
             'date': ts,
             'queue size': bucket['size']['value'],

-- 
To stop receiving notification emails like this one, please contact
humbedooh@apache.org.

[kibble] 03/06: set wargs if defined in widgets.yaml (histogram changes etc)

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 7872cbb9438e7d75ae54ee278538fd3d1e265d8e
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Fri Feb 16 22:26:19 2018 +0100

    set wargs if defined in widgets.yaml (histogram changes etc)
---
 ui/js/coffee/pageloader.coffee | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ui/js/coffee/pageloader.coffee b/ui/js/coffee/pageloader.coffee
index 56db581..13cb401 100644
--- a/ui/js/coffee/pageloader.coffee
+++ b/ui/js/coffee/pageloader.coffee
@@ -67,6 +67,10 @@ setupPage = (json, state) ->
             if child.eargs
                 for k, v of child.eargs
                     widget.args.eargs[k] = v
+            if child.wargs
+                widget.wargs = {}
+                for k, v of child.wargs
+                    widget.wargs[k] = v
             if child.type not in ['views', 'sourcelist']
                 widget.args.eargs.quick = 'true'        
             switch child.type

-- 
To stop receiving notification emails like this one, please contact
humbedooh@apache.org.