This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


The following commit(s) were added to refs/heads/master by this push:
     new 63fcf0debb0 add special message when there are no task logs (#18616)
63fcf0debb0 is described below

commit 63fcf0debb01e6c2cb7e766d0bb3ae8f655301e0
Author: Vadim Ogievetsky <[email protected]>
AuthorDate: Fri Oct 10 23:06:02 2025 +0100

    add special message when there are no task logs (#18616)
---
 web-console/src/components/show-log/show-log.scss |  5 +++++
 web-console/src/components/show-log/show-log.tsx  | 23 +++++++++++++++++------
 2 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/web-console/src/components/show-log/show-log.scss 
b/web-console/src/components/show-log/show-log.scss
index 18e7bac461c..5a4e5b3bf78 100644
--- a/web-console/src/components/show-log/show-log.scss
+++ b/web-console/src/components/show-log/show-log.scss
@@ -40,6 +40,11 @@
     position: relative;
     height: calc(100% - 40px);
 
+    .special-instructions {
+      padding: 20px;
+      text-align: center;
+    }
+
     textarea {
       height: 100%;
       width: 100%;
diff --git a/web-console/src/components/show-log/show-log.tsx 
b/web-console/src/components/show-log/show-log.tsx
index 50ae9d0c6ba..025e60eb745 100644
--- a/web-console/src/components/show-log/show-log.tsx
+++ b/web-console/src/components/show-log/show-log.tsx
@@ -27,6 +27,15 @@ import { QueryManager, QueryState } from '../../utils';
 
 import './show-log.scss';
 
+function showSpecialInstructions(endpoint: string, logState: 
QueryState<string>): React.ReactNode {
+  if (endpoint && !logState.getErrorMessage()?.includes('No log was found for 
this task')) return;
+  return (
+    <div className="special-instructions" style={{ padding: '20px', textAlign: 
'center' }}>
+      <p>No log was found for this task.</p>
+    </div>
+  );
+}
+
 function removeFirstPartialLine(log: string): string {
   const lines = log.split('\n');
   if (lines.length > 1) {
@@ -184,12 +193,14 @@ export class ShowLog extends 
React.PureComponent<ShowLogProps, ShowLogState> {
           {logState.loading ? (
             <Loader />
           ) : (
-            <textarea
-              className={Classes.INPUT}
-              readOnly
-              value={logState.data || logState.getErrorMessage()}
-              ref={this.log}
-            />
+            showSpecialInstructions(endpoint, logState) ?? (
+              <textarea
+                className={Classes.INPUT}
+                readOnly
+                value={logState.data || logState.getErrorMessage()}
+                ref={this.log}
+              />
+            )
           )}
         </div>
       </div>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to