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-touch')
|
||||
|
||||
require('angular-gettext')
|
||||
require('ng-file-upload')
|
||||
require('angular-hotkeys')
|
||||
|
||||
angular.module('app', [
|
||||
'ngRoute',
|
||||
'ngTouch',
|
||||
'gettext',
|
||||
require('gettext').name,
|
||||
'angularFileUpload',
|
||||
'cfp.hotkeys',
|
||||
require('angular-hotkeys').name,
|
||||
require('./layout').name,
|
||||
require('./device-list').name,
|
||||
require('./control-panes').name,
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
describe('AdminModeService', function() {
|
||||
|
||||
beforeEach(module('stf.admin-mode'));
|
||||
|
||||
it('should ...', inject(function(AdminModeService) {
|
||||
|
||||
//expect(AdminModeService.doSomething()).toEqual('something');
|
||||
|
||||
}));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
})
|
|
@ -1,6 +1,6 @@
|
|||
describe('angularDraggabilly', function () {
|
||||
|
||||
beforeEach(module('stf.angular-draggabilly'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, compile;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('angularPackery', function () {
|
||||
|
||||
beforeEach(module('stf.angular-packery'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, compile;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('basicMode', function () {
|
||||
|
||||
beforeEach(module('stf.basic-mode'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, compile;
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
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 () {
|
||||
|
||||
beforeEach(module('stf.badge-icon'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, compile;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('blurElement', function () {
|
||||
|
||||
beforeEach(module('stf.blur-element'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, compile;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('counter', function () {
|
||||
|
||||
beforeEach(module('stf.counter'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, compile;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('enableAutofill', function () {
|
||||
|
||||
beforeEach(module('stf.enable-autofill'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, compile;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('fallbackImage', function () {
|
||||
|
||||
beforeEach(module('stf.fallback-image'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, compile;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('filterButton', function () {
|
||||
|
||||
beforeEach(module('stf.filter-button'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, compile;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('focusElement', function () {
|
||||
|
||||
beforeEach(module('stf.focus-element'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, compile;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('iconInsideInput', function () {
|
||||
|
||||
beforeEach(module('stf.icon-inside-input'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, compile;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('includeCached', function () {
|
||||
|
||||
beforeEach(module('stf.include-cached'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, compile;
|
||||
|
||||
|
|
|
@ -3,4 +3,5 @@
|
|||
require('./modals.css')
|
||||
|
||||
module.exports = angular.module('stf.modals.common', [
|
||||
require('ui-bootstrap').name
|
||||
])
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('VersionUpdateService', function() {
|
||||
|
||||
beforeEach(module('stf.version-update'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
it('should ...', inject(function(VersionUpdateService) {
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('FatalMessageService', function() {
|
||||
|
||||
beforeEach(module('stf.fatal-message'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
it('should ...', inject(function(FatalMessageService) {
|
||||
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
require('angular-route')
|
||||
|
||||
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'))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('VersionUpdateService', function() {
|
||||
|
||||
beforeEach(module('stf.version-update'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
it('should ...', inject(function(VersionUpdateService) {
|
||||
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
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) {
|
||||
|
||||
//expect(FatalMessageService.doSomething()).toEqual('something');
|
||||
//expect(VersionUpdateService.doSomething()).toEqual('something');
|
||||
|
||||
}));
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('nativeAutocomplete', function () {
|
||||
|
||||
beforeEach(module('stf.native-autocomplete'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, compile;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('ngEnter', function () {
|
||||
|
||||
beforeEach(module('stf.ng-enter'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, compile;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('niceTabs', function () {
|
||||
|
||||
beforeEach(module('stf.nice-tabs'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, compile;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('refreshPage', function () {
|
||||
|
||||
beforeEach(module('stf.refresh-page'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, compile;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('textFocusSelect', function () {
|
||||
|
||||
beforeEach(module('stf.text-focus-select'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, compile;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('tooltips', function () {
|
||||
|
||||
beforeEach(module('stf.tooltips'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, compile;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('FilterStringService', function() {
|
||||
|
||||
beforeEach(module('stf.filter-string'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
it('should ...', inject(function(FilterStringService) {
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('imageOnload', function () {
|
||||
|
||||
beforeEach(module('stf.image-onload'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, compile;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('KeycodesService', function() {
|
||||
|
||||
beforeEach(module('stf.keycodes'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
it('should ...', inject(function(KeycodesService) {
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('landscape', function () {
|
||||
|
||||
beforeEach(module('stf.landscape'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, compile;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('logcatTable', function () {
|
||||
|
||||
beforeEach(module('stf.logcat-table'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, compile;
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
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'))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('LogcatService', function() {
|
||||
|
||||
beforeEach(module('stf.logcat'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
it('should ...', inject(function(LogcatService) {
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('navMenu', function () {
|
||||
|
||||
beforeEach(module('stf.nav-menu'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, compile;
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
module.exports = angular.module('stf.port-forwarding', [
|
||||
|
||||
])
|
||||
.factory('PortForwardingService', require('./port-forwarding-service'))
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
module.exports = function PortForwardingServiceFactory() {
|
||||
var service = {}
|
||||
module.exports = function () {
|
||||
var service = {}
|
||||
|
||||
|
||||
|
||||
return service
|
||||
return service
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
describe('PortForwardingService', function() {
|
||||
|
||||
beforeEach(module('stf.port-forwarding'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
it('should ...', inject(function(PortForwardingService) {
|
||||
|
||||
expect(1).toBe(1)
|
||||
//expect(PortForwardingService.doSomething()).toEqual('something');
|
||||
|
||||
}));
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
require('angular-hotkeys')
|
||||
module.exports = angular.module('stf.scoped-hotkeys', [
|
||||
|
||||
'cfp.hotkeys'
|
||||
])
|
||||
.factory('ScopedHotkeysService', require('./scoped-hotkeys-service'))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('ScopedHotkeysService', function() {
|
||||
|
||||
beforeEach(module('stf.scoped-hotkeys'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
it('should ...', inject(function(ScopedHotkeysService) {
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('screenKeyboard', function () {
|
||||
|
||||
beforeEach(module('stf.screen-keyboard'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, compile;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('screenTouch', function () {
|
||||
|
||||
beforeEach(module('stf.screen-touch'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
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'))
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
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'))
|
||||
|
|
|
@ -2,8 +2,11 @@ var io = require('socket.io')
|
|||
|
||||
module.exports = function SocketFactory($rootScope, VersionUpdateService) {
|
||||
/*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
|
||||
, 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 () {
|
||||
|
||||
beforeEach(module('stf.text-history'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, compile;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('TimelineService', function() {
|
||||
|
||||
beforeEach(module('stf.timeline'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
it('should ...', inject(function(TimelineService) {
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('timelineMessage', function () {
|
||||
|
||||
beforeEach(module('stf.timeline-message'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, compile;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('timelines', function () {
|
||||
|
||||
beforeEach(module('stf.timelines'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, compile;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('ActivityCtrl', function () {
|
||||
|
||||
beforeEach(module('stf.activity'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, ctrl;
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
require('./activity.css')
|
||||
|
||||
module.exports = angular.module('stf.activity', [
|
||||
require('gettext').name,
|
||||
require('stf/common-ui').name,
|
||||
require('stf/timeline').name
|
||||
])
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('AdvancedCtrl', function () {
|
||||
|
||||
beforeEach(module('stf.advanced'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
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;
|
||||
|
||||
beforeEach(inject(function ($rootScope, $controller) {
|
||||
scope = $rootScope.$new();
|
||||
ctrl = $controller('InputCtrl', {$scope: scope});
|
||||
ctrl = $controller('InputAdvancedCtrl', {$scope: scope});
|
||||
}));
|
||||
|
||||
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;
|
||||
|
||||
beforeEach(inject(function ($rootScope, $controller) {
|
||||
scope = $rootScope.$new();
|
||||
ctrl = $controller('InputCtrl', {$scope: scope});
|
||||
ctrl = $controller('MaintenanceCtrl', {$scope: scope});
|
||||
}));
|
||||
|
||||
it('should ...', inject(function () {
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
require('./port-forwarding.css')
|
||||
|
||||
module.exports = angular.module('stf.port-forwarding', [
|
||||
require('stf/common-ui/table').name,
|
||||
require('stf/settings').name
|
||||
])
|
||||
.run(["$templateCache", function ($templateCache) {
|
||||
$templateCache.put(
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('PortForwardingCtrl', function () {
|
||||
|
||||
beforeEach(module('stf.port-forwarding'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, ctrl;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('RunJsCtrl', function () {
|
||||
|
||||
beforeEach(module('stf.run-js'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, ctrl;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('UsbCtrl', function () {
|
||||
|
||||
beforeEach(module('stf.usb'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, ctrl;
|
||||
|
||||
|
|
|
@ -2,19 +2,22 @@ module.exports = function DeviceSettingsCtrl($scope, $timeout) {
|
|||
$scope.wifiEnabled = true
|
||||
|
||||
var getWifiStatus = function () {
|
||||
$scope.control.getWifiStatus().then(function (result) {
|
||||
$scope.$apply(function () {
|
||||
$scope.wifiEnabled = (result.lastData === 'wifi_enabled')
|
||||
if ($scope.control) {
|
||||
$scope.control.getWifiStatus().then(function (result) {
|
||||
$scope.$apply(function () {
|
||||
$scope.wifiEnabled = (result.lastData === 'wifi_enabled')
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
getWifiStatus()
|
||||
|
||||
$scope.toggleWifi = function () {
|
||||
$scope.control.setWifiEnabled(!$scope.wifiEnabled)
|
||||
$scope.wifiEnabled = !$scope.wifiEnabled
|
||||
$timeout(getWifiStatus, 500)
|
||||
if ($scope.control) {
|
||||
$scope.control.setWifiEnabled(!$scope.wifiEnabled)
|
||||
$scope.wifiEnabled = !$scope.wifiEnabled
|
||||
$timeout(getWifiStatus, 500)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('DeviceSettingsCtrl', function () {
|
||||
|
||||
beforeEach(module('stf.device-settings'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, ctrl;
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@ require('./store-account.css')
|
|||
require('angular-ladda')
|
||||
|
||||
module.exports = angular.module('stf.store-account', [
|
||||
'angular-ladda'
|
||||
'angular-ladda',
|
||||
require('stf/common-ui/table').name
|
||||
])
|
||||
.run(["$templateCache", function ($templateCache) {
|
||||
$templateCache.put('control-panes/automation/store-account/store-account.jade',
|
||||
|
|
|
@ -40,12 +40,14 @@ module.exports = function StoreAccountCtrl($scope, ngTableParams, $timeout) {
|
|||
|
||||
function getAccounts() {
|
||||
var storeAccountType = $scope.deviceAppStores[$scope.currentAppStore].package
|
||||
$scope.control.getAccounts(storeAccountType).then(function (result) {
|
||||
$scope.$apply(function () {
|
||||
$scope.accountsList = result.body
|
||||
$scope.accountsTable.reload()
|
||||
if ($scope.control) {
|
||||
$scope.control.getAccounts(storeAccountType).then(function (result) {
|
||||
$scope.$apply(function () {
|
||||
$scope.accountsList = result.body
|
||||
$scope.accountsTable.reload()
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
getAccounts()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('StoreAccountCtrl', function () {
|
||||
|
||||
beforeEach(module('stf.store-account'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, ctrl;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('CpuCtrl', function () {
|
||||
|
||||
beforeEach(module('stf.cpu'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, ctrl;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('ClipboardCtrl', function () {
|
||||
|
||||
beforeEach(module('stf.clipboard'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, ctrl;
|
||||
|
||||
|
|
|
@ -3,7 +3,8 @@ require('./clipboard.css')
|
|||
require('angular-elastic')
|
||||
|
||||
module.exports = angular.module('stf.clipboard', [
|
||||
'monospaced.elastic'
|
||||
'monospaced.elastic',
|
||||
require('gettext').name
|
||||
])
|
||||
.run(["$templateCache", function ($templateCache) {
|
||||
$templateCache.put('control-panes/dashboard/clipboard/clipboard.jade',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('DashboardCtrl', function () {
|
||||
|
||||
beforeEach(module('stf.dashboard'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, ctrl;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('NavigationCtrl', function () {
|
||||
|
||||
beforeEach(module('stf.navigation'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, ctrl;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('RemoteDebugCtrl', function () {
|
||||
|
||||
beforeEach(module('stf.remote-debug'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, ctrl;
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
require('./shell.css')
|
||||
|
||||
module.exports = angular.module('stf.shell', [
|
||||
require('stf/common-ui').name
|
||||
require('stf/common-ui').name,
|
||||
require('gettext').name
|
||||
])
|
||||
.run(["$templateCache", function ($templateCache) {
|
||||
$templateCache.put('control-panes/dashboard/shell/shell.jade',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('ShellCtrl', function () {
|
||||
|
||||
beforeEach(module('stf.shell'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, ctrl;
|
||||
|
||||
|
|
|
@ -4,7 +4,9 @@ module.exports = function ActivitiesCtrl($scope) {
|
|||
$scope.selectedAction = ''
|
||||
$scope.selectedCategory = ''
|
||||
$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.activityActions = []
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('ActivitiesCtrl', function () {
|
||||
|
||||
beforeEach(module('stf.activities'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, ctrl;
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@ require('./upload.css')
|
|||
|
||||
module.exports = angular.module('stf.upload', [
|
||||
require('stf/common-ui/tree').name,
|
||||
require('./activities').name
|
||||
require('./activities').name,
|
||||
require('stf/settings').name
|
||||
])
|
||||
.run(["$templateCache", function ($templateCache) {
|
||||
$templateCache.put('control-panes/dashboard/upload/upload.jade',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('UploadCtrl', function () {
|
||||
|
||||
beforeEach(module('stf.upload'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, ctrl;
|
||||
|
||||
|
|
|
@ -3,8 +3,7 @@ require('./device-control.css')
|
|||
module.exports = angular.module('device-control', [
|
||||
require('stf/device').name,
|
||||
require('stf/control').name,
|
||||
require('stf/screen').name,
|
||||
require('stf/sprintf').name
|
||||
require('stf/screen').name
|
||||
])
|
||||
.run(["$templateCache", function ($templateCache) {
|
||||
$templateCache.put('control-panes/device-control/device-control.jade',
|
||||
|
|
|
@ -5,13 +5,14 @@ module.exports = function InfoCtrl($scope, LightboxImageService) {
|
|||
LightboxImageService.open(title, enhancedPhoto800)
|
||||
}
|
||||
|
||||
|
||||
var getSdStatus = function () {
|
||||
$scope.control.getSdStatus().then(function (result) {
|
||||
$scope.$apply(function () {
|
||||
$scope.sdCardMounted = (result.lastData === 'sd_mounted')
|
||||
if ($scope.control) {
|
||||
$scope.control.getSdStatus().then(function (result) {
|
||||
$scope.$apply(function () {
|
||||
$scope.sdCardMounted = (result.lastData === 'sd_mounted')
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
getSdStatus()
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('InfoCtrl', function () {
|
||||
|
||||
beforeEach(module('stf.info'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, ctrl;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('InspectCtrl', function () {
|
||||
|
||||
beforeEach(module('stf.inspect'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, ctrl;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('LogsCtrl', function () {
|
||||
|
||||
beforeEach(module('stf.logs'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, ctrl;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('ResourcesCtrl', function () {
|
||||
|
||||
beforeEach(module('stf.resources'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, ctrl;
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
require('./screenshots.css')
|
||||
|
||||
module.exports = angular.module('stf.screenshots', [
|
||||
require('stf/image-onload').name
|
||||
require('stf/image-onload').name,
|
||||
require('stf/settings').name
|
||||
])
|
||||
.run(["$templateCache", function ($templateCache) {
|
||||
$templateCache.put('control-panes/screenshots/screenshots.jade',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('ScreenshotsCtrl', function () {
|
||||
|
||||
beforeEach(module('stf.screenshots'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, ctrl;
|
||||
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
require('se7en-bootstrap-3')
|
||||
|
||||
require('angular-bootstrap')
|
||||
|
||||
require('angular-borderlayout')
|
||||
|
||||
|
||||
require('./cursor.css')
|
||||
require('./stf-se7en.css')
|
||||
require('./small.css')
|
||||
|
@ -14,8 +9,8 @@ module.exports = angular.module('layout', [
|
|||
require('../settings/language').name,
|
||||
require('stf/landscape').name,
|
||||
require('stf/basic-mode').name,
|
||||
'ui.bootstrap',
|
||||
'fa.directive.borderLayout',
|
||||
require('ui-bootstrap').name,
|
||||
require('angular-borderlayout').name,
|
||||
require('stf/common-ui').name,
|
||||
require('stf/socket/socket-state').name,
|
||||
require('stf/browser-info').name
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe('MenuCtrl', function () {
|
||||
|
||||
beforeEach(module('stf.menu'));
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
|
||||
var scope, ctrl;
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ module.exports = function (config) {
|
|||
|
||||
preprocessors: {
|
||||
'helpers/**/*.js': ['webpack'],
|
||||
'../app/**/*.js': ['webpack']
|
||||
'../**/*.js': ['webpack']
|
||||
},
|
||||
exclude: [
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
require('angular-borderlayout/src/borderLayout.js')
|
||||
require('angular-borderlayout/src/borderLayout.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('./hotkeys.css')
|
||||
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')
|
||||
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')
|
||||
|
||||
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: /oboe-browser\.js/, loader: 'imports?define=>false!exports?oboe'},
|
||||
{ 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: /bluebird\.js/, loader: 'imports?require=>undefined'}
|
||||
],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue