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
440ea666
Commit
440ea666
authored
Sep 24, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more work on share panel, #864
parent
6f1a6d5a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
66 additions
and
11 deletions
+66
-11
src/app/controllers/all.js
+1
-0
src/app/controllers/sharePanelCtrl.js
+42
-0
src/app/controllers/submenuCtrl.js
+1
-2
src/app/partials/share-panel.html
+13
-2
src/css/less/grafana.less
+9
-1
src/css/less/overrides.less
+0
-6
No files found.
src/app/controllers/all.js
View file @
440ea666
...
...
@@ -15,5 +15,6 @@ define([
'./opentsdbTargetCtrl'
,
'./annotationsEditorCtrl'
,
'./templateEditorCtrl'
,
'./sharePanelCtrl'
,
'./jsonEditorCtrl'
,
],
function
()
{});
src/app/controllers/sharePanelCtrl.js
0 → 100644
View file @
440ea666
define
([
'angular'
,
'lodash'
],
function
(
angular
,
_
)
{
'use strict'
;
var
module
=
angular
.
module
(
'grafana.controllers'
);
module
.
controller
(
'SharePanelCtrl'
,
function
(
$scope
,
$location
,
$timeout
,
timeSrv
,
$element
)
{
$scope
.
init
=
function
()
{
$scope
.
editor
=
{
index
:
0
};
var
currentUrl
=
$location
.
absUrl
();
var
panelId
=
$scope
.
panel
.
id
;
var
range
=
timeSrv
.
timeRange
(
false
);
var
from
=
range
.
from
;
var
to
=
range
.
to
;
if
(
_
.
isDate
(
from
))
{
from
=
from
.
getTime
();
}
if
(
_
.
isDate
(
to
))
{
to
=
to
.
getTime
();
}
$scope
.
shareUrl
=
currentUrl
+
"?panelId="
+
panelId
+
"&fullscreen"
;
$scope
.
shareUrl
+=
"&from="
+
from
;
$scope
.
shareUrl
+=
"&to="
+
to
;
$timeout
(
function
()
{
var
input
=
$element
.
find
(
'[data-share-panel-url]'
);
input
.
focus
();
input
.
select
();
});
};
$scope
.
init
();
});
});
src/app/controllers/submenuCtrl.js
View file @
440ea666
define
([
'angular'
,
'app'
,
'lodash'
],
function
(
angular
,
app
,
_
)
{
function
(
angular
,
_
)
{
'use strict'
;
var
module
=
angular
.
module
(
'grafana.controllers'
);
...
...
src/app/partials/share-panel.html
View file @
440ea666
...
...
@@ -7,7 +7,7 @@
</div>
<div
ng-model=
"editor.index"
bs-tabs
style=
"text-transform:capitalize;"
>
<div
ng-repeat=
"tab in ['Link', 'Embed
d
', 'Image']"
data-title=
"{{tab}}"
>
<div
ng-repeat=
"tab in ['Link', 'Embed', 'Image']"
data-title=
"{{tab}}"
>
</div>
</div>
...
...
@@ -16,7 +16,18 @@
<div
class=
"modal-body"
>
<div
class=
"editor-row"
>
<input
type=
"text"
class=
"input input-xxlarge"
></input>
<div
class=
"editor-option"
>
<label
class=
"small"
>
Current time range
</label>
<input
type=
"checkbox"
></input>
</div>
<div
class=
"editor-option"
>
<label
class=
"small"
>
To fullscreen panel
</label>
<input
type=
"checkbox"
></input>
</div>
</div>
<div
class=
"editor-row"
style=
"margin-top: 20px;"
>
<input
type=
"text"
data-share-panel-url
ng-model=
"shareUrl"
class=
"input input-fluid"
></input>
</div>
</div>
...
...
src/css/less/grafana.less
View file @
440ea666
...
...
@@ -53,8 +53,9 @@
}
.modal {
max-width:
1024
px;
max-width:
800
px;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
...
...
@@ -528,3 +529,10 @@ select.grafana-target-segment-input {
.grafana-tip {
padding-left: 5px;
}
input[type=text].input-fluid {
width: 100%;
box-sizing: border-box;
padding: 14px;
}
src/css/less/overrides.less
View file @
440ea666
...
...
@@ -562,12 +562,6 @@ div.flot-text {
background-color: darken(@purple, 10%);
}
.annotation-editor-table {
td {
white-space: nowrap;
}
}
// Top menu
.save-dashboard-dropdown {
padding: 10px;
...
...
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