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
baeec495
Commit
baeec495
authored
Feb 06, 2019
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some remaining issues
parent
961695a6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
4 deletions
+24
-4
public/app/core/components/AlertBox/AlertBox.tsx
+2
-1
public/app/features/dashboard/containers/DashboardPage.test.tsx
+20
-0
public/app/features/dashboard/containers/DashboardPage.tsx
+1
-2
public/app/features/dashboard/services/DashboardSrv.ts
+1
-1
No files found.
public/app/core/components/AlertBox/AlertBox.tsx
View file @
baeec495
...
...
@@ -17,7 +17,8 @@ function getIconFromSeverity(severity: AppNotificationSeverity): string {
case
AppNotificationSeverity
.
Success
:
{
return
'fa fa-check'
;
}
default
:
return
null
;
default
:
return
null
;
}
}
...
...
public/app/features/dashboard/containers/DashboardPage.test.tsx
View file @
baeec495
...
...
@@ -210,4 +210,24 @@ describe('DashboardPage', () => {
expect
(
ctx
.
dashboard
.
panels
[
0
].
type
).
toBe
(
'add-panel'
);
});
});
dashboardPageScenario
(
"Given panel with id 0"
,
(
ctx
)
=>
{
ctx
.
setup
(()
=>
{
ctx
.
mount
();
ctx
.
setDashboardProp
({
panels
:
[{
id
:
0
,
type
:
'graph'
}],
schemaVersion
:
17
,
});
ctx
.
wrapper
.
setProps
({
urlEdit
:
true
,
urlFullscreen
:
true
,
urlPanelId
:
'0'
});
});
it
(
'Should go into edit mode'
,
()
=>
{
expect
(
ctx
.
wrapper
.
state
().
isEditing
).
toBe
(
true
);
expect
(
ctx
.
wrapper
.
state
().
fullscreenPanel
.
id
).
toBe
(
0
);
});
});
});
public/app/features/dashboard/containers/DashboardPage.tsx
View file @
baeec495
...
...
@@ -90,7 +90,6 @@ export class DashboardPage extends PureComponent<Props, State> {
}
componentWillUnmount
()
{
console
.
log
(
'unmount'
,
this
.
props
.
cleanUpDashboard
);
if
(
this
.
props
.
dashboard
)
{
this
.
props
.
cleanUpDashboard
();
}
...
...
@@ -118,7 +117,7 @@ export class DashboardPage extends PureComponent<Props, State> {
// Sync url state with model
if
(
urlFullscreen
!==
dashboard
.
meta
.
fullscreen
||
urlEdit
!==
dashboard
.
meta
.
isEditing
)
{
if
(
urlPanelId
)
{
if
(
!
isNaN
(
parseInt
(
urlPanelId
,
10
))
)
{
this
.
onEnterFullscreen
();
}
else
{
this
.
onLeaveFullscreen
();
...
...
public/app/features/dashboard/services/DashboardSrv.ts
View file @
baeec495
...
...
@@ -60,7 +60,7 @@ export class DashboardSrv {
delete
urlParams
.
edit
;
}
if
(
options
.
panelId
)
{
if
(
options
.
panelId
!==
undefined
)
{
urlParams
.
panelId
=
options
.
panelId
;
}
else
{
delete
urlParams
.
panelId
;
...
...
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