From 6fd4c68a038fa1b04fa2b73e7306ce5f3df45aed Mon Sep 17 00:00:00 2001 From: Radoslaw Szwajkowski Date: Wed, 10 Jul 2024 18:49:08 +0200 Subject: [PATCH] Add tooltips for Priority and Preemption columns Signed-off-by: Radoslaw Szwajkowski --- client/public/locales/en/translation.json | 4 +++- client/src/app/pages/tasks/tasks-page.tsx | 12 +++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/client/public/locales/en/translation.json b/client/public/locales/en/translation.json index f5ffb073b0..d06a2e3932 100644 --- a/client/public/locales/en/translation.json +++ b/client/public/locales/en/translation.json @@ -583,7 +583,9 @@ "review": "Review analysis details" }, "tooltip": { - "advancedAnalysisDetails": "Enable enhanced analysis details to get more information about the analysis." + "advancedAnalysisDetails": "Enable enhanced analysis details to get more information about the analysis.", + "priority": "Tasks priority(Low-High). Impacts tasks scheduling policy.", + "preemption": "If enabled, allows the scheduler to cancel a running task and free the resources for higher priority tasks." } } } diff --git a/client/src/app/pages/tasks/tasks-page.tsx b/client/src/app/pages/tasks/tasks-page.tsx index 75a45c7ac3..0f4e42c8fd 100644 --- a/client/src/app/pages/tasks/tasks-page.tsx +++ b/client/src/app/pages/tasks/tasks-page.tsx @@ -41,6 +41,7 @@ import dayjs from "dayjs"; import { formatPath } from "@app/utils/utils"; import { Paths } from "@app/Paths"; import { TaskActionColumn } from "./TaskActionColumn"; +import { ThInfoType } from "@patternfly/react-table/dist/esm/components/Table/base/types"; export const TasksPage: React.FC = () => { const { t } = useTranslation(); @@ -189,6 +190,11 @@ export const TasksPage: React.FC = () => { columnState, } = tableControls; + const tooltips: Record = { + priority: { tooltip: t("tooltip.priority") }, + preemption: { tooltip: t("tooltip.preemption") }, + }; + const clearFilters = () => { const currentPath = history.location.pathname; const newSearch = new URLSearchParams(history.location.search); @@ -275,7 +281,11 @@ export const TasksPage: React.FC = () => { {columnState.columns .filter(({ id }) => getColumnVisibility(id)) .map(({ id }) => ( - + ))}