Remove standalone Activity log page (Refs #153)
This commit is contained in:
@@ -1,12 +1,6 @@
|
||||
import { parseActivityQuery } from '$lib/activity.js';
|
||||
import { activityHistory } from '$lib/server/activity.js';
|
||||
import { redirect } from '@sveltejs/kit';
|
||||
import { activityRedirectHref } from '$lib/activity-redirect.js';
|
||||
|
||||
export function load({ url }: { url: URL }) {
|
||||
return {
|
||||
activity: activityHistory({
|
||||
...parseActivityQuery(url.searchParams),
|
||||
excludeProvisioning: true,
|
||||
excludeMaintenance: true
|
||||
})
|
||||
};
|
||||
redirect(308, activityRedirectHref(url));
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
<script lang="ts">
|
||||
import ActivityLog from '$ui/components/ActivityLog.svelte';
|
||||
import SectionHeader from '$ui/components/primitives/SectionHeader.svelte';
|
||||
let { data }: { data: import('./$types').PageData } = $props();
|
||||
</script>
|
||||
|
||||
<svelte:head><title>Activity · Electric Cherry</title></svelte:head>
|
||||
|
||||
<div class="page">
|
||||
<SectionHeader
|
||||
title="Activity"
|
||||
subtitle="Releases and host activity. Server jobs are in Provisioning; maintenance and recovery are in Maintenance history."
|
||||
/>
|
||||
<ActivityLog initial={data.activity} excludeProvisioning excludeMaintenance />
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.page {
|
||||
display: grid;
|
||||
gap: var(--space-6);
|
||||
min-width: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -86,7 +86,8 @@
|
||||
<svelte:head><title>Hosts · Electric Cherry</title></svelte:head>
|
||||
<section class="page">
|
||||
<SectionHeader title="Hosts">
|
||||
{#snippet actions()}<Button href="/capacity?rebalance=1">Rebalance</Button
|
||||
{#snippet actions()}<Button href="/hosts/operations">Operation history</Button><Button
|
||||
href="/capacity?rebalance=1">Rebalance</Button
|
||||
>{#if canManage}<Button variant="primary" onclick={() => (addOpen = true)}
|
||||
>Add host</Button
|
||||
>{/if}{/snippet}
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
<section class="page" aria-busy={changingPage}>
|
||||
<SectionHeader
|
||||
title="Host operation history"
|
||||
eyebrow="Operations"
|
||||
eyebrow="Hosts"
|
||||
subtitle="Remote operations, newest first. Filtered views retain their host and server context."
|
||||
>
|
||||
{#snippet actions()}<Freshness
|
||||
@@ -152,7 +152,7 @@
|
||||
/>{/snippet}
|
||||
</SectionHeader>
|
||||
{#if data.scope.operation || $page.url.searchParams.has('returnTo')}<BackLink
|
||||
fallback={data.scope.operation ? '/activity' : '/hosts'}
|
||||
fallback={data.scope.operation ? allOperationsHref : '/hosts'}
|
||||
/>{/if}
|
||||
{#if data.scope.operation}<div class="selected-operation">
|
||||
<div><strong>Selected host operation</strong><code>{data.scope.operation}</code></div>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { redirect } from '@sveltejs/kit';
|
||||
import { activityRedirectHref } from '$lib/activity-redirect.js';
|
||||
|
||||
export function load() {
|
||||
redirect(308, '/activity');
|
||||
export function load({ url }: { url: URL }) {
|
||||
redirect(308, activityRedirectHref(url));
|
||||
}
|
||||
|
||||
@@ -837,11 +837,6 @@
|
||||
{:else if activeSection === 'matches'}
|
||||
{#key name}<MatchHistory server={name} />{/key}
|
||||
{:else if activeSection === 'history'}
|
||||
<div class="history-links">
|
||||
<a href={contextHref(`/activity?server=${encodeURIComponent(name)}`, $page.url)}
|
||||
>Open in Activity</a
|
||||
>
|
||||
</div>
|
||||
{#key name}<ActivityLog server={name} />{/key}
|
||||
{/if}
|
||||
</div>
|
||||
@@ -866,11 +861,6 @@
|
||||
min-width: 0;
|
||||
scroll-margin-top: 80px;
|
||||
}
|
||||
.history-links {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 12px;
|
||||
}
|
||||
.server-actions {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user