mirror of
https://github.com/openstf/stf
synced 2025-10-05 10:39:25 +02:00
- Finally, most of the unit tests now passes (resolving dependencies also).
- Shims now exports angular module name, however some of them clash with the original.
This commit is contained in:
parent
e78c7572e1
commit
743f8becd6
96 changed files with 245 additions and 235 deletions
|
@ -4,16 +4,14 @@ require.ensure([], function (require) {
|
||||||
require('angular-route')
|
require('angular-route')
|
||||||
require('angular-touch')
|
require('angular-touch')
|
||||||
|
|
||||||
require('angular-gettext')
|
|
||||||
require('ng-file-upload')
|
require('ng-file-upload')
|
||||||
require('angular-hotkeys')
|
|
||||||
|
|
||||||
angular.module('app', [
|
angular.module('app', [
|
||||||
'ngRoute',
|
'ngRoute',
|
||||||
'ngTouch',
|
'ngTouch',
|
||||||
'gettext',
|
require('gettext').name,
|
||||||
'angularFileUpload',
|
'angularFileUpload',
|
||||||
'cfp.hotkeys',
|
require('angular-hotkeys').name,
|
||||||
require('./layout').name,
|
require('./layout').name,
|
||||||
require('./device-list').name,
|
require('./device-list').name,
|
||||||
require('./control-panes').name,
|
require('./control-panes').name,
|
||||||
|
|
|
@ -1,11 +1,5 @@
|
||||||
describe('AdminModeService', function() {
|
describe('AdminModeService', function() {
|
||||||
|
|
||||||
beforeEach(module('stf.admin-mode'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
it('should ...', inject(function(AdminModeService) {
|
|
||||||
|
|
||||||
//expect(AdminModeService.doSomething()).toEqual('something');
|
|
||||||
|
|
||||||
}));
|
|
||||||
|
|
||||||
})
|
})
|
|
@ -1,6 +1,6 @@
|
||||||
describe('angularDraggabilly', function () {
|
describe('angularDraggabilly', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.angular-draggabilly'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, compile;
|
var scope, compile;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('angularPackery', function () {
|
describe('angularPackery', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.angular-packery'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, compile;
|
var scope, compile;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('basicMode', function () {
|
describe('basicMode', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.basic-mode'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, compile;
|
var scope, compile;
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
describe('BrowserInfo', function() {
|
describe('BrowserInfo', function() {
|
||||||
|
|
||||||
beforeEach(module('stf.browser-info'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
it('should ...', inject(function(GuestDeviceService) {
|
it('should ...', inject(function(BrowserInfo) {
|
||||||
|
|
||||||
//expect(GuestDeviceService.doSomething()).toEqual('something');
|
//expect(BrowserInfo.doSomething()).toEqual('something');
|
||||||
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('badgeIcon', function () {
|
describe('badgeIcon', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.badge-icon'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, compile;
|
var scope, compile;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('blurElement', function () {
|
describe('blurElement', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.blur-element'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, compile;
|
var scope, compile;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('counter', function () {
|
describe('counter', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.counter'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, compile;
|
var scope, compile;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('enableAutofill', function () {
|
describe('enableAutofill', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.enable-autofill'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, compile;
|
var scope, compile;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('fallbackImage', function () {
|
describe('fallbackImage', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.fallback-image'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, compile;
|
var scope, compile;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('filterButton', function () {
|
describe('filterButton', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.filter-button'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, compile;
|
var scope, compile;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('focusElement', function () {
|
describe('focusElement', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.focus-element'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, compile;
|
var scope, compile;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('iconInsideInput', function () {
|
describe('iconInsideInput', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.icon-inside-input'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, compile;
|
var scope, compile;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('includeCached', function () {
|
describe('includeCached', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.include-cached'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, compile;
|
var scope, compile;
|
||||||
|
|
||||||
|
|
|
@ -3,4 +3,5 @@
|
||||||
require('./modals.css')
|
require('./modals.css')
|
||||||
|
|
||||||
module.exports = angular.module('stf.modals.common', [
|
module.exports = angular.module('stf.modals.common', [
|
||||||
|
require('ui-bootstrap').name
|
||||||
])
|
])
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('VersionUpdateService', function() {
|
describe('VersionUpdateService', function() {
|
||||||
|
|
||||||
beforeEach(module('stf.version-update'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
it('should ...', inject(function(VersionUpdateService) {
|
it('should ...', inject(function(VersionUpdateService) {
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('FatalMessageService', function() {
|
describe('FatalMessageService', function() {
|
||||||
|
|
||||||
beforeEach(module('stf.fatal-message'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
it('should ...', inject(function(FatalMessageService) {
|
it('should ...', inject(function(FatalMessageService) {
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
|
require('angular-route')
|
||||||
|
|
||||||
module.exports = angular.module('stf.fatal-message', [
|
module.exports = angular.module('stf.fatal-message', [
|
||||||
require('stf/common-ui/modals/common').name
|
require('stf/common-ui/modals/common').name,
|
||||||
|
'ngRoute'
|
||||||
])
|
])
|
||||||
.factory('FatalMessageService', require('./fatal-message-service'))
|
.factory('FatalMessageService', require('./fatal-message-service'))
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('VersionUpdateService', function() {
|
describe('VersionUpdateService', function() {
|
||||||
|
|
||||||
beforeEach(module('stf.version-update'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
it('should ...', inject(function(VersionUpdateService) {
|
it('should ...', inject(function(VersionUpdateService) {
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
describe('VersionUpdateService', function() {
|
describe('VersionUpdateService', function() {
|
||||||
|
|
||||||
beforeEach(module('stf.version-update'));
|
beforeEach(angular.mock.module(require('ui-bootstrap').name));
|
||||||
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
it('should ...', inject(function(VersionUpdateService) {
|
it('should ...', inject(function(VersionUpdateService) {
|
||||||
|
|
||||||
//expect(FatalMessageService.doSomething()).toEqual('something');
|
//expect(VersionUpdateService.doSomething()).toEqual('something');
|
||||||
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('nativeAutocomplete', function () {
|
describe('nativeAutocomplete', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.native-autocomplete'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, compile;
|
var scope, compile;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('ngEnter', function () {
|
describe('ngEnter', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.ng-enter'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, compile;
|
var scope, compile;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('niceTabs', function () {
|
describe('niceTabs', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.nice-tabs'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, compile;
|
var scope, compile;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('refreshPage', function () {
|
describe('refreshPage', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.refresh-page'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, compile;
|
var scope, compile;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('textFocusSelect', function () {
|
describe('textFocusSelect', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.text-focus-select'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, compile;
|
var scope, compile;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('tooltips', function () {
|
describe('tooltips', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.tooltips'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, compile;
|
var scope, compile;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('FilterStringService', function() {
|
describe('FilterStringService', function() {
|
||||||
|
|
||||||
beforeEach(module('stf.filter-string'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
it('should ...', inject(function(FilterStringService) {
|
it('should ...', inject(function(FilterStringService) {
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('imageOnload', function () {
|
describe('imageOnload', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.image-onload'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, compile;
|
var scope, compile;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('KeycodesService', function() {
|
describe('KeycodesService', function() {
|
||||||
|
|
||||||
beforeEach(module('stf.keycodes'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
it('should ...', inject(function(KeycodesService) {
|
it('should ...', inject(function(KeycodesService) {
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('landscape', function () {
|
describe('landscape', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.landscape'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, compile;
|
var scope, compile;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('logcatTable', function () {
|
describe('logcatTable', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.logcat-table'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, compile;
|
var scope, compile;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
module.exports = angular.module('stf.logcat', [
|
module.exports = angular.module('stf.logcat', [
|
||||||
require('stf/filter-string').name
|
require('stf/filter-string').name,
|
||||||
|
require('stf/socket').name
|
||||||
])
|
])
|
||||||
.factory('LogcatService', require('./logcat-service'))
|
.factory('LogcatService', require('./logcat-service'))
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('LogcatService', function() {
|
describe('LogcatService', function() {
|
||||||
|
|
||||||
beforeEach(module('stf.logcat'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
it('should ...', inject(function(LogcatService) {
|
it('should ...', inject(function(LogcatService) {
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('navMenu', function () {
|
describe('navMenu', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.nav-menu'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, compile;
|
var scope, compile;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
module.exports = angular.module('stf.port-forwarding', [
|
module.exports = angular.module('stf.port-forwarding', [
|
||||||
|
|
||||||
])
|
])
|
||||||
.factory('PortForwardingService', require('./port-forwarding-service'))
|
.factory('PortForwardingService', require('./port-forwarding-service'))
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
module.exports = function PortForwardingServiceFactory() {
|
module.exports = function () {
|
||||||
var service = {}
|
var service = {}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return service
|
return service
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
describe('PortForwardingService', function() {
|
describe('PortForwardingService', function() {
|
||||||
|
|
||||||
beforeEach(module('stf.port-forwarding'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
it('should ...', inject(function(PortForwardingService) {
|
it('should ...', inject(function(PortForwardingService) {
|
||||||
|
expect(1).toBe(1)
|
||||||
//expect(PortForwardingService.doSomething()).toEqual('something');
|
//expect(PortForwardingService.doSomething()).toEqual('something');
|
||||||
|
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
|
require('angular-hotkeys')
|
||||||
module.exports = angular.module('stf.scoped-hotkeys', [
|
module.exports = angular.module('stf.scoped-hotkeys', [
|
||||||
|
'cfp.hotkeys'
|
||||||
])
|
])
|
||||||
.factory('ScopedHotkeysService', require('./scoped-hotkeys-service'))
|
.factory('ScopedHotkeysService', require('./scoped-hotkeys-service'))
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('ScopedHotkeysService', function() {
|
describe('ScopedHotkeysService', function() {
|
||||||
|
|
||||||
beforeEach(module('stf.scoped-hotkeys'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
it('should ...', inject(function(ScopedHotkeysService) {
|
it('should ...', inject(function(ScopedHotkeysService) {
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('screenKeyboard', function () {
|
describe('screenKeyboard', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.screen-keyboard'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, compile;
|
var scope, compile;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('screenTouch', function () {
|
describe('screenTouch', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.screen-touch'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, compile;
|
var scope, compile;
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
module.exports = angular.module('stf/settings', [])
|
module.exports = angular.module('stf/settings', [
|
||||||
|
require('stf/user').name
|
||||||
|
])
|
||||||
.factory('SettingsService', require('./settings-service'))
|
.factory('SettingsService', require('./settings-service'))
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
module.exports = angular.module('stf/socket', [
|
module.exports = angular.module('stf/socket', [
|
||||||
|
//TODO: Refactor version update out to its own Ctrl
|
||||||
|
require('stf/common-ui/modals/version-update').name
|
||||||
])
|
])
|
||||||
.factory('socket', require('./socket-service'))
|
.factory('socket', require('./socket-service'))
|
||||||
|
|
|
@ -2,8 +2,11 @@ var io = require('socket.io')
|
||||||
|
|
||||||
module.exports = function SocketFactory($rootScope, VersionUpdateService) {
|
module.exports = function SocketFactory($rootScope, VersionUpdateService) {
|
||||||
/*globals APPSTATE:false*/
|
/*globals APPSTATE:false*/
|
||||||
|
//TODO: Refactor APPSTATE to AppStateConstant
|
||||||
|
var websocketUrl = APPSTATE && APPSTATE.config &&
|
||||||
|
APPSTATE.config.websocketUrl ? APPSTATE.config.websocketUrl : ''
|
||||||
|
|
||||||
var socket = io(APPSTATE.config.websocketUrl, {
|
var socket = io(websocketUrl, {
|
||||||
reconnection: false
|
reconnection: false
|
||||||
, transports: ['websocket']
|
, transports: ['websocket']
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
module.exports = angular.module('stf.sprintf', [])
|
|
||||||
.filter('sprintf', require('./sprintf-filter'))
|
|
|
@ -1,14 +0,0 @@
|
||||||
module.exports = function sprintfFilter() {
|
|
||||||
function parse(str) {
|
|
||||||
var args = [].slice.call(arguments, 1)
|
|
||||||
var i = 0
|
|
||||||
|
|
||||||
return str.replace(/%s/g, function () {
|
|
||||||
return args[i++]
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
return function (input) {
|
|
||||||
return parse(input, arguments[1], arguments[2], arguments[3], arguments[4], arguments[5])
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
describe('sprintf', function() {
|
|
||||||
|
|
||||||
beforeEach(module('stf.sprintf'));
|
|
||||||
|
|
||||||
it('should ...', inject(function($filter) {
|
|
||||||
|
|
||||||
var filter = $filter('sprintf');
|
|
||||||
|
|
||||||
expect(filter('input')).toEqual('output');
|
|
||||||
|
|
||||||
}));
|
|
||||||
|
|
||||||
});
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('textHistory', function () {
|
describe('textHistory', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.text-history'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, compile;
|
var scope, compile;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('TimelineService', function() {
|
describe('TimelineService', function() {
|
||||||
|
|
||||||
beforeEach(module('stf.timeline'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
it('should ...', inject(function(TimelineService) {
|
it('should ...', inject(function(TimelineService) {
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('timelineMessage', function () {
|
describe('timelineMessage', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.timeline-message'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, compile;
|
var scope, compile;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('timelines', function () {
|
describe('timelines', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.timelines'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, compile;
|
var scope, compile;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('ActivityCtrl', function () {
|
describe('ActivityCtrl', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.activity'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, ctrl;
|
var scope, ctrl;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
require('./activity.css')
|
require('./activity.css')
|
||||||
|
|
||||||
module.exports = angular.module('stf.activity', [
|
module.exports = angular.module('stf.activity', [
|
||||||
|
require('gettext').name,
|
||||||
require('stf/common-ui').name,
|
require('stf/common-ui').name,
|
||||||
require('stf/timeline').name
|
require('stf/timeline').name
|
||||||
])
|
])
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('AdvancedCtrl', function () {
|
describe('AdvancedCtrl', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.advanced'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, ctrl;
|
var scope, ctrl;
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
describe('InputCtrl', function () {
|
describe('InputAdvancedCtrl', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.input'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, ctrl;
|
var scope, ctrl;
|
||||||
|
|
||||||
beforeEach(inject(function ($rootScope, $controller) {
|
beforeEach(inject(function ($rootScope, $controller) {
|
||||||
scope = $rootScope.$new();
|
scope = $rootScope.$new();
|
||||||
ctrl = $controller('InputCtrl', {$scope: scope});
|
ctrl = $controller('InputAdvancedCtrl', {$scope: scope});
|
||||||
}));
|
}));
|
||||||
|
|
||||||
it('should ...', inject(function () {
|
it('should ...', inject(function () {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
describe('InputCtrl', function () {
|
describe('MaintenanceCtrl', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.input'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, ctrl;
|
var scope, ctrl;
|
||||||
|
|
||||||
beforeEach(inject(function ($rootScope, $controller) {
|
beforeEach(inject(function ($rootScope, $controller) {
|
||||||
scope = $rootScope.$new();
|
scope = $rootScope.$new();
|
||||||
ctrl = $controller('InputCtrl', {$scope: scope});
|
ctrl = $controller('MaintenanceCtrl', {$scope: scope});
|
||||||
}));
|
}));
|
||||||
|
|
||||||
it('should ...', inject(function () {
|
it('should ...', inject(function () {
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
require('./port-forwarding.css')
|
require('./port-forwarding.css')
|
||||||
|
|
||||||
module.exports = angular.module('stf.port-forwarding', [
|
module.exports = angular.module('stf.port-forwarding', [
|
||||||
|
require('stf/common-ui/table').name,
|
||||||
|
require('stf/settings').name
|
||||||
])
|
])
|
||||||
.run(["$templateCache", function ($templateCache) {
|
.run(["$templateCache", function ($templateCache) {
|
||||||
$templateCache.put(
|
$templateCache.put(
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('PortForwardingCtrl', function () {
|
describe('PortForwardingCtrl', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.port-forwarding'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, ctrl;
|
var scope, ctrl;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('RunJsCtrl', function () {
|
describe('RunJsCtrl', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.run-js'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, ctrl;
|
var scope, ctrl;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('UsbCtrl', function () {
|
describe('UsbCtrl', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.usb'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, ctrl;
|
var scope, ctrl;
|
||||||
|
|
||||||
|
|
|
@ -2,19 +2,22 @@ module.exports = function DeviceSettingsCtrl($scope, $timeout) {
|
||||||
$scope.wifiEnabled = true
|
$scope.wifiEnabled = true
|
||||||
|
|
||||||
var getWifiStatus = function () {
|
var getWifiStatus = function () {
|
||||||
|
if ($scope.control) {
|
||||||
$scope.control.getWifiStatus().then(function (result) {
|
$scope.control.getWifiStatus().then(function (result) {
|
||||||
$scope.$apply(function () {
|
$scope.$apply(function () {
|
||||||
$scope.wifiEnabled = (result.lastData === 'wifi_enabled')
|
$scope.wifiEnabled = (result.lastData === 'wifi_enabled')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
getWifiStatus()
|
getWifiStatus()
|
||||||
|
|
||||||
$scope.toggleWifi = function () {
|
$scope.toggleWifi = function () {
|
||||||
|
if ($scope.control) {
|
||||||
$scope.control.setWifiEnabled(!$scope.wifiEnabled)
|
$scope.control.setWifiEnabled(!$scope.wifiEnabled)
|
||||||
$scope.wifiEnabled = !$scope.wifiEnabled
|
$scope.wifiEnabled = !$scope.wifiEnabled
|
||||||
$timeout(getWifiStatus, 500)
|
$timeout(getWifiStatus, 500)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('DeviceSettingsCtrl', function () {
|
describe('DeviceSettingsCtrl', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.device-settings'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, ctrl;
|
var scope, ctrl;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,8 @@ require('./store-account.css')
|
||||||
require('angular-ladda')
|
require('angular-ladda')
|
||||||
|
|
||||||
module.exports = angular.module('stf.store-account', [
|
module.exports = angular.module('stf.store-account', [
|
||||||
'angular-ladda'
|
'angular-ladda',
|
||||||
|
require('stf/common-ui/table').name
|
||||||
])
|
])
|
||||||
.run(["$templateCache", function ($templateCache) {
|
.run(["$templateCache", function ($templateCache) {
|
||||||
$templateCache.put('control-panes/automation/store-account/store-account.jade',
|
$templateCache.put('control-panes/automation/store-account/store-account.jade',
|
||||||
|
|
|
@ -40,6 +40,7 @@ module.exports = function StoreAccountCtrl($scope, ngTableParams, $timeout) {
|
||||||
|
|
||||||
function getAccounts() {
|
function getAccounts() {
|
||||||
var storeAccountType = $scope.deviceAppStores[$scope.currentAppStore].package
|
var storeAccountType = $scope.deviceAppStores[$scope.currentAppStore].package
|
||||||
|
if ($scope.control) {
|
||||||
$scope.control.getAccounts(storeAccountType).then(function (result) {
|
$scope.control.getAccounts(storeAccountType).then(function (result) {
|
||||||
$scope.$apply(function () {
|
$scope.$apply(function () {
|
||||||
$scope.accountsList = result.body
|
$scope.accountsList = result.body
|
||||||
|
@ -47,6 +48,7 @@ module.exports = function StoreAccountCtrl($scope, ngTableParams, $timeout) {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
getAccounts()
|
getAccounts()
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('StoreAccountCtrl', function () {
|
describe('StoreAccountCtrl', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.store-account'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, ctrl;
|
var scope, ctrl;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('CpuCtrl', function () {
|
describe('CpuCtrl', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.cpu'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, ctrl;
|
var scope, ctrl;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('ClipboardCtrl', function () {
|
describe('ClipboardCtrl', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.clipboard'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, ctrl;
|
var scope, ctrl;
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,8 @@ require('./clipboard.css')
|
||||||
require('angular-elastic')
|
require('angular-elastic')
|
||||||
|
|
||||||
module.exports = angular.module('stf.clipboard', [
|
module.exports = angular.module('stf.clipboard', [
|
||||||
'monospaced.elastic'
|
'monospaced.elastic',
|
||||||
|
require('gettext').name
|
||||||
])
|
])
|
||||||
.run(["$templateCache", function ($templateCache) {
|
.run(["$templateCache", function ($templateCache) {
|
||||||
$templateCache.put('control-panes/dashboard/clipboard/clipboard.jade',
|
$templateCache.put('control-panes/dashboard/clipboard/clipboard.jade',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('DashboardCtrl', function () {
|
describe('DashboardCtrl', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.dashboard'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, ctrl;
|
var scope, ctrl;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('NavigationCtrl', function () {
|
describe('NavigationCtrl', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.navigation'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, ctrl;
|
var scope, ctrl;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('RemoteDebugCtrl', function () {
|
describe('RemoteDebugCtrl', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.remote-debug'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, ctrl;
|
var scope, ctrl;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
require('./shell.css')
|
require('./shell.css')
|
||||||
|
|
||||||
module.exports = angular.module('stf.shell', [
|
module.exports = angular.module('stf.shell', [
|
||||||
require('stf/common-ui').name
|
require('stf/common-ui').name,
|
||||||
|
require('gettext').name
|
||||||
])
|
])
|
||||||
.run(["$templateCache", function ($templateCache) {
|
.run(["$templateCache", function ($templateCache) {
|
||||||
$templateCache.put('control-panes/dashboard/shell/shell.jade',
|
$templateCache.put('control-panes/dashboard/shell/shell.jade',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('ShellCtrl', function () {
|
describe('ShellCtrl', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.shell'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, ctrl;
|
var scope, ctrl;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,9 @@ module.exports = function ActivitiesCtrl($scope) {
|
||||||
$scope.selectedAction = ''
|
$scope.selectedAction = ''
|
||||||
$scope.selectedCategory = ''
|
$scope.selectedCategory = ''
|
||||||
$scope.selectedData = ''
|
$scope.selectedData = ''
|
||||||
$scope.selectedPackageName = $scope.installation.manifest.package || ''
|
$scope.selectedPackageName = $scope.installation &&
|
||||||
|
$scope.installation.manifest && $scope.installation.manifest.package ?
|
||||||
|
$scope.installation.manifest.package : ''
|
||||||
$scope.selectedActivityName = ''
|
$scope.selectedActivityName = ''
|
||||||
|
|
||||||
$scope.activityActions = []
|
$scope.activityActions = []
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('ActivitiesCtrl', function () {
|
describe('ActivitiesCtrl', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.activities'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, ctrl;
|
var scope, ctrl;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,8 @@ require('./upload.css')
|
||||||
|
|
||||||
module.exports = angular.module('stf.upload', [
|
module.exports = angular.module('stf.upload', [
|
||||||
require('stf/common-ui/tree').name,
|
require('stf/common-ui/tree').name,
|
||||||
require('./activities').name
|
require('./activities').name,
|
||||||
|
require('stf/settings').name
|
||||||
])
|
])
|
||||||
.run(["$templateCache", function ($templateCache) {
|
.run(["$templateCache", function ($templateCache) {
|
||||||
$templateCache.put('control-panes/dashboard/upload/upload.jade',
|
$templateCache.put('control-panes/dashboard/upload/upload.jade',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('UploadCtrl', function () {
|
describe('UploadCtrl', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.upload'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, ctrl;
|
var scope, ctrl;
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,7 @@ require('./device-control.css')
|
||||||
module.exports = angular.module('device-control', [
|
module.exports = angular.module('device-control', [
|
||||||
require('stf/device').name,
|
require('stf/device').name,
|
||||||
require('stf/control').name,
|
require('stf/control').name,
|
||||||
require('stf/screen').name,
|
require('stf/screen').name
|
||||||
require('stf/sprintf').name
|
|
||||||
])
|
])
|
||||||
.run(["$templateCache", function ($templateCache) {
|
.run(["$templateCache", function ($templateCache) {
|
||||||
$templateCache.put('control-panes/device-control/device-control.jade',
|
$templateCache.put('control-panes/device-control/device-control.jade',
|
||||||
|
|
|
@ -5,13 +5,14 @@ module.exports = function InfoCtrl($scope, LightboxImageService) {
|
||||||
LightboxImageService.open(title, enhancedPhoto800)
|
LightboxImageService.open(title, enhancedPhoto800)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var getSdStatus = function () {
|
var getSdStatus = function () {
|
||||||
|
if ($scope.control) {
|
||||||
$scope.control.getSdStatus().then(function (result) {
|
$scope.control.getSdStatus().then(function (result) {
|
||||||
$scope.$apply(function () {
|
$scope.$apply(function () {
|
||||||
$scope.sdCardMounted = (result.lastData === 'sd_mounted')
|
$scope.sdCardMounted = (result.lastData === 'sd_mounted')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
getSdStatus()
|
getSdStatus()
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('InfoCtrl', function () {
|
describe('InfoCtrl', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.info'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, ctrl;
|
var scope, ctrl;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('InspectCtrl', function () {
|
describe('InspectCtrl', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.inspect'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, ctrl;
|
var scope, ctrl;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('LogsCtrl', function () {
|
describe('LogsCtrl', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.logs'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, ctrl;
|
var scope, ctrl;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('ResourcesCtrl', function () {
|
describe('ResourcesCtrl', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.resources'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, ctrl;
|
var scope, ctrl;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
require('./screenshots.css')
|
require('./screenshots.css')
|
||||||
|
|
||||||
module.exports = angular.module('stf.screenshots', [
|
module.exports = angular.module('stf.screenshots', [
|
||||||
require('stf/image-onload').name
|
require('stf/image-onload').name,
|
||||||
|
require('stf/settings').name
|
||||||
])
|
])
|
||||||
.run(["$templateCache", function ($templateCache) {
|
.run(["$templateCache", function ($templateCache) {
|
||||||
$templateCache.put('control-panes/screenshots/screenshots.jade',
|
$templateCache.put('control-panes/screenshots/screenshots.jade',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('ScreenshotsCtrl', function () {
|
describe('ScreenshotsCtrl', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.screenshots'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, ctrl;
|
var scope, ctrl;
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
require('se7en-bootstrap-3')
|
require('se7en-bootstrap-3')
|
||||||
|
|
||||||
require('angular-bootstrap')
|
|
||||||
|
|
||||||
require('angular-borderlayout')
|
|
||||||
|
|
||||||
|
|
||||||
require('./cursor.css')
|
require('./cursor.css')
|
||||||
require('./stf-se7en.css')
|
require('./stf-se7en.css')
|
||||||
require('./small.css')
|
require('./small.css')
|
||||||
|
@ -14,8 +9,8 @@ module.exports = angular.module('layout', [
|
||||||
require('../settings/language').name,
|
require('../settings/language').name,
|
||||||
require('stf/landscape').name,
|
require('stf/landscape').name,
|
||||||
require('stf/basic-mode').name,
|
require('stf/basic-mode').name,
|
||||||
'ui.bootstrap',
|
require('ui-bootstrap').name,
|
||||||
'fa.directive.borderLayout',
|
require('angular-borderlayout').name,
|
||||||
require('stf/common-ui').name,
|
require('stf/common-ui').name,
|
||||||
require('stf/socket/socket-state').name,
|
require('stf/socket/socket-state').name,
|
||||||
require('stf/browser-info').name
|
require('stf/browser-info').name
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe('MenuCtrl', function () {
|
describe('MenuCtrl', function () {
|
||||||
|
|
||||||
beforeEach(module('stf.menu'));
|
beforeEach(angular.mock.module(require('./').name));
|
||||||
|
|
||||||
var scope, ctrl;
|
var scope, ctrl;
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ module.exports = function (config) {
|
||||||
|
|
||||||
preprocessors: {
|
preprocessors: {
|
||||||
'helpers/**/*.js': ['webpack'],
|
'helpers/**/*.js': ['webpack'],
|
||||||
'../app/**/*.js': ['webpack']
|
'../**/*.js': ['webpack']
|
||||||
},
|
},
|
||||||
exclude: [
|
exclude: [
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
require('angular-borderlayout/src/borderLayout.js')
|
require('angular-borderlayout/src/borderLayout.js')
|
||||||
require('angular-borderlayout/src/borderLayout.css')
|
require('angular-borderlayout/src/borderLayout.css')
|
||||||
require('./style.css')
|
require('./style.css')
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: 'fa.directive.borderLayout'
|
||||||
|
}
|
||||||
|
|
4
res/web_modules/angular-hotkeys/index.js
vendored
4
res/web_modules/angular-hotkeys/index.js
vendored
|
@ -1,3 +1,7 @@
|
||||||
require('angular-hotkeys/build/hotkeys.css')
|
require('angular-hotkeys/build/hotkeys.css')
|
||||||
//require('./hotkeys.css')
|
//require('./hotkeys.css')
|
||||||
require('angular-hotkeys/build/hotkeys.js')
|
require('angular-hotkeys/build/hotkeys.js')
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: 'cfp.hotkeys'
|
||||||
|
}
|
||||||
|
|
4
res/web_modules/angular-ladda/index.js
vendored
4
res/web_modules/angular-ladda/index.js
vendored
|
@ -2,3 +2,7 @@ require('ladda/dist/ladda-themeless.min.css')
|
||||||
window.Ladda = require('ladda/js/ladda')
|
window.Ladda = require('ladda/js/ladda')
|
||||||
require('angular-ladda/src/angular-ladda')
|
require('angular-ladda/src/angular-ladda')
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
Ladda: window.Ladda,
|
||||||
|
name: 'angular-ladda'
|
||||||
|
}
|
||||||
|
|
5
res/web_modules/gettext/index.js
Normal file
5
res/web_modules/gettext/index.js
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
require('angular-gettext')
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: 'gettext'
|
||||||
|
}
|
|
@ -1,2 +1,6 @@
|
||||||
require('ng-file-upload/angular-file-upload-html5-shim')
|
require('ng-file-upload/angular-file-upload-html5-shim')
|
||||||
require('ng-file-upload/angular-file-upload')
|
require('ng-file-upload/angular-file-upload')
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: 'angularFileUpload'
|
||||||
|
}
|
||||||
|
|
5
res/web_modules/ui-bootstrap/index.js
Normal file
5
res/web_modules/ui-bootstrap/index.js
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
require('script!angular-bootstrap/ui-bootstrap-tpls')
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: 'ui.bootstrap'
|
||||||
|
}
|
|
@ -56,8 +56,7 @@ module.exports = {
|
||||||
{ test: /angular-growl\.js/, loader: 'imports?angular=angular'},
|
{ test: /angular-growl\.js/, loader: 'imports?angular=angular'},
|
||||||
{ test: /oboe-browser\.js/, loader: 'imports?define=>false!exports?oboe'},
|
{ test: /oboe-browser\.js/, loader: 'imports?define=>false!exports?oboe'},
|
||||||
{ test: /uuid\.js/, loader: 'imports?require=>undefined'},
|
{ test: /uuid\.js/, loader: 'imports?require=>undefined'},
|
||||||
{ test: /localforage\.js/, loader: 'script'},
|
//{ test: /ui-bootstrap-tpls\.js/, loader: 'script'},
|
||||||
{ test: /ui-bootstrap-tpls\.js/, loader: 'script'},
|
|
||||||
{ test: /dialogs\.js/, loader: 'script'},
|
{ test: /dialogs\.js/, loader: 'script'},
|
||||||
{ test: /bluebird\.js/, loader: 'imports?require=>undefined'}
|
{ test: /bluebird\.js/, loader: 'imports?require=>undefined'}
|
||||||
],
|
],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue