mirror of
https://github.com/openstf/stf
synced 2025-10-05 19:42:01 +02:00
Refactoring ADB add keys to its own directive so it can be shared.
This commit is contained in:
parent
a83ecd43ed
commit
13d40a4649
11 changed files with 153 additions and 28 deletions
12
res/app/components/stf/keys/add-adb-key/adb-keys-service.js
Normal file
12
res/app/components/stf/keys/add-adb-key/adb-keys-service.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
module.exports = function AdbKeysServiceFactory() {
|
||||
var service = {}
|
||||
|
||||
service.hostNameFromKey = function (key) {
|
||||
if (key.match(/.+= (.+)/)) {
|
||||
return key.replace(/.+= (.+)/g, '$1').replace(/(\.local)?/g, '')
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
return service
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue