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
2a52d9bd
Commit
2a52d9bd
authored
Sep 18, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(timepicker2): more work on new timepicker
parent
5eefa361
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
55 additions
and
68 deletions
+55
-68
public/app/features/dashboard/timepicker/dropdown.html
+15
-10
public/app/features/dashboard/timepicker/timepicker.html
+9
-4
public/app/features/dashboard/timepicker/timepicker.ts
+9
-5
public/app/partials/dashboard.html
+1
-0
public/app/plugins/PLUGIN_CHANGES.md
+9
-0
public/less/tabs.less
+5
-4
public/less/timepicker.less
+5
-5
public/less/variables.dark.less
+1
-21
public/less/variables.light.less
+1
-19
No files found.
public/app/features/dashboard/timepicker/dropdown.html
View file @
2a52d9bd
<div
class=
"row pull-right"
>
<div
class=
"gf-timepicker-relative-section"
>
<h3>
Quick ranges
</h3>
<ul
ng-repeat=
"group in timeOptions"
>
<li
bindonce
ng-repeat=
'option in group'
ng-class=
"{active: option.active}"
>
<a
ng-click=
"ctrl.setRelativeFilter(option)"
bo-text=
"option.display"
></a>
</li>
</ul>
</div>
<div
class=
"gf-timepicker-absolute-section"
>
<h3>
Time range
</h3>
<label
class=
"small"
>
From:
</label>
...
...
@@ -31,8 +22,22 @@
</div>
<label
class=
"small"
>
Refreshing every:
</label>
<select
ng-model=
"dashboard.refresh"
class=
'input-large'
ng-options=
"f for f in ['5m','10m']"
></select>
<select
ng-model=
"currentRefresh"
class=
'input-large'
ng-options=
"f for f in refreshOptions"
></select>
<button
class=
"btn btn-inverse pull-right"
type=
"button"
ng-click=
"applyCustomTimeRange()"
>
Apply
</button>
</div>
<div
class=
"gf-timepicker-relative-section"
>
<h3>
Quick ranges
</h3>
<ul
ng-repeat=
"group in timeOptions"
>
<li
bindonce
ng-repeat=
'option in group'
ng-class=
"{active: option.active}"
>
<a
ng-click=
"ctrl.setRelativeFilter(option)"
bo-text=
"option.display"
></a>
</li>
</ul>
</div>
</div>
<div
class=
"clearfix"
></div>
...
...
public/app/features/dashboard/timepicker/timepicker.html
View file @
2a52d9bd
...
...
@@ -7,17 +7,22 @@
</li>
<li>
<a
class=
"timepicker-dropdown"
bs-tooltip=
"tooltip"
data-placement=
"bottom"
ng-click=
"ctrl.
loadTimeOptions
()"
>
<a
class=
"timepicker-dropdown"
bs-tooltip=
"tooltip"
data-placement=
"bottom"
ng-click=
"ctrl.
openDropdown
()"
>
<i
class=
"fa fa-clock-o"
></i>
<span
ng-bind=
"rangeString"
></span>
<i
class=
"fa fa-caret-down"
></i>
<span
ng-show=
"dashboard.refresh"
class=
"text-warning"
>
<i
class=
"fa fa-refresh"
></i>
refreshed every {{dashboard.refresh}}
</span>
</a>
</li>
<li
class=
"grafana-menu-refresh"
>
<li
class=
"grafana-menu-refresh"
ng-show=
"!dashboard.refresh"
>
<a
ng-click=
"timeSrv.refreshDashboard()"
>
<i
class=
"fa fa-refresh"
></i>
<span
ng-show=
"dashboard.refresh"
class=
"text-warning"
>
refreshed every {{dashboard.refresh}}
</span>
</a>
</li>
...
...
public/app/features/dashboard/timepicker/timepicker.ts
View file @
2a52d9bd
...
...
@@ -54,18 +54,22 @@ export class TimePickerCtrl {
this
.
$scope
.
dashboard
.
formatDate
(
time
.
to
,
format
);
}
this
.
$scope
.
timeRaw
=
timeRaw
;
this
.
$scope
.
absolute
=
{
form
:
time
.
from
.
toDate
(),
to
:
time
.
to
.
toDate
()};
this
.
$scope
.
timeRaw
=
timeRaw
;
this
.
$scope
.
tooltip
=
this
.
$scope
.
dashboard
.
formatDate
(
time
.
from
)
+
' <br>to<br>'
;
this
.
$scope
.
tooltip
+=
this
.
$scope
.
dashboard
.
formatDate
(
time
.
to
);
this
.
$scope
.
onAppEvent
(
'zoom-out'
,
function
()
{
this
.
$scope
.
zoom
(
2
);
});
this
.
$scope
.
tooltip
=
this
.
$scope
.
dashboard
.
formatDate
(
time
.
from
.
date
)
+
' <br>to<br>'
;
this
.
$scope
.
tooltip
+=
this
.
$scope
.
dashboard
.
formatDate
(
time
.
to
.
date
);
}
loadTimeOptions
()
{
openDropdown
()
{
this
.
$scope
.
timeOptions
=
rangeUtil
.
getRelativeTimesList
(
this
.
$scope
.
panel
,
this
.
$scope
.
rangeString
);
this
.
$scope
.
currentRefresh
=
this
.
$scope
.
dashboard
.
refresh
||
'off'
;
this
.
$scope
.
refreshOptions
=
this
.
$scope
.
panel
.
refresh_intervals
;
this
.
$scope
.
refreshOptions
.
unshift
(
'off'
);
this
.
$scope
.
appEvent
(
'show-dash-editor'
,
{
src
:
'app/features/dashboard/timepicker/dropdown.html'
,
scope
:
this
.
$scope
,
...
...
public/app/partials/dashboard.html
View file @
2a52d9bd
...
...
@@ -5,6 +5,7 @@
<div
dash-editor-view
></div>
<div
dash-search-view
></div>
<div
class=
"clearfix"
></div>
<div
ng-if=
"submenuEnabled"
ng-include=
"'app/partials/submenu.html'"
>
</div>
...
...
public/app/plugins/PLUGIN_CHANGES.md
0 → 100644
View file @
2a52d9bd
# Plugin API
## Changelog
2.
5 changed the
`range`
parameter in the
`datasource.query`
function's options parameter. This
parameter now holds a parsed range with
`moment`
dates
`form`
and
`to`
. To get
millisecond epoc from a
`moment`
you the function
`valueOf`
. The raw date range as represented
internally in grafana (which may be relative expressions like
`now-5h`
) is included in the
new property
`rangeRaw`
(on the options object).
public/less/tabs.less
View file @
2a52d9bd
...
...
@@ -30,10 +30,11 @@
background-color: #060606;
border-color: transparent;
}
}
.tab-content {
padding: 10px;
background-color: @grafanaPanelBackground;
.tab-content {
padding: 10px;
background-color: @grafanaPanelBackground;
}
}
public/less/timepicker.less
View file @
2a52d9bd
...
...
@@ -38,21 +38,21 @@ div.timepicker-now {
}
.gf-timepicker-dropdown {
margin:
15
px;
margin:
0
px;
padding: 10px 20px;
float: right;
background-color: @grafanaPanelBackground;
border: 1px solid @grafanaTargetFuncBackground
;
.box-shadow(@navbarDropdownShadow)
;
}
.gf-timepicker-absolute-section {
width: 300px;
float: left;
border-right: @grafanaTriggerBorder;
padding: 0 20px 0 20px;
}
.gf-timepicker-relative-section {
border-right: @grafanaTriggerBorder;
padding: 0 20px 0 20px;
min-height: 258px;
float: left;
...
...
@@ -60,8 +60,8 @@ div.timepicker-now {
float: left;
margin: 0 20px 10px 25px;
li.active {
border-
left
: 1px solid @blue;
padding: 2
px 0;
border-
bottom
: 1px solid @blue;
margin: 3
px 0;
}
}
}
...
...
public/less/variables.dark.less
View file @
2a52d9bd
...
...
@@ -48,7 +48,6 @@
@bodyBackground: rgb(22,22,22);
@textColor: @grayLighter;
// Links
// -------------------------
@linkColor: darken(@white,11%);
...
...
@@ -225,27 +224,8 @@
@navbarLinkColorActive: @navbarLinkColorHover;
@navbarLinkBackgroundHover: transparent;
@navbarLinkBackgroundActive: @navbarBackground;
@navbarBrandColor: @linkColor;
// Inverted navbar
@navbarInverseBackground: #252A30;
@navbarInverseBackgroundHighlight: #252A30;
@navbarInverseBorder: transparent;
@navbarInverseText: @grayLight;
@navbarInverseLinkColor: @grayLight;
@navbarInverseLinkColorHover: @white;
@navbarInverseLinkColorActive: @navbarInverseLinkColorHover;
@navbarInverseLinkBackgroundHover: #242A31;
@navbarInverseLinkBackgroundActive: @navbarInverseLinkBackgroundHover;
@navbarInverseSearchBackground: lighten(@navbarInverseBackground, 25%);
@navbarInverseSearchBackgroundFocus: @white;
@navbarInverseSearchBorder: @navbarInverseBackground;
@navbarInverseSearchPlaceholderColor: @white;
@navbarInverseBrandColor: @navbarInverseLinkColor;
@navbarDropdownShadow: inset 0px 4px 10px -4px @bodyBackground;
// Pagination
...
...
public/less/variables.light.less
View file @
2a52d9bd
...
...
@@ -238,28 +238,10 @@
@navbarLinkColorActive: #555;
@navbarLinkBackgroundHover: transparent;
@navbarLinkBackgroundActive: darken(@navbarBackground, 6.5%);
@navbarDropdownShadow: inset 0px 4px 10px -4px darken(@bodyBackground, 20%);
@navbarBrandColor: @navbarLinkColor;
// Inverted navbar
@navbarInverseBackground: @blue;
@navbarInverseBackgroundHighlight: @navbarInverseBackground;
@navbarInverseBorder: transparent;
@navbarInverseText: @white;
@navbarInverseLinkColor: @white;
@navbarInverseLinkColorHover: @white;
@navbarInverseLinkColorActive: @navbarInverseLinkColorHover;
@navbarInverseLinkBackgroundHover: rgba(0, 0, 0, 0.05);
@navbarInverseLinkBackgroundActive: @navbarInverseBackground;
@navbarInverseSearchBackground: lighten(@navbarInverseBackground, 25%);
@navbarInverseSearchBackgroundFocus: @white;
@navbarInverseSearchBorder: @navbarInverseBackground;
@navbarInverseSearchPlaceholderColor: @grayDark;
@navbarInverseBrandColor: @navbarInverseLinkColor;
// Pagination
// -------------------------
...
...
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