mirror of
https://github.com/mmumshad/ansible-playable.git
synced 2025-03-09 23:38:54 +00:00
Initial Commit
This commit is contained in:
commit
c92f737237
273 changed files with 16964 additions and 0 deletions
32
client/app/providers/ansi2html/ansi2html.service.js
Normal file
32
client/app/providers/ansi2html/ansi2html.service.js
Normal file
|
@ -0,0 +1,32 @@
|
|||
'use strict';
|
||||
const angular = require('angular');
|
||||
|
||||
var ansi_to_html = require('ansi-to-html');
|
||||
|
||||
/*@ngInject*/
|
||||
export function ansi2htmlProvider() {
|
||||
// Private variables
|
||||
var salutation = 'Hello';
|
||||
|
||||
// Private constructor
|
||||
function Greeter() {
|
||||
this.greet = function() {
|
||||
return salutation;
|
||||
};
|
||||
}
|
||||
|
||||
// Public API for configuration
|
||||
this.setSalutation = function(s) {
|
||||
salutation = s;
|
||||
};
|
||||
|
||||
// Method for instantiating
|
||||
this.$get = ['$window', function ($window) {
|
||||
// configure JSONEditor using provider's configuration
|
||||
return new ansi_to_html();
|
||||
}];
|
||||
}
|
||||
|
||||
export default angular.module('webAppApp.ansi2html', [])
|
||||
.provider('ansi2html', ansi2htmlProvider)
|
||||
.name;
|
16
client/app/providers/ansi2html/ansi2html.service.spec.js
Normal file
16
client/app/providers/ansi2html/ansi2html.service.spec.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
'use strict';
|
||||
|
||||
describe('Service: ansi2html', function() {
|
||||
// load the service's module
|
||||
beforeEach(module('webAppApp.ansi2html'));
|
||||
|
||||
// instantiate service
|
||||
var ansi2html;
|
||||
beforeEach(inject(function(_ansi2html_) {
|
||||
ansi2html = _ansi2html_;
|
||||
}));
|
||||
|
||||
it('should do something', function() {
|
||||
expect(!!ansi2html).to.be.true;
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue