Skip to content

Commit c31b6a1

Browse files
Merge pull request #135 from AD-SDL/aileen_dev
- Support Workflow Admin Actions - Add Events to Dashboard - Other miscellaneous tweaks and improvements to dashboard
2 parents 206b22e + 83df291 commit c31b6a1

28 files changed

+1091
-182
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ RUN --mount=type=cache,target=/root/.cache \
4949
pip install ./wei
5050

5151
COPY wei-entrypoint.sh /wei-entrypoint.sh
52+
RUN ls -l /wei-entrypoint.sh
5253
RUN chmod +x /wei-entrypoint.sh
5354
ENTRYPOINT [ "/wei-entrypoint.sh" ]
5455

package-lock.json

Lines changed: 290 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
22
"dependencies": {
3-
"prettier": "^3.3.2"
3+
"prettier": "^3.3.2",
4+
"vue": "^3.5.12"
5+
},
6+
"devDependencies": {
7+
"@types/vue": "^1.0.31",
8+
"@vue/compiler-sfc": "^3.5.12"
49
}
510
}

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "ad_sdl.wei"
3-
version = "0.7.3"
3+
version = "0.7.4"
44
description = "The Rapid Prototyping Laboratory's Workflow Execution Interface."
55
authors = [
66
{name = "Rafael Vescovi", email = "ravescovi@anl.gov"},

src/ui/src/components/AdminButtons/CancelButton.vue

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,19 @@
2222
</template>
2323

2424
<script setup lang="ts">
25-
import { main_url } from "@/store";
26-
import { ref, watchEffect } from 'vue';
25+
import {
26+
ref,
27+
watchEffect,
28+
} from 'vue';
29+
30+
import { main_url } from '@/store';
2731
2832
const props = defineProps<{
2933
module?: string;
3034
module_status?: string;
35+
wf_run_id?: string;
36+
wf_status?: string;
37+
can_Cancel?: boolean;
3138
}>();
3239
3340
const cancel_url = ref('')
@@ -39,10 +46,17 @@ watchEffect(() => {
3946
if (props.module) {
4047
cancel_url.value = main_url.value.concat('/admin/cancel/'.concat(props.module))
4148
hoverText.value = "Cancel Module Action"
49+
console.log(cancel_url.value)
50+
}
51+
else if (props.wf_run_id) {
52+
cancel_url.value = main_url.value.concat('/admin/cancel_wf/'.concat(props.wf_run_id))
53+
hoverText.value = "Cancel Workflow"
54+
console.log(cancel_url.value)
4255
}
4356
else {
4457
cancel_url.value = main_url.value.concat('/admin/cancel')
45-
hoverText.value = "Cancel All Workflows"
58+
hoverText.value = "Cancel Workcell"
59+
console.log(cancel_url.value)
4660
}
4761
})
4862
@@ -56,6 +70,9 @@ watchEffect(() => {
5670
canCancel.value = false
5771
}
5872
}
73+
else if (props.wf_run_id) {
74+
canCancel.value = ["running", "queued", "in_progress"].includes(props.wf_status || "") && props.can_Cancel === true;
75+
}
5976
else {
6077
// TODO: Allow cancel if there's an actively running workflow
6178
canCancel.value = true
@@ -66,13 +83,12 @@ watchEffect(() => {
6683
const sendCancelCommand = async () => {
6784
try {
6885
const response = await fetch(cancel_url.value, {
69-
method: 'POST',
86+
method: "POST",
7087
});
7188
if (!response.ok) {
7289
throw new Error(`HTTP error! status: ${response.status}`);
7390
}
7491
console.log('Cancel successful');
75-
7692
} catch (error) {
7793
console.error('Error in cancel:', error);
7894
}

0 commit comments

Comments
 (0)