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
f695975f
Commit
f695975f
authored
Feb 04, 2019
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed handling of orgId
parent
7634e042
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
4 deletions
+10
-4
public/app/core/config.ts
+1
-1
public/app/features/dashboard/services/DashboardSrv.ts
+1
-0
public/app/features/dashboard/state/initDashboard.ts
+7
-1
public/app/features/templating/specs/variable_srv_init.test.ts
+0
-1
public/app/types/user.ts
+1
-1
No files found.
public/app/core/config.ts
View file @
f695975f
...
@@ -68,5 +68,5 @@ const bootData = (window as any).grafanaBootData || {
...
@@ -68,5 +68,5 @@ const bootData = (window as any).grafanaBootData || {
const
options
=
bootData
.
settings
;
const
options
=
bootData
.
settings
;
options
.
bootData
=
bootData
;
options
.
bootData
=
bootData
;
const
config
=
new
Settings
(
options
);
export
const
config
=
new
Settings
(
options
);
export
default
config
;
export
default
config
;
public/app/features/dashboard/services/DashboardSrv.ts
View file @
f695975f
...
@@ -9,6 +9,7 @@ export class DashboardSrv {
...
@@ -9,6 +9,7 @@ export class DashboardSrv {
/** @ngInject */
/** @ngInject */
constructor
(
private
backendSrv
,
private
$rootScope
,
private
$location
)
{
constructor
(
private
backendSrv
,
private
$rootScope
,
private
$location
)
{
appEvents
.
on
(
'save-dashboard'
,
this
.
saveDashboard
.
bind
(
this
),
$rootScope
);
appEvents
.
on
(
'save-dashboard'
,
this
.
saveDashboard
.
bind
(
this
),
$rootScope
);
appEvents
.
on
(
'save-dashboard'
,
this
.
saveDashboard
.
bind
(
this
),
$rootScope
);
}
}
create
(
dashboard
,
meta
)
{
create
(
dashboard
,
meta
)
{
...
...
public/app/features/dashboard/state/initDashboard.ts
View file @
f695975f
...
@@ -6,6 +6,7 @@ import { TimeSrv } from 'app/features/dashboard/services/TimeSrv';
...
@@ -6,6 +6,7 @@ import { TimeSrv } from 'app/features/dashboard/services/TimeSrv';
import
{
AnnotationsSrv
}
from
'app/features/annotations/annotations_srv'
;
import
{
AnnotationsSrv
}
from
'app/features/annotations/annotations_srv'
;
import
{
VariableSrv
}
from
'app/features/templating/variable_srv'
;
import
{
VariableSrv
}
from
'app/features/templating/variable_srv'
;
import
{
KeybindingSrv
}
from
'app/core/services/keybindingSrv'
;
import
{
KeybindingSrv
}
from
'app/core/services/keybindingSrv'
;
import
{
config
}
from
'app/core/config'
;
// Actions
// Actions
import
{
updateLocation
}
from
'app/core/actions'
;
import
{
updateLocation
}
from
'app/core/actions'
;
...
@@ -88,7 +89,7 @@ export function initDashboard({
...
@@ -88,7 +89,7 @@ export function initDashboard({
if
(
dashboardUrl
!==
currentPath
)
{
if
(
dashboardUrl
!==
currentPath
)
{
// replace url to not create additional history items and then return so that initDashboard below isn't executed multiple times.
// replace url to not create additional history items and then return so that initDashboard below isn't executed multiple times.
dispatch
(
updateLocation
({
path
:
dashboardUrl
,
partial
:
true
,
replace
:
true
}));
dispatch
(
updateLocation
({
path
:
dashboardUrl
,
partial
:
true
,
replace
:
true
}));
return
;
return
;
}
}
break
;
break
;
...
@@ -117,6 +118,11 @@ export function initDashboard({
...
@@ -117,6 +118,11 @@ export function initDashboard({
return
;
return
;
}
}
// add missing orgId query param
if
(
!
getState
().
location
.
query
.
orgId
)
{
dispatch
(
updateLocation
({
query
:
{
orgId
:
config
.
bootData
.
user
.
orgId
},
partial
:
true
,
replace
:
true
}));
}
// init services
// init services
const
timeSrv
:
TimeSrv
=
$injector
.
get
(
'timeSrv'
);
const
timeSrv
:
TimeSrv
=
$injector
.
get
(
'timeSrv'
);
const
annotationsSrv
:
AnnotationsSrv
=
$injector
.
get
(
'annotationsSrv'
);
const
annotationsSrv
:
AnnotationsSrv
=
$injector
.
get
(
'annotationsSrv'
);
...
...
public/app/features/templating/specs/variable_srv_init.test.ts
View file @
f695975f
...
@@ -25,7 +25,6 @@ describe('VariableSrv init', function(this: any) {
...
@@ -25,7 +25,6 @@ describe('VariableSrv init', function(this: any) {
};
};
const
$injector
=
{}
as
any
;
const
$injector
=
{}
as
any
;
let
ctx
=
{}
as
any
;
let
ctx
=
{}
as
any
;
function
describeInitScenario
(
desc
,
fn
)
{
function
describeInitScenario
(
desc
,
fn
)
{
...
...
public/app/types/user.ts
View file @
f695975f
import
{
DashboardSearchHit
}
from
'./search'
;
import
{
DashboardSearchHit
}
from
'./search'
;
export
interface
OrgUser
{
export
interface
OrgUser
{
avatarUrl
:
string
;
avatarUrl
:
string
;
...
...
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