You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by kl...@apache.org on 2022/08/25 06:59:53 UTC
[incubator-devlake] branch main updated: fix: add missing pipeline with logfile download (#2808)
This is an automated email from the ASF dual-hosted git repository.
klesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new ec76e3e8 fix: add missing pipeline with logfile download (#2808)
ec76e3e8 is described below
commit ec76e3e8987aedf561f3ae091f94d2dd812e7826
Author: Julien Chinapen <ju...@merico.dev>
AuthorDate: Thu Aug 25 02:59:49 2022 -0400
fix: add missing pipeline with logfile download (#2808)
---
.../src/pages/blueprints/blueprint-detail.jsx | 30 +++++++++++-----------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/config-ui/src/pages/blueprints/blueprint-detail.jsx b/config-ui/src/pages/blueprints/blueprint-detail.jsx
index fb56bccd..589c7025 100644
--- a/config-ui/src/pages/blueprints/blueprint-detail.jsx
+++ b/config-ui/src/pages/blueprints/blueprint-detail.jsx
@@ -221,24 +221,24 @@ const BlueprintDetail = (props) => {
setIsDownloading(true)
ToastNotification.clear()
let downloadStatus = 404
- const checkDownloadStatus = async (pipeline) => {
+ const checkStatusAndDownload = async (pipeline) => {
const d = await request.get(getPipelineLogfile(pipeline?.id))
downloadStatus = d?.status
+ if (pipeline?.id && downloadStatus === 200) {
+ saveAs(
+ getPipelineLogfile(pipeline?.id),
+ pipelineLogFilename
+ )
+ setIsDownloading(false)
+ } else if (pipeline?.id && downloadStatus === 404) {
+ ToastNotification.show({ message: d?.message || 'Logfile not available', intent: 'danger', icon: 'error' })
+ setIsDownloading(false)
+ } else {
+ ToastNotification.show({ message: 'Pipeline Invalid or Missing', intent: 'danger', icon: 'error' })
+ setIsDownloading(false)
+ }
}
- checkDownloadStatus()
- if (pipeline?.id && downloadStatus === 200) {
- saveAs(
- getPipelineLogfile(pipeline?.id),
- pipelineLogFilename
- )
- setIsDownloading(false)
- } else if (pipeline?.id && downloadStatus === 404) {
- ToastNotification.show({ message: 'Logfile not available', intent: 'danger', icon: 'error' })
- setIsDownloading(false)
- } else {
- ToastNotification.show({ message: 'Pipeline Invalid or Missing', intent: 'danger', icon: 'error' })
- setIsDownloading(false)
- }
+ checkStatusAndDownload(pipeline)
}, [getPipelineLogfile, pipelineLogFilename])
useEffect(() => {