mirror of
https://github.com/openstf/stf
synced 2025-10-04 18:29:17 +02:00
Screenshot resizing works in the UI now. Still missing rate limiting.
This commit is contained in:
parent
e56d757cde
commit
c0d02c4e3a
8 changed files with 43 additions and 47 deletions
26
lib/cli.js
26
lib/cli.js
|
@ -400,6 +400,9 @@ program
|
|||
.option('-r, --storage-url <url>'
|
||||
, 'URL to storage client'
|
||||
, String)
|
||||
.option('--storage-plugin-image-url <url>'
|
||||
, 'URL to image storage plugin'
|
||||
, String)
|
||||
.option('-u, --connect-sub <endpoint>'
|
||||
, 'sub endpoint'
|
||||
, cliutil.list)
|
||||
|
@ -418,6 +421,9 @@ program
|
|||
if (!options.storageUrl) {
|
||||
this.missingArgument('--storage-url')
|
||||
}
|
||||
if (!options.storagePluginImageUrl) {
|
||||
this.missingArgument('--storage-plugin-image-url')
|
||||
}
|
||||
if (!options.connectSub) {
|
||||
this.missingArgument('--connect-sub')
|
||||
}
|
||||
|
@ -431,6 +437,7 @@ program
|
|||
, ssid: options.ssid
|
||||
, authUrl: options.authUrl
|
||||
, storageUrl: options.storageUrl
|
||||
, storagePluginImageUrl: options.storagePluginImageUrl
|
||||
, endpoints: {
|
||||
sub: options.connectSub
|
||||
, push: options.connectPush
|
||||
|
@ -484,10 +491,6 @@ program
|
|||
, 'port (or $PORT)'
|
||||
, Number
|
||||
, process.env.PORT || 7100)
|
||||
.option('--public-ip <ip>'
|
||||
, 'public ip for global access'
|
||||
, String
|
||||
, ip())
|
||||
.option('--save-dir <dir>'
|
||||
, 'where to save files'
|
||||
, String
|
||||
|
@ -495,7 +498,6 @@ program
|
|||
.action(function(options) {
|
||||
require('./roles/storage/temp')({
|
||||
port: options.port
|
||||
, publicIp: options.publicIp
|
||||
, saveDir: options.saveDir
|
||||
})
|
||||
})
|
||||
|
@ -586,6 +588,10 @@ program
|
|||
, 'storage port'
|
||||
, Number
|
||||
, 7102)
|
||||
.option('--storage-plugin-image-port <port>'
|
||||
, 'storage image plugin port'
|
||||
, Number
|
||||
, 7103)
|
||||
.option('--provider <name>'
|
||||
, 'provider name (or os.hostname())'
|
||||
, String
|
||||
|
@ -676,6 +682,8 @@ program
|
|||
, '--auth-url', util.format('http://localhost:%d/', options.authPort)
|
||||
, '--storage-url'
|
||||
, util.format('http://localhost:%d/', options.storagePort)
|
||||
, '--storage-plugin-image-url'
|
||||
, util.format('http://localhost:%d/', options.storagePluginImagePort)
|
||||
, '--connect-sub', options.bindAppPub
|
||||
, '--connect-push', options.bindAppPull
|
||||
].concat((function() {
|
||||
|
@ -691,6 +699,14 @@ program
|
|||
'storage-temp'
|
||||
, '--port', options.storagePort
|
||||
])
|
||||
|
||||
// image processor
|
||||
, procutil.fork(__filename, [
|
||||
'storage-plugin-image'
|
||||
, '--port', options.storagePluginImagePort
|
||||
, '--storage-url'
|
||||
, util.format('http://localhost:%d/', options.storagePort)
|
||||
])
|
||||
]
|
||||
|
||||
function shutdown() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue