diff --git a/.env b/.env index 0c91b543..a38dadd3 100644 --- a/.env +++ b/.env @@ -1,4 +1,4 @@ VITE_SERVERLESS_DEPLOYMENT = "false" -VITE_TAPIS_BASE_URL = "https://tacc.tapis.io" +VITE_TAPIS_BASE_URL = "https://dev.develop.tapis.io" # Ensure there is no ending slash! ### Run npm run init-project after changing VITE_TAPIS_BASE_URL. diff --git a/package-lock.json b/package-lock.json index bfff4028..350ef590 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "@mui/x-data-grid": "^7.7.0", "@mui/x-tree-view": "^7.16.0", "@reduxjs/toolkit": "^2.2.7", - "@tapis/tapis-typescript": "^0.0.53", + "@tapis/tapis-typescript": "^0.0.54", "@tapis/tapisui-api": "file:./packages/tapisui-api", "@tapis/tapisui-common": "file:./packages/tapisui-common", "@tapis/tapisui-extensions-core": "file:./packages/tapisui-extensions-core", @@ -3997,10 +3997,9 @@ } }, "node_modules/@tapis/tapis-typescript": { - "version": "0.0.53", - "resolved": "https://registry.npmjs.org/@tapis/tapis-typescript/-/tapis-typescript-0.0.53.tgz", - "integrity": "sha512-q+Xeadhwp4FuS5OsdC1z9eh08mGob5GRB2P/Lt66/7t6AYVzbuH4BlVTf8YLyAGsAVWur2hdc9fGm99eSguVQA==", - "license": "ISC", + "version": "0.0.54", + "resolved": "https://registry.npmjs.org/@tapis/tapis-typescript/-/tapis-typescript-0.0.54.tgz", + "integrity": "sha512-VH371k62+f/v3hyRZFt/V6alDVDCZ2HU95a+hVCIckxx0jYAJZqRHA55cdfytxc7OEdA/dvFKoLq5sVGn/L8pQ==", "dependencies": { "@tapis/tapis-typescript-actors": "^0.0.3", "@tapis/tapis-typescript-apps": "^0.0.9", @@ -4014,7 +4013,7 @@ "@tapis/tapis-typescript-streams": "^0.0.4", "@tapis/tapis-typescript-systems": "^0.0.6", "@tapis/tapis-typescript-tenants": "^0.0.2", - "@tapis/tapis-typescript-workflows": "^0.0.17", + "@tapis/tapis-typescript-workflows": "^0.0.18", "@types/mocha": "^9.0.0" } }, @@ -4079,9 +4078,9 @@ "integrity": "sha512-CebqVmJ41evXC/gYj+HphU0KHveXIPjVnjWdS7ABQpIWmvYp2xyIW4jAzhaB2GXmDaUcc+KHS+HCJBh82A6nOA==" }, "node_modules/@tapis/tapis-typescript-workflows": { - "version": "0.0.17", - "resolved": "https://registry.npmjs.org/@tapis/tapis-typescript-workflows/-/tapis-typescript-workflows-0.0.17.tgz", - "integrity": "sha512-Ac86xDR7V+3Y0u7w5em1H6K6DC1gpWmqgGtbQNzMhio4OUPqJFBjkEhWt4+LCSudFffpi+Z7LsBHoPibQIxB/g==" + "version": "0.0.18", + "resolved": "https://registry.npmjs.org/@tapis/tapis-typescript-workflows/-/tapis-typescript-workflows-0.0.18.tgz", + "integrity": "sha512-WByBNvjTWS2DKH7l2JqSlCkjfwPb/9ZhdRMONZLcVX67HdIOrErmflntKUQz6Jhtns68dkUVfe5vyWFV4qSK3Q==" }, "node_modules/@tapis/tapisui-api": { "resolved": "packages/tapisui-api", @@ -16576,7 +16575,7 @@ "version": "0.1.1", "license": "ISC", "dependencies": { - "@tapis/tapis-typescript": "^0.0.53", + "@tapis/tapis-typescript": "^0.0.54", "@tapis/tapisui-common": "file:../tapisui-common", "@tapis/tapisui-extensions-core": "file:../tapisui-extensions-core", "@tapis/tapisui-hooks": "file:../tapisui-hooks", @@ -16622,7 +16621,7 @@ "version": "0.0.14", "license": "ISC", "dependencies": { - "@tapis/tapis-typescript": "^0.0.53", + "@tapis/tapis-typescript": "^0.0.54", "axios": "^1.7.5", "cross-fetch": "^3.1.4", "streamsaver": "^2.0.5", @@ -16676,7 +16675,7 @@ "@mui/lab": "^5.0.0-alpha.173", "@mui/material": "^5.16.0", "@rollup/plugin-commonjs": "^26.0.1", - "@tapis/tapis-typescript": "^0.0.53", + "@tapis/tapis-typescript": "^0.0.54", "@tapis/tapisui-hooks": "file:../tapisui-hooks", "@vitejs/plugin-react": "^4.3.1", "bootstrap": "^4.6.2", @@ -16828,7 +16827,7 @@ "dev": true, "license": "ISC", "dependencies": { - "@tapis/tapis-typescript": "^0.0.53", + "@tapis/tapis-typescript": "^0.0.54", "simple-git": "^3.24.0" }, "devDependencies": { @@ -16863,7 +16862,7 @@ "version": "0.1.10", "license": "ISC", "dependencies": { - "@tapis/tapis-typescript": "^0.0.53", + "@tapis/tapis-typescript": "^0.0.54", "simple-git": "^3.24.0" }, "devDependencies": { @@ -16906,7 +16905,7 @@ "version": "0.0.3", "license": "ISC", "dependencies": { - "@tapis/tapis-typescript": "^0.0.53", + "@tapis/tapis-typescript": "^0.0.54", "@tapis/tapisui-api": "file:../tapisui-api", "cross-fetch": "^3.1.4", "js-cookie": "^3.0.0", diff --git a/package.json b/package.json index 5ccb50f7..e6dc139b 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "@uiw/codemirror-theme-vscode": "^4.22.2", "@uiw/react-codemirror": "^4.19.7", "@uiw/react-textarea-code-editor": "^2.0.6", - "@tapis/tapis-typescript": "^0.0.53", + "@tapis/tapis-typescript": "^0.0.54", "@tapis/tapisui-api": "file:./packages/tapisui-api", "@tapis/tapisui-common": "file:./packages/tapisui-common", "@tapis/tapisui-extensions-core": "file:./packages/tapisui-extensions-core", diff --git a/packages/example-extension/package.json b/packages/example-extension/package.json index 60618b94..cf1c5988 100644 --- a/packages/example-extension/package.json +++ b/packages/example-extension/package.json @@ -19,7 +19,7 @@ "author": "", "license": "MIT", "dependencies": { - "@tapis/tapis-typescript": "^0.0.53", + "@tapis/tapis-typescript": "^0.0.54", "@tapis/tapisui-extensions-core": "file:../tapisui-extensions-core", "@tapis/tapisui-common": "file:../tapisui-common", "@tapis/tapisui-hooks": "file:../tapisui-hooks", diff --git a/packages/icicle-tapisui-extension/package-lock.json b/packages/icicle-tapisui-extension/package-lock.json index 1b0b9cd3..74893ff9 100644 --- a/packages/icicle-tapisui-extension/package-lock.json +++ b/packages/icicle-tapisui-extension/package-lock.json @@ -9,7 +9,7 @@ "version": "0.1.1", "license": "ISC", "dependencies": { - "@tapis/tapis-typescript": "^0.0.53", + "@tapis/tapis-typescript": "^0.0.54", "@tapis/tapisui-common": "file:../tapisui-common", "@tapis/tapisui-extensions-core": "file:../tapisui-extensions-core", "@tapis/tapisui-hooks": "file:../tapisui-hooks", @@ -45,7 +45,7 @@ "@mui/lab": "^5.0.0-alpha.173", "@mui/material": "^5.16.0", "@rollup/plugin-commonjs": "^26.0.1", - "@tapis/tapis-typescript": "^0.0.53", + "@tapis/tapis-typescript": "^0.0.54", "@tapis/tapisui-hooks": "file:../tapisui-hooks", "@vitejs/plugin-react": "^4.3.1", "bootstrap": "^4.6.2", @@ -97,7 +97,7 @@ "dev": true, "license": "ISC", "dependencies": { - "@tapis/tapis-typescript": "^0.0.53", + "@tapis/tapis-typescript": "^0.0.54", "simple-git": "^3.24.0" }, "devDependencies": { @@ -111,7 +111,7 @@ "version": "0.1.10", "license": "ISC", "dependencies": { - "@tapis/tapis-typescript": "^0.0.53", + "@tapis/tapis-typescript": "^0.0.54", "simple-git": "^3.24.0" }, "devDependencies": { @@ -126,7 +126,7 @@ "version": "0.0.3", "license": "ISC", "dependencies": { - "@tapis/tapis-typescript": "^0.0.53", + "@tapis/tapis-typescript": "^0.0.54", "@tapis/tapisui-api": "file:../tapisui-api", "cross-fetch": "^3.1.4", "js-cookie": "^3.0.0", @@ -644,10 +644,9 @@ } }, "node_modules/@tapis/tapis-typescript": { - "version": "0.0.53", - "resolved": "https://registry.npmjs.org/@tapis/tapis-typescript/-/tapis-typescript-0.0.53.tgz", - "integrity": "sha512-q+Xeadhwp4FuS5OsdC1z9eh08mGob5GRB2P/Lt66/7t6AYVzbuH4BlVTf8YLyAGsAVWur2hdc9fGm99eSguVQA==", - "license": "ISC", + "version": "0.0.54", + "resolved": "https://registry.npmjs.org/@tapis/tapis-typescript/-/tapis-typescript-0.0.54.tgz", + "integrity": "sha512-VH371k62+f/v3hyRZFt/V6alDVDCZ2HU95a+hVCIckxx0jYAJZqRHA55cdfytxc7OEdA/dvFKoLq5sVGn/L8pQ==", "dependencies": { "@tapis/tapis-typescript-actors": "^0.0.3", "@tapis/tapis-typescript-apps": "^0.0.9", @@ -661,7 +660,7 @@ "@tapis/tapis-typescript-streams": "^0.0.4", "@tapis/tapis-typescript-systems": "^0.0.6", "@tapis/tapis-typescript-tenants": "^0.0.2", - "@tapis/tapis-typescript-workflows": "^0.0.17", + "@tapis/tapis-typescript-workflows": "^0.0.18", "@types/mocha": "^9.0.0" } }, @@ -726,9 +725,9 @@ "integrity": "sha512-CebqVmJ41evXC/gYj+HphU0KHveXIPjVnjWdS7ABQpIWmvYp2xyIW4jAzhaB2GXmDaUcc+KHS+HCJBh82A6nOA==" }, "node_modules/@tapis/tapis-typescript-workflows": { - "version": "0.0.17", - "resolved": "https://registry.npmjs.org/@tapis/tapis-typescript-workflows/-/tapis-typescript-workflows-0.0.17.tgz", - "integrity": "sha512-Ac86xDR7V+3Y0u7w5em1H6K6DC1gpWmqgGtbQNzMhio4OUPqJFBjkEhWt4+LCSudFffpi+Z7LsBHoPibQIxB/g==" + "version": "0.0.18", + "resolved": "https://registry.npmjs.org/@tapis/tapis-typescript-workflows/-/tapis-typescript-workflows-0.0.18.tgz", + "integrity": "sha512-WByBNvjTWS2DKH7l2JqSlCkjfwPb/9ZhdRMONZLcVX67HdIOrErmflntKUQz6Jhtns68dkUVfe5vyWFV4qSK3Q==" }, "node_modules/@tapis/tapisui-common": { "resolved": "../tapisui-common", diff --git a/packages/icicle-tapisui-extension/package.json b/packages/icicle-tapisui-extension/package.json index d52b657b..90c27329 100644 --- a/packages/icicle-tapisui-extension/package.json +++ b/packages/icicle-tapisui-extension/package.json @@ -36,7 +36,7 @@ }, "homepage": "https://github.com/ICICLE-ai/tapisui-extension-icicle#readme", "dependencies": { - "@tapis/tapis-typescript": "^0.0.53", + "@tapis/tapis-typescript": "^0.0.54", "@tapis/tapisui-extensions-core": "file:../tapisui-extensions-core", "@tapis/tapisui-common": "file:../tapisui-common", "@tapis/tapisui-hooks": "file:../tapisui-hooks", diff --git a/packages/tapisui-api/package-lock.json b/packages/tapisui-api/package-lock.json index 7d9a0749..9a5be6db 100644 --- a/packages/tapisui-api/package-lock.json +++ b/packages/tapisui-api/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.14", "license": "ISC", "dependencies": { - "@tapis/tapis-typescript": "^0.0.53", + "@tapis/tapis-typescript": "^0.0.54", "axios": "^1.7.5", "cross-fetch": "^3.1.4", "streamsaver": "^2.0.5", @@ -694,10 +694,9 @@ "license": "MIT" }, "node_modules/@tapis/tapis-typescript": { - "version": "0.0.53", - "resolved": "https://registry.npmjs.org/@tapis/tapis-typescript/-/tapis-typescript-0.0.53.tgz", - "integrity": "sha512-q+Xeadhwp4FuS5OsdC1z9eh08mGob5GRB2P/Lt66/7t6AYVzbuH4BlVTf8YLyAGsAVWur2hdc9fGm99eSguVQA==", - "license": "ISC", + "version": "0.0.54", + "resolved": "https://registry.npmjs.org/@tapis/tapis-typescript/-/tapis-typescript-0.0.54.tgz", + "integrity": "sha512-VH371k62+f/v3hyRZFt/V6alDVDCZ2HU95a+hVCIckxx0jYAJZqRHA55cdfytxc7OEdA/dvFKoLq5sVGn/L8pQ==", "dependencies": { "@tapis/tapis-typescript-actors": "^0.0.3", "@tapis/tapis-typescript-apps": "^0.0.9", @@ -711,7 +710,7 @@ "@tapis/tapis-typescript-streams": "^0.0.4", "@tapis/tapis-typescript-systems": "^0.0.6", "@tapis/tapis-typescript-tenants": "^0.0.2", - "@tapis/tapis-typescript-workflows": "^0.0.17", + "@tapis/tapis-typescript-workflows": "^0.0.18", "@types/mocha": "^9.0.0" } }, @@ -776,9 +775,9 @@ "integrity": "sha512-CebqVmJ41evXC/gYj+HphU0KHveXIPjVnjWdS7ABQpIWmvYp2xyIW4jAzhaB2GXmDaUcc+KHS+HCJBh82A6nOA==" }, "node_modules/@tapis/tapis-typescript-workflows": { - "version": "0.0.17", - "resolved": "https://registry.npmjs.org/@tapis/tapis-typescript-workflows/-/tapis-typescript-workflows-0.0.17.tgz", - "integrity": "sha512-Ac86xDR7V+3Y0u7w5em1H6K6DC1gpWmqgGtbQNzMhio4OUPqJFBjkEhWt4+LCSudFffpi+Z7LsBHoPibQIxB/g==" + "version": "0.0.18", + "resolved": "https://registry.npmjs.org/@tapis/tapis-typescript-workflows/-/tapis-typescript-workflows-0.0.18.tgz", + "integrity": "sha512-WByBNvjTWS2DKH7l2JqSlCkjfwPb/9ZhdRMONZLcVX67HdIOrErmflntKUQz6Jhtns68dkUVfe5vyWFV4qSK3Q==" }, "node_modules/@types/estree": { "version": "1.0.6", diff --git a/packages/tapisui-api/package.json b/packages/tapisui-api/package.json index 7849769f..47bda96a 100644 --- a/packages/tapisui-api/package.json +++ b/packages/tapisui-api/package.json @@ -27,7 +27,7 @@ ] }, "dependencies": { - "@tapis/tapis-typescript": "^0.0.53", + "@tapis/tapis-typescript": "^0.0.54", "axios": "^1.7.5", "cross-fetch": "^3.1.4", "streamsaver": "^2.0.5", diff --git a/packages/tapisui-api/src/workflows/pipelineruns/index.ts b/packages/tapisui-api/src/workflows/pipelineruns/index.ts index c4ae327a..d8623b71 100644 --- a/packages/tapisui-api/src/workflows/pipelineruns/index.ts +++ b/packages/tapisui-api/src/workflows/pipelineruns/index.ts @@ -1,2 +1,3 @@ export { default as list } from './list'; export { default as details } from './details'; +export { default as terminate } from './terminate'; diff --git a/packages/tapisui-api/src/workflows/pipelineruns/terminate.ts b/packages/tapisui-api/src/workflows/pipelineruns/terminate.ts new file mode 100644 index 00000000..5ae5d214 --- /dev/null +++ b/packages/tapisui-api/src/workflows/pipelineruns/terminate.ts @@ -0,0 +1,21 @@ +import { Workflows } from '@tapis/tapis-typescript'; +import { apiGenerator, errorDecoder } from '../../utils'; + +const terminate = ( + params: Workflows.TerminatePipelineRequest, + basePath: string, + jwt: string +) => { + const api: Workflows.PipelineRunsApi = + apiGenerator( + Workflows, + Workflows.PipelineRunsApi, + basePath, + jwt + ); + return errorDecoder(() => + api.terminatePipeline(params) + ); +}; + +export default terminate; diff --git a/packages/tapisui-common/package-lock.json b/packages/tapisui-common/package-lock.json index 5a86c20b..0e2313c3 100644 --- a/packages/tapisui-common/package-lock.json +++ b/packages/tapisui-common/package-lock.json @@ -13,7 +13,7 @@ "@mui/lab": "^5.0.0-alpha.173", "@mui/material": "^5.16.0", "@rollup/plugin-commonjs": "^26.0.1", - "@tapis/tapis-typescript": "^0.0.53", + "@tapis/tapis-typescript": "^0.0.54", "@tapis/tapisui-hooks": "file:../tapisui-hooks", "@vitejs/plugin-react": "^4.3.1", "bootstrap": "^4.6.2", @@ -64,7 +64,7 @@ "version": "0.0.3", "license": "ISC", "dependencies": { - "@tapis/tapis-typescript": "^0.0.53", + "@tapis/tapis-typescript": "^0.0.54", "@tapis/tapisui-api": "file:../tapisui-api", "cross-fetch": "^3.1.4", "js-cookie": "^3.0.0", @@ -2151,10 +2151,9 @@ "license": "MIT" }, "node_modules/@tapis/tapis-typescript": { - "version": "0.0.53", - "resolved": "https://registry.npmjs.org/@tapis/tapis-typescript/-/tapis-typescript-0.0.53.tgz", - "integrity": "sha512-q+Xeadhwp4FuS5OsdC1z9eh08mGob5GRB2P/Lt66/7t6AYVzbuH4BlVTf8YLyAGsAVWur2hdc9fGm99eSguVQA==", - "license": "ISC", + "version": "0.0.54", + "resolved": "https://registry.npmjs.org/@tapis/tapis-typescript/-/tapis-typescript-0.0.54.tgz", + "integrity": "sha512-VH371k62+f/v3hyRZFt/V6alDVDCZ2HU95a+hVCIckxx0jYAJZqRHA55cdfytxc7OEdA/dvFKoLq5sVGn/L8pQ==", "dependencies": { "@tapis/tapis-typescript-actors": "^0.0.3", "@tapis/tapis-typescript-apps": "^0.0.9", @@ -2168,7 +2167,7 @@ "@tapis/tapis-typescript-streams": "^0.0.4", "@tapis/tapis-typescript-systems": "^0.0.6", "@tapis/tapis-typescript-tenants": "^0.0.2", - "@tapis/tapis-typescript-workflows": "^0.0.17", + "@tapis/tapis-typescript-workflows": "^0.0.18", "@types/mocha": "^9.0.0" } }, @@ -2233,9 +2232,9 @@ "integrity": "sha512-CebqVmJ41evXC/gYj+HphU0KHveXIPjVnjWdS7ABQpIWmvYp2xyIW4jAzhaB2GXmDaUcc+KHS+HCJBh82A6nOA==" }, "node_modules/@tapis/tapis-typescript-workflows": { - "version": "0.0.17", - "resolved": "https://registry.npmjs.org/@tapis/tapis-typescript-workflows/-/tapis-typescript-workflows-0.0.17.tgz", - "integrity": "sha512-Ac86xDR7V+3Y0u7w5em1H6K6DC1gpWmqgGtbQNzMhio4OUPqJFBjkEhWt4+LCSudFffpi+Z7LsBHoPibQIxB/g==" + "version": "0.0.18", + "resolved": "https://registry.npmjs.org/@tapis/tapis-typescript-workflows/-/tapis-typescript-workflows-0.0.18.tgz", + "integrity": "sha512-WByBNvjTWS2DKH7l2JqSlCkjfwPb/9ZhdRMONZLcVX67HdIOrErmflntKUQz6Jhtns68dkUVfe5vyWFV4qSK3Q==" }, "node_modules/@tapis/tapisui-hooks": { "resolved": "../tapisui-hooks", diff --git a/packages/tapisui-common/package.json b/packages/tapisui-common/package.json index 9c886e50..5814e1be 100644 --- a/packages/tapisui-common/package.json +++ b/packages/tapisui-common/package.json @@ -46,7 +46,7 @@ "@mui/lab": "^5.0.0-alpha.173", "@mui/material": "^5.16.0", "@rollup/plugin-commonjs": "^26.0.1", - "@tapis/tapis-typescript": "^0.0.53", + "@tapis/tapis-typescript": "^0.0.54", "@tapis/tapisui-hooks": "file:../tapisui-hooks", "@vitejs/plugin-react": "^4.3.1", "bootstrap": "^4.6.2", diff --git a/packages/tapisui-extension-devtools/package-lock.json b/packages/tapisui-extension-devtools/package-lock.json index 11531354..a270a73f 100644 --- a/packages/tapisui-extension-devtools/package-lock.json +++ b/packages/tapisui-extension-devtools/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.1", "license": "ISC", "dependencies": { - "@tapis/tapis-typescript": "^0.0.53", + "@tapis/tapis-typescript": "^0.0.54", "simple-git": "^3.24.0" }, "devDependencies": { @@ -34,10 +34,9 @@ "license": "MIT" }, "node_modules/@tapis/tapis-typescript": { - "version": "0.0.53", - "resolved": "https://registry.npmjs.org/@tapis/tapis-typescript/-/tapis-typescript-0.0.53.tgz", - "integrity": "sha512-q+Xeadhwp4FuS5OsdC1z9eh08mGob5GRB2P/Lt66/7t6AYVzbuH4BlVTf8YLyAGsAVWur2hdc9fGm99eSguVQA==", - "license": "ISC", + "version": "0.0.54", + "resolved": "https://registry.npmjs.org/@tapis/tapis-typescript/-/tapis-typescript-0.0.54.tgz", + "integrity": "sha512-VH371k62+f/v3hyRZFt/V6alDVDCZ2HU95a+hVCIckxx0jYAJZqRHA55cdfytxc7OEdA/dvFKoLq5sVGn/L8pQ==", "dependencies": { "@tapis/tapis-typescript-actors": "^0.0.3", "@tapis/tapis-typescript-apps": "^0.0.9", @@ -51,7 +50,7 @@ "@tapis/tapis-typescript-streams": "^0.0.4", "@tapis/tapis-typescript-systems": "^0.0.6", "@tapis/tapis-typescript-tenants": "^0.0.2", - "@tapis/tapis-typescript-workflows": "^0.0.17", + "@tapis/tapis-typescript-workflows": "^0.0.18", "@types/mocha": "^9.0.0" } }, @@ -116,9 +115,9 @@ "integrity": "sha512-CebqVmJ41evXC/gYj+HphU0KHveXIPjVnjWdS7ABQpIWmvYp2xyIW4jAzhaB2GXmDaUcc+KHS+HCJBh82A6nOA==" }, "node_modules/@tapis/tapis-typescript-workflows": { - "version": "0.0.17", - "resolved": "https://registry.npmjs.org/@tapis/tapis-typescript-workflows/-/tapis-typescript-workflows-0.0.17.tgz", - "integrity": "sha512-Ac86xDR7V+3Y0u7w5em1H6K6DC1gpWmqgGtbQNzMhio4OUPqJFBjkEhWt4+LCSudFffpi+Z7LsBHoPibQIxB/g==" + "version": "0.0.18", + "resolved": "https://registry.npmjs.org/@tapis/tapis-typescript-workflows/-/tapis-typescript-workflows-0.0.18.tgz", + "integrity": "sha512-WByBNvjTWS2DKH7l2JqSlCkjfwPb/9ZhdRMONZLcVX67HdIOrErmflntKUQz6Jhtns68dkUVfe5vyWFV4qSK3Q==" }, "node_modules/@types/mocha": { "version": "9.1.1", diff --git a/packages/tapisui-extension-devtools/package.json b/packages/tapisui-extension-devtools/package.json index cb426362..43c13893 100644 --- a/packages/tapisui-extension-devtools/package.json +++ b/packages/tapisui-extension-devtools/package.json @@ -33,7 +33,7 @@ "typescript": "^4.9.5" }, "dependencies": { - "@tapis/tapis-typescript": "^0.0.53", + "@tapis/tapis-typescript": "^0.0.54", "simple-git": "^3.24.0" } } diff --git a/packages/tapisui-extensions-core/package-lock.json b/packages/tapisui-extensions-core/package-lock.json index 78c4bb95..1b1a786c 100644 --- a/packages/tapisui-extensions-core/package-lock.json +++ b/packages/tapisui-extensions-core/package-lock.json @@ -9,7 +9,7 @@ "version": "0.1.10", "license": "ISC", "dependencies": { - "@tapis/tapis-typescript": "^0.0.53", + "@tapis/tapis-typescript": "^0.0.54", "simple-git": "^3.24.0" }, "devDependencies": { @@ -35,10 +35,9 @@ "license": "MIT" }, "node_modules/@tapis/tapis-typescript": { - "version": "0.0.53", - "resolved": "https://registry.npmjs.org/@tapis/tapis-typescript/-/tapis-typescript-0.0.53.tgz", - "integrity": "sha512-q+Xeadhwp4FuS5OsdC1z9eh08mGob5GRB2P/Lt66/7t6AYVzbuH4BlVTf8YLyAGsAVWur2hdc9fGm99eSguVQA==", - "license": "ISC", + "version": "0.0.54", + "resolved": "https://registry.npmjs.org/@tapis/tapis-typescript/-/tapis-typescript-0.0.54.tgz", + "integrity": "sha512-VH371k62+f/v3hyRZFt/V6alDVDCZ2HU95a+hVCIckxx0jYAJZqRHA55cdfytxc7OEdA/dvFKoLq5sVGn/L8pQ==", "dependencies": { "@tapis/tapis-typescript-actors": "^0.0.3", "@tapis/tapis-typescript-apps": "^0.0.9", @@ -52,7 +51,7 @@ "@tapis/tapis-typescript-streams": "^0.0.4", "@tapis/tapis-typescript-systems": "^0.0.6", "@tapis/tapis-typescript-tenants": "^0.0.2", - "@tapis/tapis-typescript-workflows": "^0.0.17", + "@tapis/tapis-typescript-workflows": "^0.0.18", "@types/mocha": "^9.0.0" } }, @@ -117,9 +116,9 @@ "integrity": "sha512-CebqVmJ41evXC/gYj+HphU0KHveXIPjVnjWdS7ABQpIWmvYp2xyIW4jAzhaB2GXmDaUcc+KHS+HCJBh82A6nOA==" }, "node_modules/@tapis/tapis-typescript-workflows": { - "version": "0.0.17", - "resolved": "https://registry.npmjs.org/@tapis/tapis-typescript-workflows/-/tapis-typescript-workflows-0.0.17.tgz", - "integrity": "sha512-Ac86xDR7V+3Y0u7w5em1H6K6DC1gpWmqgGtbQNzMhio4OUPqJFBjkEhWt4+LCSudFffpi+Z7LsBHoPibQIxB/g==" + "version": "0.0.18", + "resolved": "https://registry.npmjs.org/@tapis/tapis-typescript-workflows/-/tapis-typescript-workflows-0.0.18.tgz", + "integrity": "sha512-WByBNvjTWS2DKH7l2JqSlCkjfwPb/9ZhdRMONZLcVX67HdIOrErmflntKUQz6Jhtns68dkUVfe5vyWFV4qSK3Q==" }, "node_modules/@tapis/tapisui-extension-devtools": { "resolved": "tapisui-extension-devtools", diff --git a/packages/tapisui-extensions-core/package.json b/packages/tapisui-extensions-core/package.json index 75945129..a14d99be 100644 --- a/packages/tapisui-extensions-core/package.json +++ b/packages/tapisui-extensions-core/package.json @@ -35,7 +35,7 @@ "typescript": "^4.9.5" }, "dependencies": { - "@tapis/tapis-typescript": "^0.0.53", + "@tapis/tapis-typescript": "^0.0.54", "simple-git": "^3.24.0" } } diff --git a/packages/tapisui-hooks/package-lock.json b/packages/tapisui-hooks/package-lock.json index 4c97860b..58ef9771 100644 --- a/packages/tapisui-hooks/package-lock.json +++ b/packages/tapisui-hooks/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.3", "license": "ISC", "dependencies": { - "@tapis/tapis-typescript": "^0.0.53", + "@tapis/tapis-typescript": "^0.0.54", "@tapis/tapisui-api": "file:../tapisui-api", "cross-fetch": "^3.1.4", "js-cookie": "^3.0.0", @@ -40,7 +40,7 @@ "version": "0.0.14", "license": "ISC", "dependencies": { - "@tapis/tapis-typescript": "^0.0.53", + "@tapis/tapis-typescript": "^0.0.54", "axios": "^1.7.5", "cross-fetch": "^3.1.4", "streamsaver": "^2.0.5", @@ -1028,10 +1028,9 @@ "license": "MIT" }, "node_modules/@tapis/tapis-typescript": { - "version": "0.0.53", - "resolved": "https://registry.npmjs.org/@tapis/tapis-typescript/-/tapis-typescript-0.0.53.tgz", - "integrity": "sha512-q+Xeadhwp4FuS5OsdC1z9eh08mGob5GRB2P/Lt66/7t6AYVzbuH4BlVTf8YLyAGsAVWur2hdc9fGm99eSguVQA==", - "license": "ISC", + "version": "0.0.54", + "resolved": "https://registry.npmjs.org/@tapis/tapis-typescript/-/tapis-typescript-0.0.54.tgz", + "integrity": "sha512-VH371k62+f/v3hyRZFt/V6alDVDCZ2HU95a+hVCIckxx0jYAJZqRHA55cdfytxc7OEdA/dvFKoLq5sVGn/L8pQ==", "dependencies": { "@tapis/tapis-typescript-actors": "^0.0.3", "@tapis/tapis-typescript-apps": "^0.0.9", @@ -1045,7 +1044,7 @@ "@tapis/tapis-typescript-streams": "^0.0.4", "@tapis/tapis-typescript-systems": "^0.0.6", "@tapis/tapis-typescript-tenants": "^0.0.2", - "@tapis/tapis-typescript-workflows": "^0.0.17", + "@tapis/tapis-typescript-workflows": "^0.0.18", "@types/mocha": "^9.0.0" } }, @@ -1110,9 +1109,9 @@ "integrity": "sha512-CebqVmJ41evXC/gYj+HphU0KHveXIPjVnjWdS7ABQpIWmvYp2xyIW4jAzhaB2GXmDaUcc+KHS+HCJBh82A6nOA==" }, "node_modules/@tapis/tapis-typescript-workflows": { - "version": "0.0.17", - "resolved": "https://registry.npmjs.org/@tapis/tapis-typescript-workflows/-/tapis-typescript-workflows-0.0.17.tgz", - "integrity": "sha512-Ac86xDR7V+3Y0u7w5em1H6K6DC1gpWmqgGtbQNzMhio4OUPqJFBjkEhWt4+LCSudFffpi+Z7LsBHoPibQIxB/g==" + "version": "0.0.18", + "resolved": "https://registry.npmjs.org/@tapis/tapis-typescript-workflows/-/tapis-typescript-workflows-0.0.18.tgz", + "integrity": "sha512-WByBNvjTWS2DKH7l2JqSlCkjfwPb/9ZhdRMONZLcVX67HdIOrErmflntKUQz6Jhtns68dkUVfe5vyWFV4qSK3Q==" }, "node_modules/@tapis/tapisui-api": { "resolved": "../tapisui-api", diff --git a/packages/tapisui-hooks/package.json b/packages/tapisui-hooks/package.json index 2ec28333..4bb1d77b 100644 --- a/packages/tapisui-hooks/package.json +++ b/packages/tapisui-hooks/package.json @@ -28,7 +28,7 @@ }, "dependencies": { "react-query": "^3.19.2", - "@tapis/tapis-typescript": "^0.0.53", + "@tapis/tapis-typescript": "^0.0.54", "@tapis/tapisui-api": "file:../tapisui-api", "cross-fetch": "^3.1.4", "js-cookie": "^3.0.0", diff --git a/packages/tapisui-hooks/src/workflows/pipelineruns/index.ts b/packages/tapisui-hooks/src/workflows/pipelineruns/index.ts index 10c88ae3..10e6a9d3 100644 --- a/packages/tapisui-hooks/src/workflows/pipelineruns/index.ts +++ b/packages/tapisui-hooks/src/workflows/pipelineruns/index.ts @@ -1,3 +1,4 @@ +export { default as queryKeys } from './queryKeys'; export { default as useList } from './useList'; export { default as useDetails } from './useDetails'; -export { default as queryKeys } from './queryKeys'; +export { default as useTerminate } from './useTerminate'; diff --git a/packages/tapisui-hooks/src/workflows/pipelineruns/queryKeys.ts b/packages/tapisui-hooks/src/workflows/pipelineruns/queryKeys.ts index 56562ec8..89864441 100644 --- a/packages/tapisui-hooks/src/workflows/pipelineruns/queryKeys.ts +++ b/packages/tapisui-hooks/src/workflows/pipelineruns/queryKeys.ts @@ -1,6 +1,7 @@ const QueryKeys = { list: 'workflows/groups/pipelines/pipelineruns/list', details: 'workflows/groups/pipelines/pipelineruns/details', + terminate: 'workflows/groups/pipelines/pipelineruns/terminate', }; export default QueryKeys; diff --git a/packages/tapisui-hooks/src/workflows/pipelineruns/useTerminate.ts b/packages/tapisui-hooks/src/workflows/pipelineruns/useTerminate.ts new file mode 100644 index 00000000..f0b350e1 --- /dev/null +++ b/packages/tapisui-hooks/src/workflows/pipelineruns/useTerminate.ts @@ -0,0 +1,44 @@ +import { useMutation, MutateOptions, useQueryClient } from 'react-query'; +import { Workflows } from '@tapis/tapis-typescript'; +import { Workflows as API } from '@tapis/tapisui-api'; +import { useTapisConfig } from '../../'; +import QueryKeys from './queryKeys'; + +const useTerminate = () => { + const { basePath, accessToken } = useTapisConfig(); + const jwt = accessToken?.access_token || ''; + const { mutate, isLoading, isError, isSuccess, data, error, reset } = + useMutation< + Workflows.RespPipelineRun, + Error, + Workflows.TerminatePipelineRequest + >([QueryKeys.terminate, basePath, jwt], (params) => + API.PipelineRuns.terminate(params, basePath, jwt) + ); + const queryClient = useQueryClient(); + const invalidate = () => { + queryClient.invalidateQueries([QueryKeys.list, QueryKeys.details]); + }; + + return { + isLoading, + isError, + isSuccess, + data, + error, + reset, + invalidate, + terminate: ( + params: Workflows.TerminatePipelineRequest, + options?: MutateOptions< + Workflows.RespPipelineRun, + Error, + Workflows.TerminatePipelineRequest + > + ) => { + return mutate(params, options); + }, + }; +}; + +export default useTerminate; diff --git a/src/app/Workflows/Pipelines/Pipeline/_components/DagView/DagViewHeader/DagViewHeader.tsx b/src/app/Workflows/Pipelines/Pipeline/_components/DagView/DagViewHeader/DagViewHeader.tsx index 8a6369f4..3411ec2d 100644 --- a/src/app/Workflows/Pipelines/Pipeline/_components/DagView/DagViewHeader/DagViewHeader.tsx +++ b/src/app/Workflows/Pipelines/Pipeline/_components/DagView/DagViewHeader/DagViewHeader.tsx @@ -7,7 +7,8 @@ import { PipelineRunDuration, } from 'app/Workflows/Pipelines/PipelineRuns/_components'; import { Link } from 'react-router-dom'; -import { Button } from '@mui/material'; +import { LoadingButton as Button } from '@mui/lab'; +import { Alert, AlertTitle } from '@mui/material'; import { Workflows } from '@tapis/tapis-typescript'; import { JSONDisplay } from '@tapis/tapisui-common'; @@ -28,6 +29,15 @@ const DagViewHeader: React.FC = ({ return ''; } const [open, setOpen] = useState(undefined); + const { + terminate, + invalidate, + isLoading: isTerminating, + isSuccess: terminated, + isError: isTerminationError, + error: terminationError, + reset, + } = Hooks.PipelineRuns.useTerminate(); const { data, isError, error, isLoading } = Hooks.PipelineRuns.useDetails({ groupId, pipelineId, @@ -36,7 +46,21 @@ const DagViewHeader: React.FC = ({ const run = data?.result || {}; return (
- {isError && error.message} + {isError && error && ( + {}}> + {error.message} + + )} + {isTerminationError && terminationError && ( + { + reset(); + }} + > + {terminationError.message} + + )} {isLoading ? ( 'Loading...' ) : ( @@ -49,6 +73,35 @@ const DagViewHeader: React.FC = ({ > {run.name || '?'} + {![ + Workflows.EnumRunStatus.Completed, + Workflows.EnumRunStatus.Failed, + Workflows.EnumRunStatus.Terminated, + Workflows.EnumRunStatus.Terminating, + ].includes(run.status!) && ( + + )}