Skip to content

Commit

Permalink
Changed 'Effort' to 'Total Effort' on application inventory page
Browse files Browse the repository at this point in the history
	modified:   client/public/locales/en/translation.json
	modified:   client/src/app/pages/applications/applications-table/applications-table.tsx
	modified:   client/src/app/pages/applications/components/application-detail-drawer/application-detail-drawer.tsx

Signed-off-by: Karishma Punwatkar <kpunwatk@redhat.com>

	modified:   client/public/locales/en/translation.json
	modified:   client/src/app/pages/applications/applications-table/applications-table.tsx
	modified:   client/src/app/pages/issues/affected-applications/affected-applications.tsx
	modified:   client/src/app/pages/issues/issues-table.tsx
  • Loading branch information
kpunwatk committed Apr 22, 2024
1 parent 65012b8 commit ba6f8f9
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 5 deletions.
1 change: 1 addition & 0 deletions client/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@
"details": "Details",
"displayName": "Display name",
"effort": "Effort",
"totalEffort": "Total Effort",
"effortEstimate": "Effort estimate",
"email": "Email",
"error": "Error",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
DropdownItem,
Modal,
Tooltip,
Text,
} from "@patternfly/react-core";
import { PencilAltIcon, TagIcon } from "@patternfly/react-icons";
import {
Expand Down Expand Up @@ -109,6 +110,8 @@ import { useFetchArchetypes } from "@app/queries/archetypes";
import { ApplicationFormModal } from "../components/application-form";
import { ManageColumnsToolbar } from "./components/manage-columns-toolbar";

import { QuestionCircleIcon } from "@patternfly/react-icons";

export const ApplicationsTable: React.FC = () => {
const { t } = useTranslation();
const history = useHistory();
Expand Down Expand Up @@ -845,9 +848,35 @@ export const ApplicationsTable: React.FC = () => {
<Th {...getThProps({ columnKey: "tags" })} width={10} />
)}
{getColumnVisibility("effort") && (
<Th {...getThProps({ columnKey: "effort" })} width={10} />
<Th
{...getThProps({ columnKey: "effort" })}
style={{ paddingRight: 0 }}
>
<div style={{ display: "flex", alignItems: "center" }}>
<div>
<span style={{ marginRight: "5px" }}>Effort</span>
</div>
<div style={{ marginLeft: "5px" }}>
<Tooltip
content={
<>
<Text>
This column shows the total application effort.
</Text>
</>
}
position="right"
>
<div
style={{ display: "flex", alignItems: "center" }}
>
<QuestionCircleIcon className="h-5 w-5 text-gray-400" />
</div>
</Tooltip>
</div>
</div>
</Th>
)}
<Th />
</TableHeaderContentWithControls>
</Tr>
</Thead>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
Toolbar,
ToolbarContent,
ToolbarItem,
Tooltip,
} from "@patternfly/react-core";
import { useTranslation } from "react-i18next";
import { Table, Tbody, Td, Th, Thead, Tr } from "@patternfly/react-table";
Expand Down Expand Up @@ -36,6 +37,7 @@ import {
} from "../helpers";
import { IssueDetailDrawer } from "../issue-detail-drawer";
import { TablePersistenceKeyPrefix } from "@app/Constants";
import { QuestionCircleIcon } from "@patternfly/react-icons";

interface IAffectedApplicationsRouteParams {
ruleset: string;
Expand All @@ -60,7 +62,7 @@ export const AffectedApplications: React.FC = () => {
name: "Name",
description: "Description",
businessService: "Business service",
effort: "Total Effort",
effort: "Effort",
incidents: "Incidents",
},
isFilterEnabled: true,
Expand Down Expand Up @@ -181,7 +183,35 @@ export const AffectedApplications: React.FC = () => {
<Th {...getThProps({ columnKey: "name" })} />
<Th {...getThProps({ columnKey: "description" })} />
<Th {...getThProps({ columnKey: "businessService" })} />
<Th {...getThProps({ columnKey: "effort" })} />
<Th
{...getThProps({ columnKey: "effort" })}
style={{ paddingRight: 0 }}
>
<div style={{ display: "flex", alignItems: "center" }}>
<div>
<span style={{ marginRight: "5px" }}>Effort</span>
</div>
<div style={{ marginLeft: "5px" }}>
<Tooltip
content={
<>
<Text>
This column shows the total calculated effort
for all incidents related to this file.
</Text>
</>
}
position="right"
>
<div
style={{ display: "flex", alignItems: "center" }}
>
<QuestionCircleIcon className="h-5 w-5 text-gray-400" />
</div>
</Tooltip>
</div>
</div>
</Th>
<Th {...getThProps({ columnKey: "incidents" })} />
</TableHeaderContentWithControls>
</Tr>
Expand Down
29 changes: 28 additions & 1 deletion client/src/app/pages/issues/issues-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ import { AffectedAppsLink } from "./affected-apps-link";
import { ConditionalTooltip } from "@app/components/ConditionalTooltip";
import { IssueDetailDrawer } from "./issue-detail-drawer";
import { IssueDescriptionAndLinks } from "./components/issue-description-and-links";
import { QuestionCircleIcon } from "@patternfly/react-icons";

export interface IIssuesTableProps {
mode: "allIssues" | "singleApp";
Expand Down Expand Up @@ -328,7 +329,33 @@ export const IssuesTable: React.FC<IIssuesTableProps> = ({ mode }) => {
<Th {...getThProps({ columnKey: "category" })} />
<Th {...getThProps({ columnKey: "source" })} />
<Th {...getThProps({ columnKey: "target" })} />
<Th {...getThProps({ columnKey: "effort" })} />
<Th
{...getThProps({ columnKey: "effort" })}
style={{ paddingRight: 0 }}
>
<div style={{ display: "flex", alignItems: "center" }}>
<div>
<span style={{ marginRight: "5px" }}>Effort</span>
</div>
<div style={{ marginLeft: "5px" }}>
<Tooltip
content={
<>
<Text>
This column shows the effort weight for a single
issue incident.
</Text>
</>
}
position="right"
>
<div style={{ display: "flex", alignItems: "center" }}>
<QuestionCircleIcon className="h-5 w-5 text-gray-400" />
</div>
</Tooltip>
</div>
</div>
</Th>
<Th {...getThProps({ columnKey: "affected" })} />
</TableHeaderContentWithControls>
</Tr>
Expand Down

0 comments on commit ba6f8f9

Please sign in to comment.