Merge pull request #2090 from coreos-inc/broken-log-labels
Fix logs view for dates that start in zero
This commit is contained in:
commit
7a6443d377
1 changed files with 6 additions and 5 deletions
|
@ -1126,7 +1126,12 @@ LogUsageChart.prototype.buildData_ = function(aggregatedLogs) {
|
|||
var title = this.titleMap_[aggregated.kind] || aggregated.kind;
|
||||
var datetime = parseDate(aggregated.datetime);
|
||||
|
||||
var formatted = (datetime.getMonth() + 1) + '/' + datetime.getDate();
|
||||
var day = datetime.getDate();
|
||||
if (day < 10) {
|
||||
day = '0' + day;
|
||||
}
|
||||
|
||||
var formatted = (datetime.getMonth() + 1) + '/' + day;
|
||||
var justdate = new Date(datetime.getFullYear(), datetime.getMonth(), datetime.getDate());
|
||||
var key = title + '_' + formatted;
|
||||
var entry = {
|
||||
|
@ -1205,10 +1210,6 @@ LogUsageChart.prototype.buildData_ = function(aggregatedLogs) {
|
|||
* Renders the tooltip when hovering over an element in the chart.
|
||||
*/
|
||||
LogUsageChart.prototype.renderTooltip_ = function(d, e) {
|
||||
if (e[0] == '0') {
|
||||
e = e.substr(1);
|
||||
}
|
||||
|
||||
var key = d + '_' + e;
|
||||
var entry = this.entryMap_[key];
|
||||
if (!entry) {
|
||||
|
|
Reference in a new issue