Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge develop into release-1.2 #5858

Merged
merged 4 commits into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
with:
submodules: true
- name: "Install Helm"
uses: azure/setup-helm@v4.2.0
uses: azure/setup-helm@v4.3.0
- name: "Linting: helm lint"
run: "helm lint helm/"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-helm-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
with:
submodules: true
- name: Install Helm
uses: azure/setup-helm@v4.2.0
uses: azure/setup-helm@v4.3.0

- name: Determine Chart Version
id: version
Expand Down
6 changes: 3 additions & 3 deletions backend/infrahub/menu/menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,9 @@ def _extract_node_icon(model: MainSchemaTypes) -> str:
),
MenuItemDefinition(
namespace="Builtin",
name="ActivityLog",
label="Activity Log",
path="/activity-log",
name="Activities",
label="Activities",
path="/activities",
icon="mdi:timeline-text",
protected=True,
section=MenuSection.INTERNAL,
Expand Down
856 changes: 449 additions & 407 deletions frontend/app/package-lock.json

Large diffs are not rendered by default.

46 changes: 23 additions & 23 deletions frontend/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
"biome:fix": "biome check --write ."
},
"dependencies": {
"@apollo/client": "^3.12.10",
"@apollo/client": "^3.13.1",
"@codemirror/commands": "^6.7.0",
"@codemirror/lang-markdown": "^6.3.0",
"@codemirror/language": "^6.10.3",
"@codemirror/state": "^6.5.2",
"@codemirror/theme-one-dark": "^6.1.2",
"@codemirror/view": "^6.34.1",
"@codemirror/view": "^6.36.3",
"@graphiql/plugin-explorer": "^3.2.5",
"@graphiql/toolkit": "^0.11.1",
"@headlessui/react": "^2.2.0",
Expand All @@ -51,10 +51,10 @@
"@radix-ui/react-slot": "^1.1.2",
"@radix-ui/react-tabs": "^1.1.3",
"@radix-ui/react-tooltip": "^1.1.8",
"@tanstack/react-query": "^5.66.0",
"@tanstack/react-query-devtools": "^5.66.0",
"@tanstack/react-table": "^8.20.6",
"@uiw/react-color": "^2.3.4",
"@tanstack/react-query": "^5.66.9",
"@tanstack/react-query-devtools": "^5.66.9",
"@tanstack/react-table": "^8.21.2",
"@uiw/react-color": "^2.4.0",
"@vitejs/plugin-react": "^4.3.4",
"autoprefixer": "^10.4.20",
"class-variance-authority": "^0.7.1",
Expand All @@ -66,7 +66,7 @@
"graphiql": "^3.8.3",
"graphql": "^16.10.0",
"handlebars": "^4.7.8",
"jotai": "^2.11.3",
"jotai": "^2.12.1",
"json-to-graphql-query": "^2.2.5",
"lucide-react": "^0.475.0",
"openapi-fetch": "^0.13.4",
Expand All @@ -76,54 +76,54 @@
"react": "19.0.0",
"react-accessible-treeview": "^2.11.0",
"react-aria-components": "^1.6.0",
"react-datepicker": "^8.0.0",
"react-datepicker": "^8.1.0",
"react-diff-view": "^3.2.0",
"react-dom": "19.0.0",
"react-error-boundary": "^5.0.0",
"react-hook-form": "^7.54.2",
"react-markdown": "^9.0.3",
"react-paginate": "^8.2.0",
"react-resizable-panels": "^2.1.7",
"react-router": "^7.1.5",
"react-router": "^7.2.0",
"react-scan": "^0.1.3",
"react-simple-code-editor": "^0.14.1",
"react-syntax-highlighter": "^15.6.1",
"react-toastify": "^9.1.3",
"recharts": "^2.15.1",
"remark-gfm": "^4.0.0",
"remeda": "^2.20.1",
"remark-gfm": "^4.0.1",
"remeda": "^2.20.2",
"sha1": "^1.1.1",
"tailwind-merge": "^2.6.0",
"tailwindcss-animate": "^1.0.7",
"unidiff": "^1.0.4",
"use-query-params": "^2.2.1",
"vite": "^6.1.0",
"vite": "^6.1.1",
"vite-plugin-svgr": "^4.3.0",
"vite-tsconfig-paths": "^5.1.4"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@graphql-codegen/cli": "^5.0.4",
"@graphql-codegen/typescript": "^4.1.3",
"@graphql-codegen/cli": "^5.0.5",
"@graphql-codegen/typescript": "^4.1.5",
"@playwright/test": "^1.50.1",
"@types/node": "^22.13.1",
"@types/node": "^22.13.5",
"@types/prismjs": "^1.26.5",
"@types/ramda": "^0.30.2",
"@types/react": "19.0.8",
"@types/react-dom": "19.0.3",
"@types/react": "^19.0.10",
"@types/react-dom": "^19.0.4",
"@types/react-syntax-highlighter": "^15.5.13",
"@types/sha1": "^1.1.5",
"@vitest/browser": "^3.0.5",
"@vitest/coverage-v8": "^3.0.5",
"cypress": "^14.0.2",
"@vitest/browser": "^3.0.6",
"@vitest/coverage-v8": "^3.0.6",
"cypress": "^14.0.3",
"openapi-typescript": "^7.6.1",
"playwright": "^1.50.1",
"postcss": "^8.5.1",
"postcss": "^8.5.3",
"tailwindcss": "^3.4.17",
"ts-node": "^10.9.2",
"typescript": "^5.7.3",
"vitest": "^3.0.5",
"vitest-browser-react": "^0.0.4"
"vitest": "^3.0.6",
"vitest-browser-react": "^0.1.1"
},
"overrides": {
"@graphiql/plugin-explorer": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ const EVENT_DETAILS_QUERY = gql`
export async function getEventDetailsFromApi({
branchName,
atDate,
id,
...filters
}: EventDetailsFilters & { branchName?: string; atDate?: Date | null }) {
const { data } = await graphqlClient.query({
query: EVENT_DETAILS_QUERY,
variables: {
ids: [id],
...filters,
},
context: {
Expand Down
45 changes: 41 additions & 4 deletions frontend/app/src/entities/events/ui/event.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import { EventNodeInterface, NodeMutatedEvent } from "@/shared/api/graphql/generated/graphql";
import { DateDisplay } from "@/shared/components/display/date-display";

import { ACCOUNT_OBJECT } from "@/config/constants";
import { QSP } from "@/config/qsp";
import { NodeLabel } from "@/entities/nodes/object/ui/node-label";
import { PropertyRow } from "@/entities/schema/ui/styled";
import { constructPath } from "@/shared/api/rest/fetch";
import { CopyToClipboard } from "@/shared/components/buttons/copy-to-clipboard";
import { Link } from "@/shared/components/ui/link";
import { Popover, PopoverContent, PopoverTrigger } from "@/shared/components/ui/popover";
import { TimelineBorder } from "@/shared/components/ui/timeline-border";
import {
Expand Down Expand Up @@ -52,17 +56,50 @@ export const EventDetails = ({
/>
<PropertyRow title="Event" value={event} />
<PropertyRow title="Occured at" value={<DateDisplay date={occurred_at} />} />
{account_id && <PropertyRow title="Account" value={<NodeLabel id={account_id} />} />}
{account_id && (
<PropertyRow
title="Account"
value={
<Link
to={constructPath(`/${ACCOUNT_OBJECT}/${account_id}`, [
{ name: QSP.BRANCH, value: props.branch },
])}
>
<NodeLabel id={account_id} />
</Link>
}
/>
)}
{primary_node?.id && (
<PropertyRow title="Primary Node" value={<NodeLabel id={primary_node?.id} />} />
<PropertyRow
title="Primary Node"
value={
<Link
to={constructPath(`/${primary_node.kind}/${primary_node.id}`, [
{ name: QSP.BRANCH, value: props.branch },
])}
>
<NodeLabel id={primary_node.id} />
</Link>
}
/>
)}
{!!related_nodes?.length && (
<PropertyRow
title="Related Nodes"
value={
<div className="flex items-center gap-1">
<div className="flex flex-col items-end gap-1">
{related_nodes.map((node) => {
return <NodeLabel key={node.id} id={node?.id} />;
return (
<Link
key={node.id}
to={constructPath(`/${node.kind}/${node.id}`, [
{ name: QSP.BRANCH, value: props.branch },
])}
>
<NodeLabel id={node?.id} />
</Link>
);
})}
</div>
}
Expand Down
11 changes: 7 additions & 4 deletions frontend/app/src/entities/events/ui/global-event-details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { NodeEvents } from "./node-events";

const EventDetailsView = () => {
const { activityid } = useParams();

const { isLoading, data, error, refetch } = useEventDetails({ id: activityid });

return (
Expand All @@ -23,10 +24,12 @@ const EventDetailsView = () => {
<EventDetails {...data} />
</CardWithBorder>

<CardWithBorder className="p-0 border-0 flex-1">
<CardWithBorder.Title>Activities</CardWithBorder.Title>
<NodeEvents parentId={activityid} />
</CardWithBorder>
{data?.has_children && (
<CardWithBorder className="p-0 border-0 flex-1">
<CardWithBorder.Title>Sub activities</CardWithBorder.Title>
<NodeEvents parentId={activityid} />
</CardWithBorder>
)}
</div>
)}
</Content.CardContent>
Expand Down
29 changes: 20 additions & 9 deletions frontend/app/src/entities/events/ui/global-event.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Link } from "@/shared/components/ui/link";
import { Tooltip } from "@/shared/components/ui/tooltip";
import { classNames } from "@/shared/utils/common";
import { Icon } from "@iconify-icon/react";
import { format } from "date-fns";
Expand All @@ -12,29 +13,39 @@ export const Event = ({ __typename, ...props }: EventType) => {
return (
<div
className={classNames(
"grid grid-cols-2 p-2 rounded-md shadow-sm border transition-all",
"bg-gray-50",
props.has_children && "bg-custom-blue-500/10"
"grid grid-cols-3 relative gap-8 rounded-md shadow-sm transition-all border",
"bg-gray-50"
)}
>
<div className="flex flex-col gap-2 grow">
<div className="col-span-2 p-2.5">
{"attributes" in props && <NodeEvent {...props} />}

{BRANCH_EVENTS.includes(__typename) && <BranchEvent {...props} />}

{STANDARD_EVENTS.includes(__typename) && <StandardEvent {...props} />}
</div>

<div className="grid grid-cols-3 items-center text-right">
<div className="grid grid-cols-3 col-span-1 items-center text-right p-2.5 relative">
<div className="text-xs font-medium text-gray-500 flex items-center gap-1">
{props.has_children && (
<Tooltip enabled content="Contains sub activities">
<Icon
icon={"mdi:subtasks"}
className="absolute -left-8 rounded-full text-custom-blue-500 bg-custom-blue-500/10 p-1.5"
/>
</Tooltip>
)}

<Icon icon={"mdi:source-branch"} />
{props.branch}
</div>

<div className="flex text-xs font-medium text-gray-500">
<span className="mr-2">
{props.occurred_at && format(new Date(props.occurred_at), "yyyy-MM-dd HH:mm:ss (O)")}
</span>
<div className="flex text-xs font-medium text-gray-500 whitespace-nowrap">
{props.occurred_at && (
<Tooltip enabled content={props.occurred_at}>
<span>{format(new Date(props.occurred_at), "MMM dd - HH:mm:ss")}</span>
</Tooltip>
)}
</div>

<Link to={`/activities/${props.id}`} className="text-xs text-gray-500">
Expand Down
12 changes: 6 additions & 6 deletions frontend/app/src/entities/events/ui/global-events.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ export const GlobalEvents = () => {
}

return (
<Content.Card>
<Content.Card className="relative">
<Content.CardTitle title="Activities" isReloadLoading={isLoading} reload={() => refetch()} />
<div className="flex flex-col flex-grow gap-2 p-2">
<div className="flex items-center gap-2">
<GlobalEventsFilters />
{filters.length > 0 && <FilterResetButton />}
</div>
<div className="flex items-center gap-2 sticky top-0 bg-white z-10 p-2">
<GlobalEventsFilters />
{filters.length > 0 && <FilterResetButton />}
</div>

<div className="flex flex-col flex-grow gap-2 p-2 bg-white z-30">
<div className="flex flex-col gap-2">
{!isLoading && !flatData?.length && <NoDataFound message="No activity found." />}

Expand Down
52 changes: 27 additions & 25 deletions frontend/app/src/entities/events/ui/global-node-event.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,34 +37,36 @@ export const NodeEvent = (props: NodeMutatedEvent) => {
const { schema } = useSchema(props.payload.data.node_kind);

return (
<>
<div className="flex items-center justify-between">
<div className="flex items-center gap-2 text-sm">
<Icon icon={schema?.icon ?? "mdi:cube-outline"} className="text-gray-400" />
<div className="flex items-center gap-2 text-sm whitespace-nowrap">
<Icon icon={schema?.icon ?? "mdi:cube-outline"} className="text-gray-400" />

<div className="font-semibold">
<NodeLabel id={account_id} />
</div>
<NodeLabel
id={account_id}
className="overflow-hidden text-ellipsis whitespace-nowrap font-semibold"
/>

<div className="text-gray-500">{NODE_EVENTS_MAPPING[event] ?? "-"}</div>
<div className="text-gray-500">{NODE_EVENTS_MAPPING[event] ?? "-"}</div>

<div className="font-semibold">{schemaLabels[props.payload.data.node_kind] ?? "-"}</div>
<div className="font-semibold">{schemaLabels[props.payload.data.node_kind] ?? "-"}</div>

<Link
to={constructPath(
`/objects/${props.payload.data.node_kind}/${props.payload.data.node_id}`,
[
{
name: QSP.BRANCH,
value: props.branch,
},
]
)}
>
<NodeLabel id={props.payload.data.node_id} />
</Link>
</div>
</div>
</>
<Link
to={constructPath(
`/objects/${props.payload.data.node_kind}/${props.payload.data.node_id}`,
[
{
name: QSP.BRANCH,
value: props.branch,
},
]
)}
className="overflow-hidden text-ellipsis"
>
<NodeLabel
id={props.primary_node.id}
kind={props.primary_node?.kind}
className="overflow-hidden text-ellipsis"
/>
</Link>
</div>
);
};
2 changes: 1 addition & 1 deletion frontend/app/src/entities/events/ui/node-event.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const NodeEvent = (props: NodeMutatedEvent) => {
`/objects/${props.payload.data.node_kind}/${props.payload.data.node_id}`
)}
>
<NodeLabel id={props.payload.data.node_id} />
<NodeLabel id={props.primary_node.id} kind={props.primary_node?.kind} />
</Link>
</div>
</div>
Expand Down
Loading
Loading