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 430734e950 UI: fix message shown after scheduling task (#11391)
430734e950 is described below
commit 430734e9508b8eb96b4164b0514f57553d396719
Author: Jayesh Choudhary <[email protected]>
AuthorDate: Sun Aug 20 03:51:47 2023 +0530
UI: fix message shown after scheduling task (#11391)
---
pinot-controller/src/main/resources/app/pages/TaskQueueTable.tsx | 4 ++--
pinot-controller/src/main/resources/app/requests/index.ts | 2 +-
pinot-controller/src/main/resources/app/utils/PinotMethodUtils.ts | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/pinot-controller/src/main/resources/app/pages/TaskQueueTable.tsx
b/pinot-controller/src/main/resources/app/pages/TaskQueueTable.tsx
index aa50548f29..0fb2d4e2fa 100644
--- a/pinot-controller/src/main/resources/app/pages/TaskQueueTable.tsx
+++ b/pinot-controller/src/main/resources/app/pages/TaskQueueTable.tsx
@@ -107,7 +107,7 @@ const TaskQueueTable = (props) => {
const handleScheduleNow = async () => {
const res = await PinotMethodUtils.scheduleTaskAction(tableName, taskType);
- if (get(res, `data.${taskType}`, null) === null) {
+ if (get(res, `${taskType}`, null) === null) {
dispatch({
type: 'error',
message: `Could not schedule task`,
@@ -116,7 +116,7 @@ const TaskQueueTable = (props) => {
} else {
dispatch({
type: 'success',
- message: `${get(res, `data.${taskType}`, null)} scheduled
successfully`,
+ message: `${get(res, `${taskType}`, null)} scheduled successfully`,
show: true
});
}
diff --git a/pinot-controller/src/main/resources/app/requests/index.ts
b/pinot-controller/src/main/resources/app/requests/index.ts
index f41c773106..52aa9be95a 100644
--- a/pinot-controller/src/main/resources/app/requests/index.ts
+++ b/pinot-controller/src/main/resources/app/requests/index.ts
@@ -119,7 +119,7 @@ export const cleanupTasks = (taskType: string):
Promise<AxiosResponse<OperationR
export const deleteTasks = (taskType: string):
Promise<AxiosResponse<OperationResponse>> =>
baseApi.delete(`/tasks/${taskType}`, { headers: { ...headers, Accept:
'application/json' } });
-export const sheduleTask = (tableName: string, taskType: string):
Promise<AxiosResponse<OperationResponse>> =>
+export const scheduleTask = (tableName: string, taskType: string):
Promise<AxiosResponse<OperationResponse>> =>
baseApi.post(`/tasks/schedule?tableName=${tableName}&taskType=${taskType}`,
null, { headers: { ...headers, Accept: 'application/json' } });
export const executeTask = (data): Promise<AxiosResponse<OperationResponse>> =>
diff --git a/pinot-controller/src/main/resources/app/utils/PinotMethodUtils.ts
b/pinot-controller/src/main/resources/app/utils/PinotMethodUtils.ts
index 07175ad49c..0085d4ede3 100644
--- a/pinot-controller/src/main/resources/app/utils/PinotMethodUtils.ts
+++ b/pinot-controller/src/main/resources/app/utils/PinotMethodUtils.ts
@@ -39,7 +39,7 @@ import {
resumeTasks,
cleanupTasks,
deleteTasks,
- sheduleTask,
+ scheduleTask,
executeTask,
getJobDetail,
getMinionMeta,
@@ -1114,7 +1114,7 @@ const getTableData = (params)=>{
};
const scheduleTaskAction = (tableName, taskType)=>{
- return sheduleTask(tableName, taskType).then(response=>{
+ return scheduleTask(tableName, taskType).then(response=>{
return response.data;
})
};
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]