This is an automated email from the ASF dual-hosted git repository.
xiangfu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new 53be25eaa2 fix(ui): UI shows a blank screen when it encounters a
unknown task (#11527)
53be25eaa2 is described below
commit 53be25eaa281ac6b434953199ae02eb47100c5ec
Author: Jayesh Choudhary <[email protected]>
AuthorDate: Wed Sep 6 21:28:10 2023 +0530
fix(ui): UI shows a blank screen when it encounters a unknown task (#11527)
---
pinot-controller/src/main/resources/app/pages/HomePage.tsx | 1 -
pinot-controller/src/main/resources/app/utils/PinotMethodUtils.ts | 7 ++++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/pinot-controller/src/main/resources/app/pages/HomePage.tsx
b/pinot-controller/src/main/resources/app/pages/HomePage.tsx
index 1b17c046de..6733de6979 100644
--- a/pinot-controller/src/main/resources/app/pages/HomePage.tsx
+++ b/pinot-controller/src/main/resources/app/pages/HomePage.tsx
@@ -78,7 +78,6 @@ const HomePage = () => {
const fetchData = async () => {
const tenantsDataResponse = await PinotMethodUtils.getTenantsData();
const instanceResponse = await PinotMethodUtils.getAllInstances();
- const taskTypes = await PinotMethodUtils.getAllTaskTypes();
const tablesResponse = await
PinotMethodUtils.getQueryTablesList({bothType: true});
const tablesList = [];
tablesResponse.records.map((record)=>{
diff --git a/pinot-controller/src/main/resources/app/utils/PinotMethodUtils.ts
b/pinot-controller/src/main/resources/app/utils/PinotMethodUtils.ts
index b574a019bc..1132630637 100644
--- a/pinot-controller/src/main/resources/app/utils/PinotMethodUtils.ts
+++ b/pinot-controller/src/main/resources/app/utils/PinotMethodUtils.ts
@@ -778,7 +778,12 @@ const getAllTaskTypes = async () => {
const getTaskInfo = async (taskType) => {
const tasksRes = await getTaskTypeTasks(taskType);
const stateRes = await getTaskTypeState(taskType);
- const state = get(stateRes, 'data', '');
+
+ let state = get(stateRes, 'data', '');
+ // response contains error
+ if(typeof state !== "string") {
+ state = "";
+ }
return [tasksRes?.data?.length || 0, state];
};
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]