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
ad9b2ab6
Commit
ad9b2ab6
authored
Feb 29, 2016
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(impressionStorage): use title instead of slut
closes #4194
parent
df8e56dd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
12 deletions
+15
-12
public/app/features/dashboard/all.js
+1
-1
public/app/features/dashboard/dashboardLoaderSrv.js
+2
-2
public/app/features/dashboard/impression_store.ts
+9
-6
public/app/plugins/panel/dashlist/module.ts
+3
-3
No files found.
public/app/features/dashboard/all.js
View file @
ad9b2ab6
...
...
@@ -16,5 +16,5 @@ define([
'./graphiteImportCtrl'
,
'./dynamicDashboardSrv'
,
'./importCtrl'
,
'./impression
S
tore'
,
'./impression
_s
tore'
,
],
function
()
{});
public/app/features/dashboard/dashboardLoaderSrv.js
View file @
ad9b2ab6
...
...
@@ -5,7 +5,7 @@ define([
'jquery'
,
'app/core/utils/kbn'
,
'app/core/utils/datemath'
,
'./impression
S
tore'
,
'./impression
_s
tore'
,
],
function
(
angular
,
moment
,
_
,
$
,
kbn
,
dateMath
,
impressionStore
)
{
'use strict'
;
...
...
@@ -41,7 +41,7 @@ function (angular, moment, _, $, kbn, dateMath, impressionStore) {
}
promise
.
then
(
function
(
result
)
{
impressionStore
.
impressions
.
addDashboardImpression
(
slug
);
impressionStore
.
impressions
.
addDashboardImpression
(
result
);
return
result
;
});
...
...
public/app/features/dashboard/impression
S
tore.ts
→
public/app/features/dashboard/impression
_s
tore.ts
View file @
ad9b2ab6
...
...
@@ -6,7 +6,8 @@ import _ from 'lodash';
export
class
ImpressionsStore
{
constructor
()
{}
addDashboardImpression
(
slug
)
{
addDashboardImpression
(
impression
)
{
console
.
log
(
impression
);
var
impressions
=
[];
if
(
store
.
exists
(
"dashboard_impressions"
))
{
impressions
=
JSON
.
parse
(
store
.
get
(
"dashboard_impressions"
));
...
...
@@ -15,12 +16,14 @@ export class ImpressionsStore {
}
}
var
exists
=
impressions
.
indexOf
(
slug
);
if
(
exists
>=
0
)
{
impressions
.
splice
(
exists
,
1
);
}
impressions
=
impressions
.
filter
((
imp
)
=>
{
return
impression
.
meta
.
slug
!==
imp
.
slug
;
});
impressions
.
unshift
(
slug
);
impressions
.
unshift
({
title
:
impression
.
dashboard
.
title
,
slug
:
impression
.
meta
.
slug
});
if
(
impressions
.
length
>
20
)
{
impressions
.
shift
();
...
...
public/app/plugins/panel/dashlist/module.ts
View file @
ad9b2ab6
...
...
@@ -3,7 +3,7 @@
import
_
from
'lodash'
;
import
config
from
'app/core/config'
;
import
{
PanelCtrl
}
from
'app/plugins/sdk'
;
import
{
impressions
}
from
'app/features/dashboard/impression
S
tore'
;
import
{
impressions
}
from
'app/features/dashboard/impression
_s
tore'
;
// Set and populate defaults
var
panelDefaults
=
{
...
...
@@ -45,8 +45,8 @@ class DashListCtrl extends PanelCtrl {
if
(
this
.
panel
.
mode
===
'last viewed'
)
{
var
dashListNames
=
_
.
first
(
impressions
.
getDashboardOpened
(),
this
.
panel
.
limit
).
map
((
dashboard
)
=>
{
return
{
title
:
dashboard
,
uri
:
'db/'
+
dashboard
title
:
dashboard
.
title
,
uri
:
'db/'
+
dashboard
.
slug
};
});
...
...
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