Improved styling and synchronisation
This commit is contained in:
parent
53644a691b
commit
46444770f3
3 changed files with 41 additions and 9 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div id="log-container" ref="logContainer">
|
<div class="log-container" ref="logContainer">
|
||||||
<div v-if="log">
|
<div v-if="log">
|
||||||
<div v-for="(item, index) in log" :key="`log_entry_${index}`">
|
<div v-for="(item, index) in log" :key="`log_entry_${index}`">
|
||||||
{{ item.message }}
|
{{ item.message }}
|
||||||
|
|
@ -44,9 +44,8 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
#log-container {
|
.log-container {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 6em;
|
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
class=""
|
class=""
|
||||||
uk-modal="bg-close: false; esc-close: false; stack: true;"
|
uk-modal="bg-close: false; esc-close: false; stack: true;"
|
||||||
>
|
>
|
||||||
<div class="uk-modal-dialog uk-modal-body uk-margin-auto-vertical">
|
<div class="uk-modal-dialog uk-modal-body uk-margin-auto-vertical" id="status-modal">
|
||||||
<h2>{{ submitLabel }}</h2>
|
<h2>{{ submitLabel }}</h2>
|
||||||
<action-log-display :log="log" :task-status="taskStatus" />
|
<action-log-display :log="log" :task-status="taskStatus" />
|
||||||
<div id="progress-and-cancel-row">
|
<div id="progress-and-cancel-row">
|
||||||
|
|
@ -308,6 +308,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
terminateTask: function() {
|
terminateTask: function() {
|
||||||
|
console.log(`deleting task at ${this.taskUrl}`);
|
||||||
axios.delete(this.taskUrl);
|
axios.delete(this.taskUrl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -336,4 +337,8 @@ export default {
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#status-modal .log-container {
|
||||||
|
height:10em;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -39,12 +39,12 @@
|
||||||
:submit-url="smartScanUri"
|
:submit-url="smartScanUri"
|
||||||
submit-label="Start smart scan"
|
submit-label="Start smart scan"
|
||||||
:can-terminate="true"
|
:can-terminate="true"
|
||||||
:modal-progress="true"
|
:submit-data="{ sample_check: true }"
|
||||||
:submit-data="{ sample_check: false }"
|
|
||||||
@update:taskRunning="scanning = $event"
|
@update:taskRunning="scanning = $event"
|
||||||
@update:taskStatus="taskStatus = $event"
|
@update:taskStatus="taskStatus = $event"
|
||||||
@update:progress="progress = $event"
|
@update:progress="progress = $event"
|
||||||
@update:log="log = $event"
|
@update:log="log = $event"
|
||||||
|
ref="smartScanTaskSubmitter"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-margin">
|
<div class="uk-margin">
|
||||||
|
|
@ -52,7 +52,6 @@
|
||||||
:submit-url="smartScanUri"
|
:submit-url="smartScanUri"
|
||||||
submit-label="Start manual scan"
|
submit-label="Start manual scan"
|
||||||
:can-terminate="true"
|
:can-terminate="true"
|
||||||
:modal-progress="true"
|
|
||||||
:submit-data="{ sample_check: false }"
|
:submit-data="{ sample_check: false }"
|
||||||
@update:taskRunning="scanning = $event"
|
@update:taskRunning="scanning = $event"
|
||||||
@update:taskStatus="taskStatus = $event"
|
@update:taskStatus="taskStatus = $event"
|
||||||
|
|
@ -61,6 +60,22 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-show="scanning">
|
||||||
|
<action-log-display
|
||||||
|
id="log-display"
|
||||||
|
:log="log"
|
||||||
|
:task-status="taskStatus"
|
||||||
|
/>
|
||||||
|
<action-progress-bar :progress="progress" :task-status="taskStatus" />
|
||||||
|
<button
|
||||||
|
v-if="scanning"
|
||||||
|
type="button"
|
||||||
|
class="uk-button uk-button-danger uk-margin-remove uk-float-right uk-width-1-1"
|
||||||
|
@click="$refs.smartScanTaskSubmitter.terminateTask()"
|
||||||
|
>
|
||||||
|
Cancel
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="view-component uk-width-expand">
|
<div class="view-component uk-width-expand">
|
||||||
<streamDisplay />
|
<streamDisplay />
|
||||||
|
|
@ -72,6 +87,8 @@
|
||||||
import streamDisplay from "./streamContent.vue";
|
import streamDisplay from "./streamContent.vue";
|
||||||
import taskSubmitter from "../genericComponents/taskSubmitter";
|
import taskSubmitter from "../genericComponents/taskSubmitter";
|
||||||
import propertyControl from "../labThingsComponents/propertyControl.vue";
|
import propertyControl from "../labThingsComponents/propertyControl.vue";
|
||||||
|
import actionLogDisplay from "../genericComponents/actionLogDisplay.vue";
|
||||||
|
import actionProgressBar from "../genericComponents/actionProgressBar.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "SlideScanContent",
|
name: "SlideScanContent",
|
||||||
|
|
@ -79,14 +96,16 @@ export default {
|
||||||
components: {
|
components: {
|
||||||
streamDisplay,
|
streamDisplay,
|
||||||
taskSubmitter,
|
taskSubmitter,
|
||||||
propertyControl
|
propertyControl,
|
||||||
|
actionLogDisplay,
|
||||||
|
actionProgressBar
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
lastScanName: null,
|
lastScanName: null,
|
||||||
scanning: false,
|
scanning: false,
|
||||||
taskStatus: null,
|
taskStatus: "pending",
|
||||||
progress: null,
|
progress: null,
|
||||||
log: []
|
log: []
|
||||||
};
|
};
|
||||||
|
|
@ -109,3 +128,12 @@ export default {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
#log-display {
|
||||||
|
height: 20em;
|
||||||
|
}
|
||||||
|
.control-component {
|
||||||
|
width: 33%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue