mirror of
https://github.com/volodymyrsmirnov/MalwareMultiScan.git
synced 2025-08-25 22:01:16 +00:00
version 1.1L
* UI responsive table fix * Background scanning for backends * Callback URL parameter to notify on scan results
This commit is contained in:
@@ -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}});
|
||||
|
Reference in New Issue
Block a user