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
de7856cf
Commit
de7856cf
authored
Jun 05, 2019
by
Torkel Ödegaard
Committed by
Marcus Efraimsson
Jun 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PluginConfig: Fixed plugin config page navigation when using subpath (#17364)
parent
02975256
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
public/app/features/plugins/PluginPage.tsx
+9
-5
No files found.
public/app/features/plugins/PluginPage.tsx
View file @
de7856cf
...
@@ -29,6 +29,7 @@ import { PluginHelp } from 'app/core/components/PluginHelp/PluginHelp';
...
@@ -29,6 +29,7 @@ import { PluginHelp } from 'app/core/components/PluginHelp/PluginHelp';
import
{
AppConfigCtrlWrapper
}
from
'./wrappers/AppConfigWrapper'
;
import
{
AppConfigCtrlWrapper
}
from
'./wrappers/AppConfigWrapper'
;
import
{
PluginDashboards
}
from
'./PluginDashboards'
;
import
{
PluginDashboards
}
from
'./PluginDashboards'
;
import
{
appEvents
}
from
'app/core/core'
;
import
{
appEvents
}
from
'app/core/core'
;
import
{
config
}
from
'app/core/config'
;
export
function
getLoadingNav
():
NavModel
{
export
function
getLoadingNav
():
NavModel
{
const
node
=
{
const
node
=
{
...
@@ -94,6 +95,8 @@ class PluginPage extends PureComponent<Props, State> {
...
@@ -94,6 +95,8 @@ class PluginPage extends PureComponent<Props, State> {
async
componentDidMount
()
{
async
componentDidMount
()
{
const
{
pluginId
,
path
,
query
}
=
this
.
props
;
const
{
pluginId
,
path
,
query
}
=
this
.
props
;
const
{
appSubUrl
}
=
config
;
const
plugin
=
await
loadPlugin
(
pluginId
);
const
plugin
=
await
loadPlugin
(
pluginId
);
if
(
!
plugin
)
{
if
(
!
plugin
)
{
this
.
setState
({
this
.
setState
({
...
@@ -102,15 +105,16 @@ class PluginPage extends PureComponent<Props, State> {
...
@@ -102,15 +105,16 @@ class PluginPage extends PureComponent<Props, State> {
});
});
return
;
// 404
return
;
// 404
}
}
const
{
meta
}
=
plugin
;
const
{
meta
}
=
plugin
;
let
defaultPage
:
string
;
let
defaultPage
:
string
;
const
pages
:
NavModelItem
[]
=
[];
const
pages
:
NavModelItem
[]
=
[];
if
(
true
)
{
if
(
true
)
{
pages
.
push
({
pages
.
push
({
text
:
'Readme'
,
text
:
'Readme'
,
icon
:
'fa fa-fw fa-file-text-o'
,
icon
:
'fa fa-fw fa-file-text-o'
,
url
:
path
+
'?page='
+
PAGE_ID_README
,
url
:
`
${
appSubUrl
}${
path
}
?page=
${
PAGE_ID_README
}
`
,
id
:
PAGE_ID_README
,
id
:
PAGE_ID_README
,
});
});
}
}
...
@@ -122,7 +126,7 @@ class PluginPage extends PureComponent<Props, State> {
...
@@ -122,7 +126,7 @@ class PluginPage extends PureComponent<Props, State> {
pages
.
push
({
pages
.
push
({
text
:
'Config'
,
text
:
'Config'
,
icon
:
'gicon gicon-cog'
,
icon
:
'gicon gicon-cog'
,
url
:
path
+
'?page='
+
PAGE_ID_CONFIG_CTRL
,
url
:
`
${
appSubUrl
}${
path
}
?page=
${
PAGE_ID_CONFIG_CTRL
}
`
,
id
:
PAGE_ID_CONFIG_CTRL
,
id
:
PAGE_ID_CONFIG_CTRL
,
});
});
defaultPage
=
PAGE_ID_CONFIG_CTRL
;
defaultPage
=
PAGE_ID_CONFIG_CTRL
;
...
@@ -147,7 +151,7 @@ class PluginPage extends PureComponent<Props, State> {
...
@@ -147,7 +151,7 @@ class PluginPage extends PureComponent<Props, State> {
pages
.
push
({
pages
.
push
({
text
:
'Dashboards'
,
text
:
'Dashboards'
,
icon
:
'gicon gicon-dashboard'
,
icon
:
'gicon gicon-dashboard'
,
url
:
path
+
'?page='
+
PAGE_ID_DASHBOARDS
,
url
:
`
${
appSubUrl
}${
path
}
?page=
${
PAGE_ID_DASHBOARDS
}
`
,
id
:
PAGE_ID_DASHBOARDS
,
id
:
PAGE_ID_DASHBOARDS
,
});
});
}
}
...
@@ -162,7 +166,7 @@ class PluginPage extends PureComponent<Props, State> {
...
@@ -162,7 +166,7 @@ class PluginPage extends PureComponent<Props, State> {
img
:
meta
.
info
.
logos
.
large
,
img
:
meta
.
info
.
logos
.
large
,
subTitle
:
meta
.
info
.
author
.
name
,
subTitle
:
meta
.
info
.
author
.
name
,
breadcrumbs
:
[{
title
:
'Plugins'
,
url
:
'/plugins'
}],
breadcrumbs
:
[{
title
:
'Plugins'
,
url
:
'/plugins'
}],
url
:
path
,
url
:
`
${
appSubUrl
}${
path
}
`
,
children
:
this
.
setActivePage
(
query
.
page
as
string
,
pages
,
defaultPage
),
children
:
this
.
setActivePage
(
query
.
page
as
string
,
pages
,
defaultPage
),
};
};
...
...
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