diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 149347f18f..ce7a94103e 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -1,10 +1,11 @@ -import { Button, ConfigProvider, notification, Typography, theme } from "antd"; +import { Button, ConfigProvider, notification, theme } from "antd"; import axios from "axios"; import { useEffect } from "react"; import { HelmetProvider } from "react-helmet-async"; import { BrowserRouter } from "react-router-dom"; import { GenericLoader } from "./components/generic-loader/GenericLoader"; import CustomMarkdown from "./components/helpers/custom-markdown/CustomMarkdown.jsx"; +import { NotificationIdLine } from "./components/notification/NotificationIdLine.jsx"; import { PageTitle } from "./components/widgets/page-title/PageTitle.jsx"; import { THEME } from "./helpers/GetStaticData.js"; import { attachRequestIdInterceptor } from "./helpers/requestId.js"; @@ -63,20 +64,22 @@ function App() { const showRequestId = alertDetails?.type === "error" && alertDetails?.requestId; + const showExecutionId = Boolean(alertDetails?.executionId); const description = ( <> + {showExecutionId && ( + + )} {showRequestId && ( -
- Request ID:{" "} - - {alertDetails?.requestId} - -
+ )} ); @@ -90,8 +93,14 @@ function App() { key: alertDetails?.key, }); - const logMessage = showRequestId - ? `${alertDetails.content}\nRequest ID: \`${alertDetails.requestId}\`` + const logSuffix = [ + showExecutionId && `Execution ID: \`${alertDetails.executionId}\``, + showRequestId && `Request ID: \`${alertDetails.requestId}\``, + ] + .filter(Boolean) + .join("\n"); + const logMessage = logSuffix + ? `${alertDetails.content}\n${logSuffix}` : alertDetails.content; pushLogMessages([ diff --git a/frontend/src/components/agency/agency/Agency.jsx b/frontend/src/components/agency/agency/Agency.jsx index de90e8d136..5fe5ec3a90 100644 --- a/frontend/src/components/agency/agency/Agency.jsx +++ b/frontend/src/components/agency/agency/Agency.jsx @@ -778,6 +778,16 @@ function Agency() { const execIdValue = initialRes?.data?.execution_id; setExecutionId(execIdValue); + if (execIdValue && !isStepExecution) { + // Live progress on this page is stale; point users at the logs page. + setAlertDetails({ + type: "info", + title: "Workflow run started", + content: `[View logs](/logs/WF/${execIdValue}) to track progress`, + executionId: execIdValue, + duration: 0, + }); + } body["execution_id"] = execIdValue; if (isStepExecution) { body["execution_action"] = wfExecutionTypes[executionAction]; diff --git a/frontend/src/components/logging/detailed-logs/DetailedLogs.jsx b/frontend/src/components/logging/detailed-logs/DetailedLogs.jsx index b7870942d7..3ff0034238 100644 --- a/frontend/src/components/logging/detailed-logs/DetailedLogs.jsx +++ b/frontend/src/components/logging/detailed-logs/DetailedLogs.jsx @@ -1,5 +1,4 @@ import { - ArrowLeftOutlined, CalendarOutlined, ClockCircleOutlined, CloseCircleFilled, @@ -24,12 +23,11 @@ import { } from "antd"; import PropTypes from "prop-types"; import { useEffect, useRef, useState } from "react"; -import { useLocation, useNavigate, useParams } from "react-router-dom"; +import { useParams } from "react-router-dom"; import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate"; import { useExceptionHandler } from "../../../hooks/useExceptionHandler"; import { useAlertStore } from "../../../store/alert-store"; -import { useSessionStore } from "../../../store/session-store"; import "./DetailedLogs.css"; import { formattedDateTime, @@ -93,12 +91,8 @@ const DetailedLogs = () => { const axiosPrivate = useAxiosPrivate(); const { setAlertDetails } = useAlertStore(); const handleException = useExceptionHandler(); - const navigate = useNavigate(); - const location = useLocation(); - const { sessionDetails } = useSessionStore(); const { getUrl } = useRequestUrl(); const copyToClipboard = useCopyToClipboard(); - const cameFromDashboard = location.state?.from === "dashboard"; const [executionDetails, setExecutionDetails] = useState(); const [executionFiles, setExecutionFiles] = useState(); @@ -460,18 +454,6 @@ const DetailedLogs = () => {
-