version 1.1L

* UI responsive table fix
* Background scanning for backends
* Callback URL parameter to notify on scan results
This commit is contained in:
Volodymyr Smirnov
2020-10-30 11:20:08 +02:00
parent 3ff8d1d05f
commit ee071811e8
30 changed files with 345 additions and 148 deletions

View File

@@ -9,6 +9,9 @@
</b-input-group-append>
</b-input-group>
<b-input id="callback-url" v-model="callbackUrl" class="mt-3"
placeholder="Optional callback URL. I.e. https://pipedream.com/" type="url"/>
<b-progress v-if="uploading" :value="progress" animated class="mt-3"/>
</b-tab>
@@ -19,6 +22,9 @@
<b-button :disabled="!isUrl(url)" variant="primary" @click="scanUrl">Scan</b-button>
</b-input-group-append>
</b-input-group>
<b-input id="callback-url" v-model="callbackUrl" class="mt-3"
placeholder="Optional callback URL. I.e. https://pipedream.com/" type="url"/>
</b-tab>
</b-tabs>
</b-card>
@@ -37,6 +43,7 @@ export default Vue.extend({
file: null as File | null,
url: '' as string,
callbackUrl: '' as string
}
},
@@ -53,6 +60,9 @@ export default Vue.extend({
data.append('file', this.file, this.file.name);
if (this.isUrl(this.callbackUrl))
data.append('callbackUrl', this.callbackUrl);
try {
this.uploading = true;
@@ -80,6 +90,9 @@ export default Vue.extend({
data.append('url', this.url);
if (this.isUrl(this.callbackUrl))
data.append('callbackUrl', this.callbackUrl);
const result = await this.$axios.$post<ScanResult>('queue/url', data);
await this.$router.push({name: 'id', params: {id: result.id}});