This is an automated email from the ASF dual-hosted git repository.
vogievetsky pushed a commit to branch 24.0.0
in repository https://gitbox.apache.org/repos/asf/druid.git
The following commit(s) were added to refs/heads/24.0.0 by this push:
new 52dfc2e91c Web console: fix pagination, add error delimiters (#12969)
52dfc2e91c is described below
commit 52dfc2e91c254c453b8a6e1c9b2b5b5ec6bd4001
Author: Vadim Ogievetsky <[email protected]>
AuthorDate: Thu Aug 25 08:18:21 2022 -0700
Web console: fix pagination, add error delimiters (#12969)
* fix pagination, add error delimiters
* reword debug message
---
web-console/lib/keywords.js | 1 +
.../react-table-pagination.tsx | 2 +-
.../execution-error-pane.spec.tsx.snap | 16 +++++------
.../execution-error-pane/execution-error-pane.scss | 2 ++
.../execution-error-pane/execution-error-pane.tsx | 31 +++++++++++-----------
.../recent-query-task-panel.tsx | 2 +-
6 files changed, 28 insertions(+), 26 deletions(-)
diff --git a/web-console/lib/keywords.js b/web-console/lib/keywords.js
index bf30e3578e..e34b2daf45 100644
--- a/web-console/lib/keywords.js
+++ b/web-console/lib/keywords.js
@@ -60,6 +60,7 @@ exports.SQL_KEYWORDS = [
'INSERT INTO',
'REPLACE INTO',
'OVERWRITE',
+ 'RETURNING',
];
exports.SQL_EXPRESSION_PARTS = [
diff --git
a/web-console/src/react-table/react-table-pagination/react-table-pagination.tsx
b/web-console/src/react-table/react-table-pagination/react-table-pagination.tsx
index 4c7fe477aa..956cd7f8a2 100644
---
a/web-console/src/react-table/react-table-pagination/react-table-pagination.tsx
+++
b/web-console/src/react-table/react-table-pagination/react-table-pagination.tsx
@@ -101,7 +101,7 @@ export const ReactTablePagination = React.memo(function
ReactTablePagination(
const start = page * pageSize + 1;
let end = page * pageSize + pageSize;
if (nonEmptyArray(sortedData)) {
- end = Math.min(end, sortedData.length);
+ end = Math.min(end, page * pageSize + sortedData.length);
}
let pageInfo = 'Showing';
diff --git
a/web-console/src/views/workbench-view/execution-error-pane/__snapshots__/execution-error-pane.spec.tsx.snap
b/web-console/src/views/workbench-view/execution-error-pane/__snapshots__/execution-error-pane.spec.tsx.snap
index 55c2b89768..c2cddd9110 100644
---
a/web-console/src/views/workbench-view/execution-error-pane/__snapshots__/execution-error-pane.spec.tsx.snap
+++
b/web-console/src/views/workbench-view/execution-error-pane/__snapshots__/execution-error-pane.spec.tsx.snap
@@ -17,24 +17,24 @@ exports[`ExecutionErrorPane matches snapshot 1`] = `
(Stack trace)
</a>
</p>
- <p>
+ <div>
Failed task ID:
<Memo(ClickToCopy)
text="query-0cf1a40a-aaef-4d17-bda4-5afa7edf07e7-worker0"
/>
-
- On host:
+ (on host:
<Memo(ClickToCopy)
text="localhost:8101"
/>
-
- Debug:
-
+ )
+ </div>
+ <div>
+ Debug:
<a
onClick={[Function]}
>
- download query detail archive
+ get query detail archive
</a>
- </p>
+ </div>
</Blueprint4.Callout>
`;
diff --git
a/web-console/src/views/workbench-view/execution-error-pane/execution-error-pane.scss
b/web-console/src/views/workbench-view/execution-error-pane/execution-error-pane.scss
index 7ba5fcf36f..4189aa213f 100644
---
a/web-console/src/views/workbench-view/execution-error-pane/execution-error-pane.scss
+++
b/web-console/src/views/workbench-view/execution-error-pane/execution-error-pane.scss
@@ -19,6 +19,8 @@
@import '../../../variables';
.execution-error-pane {
+ overflow: hidden;
+
.#{$bp-ns}-dark & {
background: $dark-gray3;
}
diff --git
a/web-console/src/views/workbench-view/execution-error-pane/execution-error-pane.tsx
b/web-console/src/views/workbench-view/execution-error-pane/execution-error-pane.tsx
index 7e37d64b9b..da7e3173b3 100644
---
a/web-console/src/views/workbench-view/execution-error-pane/execution-error-pane.tsx
+++
b/web-console/src/views/workbench-view/execution-error-pane/execution-error-pane.tsx
@@ -58,28 +58,27 @@ export const ExecutionErrorPane = React.memo(function
ExecutionErrorPane(
</>
)}
</p>
- <p>
- {taskId && (
- <>
- Failed task ID: <ClickToCopy text={taskId} />
-
- </>
- )}
- {host && (
- <>
- On host: <ClickToCopy text={host} />
-
- </>
- )}
- Debug:{' '}
+ {taskId && (
+ <div>
+ Failed task ID: <ClickToCopy text={taskId} />
+ {host && (
+ <>
+ {' (on host: '}
+ <ClickToCopy text={host} />)
+ </>
+ )}
+ </div>
+ )}
+ <div>
+ {'Debug: '}
<a
onClick={() => {
void downloadQueryDetailArchive(execution.id);
}}
>
- download query detail archive
+ get query detail archive
</a>
- </p>
+ </div>
{stackToShow && (
<ShowValueDialog
diff --git
a/web-console/src/views/workbench-view/recent-query-task-panel/recent-query-task-panel.tsx
b/web-console/src/views/workbench-view/recent-query-task-panel/recent-query-task-panel.tsx
index 5983d7e977..5911eb1c50 100644
---
a/web-console/src/views/workbench-view/recent-query-task-panel/recent-query-task-panel.tsx
+++
b/web-console/src/views/workbench-view/recent-query-task-panel/recent-query-task-panel.tsx
@@ -190,7 +190,7 @@ LIMIT 100`,
)}
<MenuItem
icon={IconNames.ARCHIVE}
- text="Download query detail archive"
+ text="Get query detail archive"
onClick={() => downloadQueryDetailArchive(w.taskId)}
/>
{w.taskStatus === 'RUNNING' && (
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]