mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
Add view certificate logs option
This commit is contained in:
1 parent
8d60e38bf5
commit
49f08b6fbb
2 files changed
+55
-2
No files matched your search
+33
-2
@@ -3,7 +3,12 @@
|
||||
import { Link } from '$lib/elements';
|
||||
import { Button } from '$lib/elements/forms';
|
||||
import type { Models } from '@appwrite.io/console';
|
||||
import { IconDotsHorizontal, IconRefresh, IconTrash } from '@appwrite.io/pink-icons-svelte';
|
||||
import {
|
||||
IconDotsHorizontal,
|
||||
IconRefresh,
|
||||
IconTrash,
|
||||
IconTerminal
|
||||
} from '@appwrite.io/pink-icons-svelte';
|
||||
import {
|
||||
ActionMenu,
|
||||
Badge,
|
||||
@@ -11,10 +16,12 @@
|
||||
Layout,
|
||||
Popover,
|
||||
Table,
|
||||
Typography
|
||||
Typography,
|
||||
Divider
|
||||
} from '@appwrite.io/pink-svelte';
|
||||
import DeleteDomainModal from './deleteDomainModal.svelte';
|
||||
import RetryDomainModal from './retryDomainModal.svelte';
|
||||
import ViewLogsModal from './viewLogsModal.svelte';
|
||||
import { columns } from './store';
|
||||
import { regionalProtocol } from '$routes/(console)/project-[region]-[project]/store';
|
||||
|
||||
@@ -26,6 +33,7 @@
|
||||
|
||||
let showDelete = $state(false);
|
||||
let showRetry = $state(false);
|
||||
let showLogs = $state(false);
|
||||
let selectedProxyRule: Models.ProxyRule = $state(null);
|
||||
|
||||
const proxyTarget = (proxy: Models.ProxyRule) => {
|
||||
@@ -91,6 +99,17 @@
|
||||
|
||||
<svelte:fragment slot="tooltip" let:toggle>
|
||||
<ActionMenu.Root>
|
||||
{#if rule.logs}
|
||||
<ActionMenu.Item.Button
|
||||
leadingIcon={IconTerminal}
|
||||
on:click={(e) => {
|
||||
selectedProxyRule = rule;
|
||||
showLogs = true;
|
||||
toggle(e);
|
||||
}}>
|
||||
View logs
|
||||
</ActionMenu.Item.Button>
|
||||
{/if}
|
||||
{#if rule.status !== 'verified' && rule.status !== 'verifying'}
|
||||
<ActionMenu.Item.Button
|
||||
leadingIcon={IconRefresh}
|
||||
@@ -102,6 +121,14 @@
|
||||
Retry
|
||||
</ActionMenu.Item.Button>
|
||||
{/if}
|
||||
{#if rule.logs || (rule.status !== 'verified' && rule.status !== 'verifying')}
|
||||
<div
|
||||
style:margin-inline="-1rem"
|
||||
style:padding-block-start="0.25rem"
|
||||
style:padding-block-end="0.25rem">
|
||||
<Divider />
|
||||
</div>
|
||||
{/if}
|
||||
<ActionMenu.Item.Button
|
||||
status="danger"
|
||||
leadingIcon={IconTrash}
|
||||
@@ -131,3 +158,7 @@
|
||||
{#if showRetry}
|
||||
<RetryDomainModal bind:show={showRetry} {selectedProxyRule} />
|
||||
{/if}
|
||||
|
||||
{#if showLogs}
|
||||
<ViewLogsModal bind:show={showLogs} {selectedProxyRule} />
|
||||
{/if}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
<script lang="ts">
|
||||
import { Modal } from '$lib/components';
|
||||
import { Logs } from '@appwrite.io/pink-svelte';
|
||||
import { app } from '$lib/stores/app';
|
||||
import type { Models } from '@appwrite.io/console';
|
||||
|
||||
let {
|
||||
show = $bindable(false),
|
||||
selectedProxyRule
|
||||
}: {
|
||||
show: boolean;
|
||||
selectedProxyRule: Models.ProxyRule;
|
||||
} = $props();
|
||||
</script>
|
||||
|
||||
<Modal title="Certificate logs" bind:show size="m" hideFooter>
|
||||
<Logs
|
||||
logs={selectedProxyRule.logs}
|
||||
bind:theme={$app.themeInUse}
|
||||
showScrollButton
|
||||
height="250px" />
|
||||
</Modal>
|
||||
Reference in new issue
Block a user