diff --git a/index.html b/index.html
index c9866d8befe..ce4cae0a61d 100644
--- a/index.html
+++ b/index.html
@@ -1,24 +1,47 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
- Kibana 3
+ Kibana 3
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{alert.title}} {{$index + 1}} alert(s)
+
+
+
+
+
Kibana 3 milestone 2
+
{{dashboards.title}}
+
+
+
+
+
+
@@ -27,26 +50,4 @@
-
-
-
-
-
-
{{alert.title}} {{$index + 1}} alert(s)
-
-
-
-
-
Kibana 3 milestone 2
-
{{dashboards.title}}
-
-
-
-
-
-
diff --git a/panels/trends/editor.html b/panels/trends/editor.html
index 092f909b20c..4c104257da2 100644
--- a/panels/trends/editor.html
+++ b/panels/trends/editor.html
@@ -15,7 +15,7 @@
-
+
@@ -52,10 +52,7 @@
-
diff --git a/panels/trends/module.js b/panels/trends/module.js
index 83cbb71716d..eb05da0b942 100644
--- a/panels/trends/module.js
+++ b/panels/trends/module.js
@@ -147,7 +147,8 @@ angular.module('kibana.trends', [])
$scope.hits.new += n;
$scope.hits.old += o;
- var percent = Math.round(percentage(hits.old,hits.new)*100)/100
+ var percent = percentage(hits.old,hits.new) == null ?
+ '?' : Math.round(percentage(hits.old,hits.new)*100)/100
// Create series
$scope.data[i] = {
label: $scope.panel.query[i].label || "query"+(parseInt(i)+1),
@@ -155,7 +156,7 @@ angular.module('kibana.trends', [])
new : hits.new,
old : hits.old
},
- percent: _.isNull(percent) ? 0 : percent
+ percent: percent
};
i++;
@@ -171,7 +172,7 @@ angular.module('kibana.trends', [])
}
function percentage(x,y) {
- return 100*(y-x)/x
+ return x == 0 ? null : 100*(y-x)/x
}
$scope.remove_query = function(q) {