Skip to content

Commit

Permalink
feat: add notification rule name to the ui
Browse files Browse the repository at this point in the history
Fixes #2349
  • Loading branch information
mainawycliffe authored and moshloop committed Oct 21, 2024
1 parent 263cc09 commit 4f3e474
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/api/types/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { Team, User } from "./users";

export type NotificationRules = {
id: string;
title: string;
name: string;
title?: string;
events: string[];
source?: "KubernetesCRD" | "ConfigFile" | "UI" | "Topology";
template: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export default function NotificationsRulesForm({
className="flex flex-1 flex-col gap-4 overflow-y-auto"
>
<div className="flex flex-col gap-4 overflow-y-auto p-4">
<FormikTextInput name="name" label="Name" />
<FormikTextInput name="title" label="Title" />
<FormikNotificationEventsDropdown
name="events"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export function StatusColumn({ cell }: MRTCellProps<NotificationRules>) {
setIsModalOpen={setIsModalOpen}
job={{
details: cell.row.original.job_details,
name: cell.row.original.job_name ?? cell.row.original.title
name: cell.row.original.job_name ?? cell.row.original.name
}}
/>
</>
Expand Down Expand Up @@ -136,12 +136,12 @@ export const notificationsRulesTableColumns: MRT_ColumnDef<NotificationRules>[]
}
},
{
header: "Title",
id: "title",
header: "Name",
id: "name",
size: 150,
accessorKey: "title",
accessorKey: "name",
Cell: ({ row, column }) => {
const value = row.getValue<string>(column.id);
const value = row.original.name;
const error = row.original.error;

const [showError, setShowError] = useState(false);
Expand Down

0 comments on commit 4f3e474

Please sign in to comment.