Merge pull request #10463 from AnonyV/master

Fixed the subUrl bugs for folder/settings/teams etc. with root_url modified
This commit is contained in:
Marcus Efraimsson 2018-01-09 12:42:22 +01:00 committed by GitHub
commit 4af1aca97c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 7 deletions

10
public/app/features/dashboard/folder_page_loader.ts Normal file → Executable file
View File

@ -11,28 +11,28 @@ export class FolderPageLoader {
subTitle: 'Manage folder dashboards & permissions',
url: '',
text: '',
breadcrumbs: [{ title: 'Dashboards', url: '/dashboards' }, { title: ' ' }],
breadcrumbs: [{ title: 'Dashboards', url: 'dashboards' }, { title: ' ' }],
children: [
{
active: activeChildId === 'manage-folder-dashboards',
icon: 'fa fa-fw fa-th-large',
id: 'manage-folder-dashboards',
text: 'Dashboards',
url: '/dashboards',
url: 'dashboards',
},
{
active: activeChildId === 'manage-folder-permissions',
icon: 'fa fa-fw fa-lock',
id: 'manage-folder-permissions',
text: 'Permissions',
url: '/dashboards/permissions',
url: 'dashboards/permissions',
},
{
active: activeChildId === 'manage-folder-settings',
icon: 'fa fa-fw fa-cog',
id: 'manage-folder-settings',
text: 'Settings',
url: '/dashboards/settings',
url: 'dashboards/settings',
},
],
},
@ -41,7 +41,7 @@ export class FolderPageLoader {
return this.backendSrv.getDashboard('db', this.$routeParams.slug).then(result => {
const folderTitle = result.dashboard.title;
ctrl.navModel.main.text = '';
ctrl.navModel.main.breadcrumbs = [{ title: 'Dashboards', url: '/dashboards' }, { title: folderTitle }];
ctrl.navModel.main.breadcrumbs = [{ title: 'Dashboards', url: 'dashboards' }, { title: folderTitle }];
const folderUrl = this.createFolderUrl(folderId, result.meta.type, result.meta.slug);

3
public/app/features/dashboard/settings/settings.ts Normal file → Executable file
View File

@ -2,6 +2,7 @@ import { coreModule, appEvents, contextSrv } from 'app/core/core';
import { DashboardModel } from '../dashboard_model';
import $ from 'jquery';
import _ from 'lodash';
import config from 'app/core/config';
export class SettingsCtrl {
dashboard: DashboardModel;
@ -86,7 +87,7 @@ export class SettingsCtrl {
for (let section of this.sections) {
const sectionParams = _.defaults({ editview: section.id }, params);
section.url = url + '?' + $.param(sectionParams);
section.url = config.appSubUrl + url + '?' + $.param(sectionParams);
}
}

2
public/app/features/org/partials/teams.html Normal file → Executable file
View File

@ -8,7 +8,7 @@
</label>
<div class="page-action-bar__spacer"></div>
<a class="btn btn-success" href="/org/teams/new">
<a class="btn btn-success" href="org/teams/new">
<i class="fa fa-plus"></i>
Add Team
</a>