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
41fd0ed4
Commit
41fd0ed4
authored
Jan 19, 2016
by
utkarshcmu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/grafana/grafana
into snapshot-view
parents
bcb44b7b
6b85a6fd
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
39 additions
and
32 deletions
+39
-32
pkg/api/dashboard_snapshot.go
+1
-0
pkg/models/dashboard_snapshot.go
+1
-0
pkg/services/sqlstore/dashboard_snapshot.go
+1
-0
public/app/features/apps/edit_ctrl.ts
+2
-3
public/app/features/apps/partials/edit.html
+17
-17
public/app/features/dashboard/shareSnapshotCtrl.js
+1
-0
public/less/apps.less
+12
-12
public/less/simple-box.less
+4
-0
No files found.
pkg/api/dashboard_snapshot.go
View file @
41fd0ed4
...
...
@@ -36,6 +36,7 @@ func CreateDashboardSnapshot(c *middleware.Context, cmd m.CreateDashboardSnapsho
cmd
.
DeleteKey
=
util
.
GetRandomString
(
32
)
cmd
.
OrgId
=
c
.
OrgId
cmd
.
UserId
=
c
.
UserId
cmd
.
Name
=
c
.
Name
metrics
.
M_Api_Dashboard_Snapshot_Create
.
Inc
(
1
)
}
...
...
pkg/models/dashboard_snapshot.go
View file @
41fd0ed4
...
...
@@ -25,6 +25,7 @@ type DashboardSnapshot struct {
type
CreateDashboardSnapshotCommand
struct
{
Dashboard
map
[
string
]
interface
{}
`json:"dashboard" binding:"Required"`
Name
string
`json:"name" binding:"Required"`
Expires
int64
`json:"expires"`
// these are passed when storing an external snapshot ref
...
...
pkg/services/sqlstore/dashboard_snapshot.go
View file @
41fd0ed4
...
...
@@ -25,6 +25,7 @@ func CreateDashboardSnapshot(cmd *m.CreateDashboardSnapshotCommand) error {
}
snapshot
:=
&
m
.
DashboardSnapshot
{
Name
:
cmd
.
Name
,
Key
:
cmd
.
Key
,
DeleteKey
:
cmd
.
DeleteKey
,
OrgId
:
cmd
.
OrgId
,
...
...
public/app/features/apps/edit_ctrl.ts
View file @
41fd0ed4
...
...
@@ -7,10 +7,9 @@ export class AppEditCtrl {
appModel
:
any
;
/** @ngInject */
constructor
(
private
backendSrv
:
any
,
private
$routeParams
:
any
)
{}
init
()
{
constructor
(
private
backendSrv
:
any
,
private
$routeParams
:
any
)
{
this
.
appModel
=
{};
this
.
backendSrv
.
get
(
`/api/org/apps/
${
this
.
$routeParams
.
appId
}
/settings`
).
then
(
result
=>
{
this
.
appModel
=
result
;
});
...
...
public/app/features/apps/partials/edit.html
View file @
41fd0ed4
...
...
@@ -5,37 +5,38 @@
</navbar>
<div
class=
"page-container"
>
<div
class=
"
apps-side-box
"
>
<div
class=
"
apps-side-box-logo"
>
<div
class=
"
flex-container
"
>
<div
class=
"
flex-column app-edit-logo-box"
>
<img
src=
"{{ctrl.appModel.info.logos.large}}"
>
</div>
<ul
class=
"app-side-box-links"
>
<li>
By
<a
href=
"{{ctrl.appModel.info.author.url}}"
class=
"external-link"
target=
"_blank"
>
{{ctrl.appModel.info.author.name}}
</a>
</li>
<li
ng-repeat=
"link in ctrl.appModel.info.links"
>
<a
href=
"{{link.url}}"
class=
"external-link"
target=
"_blank"
>
{{link.name}}
</a>
</li>
</ul>
</div>
<div
class=
"page-wide-margined"
ng-init=
"ctrl.init()"
>
<div
class=
"flex-column"
>
<h1>
{{ctrl.appModel.name}}
</h1>
<em
>
<div
class=
"app-edit-description"
>
{{ctrl.appModel.info.description}}
<br>
<span
style=
"small"
>
Version: {{ctrl.appModel.info.version}}
Updated: {{ctrl.appModel.info.updated}}
</span>
</em>
<br><br>
</div>
<div
class=
"form-inline"
>
<editor-checkbox
text=
"Enabled"
model=
"ctrl.appModel.enabled"
change=
"ctrl.toggleEnabled()"
></editor-checkbox>
<editor-checkbox
text=
"Pinned"
model=
"ctrl.appModel.pinned"
change=
"ctrl.togglePinned()"
></editor-checkbox>
</div>
</div>
<div
class=
"flex-column"
>
<ul
class=
"app-edit-links"
>
<li>
By
<a
href=
"{{ctrl.appModel.info.author.url}}"
class=
"external-link"
target=
"_blank"
>
{{ctrl.appModel.info.author.name}}
</a>
</li>
<li
ng-repeat=
"link in ctrl.appModel.info.links"
>
<a
href=
"{{link.url}}"
class=
"external-link"
target=
"_blank"
>
{{link.name}}
</a>
</li>
</ul>
</div>
</div>
<section
class=
"simple-box"
>
<h3
class=
"simple-box-header"
>
Included with app:
</h3>
...
...
@@ -99,5 +100,4 @@
</section>
</div>
</div>
public/app/features/dashboard/shareSnapshotCtrl.js
View file @
41fd0ed4
...
...
@@ -60,6 +60,7 @@ function (angular, _) {
var
cmdData
=
{
dashboard
:
dash
,
name
:
dash
.
title
,
expires
:
$scope
.
snapshot
.
expires
,
};
...
...
public/less/apps.less
View file @
41fd0ed4
.apps-side-box {
float: left;
}
.app
s-side-box-logo
{
padding: 1
5px
;
.app
-edit-logo-box
{
padding: 1
.2rem
;
background: @grafanaPanelBackground;
width: 120px;
text-align: center;
img {
max-width:
100px
;
max-width:
7rem
;
}
margin-
bottom: 10px
;
margin-
right: 2rem
;
}
.app-
side-box
-links {
.app-
edit
-links {
list-style: none;
margin: 0;
margin: 0
0 0 2rem
;
li {
background: @grafanaPanelBackground;
margin-top: 4px;
padding-left: 10px;
line-height: 25px;
padding: 0.2rem 1rem;
}
}
.app-edit-description {
font-style: italic;
margin-bottom: 1.5rem;
}
public/less/simple-box.less
View file @
41fd0ed4
...
...
@@ -44,3 +44,7 @@
.flex-container {
display: flex;
}
.flex-column {
flex-direction: row;
}
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