App Plugins: support react pages and tabs (#16586)

This commit is contained in:
Ryan McKinley
2019-05-02 10:15:39 -07:00
committed by GitHub
parent 31ea0122a0
commit 013f1b8d19
29 changed files with 1316 additions and 450 deletions

View File

@@ -22,6 +22,8 @@ import DataSourceSettingsPage from '../features/datasources/settings/DataSourceS
import OrgDetailsPage from '../features/org/OrgDetailsPage';
import SoloPanelPage from '../features/dashboard/containers/SoloPanelPage';
import DashboardPage from '../features/dashboard/containers/DashboardPage';
import PluginPage from '../features/plugins/PluginPage';
import AppRootPage from 'app/features/plugins/AppRootPage';
import config from 'app/core/config';
// Types
@@ -164,6 +166,14 @@ export function setupAngularRoutes($routeProvider, $locationProvider) {
component: () => import(/* webpackChunkName: "explore" */ 'app/features/explore/Wrapper'),
},
})
.when('/a/:pluginId/', {
// Someday * and will get a ReactRouter under that path!
template: '<react-container />',
reloadOnSearch: false,
resolve: {
component: () => AppRootPage,
},
})
.when('/org', {
template: '<react-container />',
resolve: {
@@ -301,10 +311,12 @@ export function setupAngularRoutes($routeProvider, $locationProvider) {
component: () => PluginListPage,
},
})
.when('/plugins/:pluginId/edit', {
templateUrl: 'public/app/features/plugins/partials/plugin_edit.html',
controller: 'PluginEditCtrl',
controllerAs: 'ctrl',
.when('/plugins/:pluginId/', {
template: '<react-container />',
reloadOnSearch: false, // tabs from query parameters
resolve: {
component: () => PluginPage,
},
})
.when('/plugins/:pluginId/page/:slug', {
templateUrl: 'public/app/features/plugins/partials/plugin_page.html',