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 14:04:11 UTC

[kibble] branch master updated (96f20cb -> ce8a598)

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 96f20cb  regen JS
     new 96a8514  tweak: if we get an array instead of a hash, work around it
     new ce8a598  regen JS

The 2 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:
 ui/js/coffee/charts_linechart.coffee | 4 ++++
 ui/js/kibble.v1.js                   | 4 ++++
 2 files changed, 8 insertions(+)


[kibble] 01/02: tweak: if we get an array instead of a hash, work around it

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 96a8514aea1872740519dacc3e4a3887727f4015
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Fri Aug 3 16:03:57 2018 +0200

    tweak: if we get an array instead of a hash, work around it
---
 ui/js/coffee/charts_linechart.coffee | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ui/js/coffee/charts_linechart.coffee b/ui/js/coffee/charts_linechart.coffee
index 69ecb7f..3a6fe8d 100644
--- a/ui/js/coffee/charts_linechart.coffee
+++ b/ui/js/coffee/charts_linechart.coffee
@@ -80,6 +80,10 @@ charts_linechart = (obj, data, options) ->
         asDataArray = ts
     else
         for k, v of (data.counts||data.phrases)
+            # If we have an array of objects with a .count sub:
+            if isHash(v) and v.count
+              k = v.phrase||v.value
+              v = v.count
             asList.push(k)
             asTypes[k] = 'bar'
             tmpArray = [k]


[kibble] 02/02: 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 ce8a598543660743d0a9636764b26c8973235866
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Fri Aug 3 16:04:01 2018 +0200

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

diff --git a/ui/js/kibble.v1.js b/ui/js/kibble.v1.js
index df7a5a2..f20941e 100644
--- a/ui/js/kibble.v1.js
+++ b/ui/js/kibble.v1.js
@@ -316,6 +316,10 @@ charts_linechart = function(obj, data, options) {
     ref1 = data.counts || data.phrases;
     for (k in ref1) {
       v = ref1[k];
+      if (isHash(v) && v.count) {
+        k = v.phrase || v.value;
+        v = v.count;
+      }
       asList.push(k);
       asTypes[k] = 'bar';
       tmpArray = [k];