Commit f5ab2a55 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Added more commands to GUI.

parent e9d9cf10
...@@ -367,7 +367,7 @@ class Api { ...@@ -367,7 +367,7 @@ class Api {
return this.swaggerPromise return this.swaggerPromise
.then(client => client.apis.uploads.get_upload_command()) .then(client => client.apis.uploads.get_upload_command())
.catch(this.handleApiError) .catch(this.handleApiError)
.then(response => response.body.upload_command) .then(response => response.body)
.finally(this.onFinishLoading) .finally(this.onFinishLoading)
} }
} }
......
...@@ -93,7 +93,11 @@ class Uploads extends React.Component { ...@@ -93,7 +93,11 @@ class Uploads extends React.Component {
publishedUploads: null, publishedUploads: null,
publishedUploadsPage: 1, publishedUploadsPage: 1,
publishedUploadsTotal: 0, publishedUploadsTotal: 0,
uploadCommand: 'loading ...', uploadCommand: {
upload_command: 'loading ...',
upload_tar_command: 'loading ...',
upload_progress_command: 'loading ...'
},
selectedUnpublishedUploads: [], selectedUnpublishedUploads: [],
showPublishDialog: false showPublishDialog: false
} }
...@@ -389,7 +393,7 @@ class Uploads extends React.Component { ...@@ -389,7 +393,7 @@ class Uploads extends React.Component {
<div className={classes.commandMarkup}> <div className={classes.commandMarkup}>
<Markdown>{` <Markdown>{`
\`\`\` \`\`\`
${uploadCommand} ${uploadCommand.upload_command}
\`\`\` \`\`\`
`}</Markdown> `}</Markdown>
</div> </div>
...@@ -403,6 +407,12 @@ class Uploads extends React.Component { ...@@ -403,6 +407,12 @@ class Uploads extends React.Component {
</CopyToClipboard> </CopyToClipboard>
</div> </div>
<Help cookie="moreUploadCommandHelp">{`
The above command can be modified. To see progress on large files, use
\`${uploadCommand.upload_progress_command}\`. To
\`tar\` and upload in one command, use \`${uploadCommand.upload_tar_command}\`.
`}</Help>
{this.renderUnpublishedUploads()} {this.renderUnpublishedUploads()}
{this.renderPublishedUploads()} {this.renderPublishedUploads()}
</Agree> </Agree>
......
...@@ -513,7 +513,9 @@ class UploadResource(Resource): ...@@ -513,7 +513,9 @@ class UploadResource(Resource):
upload_command_model = api.model('UploadCommand', { upload_command_model = api.model('UploadCommand', {
'upload_url': fields.Url, 'upload_url': fields.Url,
'upload_command': fields.String 'upload_command': fields.String,
'upload_progress_command': fields.String,
'upload_tar_command': fields.String
}) })
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment