Skip to content
This repository was archived by the owner on Mar 15, 2026. It is now read-only.

Commit 36f86b7

Browse files
Fix widget rendering error
1 parent 85fd9d0 commit 36f86b7

14 files changed

Lines changed: 101 additions & 89 deletions

File tree

package-lock.json

Lines changed: 21 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
"type": "module",
44
"dependencies": {
55
"@fortawesome/fontawesome-free": "^7.1.0",
6-
"@tanstack/react-query": "^5.90.15",
6+
"@tanstack/react-query": "^5.90.16",
77
"@uiw/react-md-editor": "^4.0.11",
88
"@xterm/addon-fit": "^0.11.0",
99
"@xterm/xterm": "^6.0.0",
1010
"bulma": "^1.0.4",
1111
"countries-and-timezones": "^3.8.0",
1212
"cronstrue": "^3.9.0",
1313
"friendly-mimes": "^3.0.1",
14-
"globals": "^16.5.0",
14+
"globals": "^17.0.0",
1515
"http-status-codes": "^2.3.0",
1616
"i18next": "^25.7.3",
1717
"i18next-browser-languagedetector": "^8.2.0",
@@ -21,7 +21,7 @@
2121
"react-dom": "^19.2.3",
2222
"react-dropzone": "^14.3.8",
2323
"react-hot-toast": "^2.6.0",
24-
"react-i18next": "^16.5.0",
24+
"react-i18next": "^16.5.1",
2525
"react-markdown": "^10.1.0",
2626
"react-router": "^7.11.0",
2727
"react-router-dom": "^7.11.0",
@@ -57,7 +57,7 @@
5757
"eslint-plugin-react-hooks": "^7.0.1",
5858
"husky": "^9.1.7",
5959
"jsdom": "^27.4.0",
60-
"knip": "^5.78.0",
60+
"knip": "^5.79.0",
6161
"lint-staged": "^16.2.7",
6262
"npm-check-updates": "^19.2.0",
6363
"prettier": "^3.7.4",

src/api/auditlog.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const useAuditLogQuery = (params: any) => {
1010

1111
const useAuditLogStatsQuery = () => {
1212
return useQuery({
13-
queryKey: ["audit-log"],
13+
queryKey: ["audit-log", "stats"],
1414
queryFn: () => requestAuditLogStats().then((res) => res.json()),
1515
});
1616
};

src/api/requests/auditlog.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import secureApiFetch from "services/api.js";
21
import { requestEntities } from "utilities/requests.js";
32

43
const API_BASE_URL = "/auditlog";
@@ -8,7 +7,7 @@ const requestAuditLog = async (params: any) => {
87
};
98

109
const requestAuditLogStats = () => {
11-
return secureApiFetch(`${API_BASE_URL}/stats`, { method: "GET" });
10+
return requestEntities(`${API_BASE_URL}/stats`);
1211
};
1312

1413
export { requestAuditLog, requestAuditLogStats };

src/components/clients/Details.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ const ClientDetails = () => {
234234
<table className="table">
235235
<thead>
236236
<tr>
237-
<th>Kind</th>
237+
<th>Type</th>
238238
<th>Name</th>
239239
<th>Role</th>
240240
<th>Email</th>

src/components/commands/CommandDetailsPage.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,7 @@ const CommandDetailsPage = () => {
131131
)}
132132
{1 === tabIndex && (
133133
<div>
134-
<h3>Usages</h3>
135-
<Link to={`/commands/${command.id}/usages`}>Add usage</Link>{" "}
134+
<Link className="button is-success" to={`/commands/${command.id}/usages`}>Add usage</Link>{" "}
136135
{commandUsages !== null && (
137136
<>
138137
<table className="table is-fullwidth">

src/components/commands/ScheduledRuns.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const ScheduledRuns = ({ command, task = null }) => {
3232

3333
return (
3434
<>
35-
<NativeTable caption="Scheduled commands" rows={scheduledCommands} rowId={(scheduledCommand) => scheduledCommand.id} columns={columns} emptyRowsMessage="No scheduled commands available.">
35+
<NativeTable rows={scheduledCommands} rowId={(scheduledCommand) => scheduledCommand.id} columns={columns} emptyRowsMessage="No scheduled commands available.">
3636
</NativeTable>
3737
</>
3838
);

src/components/layout/dashboard/widgets/RecentActivityWidget.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import UserLink from "components/users/Link";
44
import DashboardWidget from "./Widget";
55

66
const RecentActivityWidget = () => {
7-
const { data: auditLog } = useAuditLogQuery({ limit: 5 });
7+
const { data: auditLog } = useAuditLogQuery({ limit: 10 });
88

99
return (
1010
<DashboardWidget title="Recent activity">
@@ -26,7 +26,7 @@ const RecentActivityWidget = () => {
2626
</td>
2727
<td>{log.object}</td>
2828
<td>
29-
{log.user_name ? <UserLink userId={log.user_id}>{log.user_name}</UserLink> : "-"}
29+
{log.createdBy?.fullName ? <UserLink userId={log.createdByUid}>{log.createdBy?.fullName}</UserLink> : "-"}
3030
</td>
3131
<td>{log.createdAt}</td>
3232
</tr>

src/components/layout/dashboard/widgets/UserActivityStatsWidget.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ const UserActivityStatsWidget = () => {
99
<DashboardWidget title="User activity over time">
1010
{auditLogStats && auditLogStats.length > 0 ? (
1111
<LineChart width={320} height={320} data={auditLogStats}>
12-
<Line type="monotone" dataKey="total" stroke="var(--color-accent-1)" />
1312
<CartesianGrid />
14-
<XAxis dataKey="log_date" />
13+
<Line type="monotone" dataKey="total" />
14+
<XAxis dataKey="logDate" />
1515
<YAxis dataKey="total" />
1616
</LineChart>
1717
) : (

src/components/projects/ProjectsListPage.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const ProjectsListPage = () => {
2020
const apiPageNumber = pageNumber - 1;
2121

2222
const [statusFilter, setStatusFilter] = useState("active");
23-
const { data: projects, isLoading } = useProjectsQuery({ limit: 10, status: statusFilter, page: apiPageNumber });
23+
const { data: projects, isLoading } = useProjectsQuery({ isTemplate: false, limit: 10, status: statusFilter, page: apiPageNumber });
2424

2525
const handleCreateProject = () => {
2626
navigate("/projects/create");

0 commit comments

Comments
 (0)