Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
020277c0
Commit
020277c0
authored
Feb 05, 2016
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style(panel): fix intendention issue
parent
f8b3c0a6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
37 deletions
+37
-37
public/app/features/panel/metrics_panel_ctrl.ts
+37
-37
No files found.
public/app/features/panel/metrics_panel_ctrl.ts
View file @
020277c0
...
...
@@ -111,49 +111,49 @@ class MetricsPanelCtrl extends PanelCtrl {
var
panelInterval
=
this
.
panel
.
interval
;
var
datasourceInterval
=
(
this
.
datasource
||
{}).
interval
;
this
.
interval
=
kbn
.
calculateInterval
(
this
.
range
,
this
.
resolution
,
panelInterval
||
datasourceInterval
);
};
applyPanelTimeOverrides
()
{
this
.
timeInfo
=
''
;
// check panel time overrrides
if
(
this
.
panel
.
timeFrom
)
{
var
timeFromInfo
=
rangeUtil
.
describeTextRange
(
this
.
panel
.
timeFrom
);
if
(
timeFromInfo
.
invalid
)
{
this
.
timeInfo
=
'invalid time override'
;
return
;
}
this
.
interval
=
kbn
.
calculateInterval
(
this
.
range
,
this
.
resolution
,
panelInterval
||
datasourceInterval
);
};
applyPanelTimeOverrides
()
{
this
.
timeInfo
=
''
;
// check panel time overrrides
if
(
this
.
panel
.
timeFrom
)
{
var
timeFromInfo
=
rangeUtil
.
describeTextRange
(
this
.
panel
.
timeFrom
);
if
(
timeFromInfo
.
invalid
)
{
this
.
timeInfo
=
'invalid time override'
;
return
;
}
if
(
_
.
isString
(
this
.
rangeRaw
.
from
))
{
var
timeFromDate
=
dateMath
.
parse
(
timeFromInfo
.
from
);
this
.
timeInfo
=
timeFromInfo
.
display
;
this
.
rangeRaw
.
from
=
timeFromInfo
.
from
;
this
.
rangeRaw
.
to
=
timeFromInfo
.
to
;
this
.
range
.
from
=
timeFromDate
;
this
.
range
.
to
=
dateMath
.
parse
(
timeFromInfo
.
to
);
}
if
(
_
.
isString
(
this
.
rangeRaw
.
from
))
{
var
timeFromDate
=
dateMath
.
parse
(
timeFromInfo
.
from
);
this
.
timeInfo
=
timeFromInfo
.
display
;
this
.
rangeRaw
.
from
=
timeFromInfo
.
from
;
this
.
rangeRaw
.
to
=
timeFromInfo
.
to
;
this
.
range
.
from
=
timeFromDate
;
this
.
range
.
to
=
dateMath
.
parse
(
timeFromInfo
.
to
);
}
}
if
(
this
.
panel
.
timeShift
)
{
var
timeShiftInfo
=
rangeUtil
.
describeTextRange
(
this
.
panel
.
timeShift
);
if
(
timeShiftInfo
.
invalid
)
{
this
.
timeInfo
=
'invalid timeshift'
;
return
;
}
if
(
this
.
panel
.
timeShift
)
{
var
timeShiftInfo
=
rangeUtil
.
describeTextRange
(
this
.
panel
.
timeShift
);
if
(
timeShiftInfo
.
invalid
)
{
this
.
timeInfo
=
'invalid timeshift'
;
return
;
}
var
timeShift
=
'-'
+
this
.
panel
.
timeShift
;
this
.
timeInfo
+=
' timeshift '
+
timeShift
;
this
.
range
.
from
=
dateMath
.
parseDateMath
(
timeShift
,
this
.
range
.
from
,
false
);
this
.
range
.
to
=
dateMath
.
parseDateMath
(
timeShift
,
this
.
range
.
to
,
true
);
var
timeShift
=
'-'
+
this
.
panel
.
timeShift
;
this
.
timeInfo
+=
' timeshift '
+
timeShift
;
this
.
range
.
from
=
dateMath
.
parseDateMath
(
timeShift
,
this
.
range
.
from
,
false
);
this
.
range
.
to
=
dateMath
.
parseDateMath
(
timeShift
,
this
.
range
.
to
,
true
);
this
.
rangeRaw
=
this
.
range
;
}
this
.
rangeRaw
=
this
.
range
;
}
if
(
this
.
panel
.
hideTimeOverride
)
{
this
.
timeInfo
=
''
;
}
};
if
(
this
.
panel
.
hideTimeOverride
)
{
this
.
timeInfo
=
''
;
}
};
issueQueries
(
datasource
)
{
this
.
updateTimeRange
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment