1
0
Fork 0
mirror of https://github.com/mmumshad/ansible-playable.git synced 2025-03-09 23:38:54 +00:00

Feature - Integrate System API to view logs in UI

This commit is contained in:
Mumshad Mannambeth 2017-07-11 11:58:56 -04:00
parent 1690470269
commit bf6c8743c5
15 changed files with 353 additions and 26 deletions

View file

@ -0,0 +1,19 @@
'use strict';
const angular = require('angular');
/*@ngInject*/
export function systemService($http) {
// AngularJS will instantiate a singleton by calling "new" on this function
const api_system = '/api/system';
const api_get_logs = api_system + '/logs';
this.getLogs = function(type, successCallback, errorCallback){
$http.get(api_get_logs + '/' + type).then(successCallback, errorCallback);
}
}
export default angular.module('webAppApp.system', [])
.service('system', systemService)
.name;

View file

@ -0,0 +1,16 @@
'use strict';
describe('Service: system', function() {
// load the service's module
beforeEach(module('webAppApp.system'));
// instantiate service
var system;
beforeEach(inject(function(_system_) {
system = _system_;
}));
it('should do something', function() {
expect(!!system).to.be.true;
});
});