mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-22 16:55:14 +02:00
Moved Remote Debug from Advanced to Dashboard for faster access.
This commit is contained in:
12
res/app/control-panes/dashboard/remote-debug/index.js
Normal file
12
res/app/control-panes/dashboard/remote-debug/index.js
Normal file
@@ -0,0 +1,12 @@
|
||||
require('./remote-debug.css')
|
||||
|
||||
module.exports = angular.module('stf.remote-debug', [
|
||||
|
||||
])
|
||||
.run(["$templateCache", function ($templateCache) {
|
||||
$templateCache.put(
|
||||
'control-panes/advanced/remote-debug/remote-debug.jade',
|
||||
require('./remote-debug.jade')
|
||||
)
|
||||
}])
|
||||
.controller('RemoteDebugCtrl', require('./remote-debug-controller'))
|
||||
@@ -0,0 +1,17 @@
|
||||
module.exports = function RemoteDebugCtrl($scope, $timeout) {
|
||||
function startRemoteConnect() {
|
||||
$scope.control.startRemoteConnect().then(function (result) {
|
||||
var url = result.lastData
|
||||
$scope.$apply(function () {
|
||||
$scope.debugCommand = 'adb connect ' + url
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// TODO: Remove timeout and fix control initialization
|
||||
if ($scope.control) {
|
||||
startRemoteConnect()
|
||||
} else {
|
||||
$timeout(startRemoteConnect, 200)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
describe('RemoteDebugCtrl', function () {
|
||||
|
||||
beforeEach(module('stf.remote-debug'));
|
||||
|
||||
var scope, ctrl;
|
||||
|
||||
beforeEach(inject(function ($rootScope, $controller) {
|
||||
scope = $rootScope.$new();
|
||||
ctrl = $controller('RemoteDebugCtrl', {$scope: scope});
|
||||
}));
|
||||
|
||||
it('should ...', inject(function () {
|
||||
expect(1).toEqual(1);
|
||||
|
||||
}));
|
||||
|
||||
});
|
||||
@@ -0,0 +1,10 @@
|
||||
.stf-remote-debug {
|
||||
|
||||
}
|
||||
|
||||
.stf-remote-debug .remote-debug-textarea {
|
||||
resize: none;
|
||||
cursor: text;
|
||||
font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
|
||||
font-size: 12px;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
.widget-container.fluid-height.stf-remote-debug(ng-controller='RemoteDebugCtrl')
|
||||
.heading
|
||||
i.fa.fa-bug
|
||||
span(translate) Remote debug
|
||||
i.fa.fa-question-circle.pull-right(tooltip='{{"Run the following on your command line to debug the device from your IDE" | translate}}', tooltip-placement='left')
|
||||
.widget-content.padded
|
||||
.form-inline
|
||||
textarea(readonly, rows='1', ng-model='debugCommand', msd-elastic, text-focus-select).form-control.remote-debug-textarea
|
||||
|
||||
Reference in New Issue
Block a user