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
c82bf7f6
Commit
c82bf7f6
authored
Sep 10, 2018
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: changing edit / view fullscreen modes now work
parent
df822a66
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
20 deletions
+26
-20
public/app/core/directives/dash_class.ts
+1
-0
public/app/features/dashboard/dashgrid/VizTypePicker.tsx
+8
-1
public/app/features/dashboard/view_state_srv.ts
+3
-13
public/sass/components/_scrollbar.scss
+5
-0
public/sass/components/_viz_editor.scss
+9
-6
No files found.
public/app/core/directives/dash_class.ts
View file @
c82bf7f6
...
@@ -6,6 +6,7 @@ function dashClass($timeout) {
...
@@ -6,6 +6,7 @@ function dashClass($timeout) {
return
{
return
{
link
:
(
$scope
,
elem
)
=>
{
link
:
(
$scope
,
elem
)
=>
{
$scope
.
ctrl
.
dashboard
.
events
.
on
(
'view-mode-changed'
,
panel
=>
{
$scope
.
ctrl
.
dashboard
.
events
.
on
(
'view-mode-changed'
,
panel
=>
{
console
.
log
(
'view-mode-changed'
,
panel
.
fullscreen
);
if
(
panel
.
fullscreen
)
{
if
(
panel
.
fullscreen
)
{
elem
.
addClass
(
'panel-in-fullscreen'
);
elem
.
addClass
(
'panel-in-fullscreen'
);
}
else
{
}
else
{
...
...
public/app/features/dashboard/dashgrid/VizTypePicker.tsx
View file @
c82bf7f6
...
@@ -2,6 +2,7 @@ import React, { PureComponent } from 'react';
...
@@ -2,6 +2,7 @@ import React, { PureComponent } from 'react';
import
classNames
from
'classnames'
;
import
classNames
from
'classnames'
;
import
config
from
'app/core/config'
;
import
config
from
'app/core/config'
;
import
{
PanelPlugin
}
from
'app/types/plugins'
;
import
{
PanelPlugin
}
from
'app/types/plugins'
;
import
CustomScrollbar
from
'app/core/components/CustomScrollbar/CustomScrollbar'
;
import
_
from
'lodash'
;
import
_
from
'lodash'
;
interface
Props
{
interface
Props
{
...
@@ -49,13 +50,19 @@ export class VizTypePicker extends PureComponent<Props, State> {
...
@@ -49,13 +50,19 @@ export class VizTypePicker extends PureComponent<Props, State> {
render
()
{
render
()
{
return
(
return
(
<
div
className=
"viz-picker"
>
<
div
className=
"viz-picker"
>
<
div
className=
"viz-picker__search"
>
<
div
className=
"gf-form gf-form--grow"
>
<
div
className=
"gf-form gf-form--grow"
>
<
label
className=
"gf-form--has-input-icon gf-form--grow"
>
<
label
className=
"gf-form--has-input-icon gf-form--grow"
>
<
input
type=
"text"
className=
"gf-form-input"
placeholder=
"Search type"
/>
<
input
type=
"text"
className=
"gf-form-input"
placeholder=
"Search type"
/>
<
i
className=
"gf-form-input-icon fa fa-search"
/>
<
i
className=
"gf-form-input-icon fa fa-search"
/>
</
label
>
</
label
>
</
div
>
</
div
>
<
div
className=
"viz-picker-list"
>
{
this
.
state
.
pluginList
.
map
(
this
.
renderVizPlugin
)
}
</
div
>
</
div
>
<
div
className=
"viz-picker__items"
>
<
CustomScrollbar
>
<
div
className=
"scroll-margin-helper"
>
{
this
.
state
.
pluginList
.
map
(
this
.
renderVizPlugin
)
}
</
div
>
</
CustomScrollbar
>
</
div
>
</
div
>
</
div
>
);
);
}
}
...
...
public/app/features/dashboard/view_state_srv.ts
View file @
c82bf7f6
...
@@ -11,7 +11,6 @@ export class DashboardViewState {
...
@@ -11,7 +11,6 @@ export class DashboardViewState {
panelScopes
:
any
;
panelScopes
:
any
;
$scope
:
any
;
$scope
:
any
;
dashboard
:
DashboardModel
;
dashboard
:
DashboardModel
;
editStateChanged
:
any
;
fullscreenPanel
:
any
;
fullscreenPanel
:
any
;
oldTimeRange
:
any
;
oldTimeRange
:
any
;
...
@@ -72,9 +71,6 @@ export class DashboardViewState {
...
@@ -72,9 +71,6 @@ export class DashboardViewState {
}
}
}
}
// remember if editStateChanged
this
.
editStateChanged
=
(
state
.
edit
||
false
)
!==
(
this
.
state
.
edit
||
false
);
_
.
extend
(
this
.
state
,
state
);
_
.
extend
(
this
.
state
,
state
);
this
.
dashboard
.
meta
.
fullscreen
=
this
.
state
.
fullscreen
;
this
.
dashboard
.
meta
.
fullscreen
=
this
.
state
.
fullscreen
;
...
@@ -128,17 +124,11 @@ export class DashboardViewState {
...
@@ -128,17 +124,11 @@ export class DashboardViewState {
return
;
return
;
}
}
if
(
this
.
fullscreenPanel
)
{
// if already fullscreen
if
(
this
.
fullscreenPanel
===
panel
&&
this
.
editStateChanged
===
false
)
{
return
;
}
else
{
this
.
leaveFullscreen
();
}
}
if
(
!
panel
.
fullscreen
)
{
if
(
!
panel
.
fullscreen
)
{
this
.
enterFullscreen
(
panel
);
this
.
enterFullscreen
(
panel
);
}
else
{
// already in fullscreen view just update the view mode
this
.
dashboard
.
setViewMode
(
panel
,
this
.
state
.
fullscreen
,
this
.
state
.
edit
);
}
}
}
else
if
(
this
.
fullscreenPanel
)
{
}
else
if
(
this
.
fullscreenPanel
)
{
this
.
leaveFullscreen
();
this
.
leaveFullscreen
();
...
...
public/sass/components/_scrollbar.scss
View file @
c82bf7f6
...
@@ -307,6 +307,7 @@
...
@@ -307,6 +307,7 @@
.view
{
.view
{
display
:
flex
;
display
:
flex
;
flex-grow
:
1
;
flex-grow
:
1
;
flex-direction
:
column
;
}
}
.track-vertical
{
.track-vertical
{
...
@@ -337,3 +338,7 @@
...
@@ -337,3 +338,7 @@
border-radius
:
6px
;
border-radius
:
6px
;
}
}
}
}
.scroll-margin-helper
{
margin-right
:
12px
;
}
public/sass/components/_viz_editor.scss
View file @
c82bf7f6
...
@@ -19,12 +19,13 @@
...
@@ -19,12 +19,13 @@
height
:
100%
;
height
:
100%
;
}
}
.viz-picker
-list
{
.viz-picker
__search
{
padding-top
:
$spacer
;
flex-grow
:
0
;
display
:
flex
;
}
flex-direction
:
column
;
overflow
:
auto
;
.viz-picker__items
{
flex-grow
:
1
;
flex-grow
:
1
;
height
:
calc
(
100%
-
50px
);
}
}
.viz-picker__item
{
.viz-picker__item
{
...
@@ -41,13 +42,15 @@
...
@@ -41,13 +42,15 @@
display
:
flex
;
display
:
flex
;
flex-shrink
:
0
;
flex-shrink
:
0
;
border
:
1px
solid
transparent
;
border
:
1px
solid
transparent
;
@include
left-brand-border
;
&
:hover
{
&
:hover
{
background
:
$card-background-hover
;
background
:
$card-background-hover
;
}
}
&
--selected
{
&
--selected
{
border
:
1px
solid
$orange
;
// border: 1px solid $orange;
@include
left-brand-border-gradient
();
.viz-picker__item-name
{
.viz-picker__item-name
{
color
:
$text-color
;
color
:
$text-color
;
...
...
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