Introduction of Host module

This commit is contained in:
Frédéric Vachon 2015-03-26 12:38:55 -04:00
parent 47d1cbf10c
commit c23de1cc45
12 changed files with 101 additions and 0 deletions

View File

View File

@ -0,0 +1,31 @@
'use strict';
angular.module('adagios.host', [])
.controller('TableCtrl', ['$scope', function ($scope) {
angular.noop();
}])
.directive('adgHost', ['$http', '$compile',
function ($http, $compile) {
return {
restrict: 'E',
compile: function () {
return function (scope, element, attrs) {
var template = 'components/host/host.html',
conf;
if (!attrs.hostName || !attrs.modules) {
throw new Error('<adg-host> "host-name" and "modules" attributes must be defined');
}
$http.get(template, { cache: true })
.success(function (data) {
var elem = $compile(data)(scope);
element.append(elem);
});
};
}
};
}]);

View File

@ -0,0 +1,14 @@
'use strict';
angular.module('adagios.host.cpu', [])
.controller('TableCtrl', ['$scope', function ($scope) {
angular.noop();
}])
.directive('adgHostCpu', function () {
return {
restrict: 'E',
templateUrl: 'components/host/host_cpu/host_cpu.html'
};
});

View File

@ -0,0 +1,14 @@
'use strict';
angular.module('adagios.host.cpu', [])
.controller('HostCpuCtrl', ['$scope', function ($scope) {
angular.noop();
}])
.directive('adgHostCpu', function () {
return {
restrict: 'E',
templateUrl: 'components/host/host_cpu/host_cpu.html'
};
});

View File

@ -0,0 +1,14 @@
'use strict';
angular.module('adagios.host.load', [])
.controller('HostLoadCtrl', ['$scope', function ($scope) {
angular.noop();
}])
.directive('adgHostLoad', function () {
return {
restrict: 'E',
templateUrl: 'components/host/host_load/host_load.html'
};
});

View File

@ -0,0 +1,14 @@
'use strict';
angular.module('adagios.host.main', [])
.controller('HostMainCtrl', ['$scope', function ($scope) {
angular.noop();
}])
.directive('adgHostMain', function () {
return {
restrict: 'E',
templateUrl: 'components/host/host_main/host_main.html'
};
});

View File

@ -0,0 +1,14 @@
'use strict';
angular.module('adagios.host.services_list', [])
.controller('HostServicesListCtrl', ['$scope', function ($scope) {
angular.noop();
}])
.directive('adgHostServicesList', function () {
return {
restrict: 'E',
templateUrl: 'components/host/host_services_list/host_services_list.html'
};
});