@checkstack/maintenance-frontend 0.7.4 → 0.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,61 @@
|
|
|
1
1
|
# @checkstack/maintenance-frontend
|
|
2
2
|
|
|
3
|
+
## 0.7.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- @checkstack/dashboard-frontend@0.7.6
|
|
8
|
+
|
|
9
|
+
## 0.7.5
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- f23f3c9: Gate decorative motion and blur effects behind
|
|
14
|
+
`usePerformance().isLowPower` on a focused set of high-traffic plugin
|
|
15
|
+
pages (Dashboard, Dependency map, System node, Notification bell,
|
|
16
|
+
Announcement banner / cards, Anomaly field overrides editor, SLO
|
|
17
|
+
attribution chart, Catalog droppable group). Hover scales, backdrop
|
|
18
|
+
blurs, `animate-pulse`/`animate-ping` accents, and entry transitions
|
|
19
|
+
now drop to static states on low-power devices; functional UX
|
|
20
|
+
transitions (Drawer/Dialog open-close, colour transitions) are left
|
|
21
|
+
alone.
|
|
22
|
+
|
|
23
|
+
Standardise the post-mutation error-toast voice on plugin pages by
|
|
24
|
+
migrating multi-clause `toast.error(extractErrorMessage(error, "Failed
|
|
25
|
+
to X"))` call sites onto the `toastError(toast, "Failed to X", error)`
|
|
26
|
+
helper from `@checkstack/ui`. The helper applies the canonical
|
|
27
|
+
`"action: message"` prefix and 100-character truncation in one place,
|
|
28
|
+
and the now-orphaned `extractErrorMessage` imports are dropped from
|
|
29
|
+
the affected files. No business logic or component APIs changed.
|
|
30
|
+
|
|
31
|
+
- f23f3c9: Standardise the empty / loading / error story on key list pages using
|
|
32
|
+
the shared `ListEmptyState`, `QueryErrorState`, and `Skeleton`
|
|
33
|
+
primitives from `@checkstack/ui`. Each affected page now branches
|
|
34
|
+
through the same `isLoading -> isError -> empty -> data` ladder, so
|
|
35
|
+
failed queries surface a retry-able inline error instead of silently
|
|
36
|
+
rendering an empty table, and loading states match the final layout
|
|
37
|
+
rather than flashing a generic spinner. No layout, business logic, or
|
|
38
|
+
query input shapes changed.
|
|
39
|
+
- Updated dependencies [f23f3c9]
|
|
40
|
+
- Updated dependencies [f23f3c9]
|
|
41
|
+
- Updated dependencies [f23f3c9]
|
|
42
|
+
- Updated dependencies [f23f3c9]
|
|
43
|
+
- Updated dependencies [f23f3c9]
|
|
44
|
+
- Updated dependencies [f23f3c9]
|
|
45
|
+
- Updated dependencies [f23f3c9]
|
|
46
|
+
- Updated dependencies [f23f3c9]
|
|
47
|
+
- @checkstack/common@0.11.0
|
|
48
|
+
- @checkstack/auth-frontend@0.6.5
|
|
49
|
+
- @checkstack/notification-common@1.2.0
|
|
50
|
+
- @checkstack/notification-frontend@0.4.5
|
|
51
|
+
- @checkstack/frontend-api@0.5.2
|
|
52
|
+
- @checkstack/dashboard-frontend@0.7.5
|
|
53
|
+
- @checkstack/ui@1.10.0
|
|
54
|
+
- @checkstack/catalog-common@2.2.2
|
|
55
|
+
- @checkstack/maintenance-common@1.2.2
|
|
56
|
+
- @checkstack/tips-frontend@0.2.5
|
|
57
|
+
- @checkstack/signal-frontend@0.1.4
|
|
58
|
+
|
|
3
59
|
## 0.7.4
|
|
4
60
|
|
|
5
61
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@checkstack/maintenance-frontend",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.6",
|
|
4
4
|
"license": "Elastic-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.tsx",
|
|
@@ -13,17 +13,17 @@
|
|
|
13
13
|
"lint:code": "eslint . --max-warnings 0"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@checkstack/auth-frontend": "0.6.
|
|
17
|
-
"@checkstack/catalog-common": "2.2.
|
|
18
|
-
"@checkstack/common": "0.
|
|
19
|
-
"@checkstack/dashboard-frontend": "0.7.
|
|
20
|
-
"@checkstack/frontend-api": "0.5.
|
|
21
|
-
"@checkstack/maintenance-common": "1.2.
|
|
22
|
-
"@checkstack/notification-common": "1.
|
|
23
|
-
"@checkstack/notification-frontend": "0.4.
|
|
24
|
-
"@checkstack/signal-frontend": "0.1.
|
|
25
|
-
"@checkstack/tips-frontend": "0.2.
|
|
26
|
-
"@checkstack/ui": "1.
|
|
16
|
+
"@checkstack/auth-frontend": "0.6.5",
|
|
17
|
+
"@checkstack/catalog-common": "2.2.2",
|
|
18
|
+
"@checkstack/common": "0.11.0",
|
|
19
|
+
"@checkstack/dashboard-frontend": "0.7.5",
|
|
20
|
+
"@checkstack/frontend-api": "0.5.2",
|
|
21
|
+
"@checkstack/maintenance-common": "1.2.2",
|
|
22
|
+
"@checkstack/notification-common": "1.2.0",
|
|
23
|
+
"@checkstack/notification-frontend": "0.4.5",
|
|
24
|
+
"@checkstack/signal-frontend": "0.1.4",
|
|
25
|
+
"@checkstack/tips-frontend": "0.2.5",
|
|
26
|
+
"@checkstack/ui": "1.10.0",
|
|
27
27
|
"date-fns": "^4.1.0",
|
|
28
28
|
"lucide-react": "^0.344.0",
|
|
29
29
|
"react": "^18.2.0",
|
|
@@ -33,6 +33,6 @@
|
|
|
33
33
|
"typescript": "^5.0.0",
|
|
34
34
|
"@types/react": "^18.2.0",
|
|
35
35
|
"@checkstack/tsconfig": "0.0.7",
|
|
36
|
-
"@checkstack/scripts": "0.3.
|
|
36
|
+
"@checkstack/scripts": "0.3.3"
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -22,12 +22,12 @@ import {
|
|
|
22
22
|
DateTimePicker,
|
|
23
23
|
StatusUpdateTimeline,
|
|
24
24
|
LinksEditor,
|
|
25
|
+
toastError,
|
|
25
26
|
} from "@checkstack/ui";
|
|
26
27
|
import { Plus, MessageSquare, Loader2, AlertCircle } from "lucide-react";
|
|
27
28
|
import { MaintenanceUpdateForm } from "./MaintenanceUpdateForm";
|
|
28
29
|
import { getMaintenanceStatusBadge } from "../utils/badges";
|
|
29
30
|
import { TeamAccessEditor } from "@checkstack/auth-frontend";
|
|
30
|
-
import { extractErrorMessage } from "@checkstack/common";
|
|
31
31
|
|
|
32
32
|
interface Props {
|
|
33
33
|
open: boolean;
|
|
@@ -75,7 +75,7 @@ export const MaintenanceEditor: React.FC<Props> = ({
|
|
|
75
75
|
onSave();
|
|
76
76
|
},
|
|
77
77
|
onError: (error) => {
|
|
78
|
-
toast
|
|
78
|
+
toastError(toast, "Failed to create maintenance", error);
|
|
79
79
|
},
|
|
80
80
|
});
|
|
81
81
|
|
|
@@ -85,7 +85,7 @@ export const MaintenanceEditor: React.FC<Props> = ({
|
|
|
85
85
|
onSave();
|
|
86
86
|
},
|
|
87
87
|
onError: (error) => {
|
|
88
|
-
toast
|
|
88
|
+
toastError(toast, "Failed to update maintenance", error);
|
|
89
89
|
},
|
|
90
90
|
});
|
|
91
91
|
|
|
@@ -94,7 +94,7 @@ export const MaintenanceEditor: React.FC<Props> = ({
|
|
|
94
94
|
void refetchDetail();
|
|
95
95
|
},
|
|
96
96
|
onError: (error) => {
|
|
97
|
-
toast
|
|
97
|
+
toastError(toast, "Failed to add link", error);
|
|
98
98
|
},
|
|
99
99
|
});
|
|
100
100
|
|
|
@@ -103,7 +103,7 @@ export const MaintenanceEditor: React.FC<Props> = ({
|
|
|
103
103
|
void refetchDetail();
|
|
104
104
|
},
|
|
105
105
|
onError: (error) => {
|
|
106
|
-
toast
|
|
106
|
+
toastError(toast, "Failed to remove link", error);
|
|
107
107
|
},
|
|
108
108
|
});
|
|
109
109
|
|
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
Button,
|
|
27
27
|
LoadingSpinner,
|
|
28
28
|
EmptyState,
|
|
29
|
+
QueryErrorState,
|
|
29
30
|
Table,
|
|
30
31
|
TableHeader,
|
|
31
32
|
TableRow,
|
|
@@ -83,13 +84,14 @@ const MaintenanceConfigPageContent: React.FC = () => {
|
|
|
83
84
|
const [completeId, setCompleteId] = useState<string | undefined>();
|
|
84
85
|
|
|
85
86
|
// Fetch maintenances with useQuery
|
|
87
|
+
const maintenancesQuery = maintenanceClient.listMaintenances.useQuery(
|
|
88
|
+
statusFilter === "all" ? {} : { status: statusFilter },
|
|
89
|
+
);
|
|
86
90
|
const {
|
|
87
91
|
data: maintenancesData,
|
|
88
92
|
isLoading: maintenancesLoading,
|
|
89
93
|
refetch: refetchMaintenances,
|
|
90
|
-
} =
|
|
91
|
-
statusFilter === "all" ? {} : { status: statusFilter },
|
|
92
|
-
);
|
|
94
|
+
} = maintenancesQuery;
|
|
93
95
|
|
|
94
96
|
// Fetch systems with useQuery
|
|
95
97
|
const { data: systemsData, isLoading: systemsLoading } =
|
|
@@ -227,6 +229,14 @@ const MaintenanceConfigPageContent: React.FC = () => {
|
|
|
227
229
|
<div className="p-12 flex justify-center">
|
|
228
230
|
<LoadingSpinner />
|
|
229
231
|
</div>
|
|
232
|
+
) : maintenancesQuery.isError ? (
|
|
233
|
+
<div className="p-4">
|
|
234
|
+
<QueryErrorState
|
|
235
|
+
error={maintenancesQuery.error}
|
|
236
|
+
onRetry={() => void maintenancesQuery.refetch()}
|
|
237
|
+
resource="maintenances"
|
|
238
|
+
/>
|
|
239
|
+
</div>
|
|
230
240
|
) : maintenances.length === 0 ? (
|
|
231
241
|
<EmptyState
|
|
232
242
|
icon={<Wrench className="size-10" />}
|