Lifecycle planning, and consistent empty and loading states
- Inventory: end of support and replacement cost per asset; a Lifecycle page showing what ages out year by year and what replacing it will cost; support ending within 90 days in the weekly digest - Lists: a shared empty state saying what is missing, why, and the one thing to do; "nothing matches" with a clear button; skeleton rows instead of empty-looking lists while loading Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
92726568b7
commit
846af02851
50 files changed
+4434
-233
No files matched your search
@@ -7,6 +7,7 @@ import { confirmDialog } from "../../utils/dialogs";
|
||||
import { readableError } from "../../utils/errors";
|
||||
import { toast } from "../../utils/toast";
|
||||
import ExportTableButton from "../../components/ExportTableButton";
|
||||
import { EmptyRow, LoadingRow } from "../../components/EmptyState";
|
||||
|
||||
const EVENT_WORDS: Record<WebhookEventName, string> = {
|
||||
"alert.opened": "A problem begins",
|
||||
@@ -213,12 +214,9 @@ export default function ApiSettings() {
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
{tokens === null && <LoadingRow colSpan={4} />}
|
||||
{tokens?.length === 0 && (
|
||||
<tr>
|
||||
<td colSpan={4} className="text-secondary text-center">
|
||||
No tokens yet, so /metrics refuses everyone.
|
||||
</td>
|
||||
</tr>
|
||||
<EmptyRow colSpan={4} title="No metrics tokens yet" hint="/metrics refuses everyone until a token is made. Make one for Prometheus and give it the secret, which is shown once." />
|
||||
)}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -348,12 +346,9 @@ export default function ApiSettings() {
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
{hooks === null && <LoadingRow colSpan={4} />}
|
||||
{hooks?.length === 0 && (
|
||||
<tr>
|
||||
<td colSpan={4} className="text-secondary text-center">
|
||||
No webhooks yet.
|
||||
</td>
|
||||
</tr>
|
||||
<EmptyRow colSpan={4} title="No webhooks yet" hint="A webhook tells another system when an alert opens or resolves, or when maintenance starts or ends." action={{ label: "Add a webhook", onClick: () => setAdding(true) }} />
|
||||
)}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in new issue
Block a user