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:00:49 UTC
[kibble] branch master updated (fd32de1 -> 96f20cb)
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 fd32de1 force bar, lint
new d96506b really allow kpe
new 96f20cb 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/widget_linechart.coffee | 32 ++++++++++++++++----------------
ui/js/kibble.v1.js | 2 +-
2 files changed, 17 insertions(+), 17 deletions(-)
[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 96f20cbd8d4bc7572c7344d48aee73952cb5d075
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Fri Aug 3 16:00:41 2018 +0200
regen JS
---
ui/js/kibble.v1.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/js/kibble.v1.js b/ui/js/kibble.v1.js
index f7bfe90..df7a5a2 100644
--- a/ui/js/kibble.v1.js
+++ b/ui/js/kibble.v1.js
@@ -6029,7 +6029,7 @@ linechart = function(json, state) {
cats = new Array();
dates = new Array();
catdata = {};
- if (!isArray(json.timeseries) && !json.counts) {
+ if (!isArray(json.timeseries) && !(json.counts || json.phrases)) {
div.innerHTML = "No data available";
state.widget.inject(div, true);
return;
[kibble] 01/02: really allow kpe
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 d96506ba737a556b56dcb0043ddbed95e8f7efce
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Fri Aug 3 16:00:38 2018 +0200
really allow kpe
---
ui/js/coffee/widget_linechart.coffee | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/ui/js/coffee/widget_linechart.coffee b/ui/js/coffee/widget_linechart.coffee
index ab91a00..cfaccab 100644
--- a/ui/js/coffee/widget_linechart.coffee
+++ b/ui/js/coffee/widget_linechart.coffee
@@ -20,7 +20,7 @@ linechart = (json, state) ->
cats = new Array()
dates = new Array()
catdata = {}
- if not isArray(json.timeseries) and not json.counts
+ if not isArray(json.timeseries) and not (json.counts||json.phrases)
div.innerHTML = "No data available"
state.widget.inject(div, true)
return
@@ -31,11 +31,11 @@ linechart = (json, state) ->
if key != 'date' and not (key in cats)
cats.push(key)
catdata[key] = new Array()
-
+
for point in json.timeseries
m = moment(point.date*1000)
rv = m.format("MMM, YYYY")
-
+
if json.histogram == "daily" || json.interval == 'day'
rv = m.format("MMMM DD, YYYY")
if json.interval == 'year'
@@ -53,7 +53,7 @@ linechart = (json, state) ->
for cat in cats
if not cat in point
catdata[cat].push(0)
-
+
catseries = []
type = 'spline'
stack = false
@@ -76,24 +76,24 @@ linechart = (json, state) ->
stack = true
#if state.widget.args.representation
#type = state.widget.args.representation
-
+
if not state.widget.div.style.height
div.style.minHeight = "280px"
else
div.style.minHeight = "100%"
if state.widget.fullscreen
div.style.minHeight = "640px"
-
-
+
+
state.widget.inject(div, true)
-
-
+
+
range = ""
if state.widget.args.daterangeRaw
from = new Date(state.widget.args.daterangeRaw[0]*1000).toDateString()
to = new Date(state.widget.args.daterangeRaw[1]*1000).toDateString()
range = "between " + from + " and " + to
-
+
chartBox = new Chart(div, 'line', json, {title: range, stacked: stack, linetype: type, filled: filled})
if state.widget.args.source == 'git-evolution'
# Checkbox for lang breakdown
@@ -109,7 +109,7 @@ linechart = (json, state) ->
if this.checked
extended = 'true'
globArgs['extended'] = 'true'
-
+
updateWidgets('line', null, { extended: extended })
)
state.widget.inject(mk('br'))
@@ -121,7 +121,7 @@ linechart = (json, state) ->
label.style.paddingLeft = '5px'
label.appendChild(document.createTextNode('Toggle language breakdown'))
state.widget.inject(label)
-
+
# Checkbox for discounting markups/docs/build-files
if globArgs.extended
id = Math.floor(Math.random() * 987654321).toString(16)
@@ -136,7 +136,7 @@ linechart = (json, state) ->
if this.checked
codeonly = 'true'
globArgs['codeonly'] = 'true'
-
+
updateWidgets('line', null, { codeonly: codeonly })
)
state.widget.inject(chk)
@@ -147,7 +147,7 @@ linechart = (json, state) ->
label.style.paddingLeft = '5px'
label.appendChild(document.createTextNode('Only show programming languages'))
state.widget.inject(label)
-
+
if (not state.public) and json.interval
tName = 'interval'
list = document.createElement('select')
@@ -166,7 +166,7 @@ linechart = (json, state) ->
if (globArgs[tName] and globArgs[tName] == item) or json.interval == item
opt.selected = 'selected'
list.appendChild(opt)
-
+
list.addEventListener("change", () ->
source = this.value
if source == ""
@@ -175,5 +175,5 @@ linechart = (json, state) ->
globArgs[tName] = source
x = {}
x[tName] = source
- updateWidgets('line', null, x)
+ updateWidgets('line', null, x)
, false)