mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge branch '7883_new_url_structure' into 7883_frontend_step2
This commit is contained in:
@@ -13,13 +13,15 @@ function WrapInProvider(store, Component, props) {
|
||||
}
|
||||
|
||||
/** @ngInject */
|
||||
export function reactContainer($route, $location) {
|
||||
export function reactContainer($route, $location, backendSrv) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
template: '',
|
||||
link(scope, elem) {
|
||||
let component = $route.current.locals.component;
|
||||
let props = {};
|
||||
let props = {
|
||||
backendSrv: backendSrv,
|
||||
};
|
||||
|
||||
ReactDOM.render(WrapInProvider(store, component, props), elem[0]);
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@ import './dashboard_loaders';
|
||||
import './ReactContainer';
|
||||
import { ServerStats } from 'app/containers/ServerStats/ServerStats';
|
||||
import { AlertRuleList } from 'app/containers/AlertRuleList/AlertRuleList';
|
||||
import { FolderSettings } from 'app/containers/ManageDashboards/FolderSettings';
|
||||
import { FolderPermissions } from 'app/containers/ManageDashboards/FolderPermissions';
|
||||
|
||||
/** @ngInject **/
|
||||
export function setupAngularRoutes($routeProvider, $locationProvider) {
|
||||
@@ -59,6 +61,11 @@ export function setupAngularRoutes($routeProvider, $locationProvider) {
|
||||
controller: 'DataSourceEditCtrl',
|
||||
controllerAs: 'ctrl',
|
||||
})
|
||||
.when('/datasources/edit/:id/dashboards', {
|
||||
templateUrl: 'public/app/features/plugins/partials/ds_dashboards.html',
|
||||
controller: 'DataSourceDashboardsCtrl',
|
||||
controllerAs: 'ctrl',
|
||||
})
|
||||
.when('/datasources/new', {
|
||||
templateUrl: 'public/app/features/plugins/partials/ds_edit.html',
|
||||
controller: 'DataSourceEditCtrl',
|
||||
@@ -75,14 +82,16 @@ export function setupAngularRoutes($routeProvider, $locationProvider) {
|
||||
controllerAs: 'ctrl',
|
||||
})
|
||||
.when('/dashboards/f/:uid/:slug/permissions', {
|
||||
templateUrl: 'public/app/features/dashboard/partials/folder_permissions.html',
|
||||
controller: 'FolderPermissionsCtrl',
|
||||
controllerAs: 'ctrl',
|
||||
template: '<react-container />',
|
||||
resolve: {
|
||||
component: () => FolderPermissions,
|
||||
},
|
||||
})
|
||||
.when('/dashboards/f/:uid/:slug/settings', {
|
||||
templateUrl: 'public/app/features/dashboard/partials/folder_settings.html',
|
||||
controller: 'FolderSettingsCtrl',
|
||||
controllerAs: 'ctrl',
|
||||
template: '<react-container />',
|
||||
resolve: {
|
||||
component: () => FolderSettings,
|
||||
},
|
||||
})
|
||||
.when('/dashboards/f/:uid/:slug', {
|
||||
templateUrl: 'public/app/features/dashboard/partials/folder_dashboards.html',
|
||||
|
||||
Reference in New Issue
Block a user