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
a96b522a
Unverified
Commit
a96b522a
authored
May 22, 2019
by
Torkel Ödegaard
Committed by
GitHub
May 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Search: changed how search filter on current folder works (#17219)
parent
cd9517c5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
26 deletions
+42
-26
public/app/features/dashboard/components/DashNav/DashNav.tsx
+21
-15
public/sass/components/_navbar.scss
+21
-11
No files found.
public/app/features/dashboard/components/DashNav/DashNav.tsx
View file @
a96b522a
...
...
@@ -60,17 +60,14 @@ export class DashNav extends PureComponent<Props> {
}
}
onOpenSearch
=
()
=>
{
const
{
dashboard
}
=
this
.
props
;
const
haveFolder
=
dashboard
.
meta
.
folderId
>
0
;
appEvents
.
emit
(
'show-dash-search'
,
haveFolder
?
{
query
:
'folder:current'
,
}
:
null
);
onDahboardNameClick
=
()
=>
{
appEvents
.
emit
(
'show-dash-search'
);
};
onFolderNameClick
=
()
=>
{
appEvents
.
emit
(
'show-dash-search'
,
{
query
:
'folder:current'
,
});
};
onClose
=
()
=>
{
...
...
@@ -148,11 +145,20 @@ export class DashNav extends PureComponent<Props> {
return
(
<>
<
div
>
<
a
className=
"navbar-page-btn"
onClick=
{
this
.
onOpenSearch
}
>
<
div
className=
"navbar-page-btn"
>
{
!
this
.
isInFullscreenOrSettings
&&
<
i
className=
"gicon gicon-dashboard"
/>
}
{
haveFolder
&&
<
span
className=
"navbar-page-btn--folder"
>
{
folderTitle
}
/
</
span
>
}
{
dashboard
.
title
}
<
i
className=
"fa fa-caret-down"
/>
</
a
>
{
haveFolder
&&
(
<>
<
a
className=
"navbar-page-btn__folder"
onClick=
{
this
.
onFolderNameClick
}
>
{
folderTitle
}
</
a
>
<
i
className=
"fa fa-chevron-right navbar-page-btn__folder-icon"
/>
</>
)
}
<
a
onClick=
{
this
.
onDahboardNameClick
}
>
{
dashboard
.
title
}
<
i
className=
"fa fa-caret-down navbar-page-btn__search"
/>
</
a
>
</
div
>
</
div
>
{
this
.
isSettings
&&
<
span
className=
"navbar-settings-title"
>
/ Settings
</
span
>
}
<
div
className=
"navbar__spacer"
/>
...
...
public/sass/components/_navbar.scss
View file @
a96b522a
...
...
@@ -67,11 +67,6 @@
min-height
:
$navbarHeight
;
line-height
:
$navbarHeight
;
.fa-caret-down
{
font-size
:
60%
;
padding-left
:
6px
;
}
.gicon
{
top
:
-2px
;
position
:
relative
;
...
...
@@ -85,17 +80,32 @@
display
:
inline-block
;
}
}
}
&
--
folder
{
color
:
$text-color-weak
;
display
:
none
;
.navbar-page-btn__
folder
{
color
:
$text-color-weak
;
display
:
none
;
@include
media-breakpoint-up
(
lg
)
{
display
:
inline-block
;
}
@include
media-breakpoint-up
(
lg
)
{
display
:
inline-block
;
}
}
// element is needed here to override font-awesome specificity
i
.navbar-page-btn__folder-icon
{
font-size
:
$font-size-sm
;
color
:
$text-color-weak
;
padding
:
0
$space-sm
;
position
:
relative
;
top
:
-1px
;
}
// element is needed here to override font-awesome specificity
i
.navbar-page-btn__search
{
font-size
:
$font-size-xs
;
padding
:
0
$space-xs
;
}
.navbar-buttons
{
// height: $navbarHeight;
display
:
flex
;
...
...
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