Merge branch '7883_new_url_structure' into 7883_frontend_step2

This commit is contained in:
Marcus Efraimsson
2018-02-01 11:08:39 +01:00
137 changed files with 3945 additions and 1596 deletions

View File

@@ -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]);

View File

@@ -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',