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/22 18:13:46 UTC
[kibble] branch master updated (ca18d20 -> ce07da4)
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 ca18d20 deal with null values in timeseries
new f903149 let the UI know we have distinguishable types here
new 311e13d if a chart has distinguishable categories, enable toggling it
new ce07da4 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/pages/issue/issues.py | 1 +
ui/js/coffee/charts_wrapper.coffee | 28 ++++++++++++++++++++++++++++
ui/js/kibble.v1.js | 32 +++++++++++++++++++++++++++++++-
3 files changed, 60 insertions(+), 1 deletion(-)
--
To stop receiving notification emails like this one, please contact
['"commits@kibble.apache.org" <co...@kibble.apache.org>'].
[kibble] 01/03: let the UI know we have distinguishable types here
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 f90314984e3f3c9b469c498a2134e6b9b454cc7b
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sun Oct 22 20:08:41 2017 +0200
let the UI know we have distinguishable types here
---
api/pages/issue/issues.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/api/pages/issue/issues.py b/api/pages/issue/issues.py
index 6497feb..623eaa7 100644
--- a/api/pages/issue/issues.py
+++ b/api/pages/issue/issues.py
@@ -252,6 +252,7 @@ def run(API, environ, indata, session):
'timeseries': ts,
'interval': interval,
'okay': True,
+ 'distinguishable': True,
'responseTime': time.time() - now
}
yield json.dumps(JSON_OUT)
--
To stop receiving notification emails like this one, please contact
"commits@kibble.apache.org" <co...@kibble.apache.org>.
[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 ce07da4a24a5b96ae97af1a1c6f77d1ab0f5d121
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sun Oct 22 20:13:39 2017 +0200
regen JS
---
ui/js/kibble.v1.js | 32 +++++++++++++++++++++++++++++++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/ui/js/kibble.v1.js b/ui/js/kibble.v1.js
index 92de665..2d0e1b9 100644
--- a/ui/js/kibble.v1.js
+++ b/ui/js/kibble.v1.js
@@ -1063,7 +1063,7 @@ stackChart = function(o, config, chart) {
Chart = (function() {
function Chart(parent, type, data, options) {
- var btn, btnDiv, btns, chartWrapperColors, cid, el, hObj, i, inner, 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, u;
cid = parseInt(Math.random() * 1000000).toString(16);
this.cid = cid;
xxCharts[cid] = this;
@@ -1148,6 +1148,36 @@ Chart = (function() {
if (type === 'relationship') {
ref4 = charts_linked(this.chartdiv, data.nodes, data.links, options), this.chartobj = ref4[0], this.config = ref4[1];
}
+ if (data.distinguishable) {
+ 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.distinguish && globArgs.distinguish === 'true') {
+ chk.checked = true;
+ }
+ chk.addEventListener("change", function() {
+ var distinguish;
+ distinguish = null;
+ if (this.checked) {
+ distinguish = 'true';
+ globArgs['distinguish'] = 'true';
+ }
+ return updateWidgets('line', null, {
+ distinguish: distinguish
+ });
+ });
+ this.main.inject(mk('br'));
+ this.main.inject(chk);
+ label = document.createElement('label');
+ label.setAttribute("for", id);
+ label.setAttribute("title", "Check this box to distinguish between sub-categories in this chart");
+ chk.setAttribute("title", "Check this box to distinguish between sub-categories in this chart");
+ label.style.paddingLeft = '5px';
+ label.appendChild(document.createTextNode('Toggle category breakdown'));
+ this.main.inject(label);
+ }
return this.main;
}
--
To stop receiving notification emails like this one, please contact
"commits@kibble.apache.org" <co...@kibble.apache.org>.
[kibble] 02/03: if a chart has distinguishable categories,
enable toggling 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 311e13df111b4a90821afc81f78c7bfbe557e425
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sun Oct 22 20:13:29 2017 +0200
if a chart has distinguishable categories, enable toggling it
---
ui/js/coffee/charts_wrapper.coffee | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/ui/js/coffee/charts_wrapper.coffee b/ui/js/coffee/charts_wrapper.coffee
index 84f1775..cc929b7 100644
--- a/ui/js/coffee/charts_wrapper.coffee
+++ b/ui/js/coffee/charts_wrapper.coffee
@@ -297,5 +297,33 @@ class Chart
if type == 'relationship'
[@chartobj, @config] = charts_linked(@chartdiv, data.nodes, data.links, options)
+ # If this data source has distinguishable categories
+ # show a checkbox to toggle it.
+ if data.distinguishable
+ 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.distinguish and globArgs.distinguish == 'true'
+ chk.checked = true
+ chk.addEventListener("change", () ->
+ distinguish = null
+ if this.checked
+ distinguish = 'true'
+ globArgs['distinguish'] = 'true'
+
+ updateWidgets('line', null, { distinguish: distinguish })
+ )
+ @main.inject(mk('br'))
+ @main.inject(chk)
+ label = document.createElement('label')
+ label.setAttribute("for", id)
+ label.setAttribute("title", "Check this box to distinguish between sub-categories in this chart")
+ chk.setAttribute("title", "Check this box to distinguish between sub-categories in this chart")
+ label.style.paddingLeft = '5px'
+ label.appendChild(document.createTextNode('Toggle category breakdown'))
+ @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>.