Skip to content

Commit

Permalink
Merge pull request #102 from rashidkpc/master
Browse files Browse the repository at this point in the history
Moment.js + new color scheme. NOTE: INDEX STRING FORMAT HAS CHANGED
  • Loading branch information
Rashid Khan committed May 22, 2013
2 parents 3c361f9 + 443d608 commit 6efd85b
Show file tree
Hide file tree
Showing 17 changed files with 7,208 additions and 114 deletions.
7,069 changes: 7,069 additions & 0 deletions common/css/bootstrap.dark.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion common/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
}

.odd {
background-color: #f9f9f9;
background-color: #3a3f44;
}

.nomargin {
Expand Down
Binary file modified common/img/load.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified common/img/load_big.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions common/lib/moment.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions common/lib/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ function add_to_query(original,field,value,negate) {
*/
function calculate_interval(from,to,size,user_interval) {
if(_.isObject(from))
from = from.getTime();
from = from.valueOf();
if(_.isObject(to))
to = to.getTime();
to = to.valueOf();
return user_interval == 0 ? round_interval((to - from)/size) : user_interval;
}

Expand Down
4 changes: 3 additions & 1 deletion config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/*
elasticsearch: URL to your elasticsearch server
elasticsearch: URL to your elasticsearch server. You almost certainly don't
want 'http://localhost:9200' here. Even if Kibana and ES are on
the same host
kibana_index: The default ES index to use for storing Kibana specific object
such as stored dashboards
modules: Panel modules to load. In the future these will be inferred
Expand Down
2 changes: 1 addition & 1 deletion dashboards/default
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
],
"timespan": "6h",
"timefield": "@timestamp",
"index": "\"logstash-\"yyyy.mm.dd",
"index": "[logstash-]YYYY.MM.DD",
"defaultindex": "NOINDEX",
"index_interval": "day",
"refresh": {
Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<title>Kibana 3</title>

<link rel="stylesheet" href="common/css/normalize.min.css">
<link rel="stylesheet" href="common/css/bootstrap.min.css">
<link rel="stylesheet" href="common/css/bootstrap.dark.min.css">
<link rel="stylesheet" href="common/css/animate.min.css">
<link rel="stylesheet" href="common/css/bootstrap-responsive.min.css">
<link rel="stylesheet" href="common/css/font-awesome.min.css">
Expand All @@ -37,7 +37,7 @@
<div class="navbar navbar-static-top">
<div class="navbar-inner">
<div class="container-fluid">
<p class="navbar-text pull-right"><small><strong>Kibana 3</strong> <small>milestone pre-2</small></small></p>
<p class="navbar-text pull-right"><small><strong>Kibana 3</strong> <small>milestone 2</small></small></p>
<span class="brand">{{dashboards.title}}</span>
<div class="brand"><i class='icon-edit pointer' ng-show='dashboards.editable' bs-modal="'partials/dasheditor.html'"></i></div>
</div>
Expand Down
4 changes: 1 addition & 3 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ var labjs = $LAB
.script("common/lib/angular-sanitize.min.js")
.script("common/lib/elastic.min.js")
.script("common/lib/elastic-angular-client.js")
.script("common/lib/dateformat.js")
.script("common/lib/date.js")
.script("common/lib/datepicker.js")
.script("common/lib/moment.js")
.script("common/lib/shared.js")
.script("common/lib/filesaver.js")
.script("js/services.js")
Expand Down
25 changes: 10 additions & 15 deletions panels/histogram/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,7 @@ angular.module('kibana.histogram', [])

$scope.set_time = function(time) {
$scope.time = time;
// Should I be storing the index on the panel? It causes errors if the index
// goes away. Hmmm.
$scope.index = time.index || $scope.index
// Only calculate interval if auto_int is set, otherwise don't touch it

$scope.index = time.index || $scope.index
$scope.get_data();
}

Expand Down Expand Up @@ -305,21 +301,21 @@ angular.module('kibana.histogram', [])
points: { show: scope.panel.points, fill: 1, fillColor: false, radius: 5},
shadowSize: 1
},
yaxis: { show: scope.panel['y-axis'], min: 0, color: "#000" },
yaxis: { show: scope.panel['y-axis'], min: 0, color: "#c8c8c8" },
xaxis: {
timezone: scope.panel.timezone,
show: scope.panel['x-axis'],
mode: "time",
timeformat: time_format(scope.panel.interval),
label: "Datetime",
color: "#000",
color: "#c8c8c8",
},
selection: {
mode: "x",
color: '#ccc'
},
grid: {
backgroundColor: '#fff',
backgroundColor: '#272b30',
borderWidth: 0,
borderColor: '#eee',
color: "#eee",
Expand Down Expand Up @@ -359,13 +355,12 @@ angular.module('kibana.histogram', [])
position: 'absolute',
top : y + 5,
left : x + 5,
color : "#000",
border : '1px solid #000',
color : "#c8c8c8",
padding : '10px',
'font-size': '11pt',
'font-weight' : 200,
'background-color': '#FFF',
'border-radius': '10px',
'background-color': '#1f1f1f',
'border-radius': '5px',
}).appendTo("body");
}

Expand All @@ -374,15 +369,15 @@ angular.module('kibana.histogram', [])
tt(pos.pageX, pos.pageY,
"<div style='vertical-align:middle;display:inline-block;background:"+item.series.color+";height:15px;width:15px;border-radius:10px;'></div> "+
item.datapoint[1].toFixed(0) + " @ " +
new Date(item.datapoint[0]).format('mm/dd HH:MM:ss'));
moment(item.datapoint[0]).format('MM/DD HH:mm:ss'));
} else {
$("#pie-tooltip").remove();
}
});

elem.bind("plotselected", function (event, ranges) {
scope.time.from = new Date(ranges.xaxis.from);
scope.time.to = new Date(ranges.xaxis.to)
scope.time.from = moment(ranges.xaxis.from);
scope.time.to = moment(ranges.xaxis.to)
eventBus.broadcast(scope.$id,scope.panel.group,'set_time',scope.time)
});
}
Expand Down
Loading

0 comments on commit 6efd85b

Please sign in to comment.