Refactor : Move modules to components directory
This commit is contained in:
parent
de6f9b0689
commit
47c4743723
@ -9,6 +9,6 @@ angular.module('adagios.sidebar', [])
|
||||
.directive('adgSidebar', function () {
|
||||
return {
|
||||
restrict: 'E',
|
||||
templateUrl: "sidebar/sidebar.html"
|
||||
templateUrl: "components/sidebar/sidebar.html"
|
||||
};
|
||||
});
|
@ -14,7 +14,7 @@ describe('Sidebar module', function () {
|
||||
$controller = _$controller_;
|
||||
$httpBackend = _$httpBackend_;
|
||||
|
||||
$httpBackend.expectGET('sidebar/sidebar.html').respond('<li></li>');
|
||||
$httpBackend.expectGET('components/sidebar/sidebar.html').respond('<li></li>');
|
||||
}));
|
||||
|
||||
describe('SideBarCtrl', function () {
|
@ -40,7 +40,7 @@ angular.module('adagios.table', ['ngRoute',
|
||||
scope.generateTable = function () {
|
||||
if (!!attrs.cells) {
|
||||
tableConfig.dashboardCells = attrs.cells.split(',');
|
||||
return 'table/table.html';
|
||||
return 'components/table/table.html';
|
||||
}
|
||||
console.log('<adg-table> "cells" attribute is undefined');
|
||||
};
|
||||
@ -55,7 +55,7 @@ angular.module('adagios.table', ['ngRoute',
|
||||
link: function (scope, element, attrs) {
|
||||
scope.getTemplateUrl = function () {
|
||||
if (!!attrs.type) {
|
||||
return 'table/cell_' + attrs.type + '/cell_' + attrs.type + '.html';
|
||||
return 'components/table/cell_' + attrs.type + '/cell_' + attrs.type + '.html';
|
||||
}
|
||||
console.error('<adg-cell> "type" attribute is undefined');
|
||||
};
|
@ -21,7 +21,7 @@ describe('In Table module', function () {
|
||||
angular.forEach(cells, function (cell) {
|
||||
var elem = angular.element('<adg-cell type="' + cell + '"></adg-cell>');
|
||||
$compile(elem)($rootScope);
|
||||
$httpBackend.expectGET('table/cell_' + cell + '/cell_' + cell + '.html').respond('');
|
||||
$httpBackend.expectGET('components/table/cell_' + cell + '/cell_' + cell + '.html').respond('');
|
||||
$httpBackend.flush();
|
||||
});
|
||||
});
|
||||
@ -30,9 +30,9 @@ describe('In Table module', function () {
|
||||
describe('adgTable directive', function () {
|
||||
|
||||
it('should request table/table.html template', function () {
|
||||
var elem = angular.element('<adg-table></adg-table>');
|
||||
var elem = angular.element('<adg-table cells="host,service_check,duration,last_check"></adg-table>');
|
||||
$compile(elem)($rootScope);
|
||||
$httpBackend.expectGET('table/table.html').respond('');
|
||||
$httpBackend.expectGET('components/table/table.html').respond('');
|
||||
$httpBackend.flush();
|
||||
});
|
||||
});
|
@ -10,6 +10,6 @@ angular.module('adagios.tactical.current_health', ['ngRoute', 'ngJustGage' ])
|
||||
.directive('adgCurrentHealth', function () {
|
||||
return {
|
||||
restrict: 'E',
|
||||
templateUrl: "tactical/current_health/current_health.html"
|
||||
templateUrl: 'components/tactical/current_health/current_health.html'
|
||||
};
|
||||
});
|
@ -14,7 +14,7 @@ describe('Current Health tactical submodule', function () {
|
||||
$controller = _$controller_;
|
||||
$httpBackend = _$httpBackend_;
|
||||
|
||||
$httpBackend.expectGET('tactical/current_health/current_health.html')
|
||||
$httpBackend.expectGET('components/tactical/current_health/current_health.html')
|
||||
.respond('<th>Current Health</th>');
|
||||
}));
|
||||
|
@ -17,6 +17,6 @@ angular.module('adagios.tactical.status_overview', ['ngRoute' ])
|
||||
.directive('adgStatusOverview', function () {
|
||||
return {
|
||||
restrict: 'E',
|
||||
templateUrl: "tactical/status_overview/status_overview.html"
|
||||
templateUrl: 'components/tactical/status_overview/status_overview.html'
|
||||
};
|
||||
});
|
@ -14,7 +14,7 @@ describe('Status Overview tactical submodule', function () {
|
||||
$controller = _$controller_;
|
||||
$httpBackend = _$httpBackend_;
|
||||
|
||||
$httpBackend.expectGET('tactical/status_overview/status_overview.html')
|
||||
$httpBackend.expectGET('components/tactical/status_overview/status_overview.html')
|
||||
.respond('<td>{{ problems }}</td>');
|
||||
}));
|
||||
|
@ -9,7 +9,7 @@ angular.module('adagios.tactical', ['ngRoute',
|
||||
|
||||
.config(['$routeProvider', function ($routeProvider) {
|
||||
$routeProvider.when('/tactical', {
|
||||
templateUrl: 'tactical/tactical.html',
|
||||
templateUrl: 'components/tactical/tactical.html',
|
||||
controller: 'TacticalCtrl'
|
||||
});
|
||||
}])
|
@ -21,6 +21,6 @@ angular.module('adagios.tactical.top_alert_producers', ['ngRoute' ])
|
||||
.directive('adgTopAlertProducers', function () {
|
||||
return {
|
||||
restrict: 'E',
|
||||
templateUrl: "tactical/top_alert_producers/top_alert_producers.html"
|
||||
templateUrl: 'components/tactical/top_alert_producers/top_alert_producers.html'
|
||||
};
|
||||
});
|
@ -14,7 +14,7 @@ describe('Top Alert Producer tactical submodule', function () {
|
||||
$controller = _$controller_;
|
||||
$httpBackend = _$httpBackend_;
|
||||
|
||||
$httpBackend.expectGET('tactical/top_alert_producers/top_alert_producers.html')
|
||||
$httpBackend.expectGET('components/tactical/top_alert_producers/top_alert_producers.html')
|
||||
.respond('<td>{{ problems }}</td>');
|
||||
}));
|
||||
|
@ -9,6 +9,6 @@ angular.module('adagios.topbar', ['adagios.live'])
|
||||
.directive('adgTopbar', function () {
|
||||
return {
|
||||
restrict: 'E',
|
||||
templateUrl: "topbar/topbar.html"
|
||||
templateUrl: 'components/topbar/topbar.html'
|
||||
};
|
||||
});
|
@ -14,7 +14,7 @@ describe('Topbar module', function () {
|
||||
$controller = _$controller_;
|
||||
$httpBackend = _$httpBackend_;
|
||||
|
||||
$httpBackend.expectGET('topbar/topbar.html').respond('<a>{{ notifications }}</a>');
|
||||
$httpBackend.expectGET('components/topbar/topbar.html').respond('<a>{{ notifications }}</a>');
|
||||
}));
|
||||
|
||||
describe('TopBarCtrl', function () {
|
@ -30,16 +30,16 @@
|
||||
<script src="components/filters/filters.js"></script>
|
||||
|
||||
<!-- MODULES -->
|
||||
<script src="sidebar/sidebar.js"></script>
|
||||
<script src="components/sidebar/sidebar.js"></script>
|
||||
|
||||
<script src="topbar/topbar.js"></script>
|
||||
<script src="components/topbar/topbar.js"></script>
|
||||
|
||||
<script src="tactical/tactical.js"></script>
|
||||
<script src="tactical/status_overview/status_overview.js"></script>
|
||||
<script src="tactical/current_health/current_health.js"></script>
|
||||
<script src="tactical/top_alert_producers/top_alert_producers.js"></script>
|
||||
<script src="components/tactical/tactical.js"></script>
|
||||
<script src="components/tactical/status_overview/status_overview.js"></script>
|
||||
<script src="components/tactical/current_health/current_health.js"></script>
|
||||
<script src="components/tactical/top_alert_producers/top_alert_producers.js"></script>
|
||||
|
||||
<script src="table/table.js"></script>
|
||||
<script src="components/table/table.js"></script>
|
||||
|
||||
<script src="bower_components/html5-boilerplate/js/vendor/modernizr-2.6.2.min.js"></script>
|
||||
<script src="bower_components/moment/moment.js"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user