mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
move import menu item to the original place
This commit is contained in:
parent
4403d919c1
commit
4d7ff4de15
@ -90,11 +90,13 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) {
|
|||||||
if c.OrgRole == m.ROLE_ADMIN || c.OrgRole == m.ROLE_EDITOR {
|
if c.OrgRole == m.ROLE_ADMIN || c.OrgRole == m.ROLE_EDITOR {
|
||||||
data.NavTree = append(data.NavTree, &dtos.NavLink{
|
data.NavTree = append(data.NavTree, &dtos.NavLink{
|
||||||
Text: "Create",
|
Text: "Create",
|
||||||
|
Id: "create",
|
||||||
Icon: "fa fa-fw fa-plus",
|
Icon: "fa fa-fw fa-plus",
|
||||||
Url: "#",
|
Url: "#",
|
||||||
Children: []*dtos.NavLink{
|
Children: []*dtos.NavLink{
|
||||||
{Text: "Dashboard", Icon: "gicon gicon-dashboard-new", Url: setting.AppSubUrl + "/dashboard/new"},
|
{Text: "Dashboard", Icon: "gicon gicon-dashboard-new", Url: setting.AppSubUrl + "/dashboard/new"},
|
||||||
{Text: "Folder", Icon: "gicon gicon-folder-new", Url: setting.AppSubUrl + "/dashboard/new/?editview=new-folder"},
|
{Text: "Folder", Icon: "gicon gicon-folder-new", Url: setting.AppSubUrl + "/dashboard/new/?editview=new-folder"},
|
||||||
|
{Text: "Import", Id: "import", Icon: "gicon gicon-dashboard-import", Url: setting.AppSubUrl + "/dashboard/import"},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -103,7 +105,6 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) {
|
|||||||
{Text: "Home", Url: setting.AppSubUrl + "/", Icon: "fa fa-fw fa-home", HideFromTabs: true},
|
{Text: "Home", Url: setting.AppSubUrl + "/", Icon: "fa fa-fw fa-home", HideFromTabs: true},
|
||||||
{Divider: true, HideFromTabs: true},
|
{Divider: true, HideFromTabs: true},
|
||||||
{Text: "Manage", Id: "dashboards", Url: setting.AppSubUrl + "/dashboards", Icon: "fa fa-fw fa-sitemap"},
|
{Text: "Manage", Id: "dashboards", Url: setting.AppSubUrl + "/dashboards", Icon: "fa fa-fw fa-sitemap"},
|
||||||
{Text: "Import", Id: "import", Url: setting.AppSubUrl + "/dashboards/import", Icon: "gicon gicon-dashboard-import"},
|
|
||||||
{Text: "Playlists", Id: "playlists", Url: setting.AppSubUrl + "/playlists", Icon: "fa fa-fw fa-film"},
|
{Text: "Playlists", Id: "playlists", Url: setting.AppSubUrl + "/playlists", Icon: "fa fa-fw fa-film"},
|
||||||
{Text: "Snapshots", Id: "snapshots", Url: setting.AppSubUrl + "/dashboard/snapshots", Icon: "icon-gf icon-gf-fw icon-gf-snapshot"},
|
{Text: "Snapshots", Id: "snapshots", Url: setting.AppSubUrl + "/dashboard/snapshots", Icon: "icon-gf icon-gf-fw icon-gf-snapshot"},
|
||||||
}
|
}
|
||||||
|
@ -48,6 +48,11 @@ function setupAngularRoutes($routeProvider, $locationProvider) {
|
|||||||
reloadOnSearch: false,
|
reloadOnSearch: false,
|
||||||
pageClass: 'page-dashboard',
|
pageClass: 'page-dashboard',
|
||||||
})
|
})
|
||||||
|
.when('/dashboard/import', {
|
||||||
|
templateUrl: 'public/app/features/dashboard/partials/dashboardImport.html',
|
||||||
|
controller : 'DashboardImportCtrl',
|
||||||
|
controllerAs: 'ctrl',
|
||||||
|
})
|
||||||
.when('/datasources', {
|
.when('/datasources', {
|
||||||
templateUrl: 'public/app/features/plugins/partials/ds_list.html',
|
templateUrl: 'public/app/features/plugins/partials/ds_list.html',
|
||||||
controller : 'DataSourcesCtrl',
|
controller : 'DataSourcesCtrl',
|
||||||
@ -68,11 +73,6 @@ function setupAngularRoutes($routeProvider, $locationProvider) {
|
|||||||
controller : 'DashboardListCtrl',
|
controller : 'DashboardListCtrl',
|
||||||
controllerAs: 'ctrl',
|
controllerAs: 'ctrl',
|
||||||
})
|
})
|
||||||
.when('/dashboards/import', {
|
|
||||||
templateUrl: 'public/app/features/dashboard/partials/dashboardImport.html',
|
|
||||||
controller : 'DashboardImportCtrl',
|
|
||||||
controllerAs: 'ctrl',
|
|
||||||
})
|
|
||||||
.when('/org', {
|
.when('/org', {
|
||||||
templateUrl: 'public/app/features/org/partials/orgDetails.html',
|
templateUrl: 'public/app/features/org/partials/orgDetails.html',
|
||||||
controller : 'OrgDetailsCtrl',
|
controller : 'OrgDetailsCtrl',
|
||||||
|
@ -16,7 +16,7 @@ export class DashboardImportCtrl {
|
|||||||
|
|
||||||
/** @ngInject */
|
/** @ngInject */
|
||||||
constructor(private backendSrv, navModelSrv, private $location, private $scope, $routeParams) {
|
constructor(private backendSrv, navModelSrv, private $location, private $scope, $routeParams) {
|
||||||
this.navModel = navModelSrv.getNav('dashboards', 'import', 0);
|
this.navModel = navModelSrv.getNav('create', 'import');
|
||||||
|
|
||||||
this.step = 1;
|
this.step = 1;
|
||||||
this.nameExists = false;
|
this.nameExists = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user