mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Moving code arround
This commit is contained in:
parent
d3e11cabd5
commit
164435f71d
@ -7,4 +7,5 @@ define([
|
||||
'./inspectCtrl',
|
||||
'./jsonEditorCtrl',
|
||||
'./loginCtrl',
|
||||
'./registerCtrl',
|
||||
], function () {});
|
||||
|
@ -6,18 +6,6 @@ function (angular) {
|
||||
|
||||
var module = angular.module('grafana.routes');
|
||||
|
||||
module.config(function($routeProvider) {
|
||||
$routeProvider
|
||||
.when('/login', {
|
||||
templateUrl: 'app/partials/login.html',
|
||||
controller : 'LoginCtrl',
|
||||
})
|
||||
.when('/register', {
|
||||
templateUrl: 'app/partials/register.html',
|
||||
controller : 'RegisterCtrl',
|
||||
});
|
||||
});
|
||||
|
||||
module.controller('RegisterCtrl', function($scope, backendSrv, $location) {
|
||||
$scope.loginModel = {};
|
||||
$scope.grafana.sidemenu = false;
|
@ -10,5 +10,6 @@ define([
|
||||
'./viewStateSrv',
|
||||
'./playlistSrv',
|
||||
'./panelSrv',
|
||||
'./soloPanelCtrl',
|
||||
'./timeSrv',
|
||||
], function () {});
|
||||
|
@ -7,14 +7,6 @@ function (angular, $) {
|
||||
|
||||
var module = angular.module('grafana.routes');
|
||||
|
||||
module.config(function($routeProvider) {
|
||||
$routeProvider
|
||||
.when('/dashboard/solo/:id/', {
|
||||
templateUrl: 'app/partials/solo-panel.html',
|
||||
controller : 'SoloPanelCtrl',
|
||||
});
|
||||
});
|
||||
|
||||
module.controller('SoloPanelCtrl', function($scope, $rootScope, datasourceSrv, $routeParams, dashboardSrv, timeSrv, $location) {
|
||||
var panelId;
|
||||
|
@ -63,7 +63,7 @@ function (angular, _, kbn) {
|
||||
};
|
||||
|
||||
GrafanaDatasource.prototype.searchDashboards = function(query) {
|
||||
return backendSrv.get('/api/search/', { q: query } )
|
||||
return backendSrv.get('/api/search/', {q: query})
|
||||
.then(function(data) {
|
||||
_.each(data.dashboards, function(item) {
|
||||
item.id = item.slug;
|
||||
|
@ -1,21 +0,0 @@
|
||||
define([
|
||||
'angular',
|
||||
],
|
||||
function (angular) {
|
||||
"use strict";
|
||||
|
||||
var module = angular.module('grafana.routes');
|
||||
|
||||
module.config(function($routeProvider) {
|
||||
$routeProvider
|
||||
.when('/admin/datasources', {
|
||||
templateUrl: 'app/features/admin/partials/datasources.html',
|
||||
controller : 'DataSourcesCtrl',
|
||||
})
|
||||
.when('/account', {
|
||||
templateUrl: 'app/features/admin/partials/account.html',
|
||||
controller : 'AccountCtrl',
|
||||
});
|
||||
});
|
||||
|
||||
});
|
@ -1,6 +1,55 @@
|
||||
define([
|
||||
'angular',
|
||||
'./dashboard',
|
||||
'./admin',
|
||||
'./login',
|
||||
'./solo-panel',
|
||||
], function() {});
|
||||
], function(angular) {
|
||||
"use strict";
|
||||
|
||||
var module = angular.module('grafana.routes');
|
||||
|
||||
module.config(function($routeProvider, $locationProvider) {
|
||||
$locationProvider.html5Mode(true);
|
||||
|
||||
$routeProvider
|
||||
.when('/', {
|
||||
templateUrl: 'app/partials/dashboard.html',
|
||||
controller : 'DashFromDBProvider',
|
||||
reloadOnSearch: false,
|
||||
})
|
||||
.when('/dashboard/db/:id', {
|
||||
templateUrl: 'app/partials/dashboard.html',
|
||||
controller : 'DashFromDBProvider',
|
||||
reloadOnSearch: false,
|
||||
})
|
||||
.when('/dashboard/temp/:id', {
|
||||
templateUrl: 'app/partials/dashboard.html',
|
||||
controller : 'DashFromDBProvider',
|
||||
reloadOnSearch: false,
|
||||
})
|
||||
.when('/dashboard/import/:id', {
|
||||
templateUrl: 'app/partials/dashboard.html',
|
||||
controller : 'DashFromImportCtrl',
|
||||
reloadOnSearch: false,
|
||||
})
|
||||
.when('/admin/datasources', {
|
||||
templateUrl: 'app/features/admin/partials/datasources.html',
|
||||
controller : 'DataSourcesCtrl',
|
||||
})
|
||||
.when('/account', {
|
||||
templateUrl: 'app/features/admin/partials/account.html',
|
||||
controller : 'AccountCtrl',
|
||||
})
|
||||
.when('/login', {
|
||||
templateUrl: 'app/partials/login.html',
|
||||
controller : 'LoginCtrl',
|
||||
})
|
||||
.when('/register', {
|
||||
templateUrl: 'app/partials/register.html',
|
||||
controller : 'RegisterCtrl',
|
||||
})
|
||||
.when('/dashboard/solo/:id/', {
|
||||
templateUrl: 'app/partials/solo-panel.html',
|
||||
controller : 'SoloPanelCtrl',
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
@ -7,32 +7,6 @@ function (angular, store) {
|
||||
|
||||
var module = angular.module('grafana.routes');
|
||||
|
||||
module.config(function($routeProvider, $locationProvider) {
|
||||
$locationProvider.html5Mode(true);
|
||||
|
||||
$routeProvider
|
||||
.when('/', {
|
||||
templateUrl: 'app/partials/dashboard.html',
|
||||
controller : 'DashFromDBProvider',
|
||||
reloadOnSearch: false,
|
||||
})
|
||||
.when('/dashboard/db/:id', {
|
||||
templateUrl: 'app/partials/dashboard.html',
|
||||
controller : 'DashFromDBProvider',
|
||||
reloadOnSearch: false,
|
||||
})
|
||||
.when('/dashboard/temp/:id', {
|
||||
templateUrl: 'app/partials/dashboard.html',
|
||||
controller : 'DashFromDBProvider',
|
||||
reloadOnSearch: false,
|
||||
})
|
||||
.when('/dashboard/import/:id', {
|
||||
templateUrl: 'app/partials/dashboard.html',
|
||||
controller : 'DashFromImportCtrl',
|
||||
reloadOnSearch: false,
|
||||
});
|
||||
});
|
||||
|
||||
// remember previous dashboard
|
||||
var prevDashPath = null;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
define([
|
||||
'helpers',
|
||||
'routes/backend/solo-panel',
|
||||
'controllers/soloPanelCtrl',
|
||||
'features/dashboard/dashboardSrv',
|
||||
], function(helpers) {
|
||||
'use strict';
|
Loading…
Reference in New Issue
Block a user