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
21e5d61d
Unverified
Commit
21e5d61d
authored
Jul 17, 2018
by
David
Committed by
GitHub
Jul 17, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12631 from grafana/davkal/explore-url-encoding
Use url params for explore state
parents
5c6adbba
c6e9ffb1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
6 deletions
+5
-6
pkg/api/api.go
+1
-2
public/app/containers/Explore/Explore.tsx
+1
-1
public/app/core/services/keybindingSrv.ts
+1
-1
public/app/features/panel/metrics_panel_ctrl.ts
+1
-1
public/app/routes/routes.ts
+1
-1
No files found.
pkg/api/api.go
View file @
21e5d61d
...
...
@@ -73,8 +73,7 @@ func (hs *HTTPServer) registerRoutes() {
r
.
Get
(
"/dashboards/"
,
reqSignedIn
,
Index
)
r
.
Get
(
"/dashboards/*"
,
reqSignedIn
,
Index
)
r
.
Get
(
"/explore/"
,
reqEditorRole
,
Index
)
r
.
Get
(
"/explore/*"
,
reqEditorRole
,
Index
)
r
.
Get
(
"/explore"
,
reqEditorRole
,
Index
)
r
.
Get
(
"/playlists/"
,
reqSignedIn
,
Index
)
r
.
Get
(
"/playlists/*"
,
reqSignedIn
,
Index
)
...
...
public/app/containers/Explore/Explore.tsx
View file @
21e5d61d
...
...
@@ -72,7 +72,7 @@ export class Explore extends React.Component<any, IExploreState> {
constructor
(
props
)
{
super
(
props
);
const
{
datasource
,
queries
,
range
}
=
parseInitialState
(
props
.
routeParams
.
initial
);
const
{
datasource
,
queries
,
range
}
=
parseInitialState
(
props
.
routeParams
.
state
);
this
.
state
=
{
datasource
:
null
,
datasourceError
:
null
,
...
...
public/app/core/services/keybindingSrv.ts
View file @
21e5d61d
...
...
@@ -191,7 +191,7 @@ export class KeybindingSrv {
range
,
};
const
exploreState
=
encodePathComponent
(
JSON
.
stringify
(
state
));
this
.
$location
.
url
(
`/explore
/
${
exploreState
}
`
);
this
.
$location
.
url
(
`/explore
?state=
${
exploreState
}
`
);
}
}
});
...
...
public/app/features/panel/metrics_panel_ctrl.ts
View file @
21e5d61d
...
...
@@ -332,7 +332,7 @@ class MetricsPanelCtrl extends PanelCtrl {
range
,
};
const
exploreState
=
encodePathComponent
(
JSON
.
stringify
(
state
));
this
.
$location
.
url
(
`/explore
/
${
exploreState
}
`
);
this
.
$location
.
url
(
`/explore
?state=
${
exploreState
}
`
);
}
addQuery
(
target
)
{
...
...
public/app/routes/routes.ts
View file @
21e5d61d
...
...
@@ -112,7 +112,7 @@ export function setupAngularRoutes($routeProvider, $locationProvider) {
controller
:
'FolderDashboardsCtrl'
,
controllerAs
:
'ctrl'
,
})
.
when
(
'/explore
/:initial?
'
,
{
.
when
(
'/explore'
,
{
template
:
'<react-container />'
,
resolve
:
{
roles
:
()
=>
[
'Editor'
,
'Admin'
],
...
...
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