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/08/03 13:54:33 UTC

[kibble] branch master updated (aa8d6f0 -> 8b3f6d5)

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 aa8d6f0  remove debug line
     new c45b6be  linting + add in KPE UI
     new e720204  accept KPE data as well
     new 8b3f6d5  regen JS

The 3 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/yaml/widgets.yaml                |  52 +++++++++++++---
 ui/js/coffee/charts_linechart.coffee |  10 ++--
 ui/js/kibble.v1.js                   | 112 +++++++++++++++++------------------
 3 files changed, 104 insertions(+), 70 deletions(-)


[kibble] 02/03: accept KPE data as well

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 e720204b1dfcbef7658dc6d6a471e69871b65aa3
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Fri Aug 3 15:54:03 2018 +0200

    accept KPE data as well
---
 ui/js/coffee/charts_linechart.coffee | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/ui/js/coffee/charts_linechart.coffee b/ui/js/coffee/charts_linechart.coffee
index 969c53d..69ecb7f 100644
--- a/ui/js/coffee/charts_linechart.coffee
+++ b/ui/js/coffee/charts_linechart.coffee
@@ -48,7 +48,7 @@ charts_linechart = (obj, data, options) ->
             ]
 
         # Get all timestamps
-        
+
         xts = {}
         for el in data.timeseries
             axisData.x = {
@@ -57,7 +57,7 @@ charts_linechart = (obj, data, options) ->
                         format: dateFormat
                     }
                 }
-            
+
             ndate = new Date(parseInt(el.date)*1000.0)
             ts[0].push(ndate)
             for k, v of el
@@ -67,7 +67,7 @@ charts_linechart = (obj, data, options) ->
                     if xts[k] == undefined
                         xts[k] = []
                     xts[k].push(v)
-                    
+
         for key, val of xts
             xx = [key]
             for el in val
@@ -76,10 +76,10 @@ charts_linechart = (obj, data, options) ->
             asList.push(key)
             asTypes[key] = linetype
             a++
-                
+
         asDataArray = ts
     else
-        for k, v of data.counts
+        for k, v of (data.counts||data.phrases)
             asList.push(k)
             asTypes[k] = 'bar'
             tmpArray = [k]


[kibble] 03/03: 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 8b3f6d5137fa4b8a4c088b39df2499738e779f1d
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Fri Aug 3 15:54:18 2018 +0200

    regen JS
---
 ui/js/kibble.v1.js | 112 ++++++++++++++++++++++++++---------------------------
 1 file changed, 56 insertions(+), 56 deletions(-)

diff --git a/ui/js/kibble.v1.js b/ui/js/kibble.v1.js
index 35fec4c..f7bfe90 100644
--- a/ui/js/kibble.v1.js
+++ b/ui/js/kibble.v1.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.12.7
 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, ciexplorer, cog, comShow, comstat, copyCSS, currentSources, dataTable, datepicker, datepickers, defaultOrgChanged, deletesource [...]
   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; };
 
@@ -238,9 +238,9 @@ charts_linechart_stacked = (function(_this) {
 })(this);
 
 charts_linechart = function(obj, data, options) {
-  var a, aa, asDataArray, asList, asTypes, axisData, c, config, dataPoint, dateFormat, el, k, key, len, len1, len2, linetype, ndate, q, ref, ref1, stacked, tmpArray, ts, u, v, val, xts, xx;
-  linetype = options && options.linetype ? options.linetype : 'line';
-  stacked = options && options.stacked ? options.stacked : false;
+  var a, asDataArray, asList, asTypes, axisData, c, config, dataPoint, dateFormat, el, i1, k, key, len, len1, len2, linetype, ndate, q, ref, ref1, stacked, tmpArray, ts, u, v, val, xts, xx;
+  linetype = (options && options.linetype) ? options.linetype : 'line';
+  stacked = (options && options.stacked) ? options.stacked : false;
   if (options && options.filled && linetype === "line") {
     linetype = "area-spline";
   }
@@ -313,15 +313,15 @@ charts_linechart = function(obj, data, options) {
     }
     asDataArray = ts;
   } else {
-    ref1 = data.counts;
+    ref1 = data.counts || data.phrases;
     for (k in ref1) {
       v = ref1[k];
       asList.push(k);
       asTypes[k] = 'bar';
       tmpArray = [k];
       if (isArray(v)) {
-        for (aa = 0, len2 = v.length; aa < len2; aa++) {
-          dataPoint = v[aa];
+        for (i1 = 0, len2 = v.length; i1 < len2; i1++) {
+          dataPoint = v[i1];
           tmpArray.push(dataPoint);
         }
       } else {
@@ -598,7 +598,7 @@ charts_linked = function(obj, nodes, links, options) {
 };
 
 charts_radarchart = function(obj, data, options) {
-  var Format, LegendOptions, aa, ab, axes, axis, cfg, d, el, g, i, indicator, j, legend, len, len1, levelFactor, li, q, radius, rect, ref, ref1, ref2, ref3, series, tooltip, total, u;
+  var Format, LegendOptions, axes, axis, cfg, d, el, g, i, i1, indicator, j, j1, legend, len, len1, levelFactor, li, q, radius, rect, ref, ref1, ref2, ref3, series, tooltip, total, u;
   cfg = {
     radius: 5,
     w: 360,
@@ -658,7 +658,7 @@ charts_radarchart = function(obj, data, options) {
   d3.select(obj).select("svg").remove();
   rect = obj.getBoundingClientRect();
   g = d3.select(obj).append("svg").attr("preserveAspectRatio", "xMinYMin meet").attr("viewBox", "0 0 1000 500").append("g").attr("transform", "translate(" + cfg.TranslateX + "," + cfg.TranslateY + ")");
-  for (j = aa = 0, ref2 = cfg.levels; 0 <= ref2 ? aa < ref2 : aa > ref2; j = 0 <= ref2 ? ++aa : --aa) {
+  for (j = i1 = 0, ref2 = cfg.levels; 0 <= ref2 ? i1 < ref2 : i1 > ref2; j = 0 <= ref2 ? ++i1 : --i1) {
     levelFactor = cfg.factor * radius * ((j + 1) / cfg.levels);
     g.selectAll(".levels").data(axes).enter().append("svg:line").attr("x1", (function(_this) {
       return function(d, i) {
@@ -678,7 +678,7 @@ charts_radarchart = function(obj, data, options) {
       };
     })(this)).attr("class", "line").style("stroke", "grey").style("stroke-opacity", "0.75").style("stroke-width", "0.3px").attr("transform", "translate(" + (cfg.w / 2 - levelFactor) + ", " + (cfg.h / 2 - levelFactor) + ")");
   }
-  for (j = ab = 0, ref3 = cfg.levels; 0 <= ref3 ? ab < ref3 : ab > ref3; j = 0 <= ref3 ? ++ab : --ab) {
+  for (j = j1 = 0, ref3 = cfg.levels; 0 <= ref3 ? j1 < ref3 : j1 > ref3; j = 0 <= ref3 ? ++j1 : --j1) {
     levelFactor = cfg.factor * radius * ((j + 1) / cfg.levels);
     g.selectAll(".levels").data([1]).enter().append("svg:text").attr("x", (function(_this) {
       return function(d) {
@@ -726,10 +726,10 @@ charts_radarchart = function(obj, data, options) {
     });
     dataValues.push(dataValues[0]);
     g.selectAll(".area").data([dataValues]).enter().append("polygon").attr("class", "radar-chart-serie" + series).style("stroke-width", "2px").style("stroke", cfg.color[series]).attr("points", function(d) {
-      var ac, len2, pt, str;
+      var k1, len2, pt, str;
       str = "";
-      for (ac = 0, len2 = d.length; ac < len2; ac++) {
-        pt = d[ac];
+      for (k1 = 0, len2 = d.length; k1 < len2; k1++) {
+        pt = d[k1];
         str = str + pt[0] + "," + pt[1] + " ";
       }
       return str;
@@ -956,7 +956,7 @@ copyCSS = function(destination, source) {
 };
 
 downloadBlob = function(name, uri) {
-  var blob, e, error, saveLink, url;
+  var blob, e, saveLink, url;
   if (navigator.msSaveOrOpenBlob) {
     return navigator.msSaveOrOpenBlob(uriToBlob(uri), name);
   } else {
@@ -1131,7 +1131,7 @@ Chart = (function() {
     this.main.inject(this.toolbar);
     this.titlebar = new HTML('div', {
       "class": "chartTitle"
-    }, options && options.title ? options.title : "");
+    }, (options && options.title) ? options.title : "");
     this.main.inject(this.titlebar);
     i = 0;
     chartWrapperColors = genColors(16, 0.2, 0.75, true);
@@ -3062,7 +3062,7 @@ fetch = function(url, xstate, callback, nocreds) {
   xmlHttp.open("GET", "api/" + url, true);
   xmlHttp.send(null);
   return xmlHttp.onreadystatechange = function(state) {
-    var e, error, js, mpart, response;
+    var e, js, mpart, response;
     if (xmlHttp.readyState === 4 && xmlHttp.status === 500) {
       if (snap) {
         snap(xstate);
@@ -3109,7 +3109,7 @@ put = function(url, json, xstate, callback, nocreds) {
   xmlHttp.open("PUT", "api/" + url, true);
   xmlHttp.send(JSON.stringify(json || {}));
   return xmlHttp.onreadystatechange = function(state) {
-    var e, error, js, response;
+    var e, js, response;
     if (xmlHttp.readyState === 4 && xmlHttp.status === 500) {
       if (snap) {
         snap(xstate);
@@ -3156,7 +3156,7 @@ patch = function(url, json, xstate, callback, nocreds) {
   xmlHttp.open("PATCH", "api/" + url, true);
   xmlHttp.send(JSON.stringify(json || {}));
   return xmlHttp.onreadystatechange = function(state) {
-    var e, error, js, response;
+    var e, js, response;
     if (xmlHttp.readyState === 4 && xmlHttp.status === 500) {
       if (snap) {
         snap(xstate);
@@ -3203,7 +3203,7 @@ xdelete = function(url, json, xstate, callback, nocreds) {
   xmlHttp.open("DELETE", "api/" + url, true);
   xmlHttp.send(JSON.stringify(json || {}));
   return xmlHttp.onreadystatechange = function(state) {
-    var e, error, js, response;
+    var e, js, response;
     if (xmlHttp.readyState === 4 && xmlHttp.status === 500) {
       if (snap) {
         snap(xstate);
@@ -3261,7 +3261,7 @@ post = function(url, json, xstate, callback, snap) {
   xmlHttp.setRequestHeader("Content-type", "application/json");
   xmlHttp.send(fdata);
   return xmlHttp.onreadystatechange = function(state) {
-    var e, error, response;
+    var e, response;
     if (xmlHttp.readyState === 4 && xmlHttp.status === 500) {
       if (snap) {
         snap(xstate);
@@ -4102,9 +4102,9 @@ renderPhonebook = function(json, state) {
       }
     ],
     ajax: function(data, callback, settings) {
-      var aa, i, out, ref1, ref2;
+      var i, i1, out, ref1, ref2;
       out = [];
-      for (i = aa = ref1 = data.start, ref2 = data.start + data.length; ref1 <= ref2 ? aa < ref2 : aa > ref2; i = ref1 <= ref2 ? ++aa : --aa) {
+      for (i = i1 = ref1 = data.start, ref2 = data.start + data.length; ref1 <= ref2 ? i1 < ref2 : i1 > ref2; i = ref1 <= ref2 ? ++i1 : --i1) {
         out.push(people[i]);
       }
       return setTimeout(function() {
@@ -4281,7 +4281,7 @@ getSourceType = function(main, t) {
 };
 
 sourcelist = function(json, state) {
-  var aa, ab, act, borked, cl, color, d, dbtn, desc, div, el, firstRun, h, ic, icons, img, item, lastException, lastFailure, lastUpdate, len, len1, len2, len3, lu, m, q, ref, ref1, ref2, ref3, ref4, ref5, retval, running, slist, source, sources, st, status, steps, t, tbody, u, vlist;
+  var act, borked, cl, color, d, dbtn, desc, div, el, firstRun, h, i1, ic, icons, img, item, j1, lastException, lastFailure, lastUpdate, len, len1, len2, len3, lu, m, q, ref, ref1, ref2, ref3, ref4, ref5, retval, running, slist, source, sources, st, status, steps, t, tbody, u, vlist;
   slist = mk('div');
   vlist = new HTML('div');
   if (json.sources) {
@@ -4317,10 +4317,10 @@ sourcelist = function(json, state) {
     }
     sources = sources.sort ? sources : [];
     sources.sort(function(a, b) {
-      return (a.running === b.running ? (a.good === b.good ? (a.sourceURL > b.sourceURL ? 1 : -1) : (b.good === true ? -1 : 1)) : (b.running === true ? 1 : -1));
+      return (a.running === b.running ? (a.good === b.good ? (a.sourceURL > b.sourceURL ? 1 : -1) : (b.good === true ? -1 : 1)) : ((b.running === true) ? 1 : -1));
     });
-    for (aa = 0, len2 = sources.length; aa < len2; aa++) {
-      source = sources[aa];
+    for (i1 = 0, len2 = sources.length; i1 < len2; i1++) {
+      source = sources[i1];
       st = getSourceType(vlist, source.type);
       tbody = st.div;
       st.count++;
@@ -4363,8 +4363,8 @@ sourcelist = function(json, state) {
       if ((ref5 = source.type) === 'irc' || ref5 === 'stats') {
         steps = ['census'];
       }
-      for (ab = 0, len3 = steps.length; ab < len3; ab++) {
-        item = steps[ab];
+      for (j1 = 0, len3 = steps.length; j1 < len3; j1++) {
+        item = steps[j1];
         color = "#394";
         cl = icons[item];
         if (!source.steps || !source.steps[item] || borked) {
@@ -5514,10 +5514,10 @@ comShow = function(t) {
 };
 
 comstat = function(json, state) {
-  var aa, ab, chk, dstyle, hash, i, js, key, lb, len, len1, len2, len3, m, nl, notice, oemail, p, person, q, ref, ref1, ref2, ref3, repo, row, stbl, tb, tbl, tr, u, url, wh, widget;
+  var chk, dstyle, hash, i, i1, j1, js, key, lb, len, len1, len2, len3, m, nl, notice, oemail, p, person, q, ref, ref1, ref2, ref3, repo, row, stbl, tb, tbl, tr, u, url, wh, widget;
   if (json && json.stats) {
     row = new Row();
-    p = new HTML('p', {}, globArgs.committersOnly === 'true' ? "You are currently only seeing stats for committers. To view statistics for all contributors (committers and authors), please uncheck the box below:" : "You are currently seeing stats for both committership and authorship of code. To view only committership stats, tick the box below:");
+    p = new HTML('p', {}, (globArgs.committersOnly === 'true') ? "You are currently only seeing stats for committers. To view statistics for all contributors (committers and authors), please uncheck the box below:" : "You are currently seeing stats for both committership and authorship of code. To view only committership stats, tick the box below:");
     chk = new HTML('input', {
       type: 'checkbox',
       checked: globArgs.committersOnly === 'true' ? 'checked' : null,
@@ -5760,7 +5760,7 @@ comstat = function(json, state) {
         app(tbl, tr);
         tb = new HTML('tbody');
         ref2 = json.stats.converts.issue_to_code;
-        for (i = aa = 0, len2 = ref2.length; aa < len2; i = ++aa) {
+        for (i = i1 = 0, len2 = ref2.length; i1 < len2; i = ++i1) {
           person = ref2[i];
           if (i > 20) {
             break;
@@ -5781,7 +5781,7 @@ comstat = function(json, state) {
               style: {
                 textAlign: 'right'
               }
-            }, (Math.floor(person.tdiff / 86400.)).pretty())
+            }, (Math.floor(person.tdiff / 86400)).pretty())
           ]);
           tb.inject(tr);
         }
@@ -5802,7 +5802,7 @@ comstat = function(json, state) {
         app(tbl, tr);
         tb = new HTML('tbody');
         ref3 = json.stats.converts.email_to_code;
-        for (i = ab = 0, len3 = ref3.length; ab < len3; i = ++ab) {
+        for (i = j1 = 0, len3 = ref3.length; j1 < len3; i = ++j1) {
           person = ref3[i];
           if (i > 20) {
             break;
@@ -5823,7 +5823,7 @@ comstat = function(json, state) {
               style: {
                 textAlign: 'right'
               }
-            }, (Math.floor(person.tdiff / 86400.)).pretty())
+            }, (Math.floor(person.tdiff / 86400)).pretty())
           ]);
           tb.inject(tr);
         }
@@ -5842,7 +5842,7 @@ comstat = function(json, state) {
 };
 
 donut = function(json, state) {
-  var a, aa, blank, chartBox, code, comment, count, data, div, dt, dtl, el, item, l, lang, langs, len, len1, len2, q, ref, top, tot, ttot, u;
+  var a, blank, chartBox, code, comment, count, data, div, dt, dtl, el, i1, item, l, lang, langs, len, len1, len2, q, ref, top, tot, ttot, u;
   dt = [];
   dtl = [];
   l = 0;
@@ -5950,8 +5950,8 @@ donut = function(json, state) {
     theme.color = genColors(17, 0.6, 0.5, true);
   }
   data = {};
-  for (aa = 0, len2 = dt.length; aa < len2; aa++) {
-    el = dt[aa];
+  for (i1 = 0, len2 = dt.length; i1 < len2; i1++) {
+    el = dt[i1];
     data[el.name] = el.value;
   }
   div = new HTML('div');
@@ -6021,7 +6021,7 @@ jsondump = function(json, state) {
 };
 
 linechart = function(json, state) {
-  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;
+  var cat, catdata, cats, catseries, chartBox, chk, dates, div, filled, from, histograms, i1, id, item, j1, 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));
@@ -6076,8 +6076,8 @@ linechart = function(json, state) {
           catdata[key].push(val);
         }
       }
-      for (aa = 0, len2 = cats.length; aa < len2; aa++) {
-        cat = cats[aa];
+      for (i1 = 0, len2 = cats.length; i1 < len2; i1++) {
+        cat = cats[i1];
         if (ref2 = !cat, indexOf.call(point, ref2) >= 0) {
           catdata[cat].push(0);
         }
@@ -6204,8 +6204,8 @@ linechart = function(json, state) {
     if (state.widget.wargs && state.widget.wargs.histogram === 'hour') {
       histograms.unshift('hour');
     }
-    for (ab = 0, len3 = histograms.length; ab < len3; ab++) {
-      item = histograms[ab];
+    for (j1 = 0, len3 = histograms.length; j1 < len3; j1++) {
+      item = histograms[j1];
       opt = document.createElement('option');
       opt.value = item;
       opt.text = item;
@@ -6330,7 +6330,7 @@ worldmap = function(json, state) {
 };
 
 messages = function(json, state) {
-  var a, aa, ab, b, btn, div, el, form, h2, inp, item, items, len, len1, len2, len3, message, obj, pre, q, ref, ref1, ref2, reply, tbl, tbody, td, thead, tr, u;
+  var a, b, btn, div, el, form, h2, i1, inp, item, items, j1, len, len1, len2, len3, message, obj, pre, q, ref, ref1, ref2, reply, tbl, tbody, td, thead, tr, u;
   if (isArray(json)) {
     obj = document.createElement('form');
     tbl = mk('table');
@@ -6388,8 +6388,8 @@ messages = function(json, state) {
     app(h2, txt("Send a message:"));
     app(obj, h2);
     ref1 = ['recipient', 'subject', 'body'];
-    for (aa = 0, len2 = ref1.length; aa < len2; aa++) {
-      item = ref1[aa];
+    for (i1 = 0, len2 = ref1.length; i1 < len2; i1++) {
+      item = ref1[i1];
       div = mk('div');
       app(div, txt(items[item] + ": "));
       if (item === 'body') {
@@ -6448,8 +6448,8 @@ messages = function(json, state) {
       body: ''
     };
     ref2 = ['recipient', 'subject', 'body'];
-    for (ab = 0, len3 = ref2.length; ab < len3; ab++) {
-      item = ref2[ab];
+    for (j1 = 0, len3 = ref2.length; j1 < len3; j1++) {
+      item = ref2[j1];
       div = mk('div');
       app(div, txt(items[item] + ": "));
       if (item === 'body') {
@@ -6494,7 +6494,7 @@ sendEmail = function(form) {
 };
 
 mvp = function(json, state) {
-  var aa, el, i, len, len1, len2, nlist, person, q, ref, ref1, ref2, tb, tbl, tr, u;
+  var el, i, i1, len, len1, len2, nlist, person, q, ref, ref1, ref2, tb, tbl, tr, u;
   nlist = new HTML('select', {
     name: 'size',
     id: 'size'
@@ -6562,7 +6562,7 @@ mvp = function(json, state) {
   app(tbl, tr);
   tb = new HTML('tbody');
   ref2 = json.sorted;
-  for (i = aa = 0, len2 = ref2.length; aa < len2; i = ++aa) {
+  for (i = i1 = 0, len2 = ref2.length; i1 < len2; i = ++i1) {
     person = ref2[i];
     tr = mk('tr', {
       scope: 'row'
@@ -6897,7 +6897,7 @@ relationship = function(json, state) {
   for (i = q = 1; q <= 5; i = ++q) {
     opt = new HTML('option', {
       value: i,
-      selected: String(i) === globArgs.links ? "selected" : null
+      selected: (String(i) === globArgs.links) ? "selected" : null
     }, String(i));
     sigsel.inject(opt);
   }
@@ -7338,11 +7338,11 @@ treemap = function(json, state) {
         }
       },
       formatter: function(info) {
-        var aa, ref1, treePath, treePathInfo, value;
+        var i1, ref1, treePath, treePathInfo, value;
         value = info.value;
         treePathInfo = info.treePathInfo;
         treePath = [];
-        for (i = aa = 1, ref1 = treePathInfo.length; 1 <= ref1 ? aa < ref1 : aa > ref1; i = 1 <= ref1 ? ++aa : --aa) {
+        for (i = i1 = 1, ref1 = treePathInfo.length; 1 <= ref1 ? i1 < ref1 : i1 > ref1; i = 1 <= ref1 ? ++i1 : --i1) {
           treePath.push(treePathInfo[i].name);
         }
         return ['<div class="tooltip-title">' + treePath.join('/') + '</div>', 'Lines of Code: ' + value.pretty()].join('');
@@ -7542,7 +7542,7 @@ filterView = function(val) {
 };
 
 manageviews = function(json, state) {
-  var aa, btn, h3, h4, inp, len, len1, len2, newdiv, noviews, obj, p, popdiv, q, ref, ref1, ref2, ref3, ref4, sdiv, source, u, view;
+  var btn, h3, h4, i1, inp, len, len1, len2, newdiv, noviews, obj, p, popdiv, q, ref, ref1, ref2, ref3, ref4, sdiv, source, u, view;
   obj = mk('div');
   p = mk('p');
   app(p, txt("Views allow you to quickly set up a group of sources to view as a sub-organisation, much like tags, but faster."));
@@ -7561,7 +7561,7 @@ manageviews = function(json, state) {
   set(newdiv, 'id', 'newdiv');
   newdiv.style.display = "none";
   json.sources.sort(function(a, b) {
-    return (a.type === b.type ? (a.sourceURL > b.sourceURL ? 1 : -1) : (b.type < a.type ? 1 : -1));
+    return (a.type === b.type ? (a.sourceURL > b.sourceURL ? 1 : -1) : ((b.type < a.type) ? 1 : -1));
   });
   inp = mk('input');
   set(inp, 'type', 'text');
@@ -7677,8 +7677,8 @@ manageviews = function(json, state) {
     set(inp, 'id', 'viewname');
     app(newdiv, txt("Select the sources you wish to have in this view below:"));
     ref3 = json.sources;
-    for (aa = 0, len2 = ref3.length; aa < len2; aa++) {
-      source = ref3[aa];
+    for (i1 = 0, len2 = ref3.length; i1 < len2; i1++) {
+      source = ref3[i1];
       sdiv = mk('div');
       set(sdiv, 'id', view.id + "_" + source.sourceID);
       set(sdiv, 'datatype', view.id);


[kibble] 01/03: linting + add in KPE UI

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 c45b6be8e47d15f99ae900ba1fd1e08c1bc424c7
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Fri Aug 3 15:53:49 2018 +0200

    linting + add in KPE UI
---
 api/yaml/widgets.yaml | 52 ++++++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 43 insertions(+), 9 deletions(-)

diff --git a/api/yaml/widgets.yaml b/api/yaml/widgets.yaml
index 542ac06..2390cd9 100644
--- a/api/yaml/widgets.yaml
+++ b/api/yaml/widgets.yaml
@@ -15,7 +15,7 @@ widgets:
                         blocks: 12
                         name: "Organisation trends"
                         source: org/trends
-                        
+
             -
                 name: "Your organisations"
                 children:
@@ -24,7 +24,7 @@ widgets:
                         blocks: 12
                         name: "Your organisations"
                         source: org/list
-                        
+
 ### VIEW EDITOR
     views:
         title: "Views"
@@ -59,8 +59,8 @@ widgets:
                         blocks: 12
                         name: "Existing Sources"
                         source: sources
-            
-                
+
+
     factors:
         title: "Engagement factors"
         rows:
@@ -405,7 +405,7 @@ widgets:
                         source:     "mail/top-topics"
                         name:       "Most active topics"
                         target:     ""
-            
+
 
 ###### RELATIONSHIPS
 
@@ -471,7 +471,7 @@ widgets:
                         source: "mail/relationships"
                         name:   "Mailing list relationships"
                         blocks: 12
-                        
+
 ## VIP AUTHOR MAP
     mail-map:
         title: "Important email authors"
@@ -503,7 +503,7 @@ widgets:
                         source: "mail/map"
                         name:   "Discussion relationships"
                         blocks: 12
-                        
+
 ## ISSUE TRACKERS
     issue-rel:
         title: "Mailing list relationships"
@@ -681,6 +681,40 @@ widgets:
                         name:   "Mood over time"
                         blocks: 12
 
+
+## EMAIL KEY PHRASES
+    mail-kpe:
+        title: "Mailing list key phrases"
+        rows:
+            -
+                name: "Date picker row"
+                children:
+                    -
+                        type:   "datepicker"
+                        blocks: 4
+                        name:   "Date picker"
+                    -
+                        type:   "viewpicker"
+                        blocks: 4
+                        source: "views"
+                        name:   "Quick filter"
+                    -
+                        type:   mailpicker
+                        blocks: 4
+                        source: "sources"
+                        eargs:
+                            types: ['mail', 'ponymail', 'pipermail', 'hyperkitty']
+                        name:   Mailing list picker"
+            -
+                name: "Current key phrases"
+                children:
+                    -
+                        type:   "bar"
+                        source: "mail/keyphrases"
+                        name:   "Overall key phrases"
+                        blocks: 12
+
+
 ## NEWTIMERS (COMSTAT)
     comstat:
         title: "Community Growth"
@@ -710,7 +744,7 @@ widgets:
                         source: "bio/newtimers"
                         name:   "New contributors"
                         blocks: 12
-                    
+
 
 ## CONTINUOUS INTEGRATION
     ci:
@@ -761,7 +795,7 @@ widgets:
                         source: "ci/top-buildcount"
                         name:   "Busiest jobs by build count"
                         blocks: 6
-                    
+
 ### FORUMS
     forums:
         title: "Forums"