Commit 77a8cfdb authored by Dheeraj Joshi's avatar Dheeraj Joshi

Add cancel button to On-demand scan form

parent c126034b
...@@ -310,6 +310,10 @@ export default { ...@@ -310,6 +310,10 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
onCancelClicked() {
this.clearStorage = true;
redirectTo(this.profilesLibraryPath);
},
showErrors(errorType, errors = []) { showErrors(errorType, errors = []) {
this.errorType = errorType; this.errorType = errorType;
this.errors = errors; this.errors = errors;
...@@ -569,6 +573,13 @@ export default { ...@@ -569,6 +573,13 @@ export default {
> >
{{ s__('OnDemandScans|Save scan') }} {{ s__('OnDemandScans|Save scan') }}
</gl-button> </gl-button>
<gl-button
data-testid="on-demand-scan-cancel-button"
:disabled="loading"
@click="onCancelClicked"
>
{{ __('Cancel') }}
</gl-button>
</div> </div>
</template> </template>
</gl-form> </gl-form>
......
Markdown is supported
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