💄 Move "Delete Current Execution Data" button next to "Execute

Workflow" button
This commit is contained in:
Jan Oberhauser 2019-06-24 13:52:03 +02:00
parent 289770357a
commit e9eb18759c
2 changed files with 17 additions and 32 deletions

View file

@ -29,10 +29,6 @@
</div>
<div class="clear-execution clickable" v-if="!isReadOnly && workflowExecution && !workflowRunning" @click="clearExecutionData()" title="Deletes the current Execution Data.">
<font-awesome-icon icon="trash" class="clear-execution-icon" />
</div>
<div class="push-connection-lost" v-if="!isPushConnectionActive">
<el-tooltip placement="bottom-end" effect="light">
<div slot="content">
@ -158,10 +154,6 @@ export default mixins(
},
},
methods: {
clearExecutionData () {
this.$store.commit('setWorkflowExecutionData', null);
this.updateNodesExecutionIssues();
},
async openWorkflow (workflowId: string) {
// Change to other workflow
this.$router.push({
@ -288,27 +280,4 @@ export default mixins(
border-top: 1px solid #707070;
}
.clear-execution {
position: absolute;
top: calc(50% - 19px);
line-height: 65px;
right: 200px;
width: 38px;
height: 38px;
line-height: 38px;
font-size: 18px;
text-align: center;
border-radius: 19px;
background-color: $--color-primary-light;
color: $--color-primary;
&:hover {
transform: scale(1.1);
}
.clear-execution-icon {
color: #f56c6c;
}
}
</style>

View file

@ -84,7 +84,16 @@
>
<font-awesome-icon icon="stop" :class="{'fa-spin': stopExecutionInProgress}"/>
</el-button>
<el-button
v-if="!isReadOnly && workflowExecution && !workflowRunning"
circle
type="text"
@click.stop="clearExecutionData()"
class="clear-execution"
title="Deletes the current Execution Data."
>
<font-awesome-icon icon="trash" class="clear-execution-icon" />
</el-button>
</div>
</div>
</template>
@ -225,6 +234,9 @@ export default mixins(
}
return returnClasses;
},
workflowExecution (): IExecutionResponse | null {
return this.$store.getters.getWorkflowExecution;
},
workflowRunning (): boolean {
return this.$store.getters.isActionActive('workflowRunning');
},
@ -259,6 +271,10 @@ export default mixins(
// @ts-ignore
await this.debouncedFunctions[functionName].apply(this, inputParameters);
},
clearExecutionData () {
this.$store.commit('setWorkflowExecutionData', null);
this.updateNodesExecutionIssues();
},
openNodeCreator () {
this.createNodeActive = true;
},