From e6e6cca7c8928141b4f89b597986b9a9d3a2d7cd 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 | 21 +++++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/client/public/locales/en/translation.json b/client/public/locales/en/translation.json index f5ffb073b..75b620e03 100644 --- a/client/public/locales/en/translation.json +++ b/client/public/locales/en/translation.json @@ -510,6 +510,10 @@ "save": "Failed to save {{type}}." } }, + "tooltip": { + "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." + }, "validation": { "email": "This field requires a valid email.", "max": "This field must be less than {{value}}.", diff --git a/client/src/app/pages/tasks/tasks-page.tsx b/client/src/app/pages/tasks/tasks-page.tsx index 75a45c7ac..915c5f6ad 100644 --- a/client/src/app/pages/tasks/tasks-page.tsx +++ b/client/src/app/pages/tasks/tasks-page.tsx @@ -13,7 +13,15 @@ import { ToolbarContent, ToolbarItem, } from "@patternfly/react-core"; -import { Table, Tbody, Th, Thead, Tr, Td } from "@patternfly/react-table"; +import { + Table, + Tbody, + Th, + Thead, + Tr, + Td, + ThProps, +} from "@patternfly/react-table"; import { CubesIcon } from "@patternfly/react-icons"; import { FilterToolbar, FilterType } from "@app/components/FilterToolbar"; @@ -189,6 +197,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 +288,11 @@ export const TasksPage: React.FC = () => { {columnState.columns .filter(({ id }) => getColumnVisibility(id)) .map(({ id }) => ( - + ))}