warble-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject [incubator-warble-server] 03/03: regen JS
Date Wed, 27 Jun 2018 22:51:06 GMT
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/incubator-warble-server.git

commit d89c91a6e5993a2f18e251dfd03e328fc445d13c
Author: Daniel Gruno <humbedooh@apache.org>
AuthorDate: Wed Jun 27 17:50:56 2018 -0500

    regen JS
---
 ui/js/warble.v1.js | 26 ++++++++++++++++++++------
 1 file changed, 20 insertions(+), 6 deletions(-)

diff --git a/ui/js/warble.v1.js b/ui/js/warble.v1.js
index 8b5d0bd..6835c8c 100644
--- a/ui/js/warble.v1.js
+++ b/ui/js/warble.v1.js
@@ -1,5 +1,5 @@
 // Generated by CoffeeScript 1.9.3
-var API, APIVERSION, Chart, HTML, Row, WarbleLogin, WarbleLoginCallback, Widget, aSourceTypes,
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, clientTypes, clientlist, cog, comShow, comstat, copyCSS, currentSources, dataTable,
datepicker, da [...]
+var API, APIVERSION, Chart, HTML, Row, WarbleLogin, WarbleLoginCallback, Widget, aSourceTypes,
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, clientTypes, clientlist, cog, comShow, comstat, copyCSS, currentSources, dataTable,
datepicker, da [...]
   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) {
@@ -4695,6 +4695,24 @@ savedNodeValue = function(json, state) {
   return app(obj, txt(state[state.type]));
 };
 
+nodeStatusSort = (function(_this) {
+  return function(a, b) {
+    if (a.enabled && !b.enabled) {
+      return -1;
+    }
+    if (b.enabled && !a.enabled) {
+      return 1;
+    }
+    if (a.verified && !b.verified) {
+      return -1;
+    }
+    if (b.verified && !a.verified) {
+      return 1;
+    }
+    return a.hostname.localeCompare(b.hostname);
+  };
+})(this);
+
 clientlist = function(json, state) {
   var banner, btn, card, d, hn, len, line, lline, lp, q, retval, rline, slist, source, sources,
vlist, vrf;
   slist = mk('div');
@@ -4702,11 +4720,7 @@ clientlist = function(json, state) {
   if (json.nodes) {
     sources = json.nodes;
     sources = sources.sort ? sources : [];
-    sources.sort((function(_this) {
-      return function(a, b) {
-        return a.id - b.id;
-      };
-    })(this));
+    sources.sort(nodeStatusSort);
     for (q = 0, len = sources.length; q < len; q++) {
       source = sources[q];
       card = new HTML('div', {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@warble.apache.org
For additional commands, e-mail: commits-help@warble.apache.org


Mime
View raw message