46 lines
985 B
Vue
46 lines
985 B
Vue
<template>
|
|
<action-button
|
|
:thing="actionData.thing"
|
|
:action="actionData.action"
|
|
:poll-interval="actionData.poll_interval"
|
|
:submit-label="actionData.submit_label"
|
|
:can-terminate="actionData.can_terminate"
|
|
:requires-confirmation="actionData.requires_confirmation"
|
|
:confirmation-message="actionData.confirmation_message"
|
|
:button-primary="actionData.button_primary"
|
|
:modal-progress="actionData.modal_progress"
|
|
@response="actionResponse"
|
|
@error="modalError"
|
|
/>
|
|
</template>
|
|
|
|
<script>
|
|
import ActionButton from "./actionButton.vue";
|
|
|
|
// Export main app
|
|
export default {
|
|
name: "ServerSpecifiedActionButton",
|
|
|
|
components: {
|
|
ActionButton
|
|
},
|
|
|
|
|
|
props: {
|
|
actionData: {
|
|
type: Object,
|
|
required: true,
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
actionResponse: function() {
|
|
if (this.actionData.notify_on_success) {
|
|
this.modalNotify(this.actionData.success_message);
|
|
}
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style lang="less"></style>
|