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/09/12 12:28:00 UTC
[kibble] 02/06: regen JS
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 7ba8a0d08c5cbcc6158afe8badca2f49fd6bc550
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Wed Sep 12 14:26:10 2018 +0200
regen JS
---
ui/js/kibble.v1.js | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 78 insertions(+), 3 deletions(-)
diff --git a/ui/js/kibble.v1.js b/ui/js/kibble.v1.js
index f20941e..32eb1a9 100644
--- a/ui/js/kibble.v1.js
+++ b/ui/js/kibble.v1.js
@@ -1,5 +1,5 @@
// 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 [...]
+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; };
signup = function(form) {
@@ -1587,7 +1587,7 @@ badModal = function(str) {
};
explorer = function(json, state) {
- var ID, chk, ezURL, h, id, item, label, len, len1, list, m, opt, org, q, ref, ref1, ref2, ref3, slen, u;
+ var ID, b, br, chk, ezURL, h, id, item, label, len, len1, list, m, opt, org, p, q, rb, ref, ref1, ref2, ref3, slen, u;
org = json.organisation;
h = document.createElement('h2');
if (json.tag) {
@@ -1734,7 +1734,38 @@ explorer = function(json, state) {
chk.setAttribute("title", "Check this box to authorships instead of committerships");
label.style.paddingLeft = '5px';
label.appendChild(document.createTextNode('Show authors'));
- return state.widget.inject(label);
+ state.widget.inject(label);
+ br = new HTML('br');
+ p = new HTML('input', {
+ id: 'pathfilter',
+ size: 32,
+ type: 'text',
+ value: globArgs.pathfilter,
+ onChange: 'pathFilterGlob = this.value;',
+ placeholder: 'optional path-filter'
+ });
+ state.widget.inject(br);
+ state.widget.inject(p);
+ b = new HTML('input', {
+ style: {
+ marginLeft: '10px'
+ },
+ "class": 'btn btn-small btn-success',
+ type: 'button',
+ onClick: 'pathFilter();',
+ value: "filter paths"
+ });
+ rb = new HTML('input', {
+ style: {
+ marginLeft: '10px'
+ },
+ "class": 'btn btn-small btn-danger',
+ type: 'button',
+ onClick: 'get("pathfilter").value = ""; pathFilter();',
+ value: "reset"
+ });
+ state.widget.inject(b);
+ return state.widget.inject(rb);
};
sourceexplorer = function(json, state) {
@@ -2491,6 +2522,50 @@ subFilter = function() {
});
};
+pathFilterGlob = null;
+
+pathFilter = function() {
+ var source, tName, x;
+ source = pathFilterGlob;
+ if (source === "") {
+ source = null;
+ }
+ tName = 'pathfilter';
+ globArgs[tName] = source;
+ x = {};
+ x[tName] = source;
+ updateWidgets('donut', null, x);
+ updateWidgets('gauge', null, x);
+ updateWidgets('line', null, x);
+ updateWidgets('contacts', null, x);
+ updateWidgets('top5', null, x);
+ updateWidgets('factors', null, x);
+ updateWidgets('trends', null, x);
+ updateWidgets('radar', null, x);
+ updateWidgets('widget', null, x);
+ updateWidgets('relationship', null, x);
+ updateWidgets('treemap', null, x);
+ updateWidgets('report', null, x);
+ updateWidgets('mvp', null, x);
+ updateWidgets('comstat', null, x);
+ updateWidgets('worldmap', null, x);
+ updateWidgets('jsondump', null, x);
+ return $("a").each(function() {
+ var m, url;
+ url = $(this).attr('href');
+ if (url) {
+ m = url.match(/^(.+\?page=[-a-z]+.*?)(?:&pathfilter=[^&]+)?(.*)$/);
+ if (m) {
+ if (source) {
+ return $(this).attr('href', m[1] + "&pathfilter=" + source + m[2]);
+ } else {
+ return $(this).attr('href', "" + m[1] + m[2]);
+ }
+ }
+ }
+ });
+};
+
viewexplorer = function(json, state) {
var ID, b, div, h, i, item, len, list, opt, org, q, rb, ref, source, tName;
org = json.organisation;