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
e8786b07
Commit
e8786b07
authored
Jan 12, 2016
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(playlist): renames timespan to interval
parent
d0bcd1d8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
13 additions
and
13 deletions
+13
-13
pkg/api/playlist.go
+1
-1
pkg/models/playlist.go
+4
-4
pkg/services/sqlstore/migrations/playlist_mig.go
+1
-1
pkg/services/sqlstore/playlist.go
+3
-3
public/app/features/dashboard/all.js
+0
-1
public/app/features/playlist/all.js
+1
-0
public/app/features/playlist/partials/playlist.html
+1
-1
public/app/features/playlist/playlistSrv.js
+2
-2
No files found.
pkg/api/playlist.go
View file @
e8786b07
...
...
@@ -60,7 +60,7 @@ func GetPlaylist(c *middleware.Context) Response {
dto
:=
&
m
.
PlaylistDTO
{
Id
:
cmd
.
Result
.
Id
,
Title
:
cmd
.
Result
.
Title
,
Timespan
:
cmd
.
Result
.
Timespan
,
Interval
:
cmd
.
Result
.
Interval
,
OrgId
:
cmd
.
Result
.
OrgId
,
Items
:
playlistDTOs
,
}
...
...
pkg/models/playlist.go
View file @
e8786b07
...
...
@@ -14,14 +14,14 @@ var (
type
Playlist
struct
{
Id
int64
`json:"id"`
Title
string
`json:"title"`
Timespan
string
`json:"timespan
"`
Interval
string
`json:"interval
"`
OrgId
int64
`json:"-"`
}
type
PlaylistDTO
struct
{
Id
int64
`json:"id"`
Title
string
`json:"title"`
Timespan
string
`json:"timespan
"`
Interval
string
`json:"interval
"`
OrgId
int64
`json:"-"`
Items
[]
PlaylistItemDTO
`json:"items"`
}
...
...
@@ -83,7 +83,7 @@ type UpdatePlaylistQuery struct {
Id
int64
Title
string
Type
string
Timespan
string
Interval
string
Items
[]
PlaylistItemDTO
Result
*
PlaylistDTO
...
...
@@ -92,7 +92,7 @@ type UpdatePlaylistQuery struct {
type
CreatePlaylistQuery
struct
{
Title
string
Type
string
Timespan
string
Interval
string
Data
[]
int64
OrgId
int64
Items
[]
PlaylistItemDTO
...
...
pkg/services/sqlstore/migrations/playlist_mig.go
View file @
e8786b07
...
...
@@ -8,7 +8,7 @@ func addPlaylistMigrations(mg *Migrator) {
Columns
:
[]
*
Column
{
{
Name
:
"id"
,
Type
:
DB_BigInt
,
IsPrimaryKey
:
true
,
IsAutoIncrement
:
true
},
{
Name
:
"title"
,
Type
:
DB_NVarchar
,
Length
:
255
,
Nullable
:
false
},
{
Name
:
"
timespan
"
,
Type
:
DB_NVarchar
,
Length
:
255
,
Nullable
:
false
},
{
Name
:
"
interval
"
,
Type
:
DB_NVarchar
,
Length
:
255
,
Nullable
:
false
},
{
Name
:
"org_id"
,
Type
:
DB_BigInt
,
Nullable
:
false
},
},
}
...
...
pkg/services/sqlstore/playlist.go
View file @
e8786b07
...
...
@@ -23,7 +23,7 @@ func CreatePlaylist(query *m.CreatePlaylistQuery) error {
playlist
:=
m
.
Playlist
{
Title
:
query
.
Title
,
Timespan
:
query
.
Timespan
,
Interval
:
query
.
Interval
,
OrgId
:
query
.
OrgId
,
}
...
...
@@ -54,7 +54,7 @@ func UpdatePlaylist(query *m.UpdatePlaylistQuery) error {
playlist
:=
m
.
Playlist
{
Id
:
query
.
Id
,
Title
:
query
.
Title
,
Timespan
:
query
.
Timespan
,
Interval
:
query
.
Interval
,
}
existingPlaylist
:=
x
.
Where
(
"id = ?"
,
query
.
Id
)
.
Find
(
m
.
Playlist
{})
...
...
@@ -67,7 +67,7 @@ func UpdatePlaylist(query *m.UpdatePlaylistQuery) error {
Id
:
playlist
.
Id
,
OrgId
:
playlist
.
OrgId
,
Title
:
playlist
.
Title
,
Timespan
:
playlist
.
Timespan
,
Interval
:
playlist
.
Interval
,
}
_
,
err
=
x
.
Id
(
query
.
Id
)
.
Cols
(
"id"
,
"title"
,
"timespan"
)
.
Update
(
&
playlist
)
...
...
public/app/features/dashboard/all.js
View file @
e8786b07
...
...
@@ -11,7 +11,6 @@ define([
'./dashboardSrv'
,
'./keybindings'
,
'./viewStateSrv'
,
'./playlistSrv'
,
'./timeSrv'
,
'./unsavedChangesSrv'
,
'./directives/dashSearchView'
,
...
...
public/app/features/playlist/all.js
View file @
e8786b07
define
([
'./playlists_ctrl'
,
'./playlistSrv'
,
'./playlist_edit_ctrl'
,
'./playlist_routes'
],
function
()
{});
public/app/features/playlist/partials/playlist.html
View file @
e8786b07
...
...
@@ -26,7 +26,7 @@
<strong>
Interval
</strong>
</li>
<li>
<input
type=
"text"
required
ng-model=
"playlist.
timespan
"
placeholder=
"5m"
class=
"input-xlarge tight-form-input"
>
<input
type=
"text"
required
ng-model=
"playlist.
interval
"
placeholder=
"5m"
class=
"input-xlarge tight-form-input"
>
</li>
</ul>
<div
class=
"clearfix"
></div>
...
...
public/app/features/playlist/playlistSrv.js
View file @
e8786b07
...
...
@@ -28,11 +28,11 @@ function (angular, _, kbn) {
self
.
next
();
};
this
.
start
=
function
(
dashboards
,
timespan
)
{
this
.
start
=
function
(
dashboards
,
interval
)
{
self
.
stop
();
self
.
index
=
0
;
self
.
interval
=
kbn
.
interval_to_ms
(
timespan
);
self
.
interval
=
kbn
.
interval_to_ms
(
interval
);
self
.
dashboards
=
dashboards
;
$rootScope
.
playlistSrv
=
this
;
...
...
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