mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
fix: quickfilter
This commit is contained in:
1 parent
5abc52c06e
commit
4659414668
10 files changed
+140
-235
No files matched your search
@@ -12,7 +12,9 @@
|
||||
<ActionMenu.Item.Button
|
||||
on:click={() => {
|
||||
show = true;
|
||||
}}>Custom filters</ActionMenu.Item.Button>
|
||||
}}>
|
||||
Custom filters
|
||||
</ActionMenu.Item.Button>
|
||||
</ActionMenu.Root>
|
||||
|
||||
{#if show}
|
||||
|
||||
@@ -11,11 +11,19 @@
|
||||
} from '$lib/elements/forms';
|
||||
import type { Writable } from 'svelte/store';
|
||||
import Modal from '../modal.svelte';
|
||||
import { addFilter, generateTag, operators, queries, type TagValue } from './store';
|
||||
import {
|
||||
addFilter,
|
||||
generateTag,
|
||||
operators,
|
||||
queries,
|
||||
ValidOperators,
|
||||
type TagValue
|
||||
} from './store';
|
||||
import type { Column } from '$lib/helpers/types';
|
||||
import { TagList } from '.';
|
||||
import { Icon, Layout } from '@appwrite.io/pink-svelte';
|
||||
import { IconPlus } from '@appwrite.io/pink-icons-svelte';
|
||||
import { addFilterAndApply } from './quickFilters';
|
||||
|
||||
export let show = false;
|
||||
export let columns: Writable<Column[]>;
|
||||
@@ -35,9 +43,17 @@
|
||||
|
||||
function apply() {
|
||||
localQueries.forEach((query) => {
|
||||
addFilter($columns, query.id, query.operator, query.value, query.arrayValues);
|
||||
addFilterAndApply(
|
||||
query.id,
|
||||
$columns.find((c) => c.id === query.id).title,
|
||||
query.operator as ValidOperators,
|
||||
query.value,
|
||||
query.arrayValues,
|
||||
$columns,
|
||||
analyticsSource
|
||||
);
|
||||
});
|
||||
queries.apply();
|
||||
|
||||
localTags = [];
|
||||
localQueries = [];
|
||||
trackEvent(Submit.FilterApply, {
|
||||
@@ -48,7 +64,7 @@
|
||||
}
|
||||
|
||||
function addCondition() {
|
||||
const newTag = generateTag(selectedColumn, operatorKey, value, arrayValues);
|
||||
const newTag = generateTag(selectedColumn, operatorKey, value || arrayValues);
|
||||
if (localTags.some((t) => t.tag === newTag.tag && t.value === newTag.value)) {
|
||||
return;
|
||||
} else {
|
||||
|
||||
@@ -1,107 +1,70 @@
|
||||
<script lang="ts">
|
||||
import { afterNavigate } from '$app/navigation';
|
||||
import { queryParamToMap } from '$lib/components/filters/store';
|
||||
import type { Column } from '$lib/helpers/types';
|
||||
import { type Writable } from 'svelte/store';
|
||||
import { CustomFilters, FiltersBottomSheet } from '$lib/components/filters';
|
||||
import { addFilterAndApply, buildFilterCol } from './quickFilters';
|
||||
import { parsedTags, setFilters } from './setFilters';
|
||||
import { addFilterAndApply, type FilterData } from './quickFilters';
|
||||
import { parsedTags } from './setFilters';
|
||||
import Menu from '../menu/menu.svelte';
|
||||
import { Button } from '$lib/elements/forms';
|
||||
import { Icon } from '@appwrite.io/pink-svelte';
|
||||
import { IconFilterLine } from '@appwrite.io/pink-icons-svelte';
|
||||
import QuickfiltersSubMenu from './quickfiltersSubMenu.svelte';
|
||||
import { isSmallViewport } from '$lib/stores/viewport';
|
||||
|
||||
export let columns: Writable<Column[]>;
|
||||
export let analyticsSource: string;
|
||||
export let openBottomSheet = false;
|
||||
let {
|
||||
columns,
|
||||
filterCols,
|
||||
analyticsSource
|
||||
}: {
|
||||
columns: Writable<Column[]>;
|
||||
filterCols: FilterData[];
|
||||
analyticsSource?: string;
|
||||
} = $props();
|
||||
|
||||
//TODO: remove this when all header are replace with `ResponsiveContainerHeader`
|
||||
let filterCols = $columns
|
||||
.map((col) => (col.filter !== false ? buildFilterCol(col) : null))
|
||||
.filter((f) => f?.options);
|
||||
|
||||
afterNavigate((p) => {
|
||||
const paramQueries = p.to.url.searchParams.get('query');
|
||||
const localQueries = queryParamToMap(paramQueries || '[]');
|
||||
const localTags = Array.from(localQueries.keys());
|
||||
// console.log(paramQueries, localQueries, localTags);
|
||||
setFilters(localTags, filterCols, $columns);
|
||||
filterCols = filterCols;
|
||||
});
|
||||
$inspect(filterCols);
|
||||
</script>
|
||||
|
||||
{#if $isSmallViewport}
|
||||
{#if $parsedTags?.length}
|
||||
<Button
|
||||
secondary
|
||||
badge={`${$parsedTags?.length}`}
|
||||
on:click={() => (openBottomSheet = true)}>
|
||||
<Icon icon={IconFilterLine} slot="start" size="s" />
|
||||
Filters
|
||||
</Button>
|
||||
{:else}
|
||||
<Button secondary on:click={() => (openBottomSheet = true)}>
|
||||
<Icon icon={IconFilterLine} slot="start" size="s" />
|
||||
Filters
|
||||
</Button>
|
||||
{/if}
|
||||
{:else}
|
||||
<Menu>
|
||||
{#if $parsedTags?.length}
|
||||
<Button secondary badge={`${$parsedTags?.length}`}>
|
||||
<Icon icon={IconFilterLine} slot="start" size="s" />
|
||||
Filters
|
||||
</Button>
|
||||
{:else}
|
||||
<Button secondary>
|
||||
<Icon icon={IconFilterLine} slot="start" size="s" />
|
||||
Filters
|
||||
</Button>
|
||||
{/if}
|
||||
<svelte:fragment slot="menu">
|
||||
{#each filterCols as filter (filter.title + filter.id)}
|
||||
{#if filter.options}
|
||||
<QuickfiltersSubMenu
|
||||
{filter}
|
||||
variant={filter?.array ? 'checkbox' : 'radio'}
|
||||
on:add={(e) => {
|
||||
addFilterAndApply(
|
||||
filter.id,
|
||||
filter.title,
|
||||
filter.operator,
|
||||
e.detail.value,
|
||||
filter?.array
|
||||
? (filter.options
|
||||
.filter((opt) => opt.checked)
|
||||
.map((opt) => opt.value) ?? [])
|
||||
: [],
|
||||
$columns,
|
||||
analyticsSource
|
||||
);
|
||||
}}
|
||||
on:clear={() => {
|
||||
addFilterAndApply(
|
||||
filter.id,
|
||||
filter.title,
|
||||
filter.operator,
|
||||
null,
|
||||
[],
|
||||
$columns,
|
||||
analyticsSource
|
||||
);
|
||||
}} />
|
||||
{/if}
|
||||
{/each}
|
||||
</svelte:fragment>
|
||||
<Menu>
|
||||
<Button secondary badge={$parsedTags?.length ? `${$parsedTags.length}` : undefined}>
|
||||
<Icon icon={IconFilterLine} slot="start" size="s" />
|
||||
Filters
|
||||
</Button>
|
||||
<svelte:fragment slot="menu">
|
||||
{#each filterCols.filter((f) => f?.options) as filter (filter.title + filter.id)}
|
||||
{#if filter.options}
|
||||
<QuickfiltersSubMenu
|
||||
{filter}
|
||||
variant={filter?.array ? 'checkbox' : 'radio'}
|
||||
on:add={(e) => {
|
||||
addFilterAndApply(
|
||||
filter.id,
|
||||
filter.title,
|
||||
filter.operator,
|
||||
e.detail.value,
|
||||
filter?.array
|
||||
? (filter.options
|
||||
.filter((opt) => opt.checked)
|
||||
.map((opt) => opt.value) ?? [])
|
||||
: [],
|
||||
$columns,
|
||||
analyticsSource
|
||||
);
|
||||
}}
|
||||
on:clear={() => {
|
||||
addFilterAndApply(
|
||||
filter.id,
|
||||
filter.title,
|
||||
filter.operator,
|
||||
null,
|
||||
[],
|
||||
$columns,
|
||||
analyticsSource
|
||||
);
|
||||
}} />
|
||||
{/if}
|
||||
{/each}
|
||||
</svelte:fragment>
|
||||
|
||||
<svelte:fragment slot="end">
|
||||
<CustomFilters {columns} />
|
||||
</svelte:fragment>
|
||||
</Menu>
|
||||
{/if}
|
||||
|
||||
{#if $isSmallViewport && openBottomSheet}
|
||||
<FiltersBottomSheet bind:openBottomSheet {columns} {analyticsSource} bind:filterCols />
|
||||
{/if}
|
||||
<svelte:fragment slot="end">
|
||||
<CustomFilters {columns} />
|
||||
</svelte:fragment>
|
||||
</Menu>
|
||||
@@ -35,8 +35,9 @@
|
||||
|
||||
<div use:melt={$subTrigger}>
|
||||
<ActionMenu.Root noPadding>
|
||||
<ActionMenu.Item.Button trailingIcon={IconChevronRight}
|
||||
>{filter.title}</ActionMenu.Item.Button>
|
||||
<ActionMenu.Item.Button trailingIcon={IconChevronRight}>
|
||||
{filter.title}
|
||||
</ActionMenu.Item.Button>
|
||||
</ActionMenu.Root>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -9,17 +9,18 @@ export function setFilters(localTags: TagValue[], filterCols: FilterData[], $col
|
||||
if (!localTags?.length) {
|
||||
filterCols.forEach((filter) => {
|
||||
resetOptions(filter);
|
||||
cleanOldTags(filter.title);
|
||||
cleanOldTags(filter?.title);
|
||||
});
|
||||
} else {
|
||||
filterCols.forEach((filter) => {
|
||||
if (filter.id.toLowerCase().includes('duration')) {
|
||||
const id = filter?.id?.toLowerCase();
|
||||
if (id?.includes('duration')) {
|
||||
setTimeFilter(filter, $columns);
|
||||
} else if (filter.id.toLocaleLowerCase().includes('size')) {
|
||||
} else if (id?.includes('size')) {
|
||||
setSizeFilter(filter, $columns);
|
||||
} else if (filter.id.toLocaleLowerCase().includes('statuscode')) {
|
||||
} else if (id?.includes('statuscode')) {
|
||||
setStatusCodeFilter(filter, $columns);
|
||||
} else if (filter.id === '$createdAt' || filter.id === '$updatedAt') {
|
||||
} else if (id === '$createdat' || id === '$updatedat') {
|
||||
setDateFilter(filter, $columns);
|
||||
} else {
|
||||
setFilterData(filter);
|
||||
@@ -40,7 +41,7 @@ export function setFilterData(filter: FilterData) {
|
||||
option.checked = values.includes(option.value);
|
||||
});
|
||||
}
|
||||
cleanOldTags(filter.title);
|
||||
cleanOldTags(filter?.title);
|
||||
const newTag = {
|
||||
tag: tagData.tag.replace(',', ' or '),
|
||||
value: tagData.value
|
||||
@@ -52,7 +53,7 @@ export function setFilterData(filter: FilterData) {
|
||||
});
|
||||
} else {
|
||||
resetOptions(filter);
|
||||
cleanOldTags(filter.title);
|
||||
cleanOldTags(filter?.title);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +77,7 @@ export function setTimeFilter(filter: FilterData, columns: Column[]) {
|
||||
value: timeTag.value
|
||||
};
|
||||
|
||||
cleanOldTags(filter.title);
|
||||
cleanOldTags(filter?.title);
|
||||
|
||||
parsedTags.update((tags) => {
|
||||
tags.push(newTag);
|
||||
@@ -84,7 +85,7 @@ export function setTimeFilter(filter: FilterData, columns: Column[]) {
|
||||
});
|
||||
}
|
||||
} else {
|
||||
cleanOldTags(filter.title);
|
||||
cleanOldTags(filter?.title);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +103,7 @@ export function setSizeFilter(filter: FilterData, columns: Column[]) {
|
||||
return prev;
|
||||
});
|
||||
if (sizeRange) {
|
||||
cleanOldTags(filter.title);
|
||||
cleanOldTags(filter?.title);
|
||||
|
||||
const newTag = {
|
||||
tag: `**${filter.title}** is **${sizeRange.label}**`,
|
||||
@@ -114,7 +115,7 @@ export function setSizeFilter(filter: FilterData, columns: Column[]) {
|
||||
});
|
||||
}
|
||||
} else {
|
||||
cleanOldTags(filter.title);
|
||||
cleanOldTags(filter?.title);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +128,7 @@ export function setStatusCodeFilter(filter: FilterData, columns: Column[]) {
|
||||
|
||||
const codeRange = ranges.find((c) => c?.value && c.value === statusCodeTag.value);
|
||||
if (codeRange) {
|
||||
cleanOldTags(filter.title);
|
||||
cleanOldTags(filter?.title);
|
||||
const newTag = {
|
||||
tag: `**${filter.title}** is **${codeRange.label}**`,
|
||||
value: statusCodeTag.value
|
||||
@@ -139,7 +140,7 @@ export function setStatusCodeFilter(filter: FilterData, columns: Column[]) {
|
||||
});
|
||||
}
|
||||
} else {
|
||||
cleanOldTags(filter.title);
|
||||
cleanOldTags(filter?.title);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,7 +159,7 @@ export function setDateFilter(filter: FilterData, columns: Column[]) {
|
||||
return prev;
|
||||
});
|
||||
if (dateRange) {
|
||||
cleanOldTags(filter.title);
|
||||
cleanOldTags(filter?.title);
|
||||
const newTag = {
|
||||
tag: `**${filter.title}** is **${dateRange.label}**`,
|
||||
value: dateTag.value
|
||||
@@ -169,11 +170,12 @@ export function setDateFilter(filter: FilterData, columns: Column[]) {
|
||||
});
|
||||
}
|
||||
} else {
|
||||
cleanOldTags(filter.title);
|
||||
cleanOldTags(filter?.title);
|
||||
}
|
||||
}
|
||||
|
||||
function cleanOldTags(title: string) {
|
||||
if (!title) return;
|
||||
parsedTags.update((tags) => {
|
||||
tags = tags.filter((tag) => !tag.tag.includes(`**${title}**`));
|
||||
return tags;
|
||||
@@ -181,6 +183,7 @@ function cleanOldTags(title: string) {
|
||||
}
|
||||
|
||||
export function resetOptions(filter: FilterData) {
|
||||
if (!filter?.options) return;
|
||||
filter.options.forEach((option) => {
|
||||
option.checked = false;
|
||||
});
|
||||
|
||||
@@ -46,9 +46,7 @@
|
||||
let showFilters = $state(false);
|
||||
|
||||
let filterCols = $derived(
|
||||
$columns
|
||||
.map((col) => (col.filter !== false ? buildFilterCol(col) : null))
|
||||
.filter((f) => f?.options)
|
||||
$columns.map((col) => (col.filter !== false ? buildFilterCol(col) : null)).filter(Boolean)
|
||||
);
|
||||
|
||||
afterNavigate((p) => {
|
||||
@@ -109,14 +107,16 @@
|
||||
<SearchQuery placeholder={searchPlaceholder} />
|
||||
{/if}
|
||||
{#if hasFilters && $columns?.length}
|
||||
<QuickFilters {columns} {analyticsSource} />
|
||||
<QuickFilters {columns} {analyticsSource} {filterCols} />
|
||||
{/if}
|
||||
</Layout.Stack>
|
||||
<Layout.Stack direction="row" alignItems="center" justifyContent="flex-end">
|
||||
{#if hasDisplaySettings}
|
||||
<ViewSelector {view} {columns} {hideView} {hideColumns} />
|
||||
{/if}
|
||||
{@render children()}
|
||||
{#if children}
|
||||
{@render children()}
|
||||
{/if}
|
||||
</Layout.Stack>
|
||||
</Layout.Stack>
|
||||
{/if}
|
||||
@@ -138,7 +138,7 @@
|
||||
bind:openBottomSheet={showFilters}
|
||||
{columns}
|
||||
{analyticsSource}
|
||||
bind:filterCols />
|
||||
filterCols={filterCols.filter((f) => f?.options)} />
|
||||
{/if}
|
||||
|
||||
<!-- SNIPPETS -->
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import { PaginationWithLimit, ViewSelector, EmptyFilter } from '$lib/components';
|
||||
import { Button } from '$lib/elements/forms';
|
||||
import { columns, deploymentList, func } from './store';
|
||||
import { Container } from '$lib/layout';
|
||||
import { Container, ResponsiveContainerHeader } from '$lib/layout';
|
||||
import type { Models } from '@appwrite.io/console';
|
||||
import { GRACE_PERIOD_OVERRIDE, isCloud } from '$lib/system';
|
||||
import { readOnly } from '$lib/stores/billing';
|
||||
@@ -168,25 +168,18 @@
|
||||
{/if}
|
||||
|
||||
<Layout.Stack gap="l">
|
||||
<Layout.Stack>
|
||||
<Layout.Stack direction="row" alignItems="center">
|
||||
<Layout.Stack direction="row" gap="s" wrap="wrap">
|
||||
<QuickFilters {columns} analyticsSource="function_deployments" />
|
||||
</Layout.Stack>
|
||||
<Layout.Stack direction="row" gap="s" inline>
|
||||
{#if data.deploymentList.total}
|
||||
<ViewSelector view={View.Table} {columns} hideView />
|
||||
{/if}
|
||||
<CreateActionMenu let:toggle installations={data.installations}>
|
||||
<Button on:click={toggle} event="create_deployment">
|
||||
<Icon icon={IconPlus} size="s" slot="start" />
|
||||
Create deployment
|
||||
</Button>
|
||||
</CreateActionMenu>
|
||||
</Layout.Stack>
|
||||
</Layout.Stack>
|
||||
<ParsedTagList />
|
||||
</Layout.Stack>
|
||||
<ResponsiveContainerHeader
|
||||
hasFilters
|
||||
{columns}
|
||||
hideView
|
||||
analyticsSource="function_deployments">
|
||||
<CreateActionMenu let:toggle installations={data.installations}>
|
||||
<Button on:click={toggle} event="create_deployment">
|
||||
<Icon icon={IconPlus} size="s" slot="start" />
|
||||
Create deployment
|
||||
</Button>
|
||||
</CreateActionMenu>
|
||||
</ResponsiveContainerHeader>
|
||||
|
||||
{#if data.deploymentList.total}
|
||||
<Table columns={$columns} {data} />
|
||||
|
||||
+19
-31
@@ -1,19 +1,17 @@
|
||||
<script lang="ts">
|
||||
import { invalidate } from '$app/navigation';
|
||||
import { Empty, EmptyFilter, PaginationWithLimit, ViewSelector } from '$lib/components';
|
||||
import { Empty, EmptyFilter, PaginationWithLimit } from '$lib/components';
|
||||
import { Dependencies } from '$lib/constants';
|
||||
import { Button } from '$lib/elements/forms';
|
||||
import { Container } from '$lib/layout';
|
||||
import { Container, ResponsiveContainerHeader } from '$lib/layout';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import { onMount } from 'svelte';
|
||||
import { project } from '$routes/(console)/project-[project]/store';
|
||||
import { base } from '$app/paths';
|
||||
import { View } from '$lib/helpers/load';
|
||||
import { Icon, Layout, Tooltip } from '@appwrite.io/pink-svelte';
|
||||
import { Icon, Tooltip } from '@appwrite.io/pink-svelte';
|
||||
import { IconPlus } from '@appwrite.io/pink-icons-svelte';
|
||||
import Table from './table.svelte';
|
||||
import { columns } from './store';
|
||||
import { ParsedTagList, QuickFilters } from '$lib/components/filters';
|
||||
|
||||
export let data;
|
||||
|
||||
@@ -27,32 +25,22 @@
|
||||
</script>
|
||||
|
||||
<Container>
|
||||
<Layout.Stack>
|
||||
<Layout.Stack direction="row" alignItems="center" justifyContent="space-between">
|
||||
<QuickFilters {columns} analyticsSource="function_executions" />
|
||||
|
||||
<Layout.Stack gap="s" inline direction="row" alignItems="center">
|
||||
{#if data?.executions?.total}
|
||||
<ViewSelector view={View.Table} {columns} hideView />
|
||||
{/if}
|
||||
<Tooltip disabled={!!data.func?.deploymentId}>
|
||||
<div>
|
||||
<Button
|
||||
event="execute_function"
|
||||
href={`${base}/project-${$project.$id}/functions/function-${data.func.$id}/executions/execute-function`}
|
||||
disabled={!data.func.$id || !data.func?.deploymentId}>
|
||||
<Icon icon={IconPlus} size="s" slot="start" />
|
||||
Create execution
|
||||
</Button>
|
||||
</div>
|
||||
<span slot="tooltip">
|
||||
Execution cannot be created because there is no active deployment.
|
||||
</span>
|
||||
</Tooltip>
|
||||
</Layout.Stack>
|
||||
</Layout.Stack>
|
||||
<ParsedTagList />
|
||||
</Layout.Stack>
|
||||
<ResponsiveContainerHeader hasFilters {columns} hideView analyticsSource="function_executions">
|
||||
<Tooltip disabled={!!data.func?.deploymentId}>
|
||||
<div>
|
||||
<Button
|
||||
event="execute_function"
|
||||
href={`${base}/project-${$project.$id}/functions/function-${data.func.$id}/executions/execute-function`}
|
||||
disabled={!data.func.$id || !data.func?.deploymentId}>
|
||||
<Icon icon={IconPlus} size="s" slot="start" />
|
||||
Create execution
|
||||
</Button>
|
||||
</div>
|
||||
<span slot="tooltip">
|
||||
Execution cannot be created because there is no active deployment.
|
||||
</span>
|
||||
</Tooltip>
|
||||
</ResponsiveContainerHeader>
|
||||
|
||||
{#if data?.executions?.total}
|
||||
<Table columns={$columns} logs={data.executions} />
|
||||
|
||||
@@ -75,7 +75,6 @@
|
||||
<Layout.Stack gap="xxxl">
|
||||
<DeploymentMetrics />
|
||||
|
||||
<!-- TODO: re-enable once component is complete -->
|
||||
<Layout.Stack gap="l">
|
||||
<ResponsiveContainerHeader
|
||||
view={View.Table}
|
||||
@@ -120,58 +119,6 @@
|
||||
</svelte:fragment>
|
||||
</Popover>
|
||||
</ResponsiveContainerHeader>
|
||||
<!-- <Layout.Stack>
|
||||
<Layout.Stack justifyContent="space-between" direction="row">
|
||||
<Layout.Stack alignItems="center" direction="row">
|
||||
{#if data.deploymentList.total || data?.query}
|
||||
<QuickFilters {columns} analyticsSource="site_deployments" />
|
||||
{/if}
|
||||
</Layout.Stack>
|
||||
|
||||
<Layout.Stack direction="row" inline>
|
||||
{#if data.deploymentList.total}
|
||||
<ViewSelector view={View.Table} {columns} hideView />
|
||||
{/if}
|
||||
<Popover padding="none" let:toggle>
|
||||
<Button size="s" on:click={toggle}>
|
||||
<Icon size="s" icon={IconPlus} />
|
||||
Create deployment
|
||||
</Button>
|
||||
<svelte:fragment slot="tooltip" let:toggle>
|
||||
<ActionMenu.Root>
|
||||
<ActionMenu.Item.Button
|
||||
badge="Recommended"
|
||||
on:click={(e) => {
|
||||
toggle(e);
|
||||
if (!hasInstallation) {
|
||||
showConnectRepo = true;
|
||||
} else {
|
||||
showCreateDeployment = true;
|
||||
}
|
||||
}}>
|
||||
Git
|
||||
</ActionMenu.Item.Button>
|
||||
<ActionMenu.Item.Button
|
||||
on:click={(e) => {
|
||||
toggle(e);
|
||||
showConnectCLI = true;
|
||||
}}>
|
||||
CLI
|
||||
</ActionMenu.Item.Button>
|
||||
<ActionMenu.Item.Button
|
||||
on:click={(e) => {
|
||||
toggle(e);
|
||||
showConnectManual = true;
|
||||
}}>
|
||||
Manual
|
||||
</ActionMenu.Item.Button>
|
||||
</ActionMenu.Root>
|
||||
</svelte:fragment>
|
||||
</Popover>
|
||||
</Layout.Stack>
|
||||
</Layout.Stack>
|
||||
<ParsedTagList />
|
||||
</Layout.Stack> -->
|
||||
|
||||
{#if data.deploymentList.total}
|
||||
<Table {data} />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { EmptyFilter, PaginationWithLimit, ViewSelector } from '$lib/components';
|
||||
import { Dependencies } from '$lib/constants';
|
||||
import { Button } from '$lib/elements/forms';
|
||||
import { Container } from '$lib/layout';
|
||||
import { Container, ResponsiveContainerHeader } from '$lib/layout';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import { onMount } from 'svelte';
|
||||
import Table from './table.svelte';
|
||||
@@ -26,16 +26,8 @@
|
||||
</script>
|
||||
|
||||
<Container>
|
||||
<Layout.Stack>
|
||||
<Layout.Stack direction="row" justifyContent="space-between">
|
||||
<QuickFilters {columns} analyticsSource="site_logs" />
|
||||
{#if data.logs.total}
|
||||
<ViewSelector view={View.Table} {columns} hideView />
|
||||
{/if}
|
||||
</Layout.Stack>
|
||||
<ResponsiveContainerHeader hasFilters {columns} hideView analyticsSource="site_logs" />
|
||||
|
||||
<ParsedTagList />
|
||||
</Layout.Stack>
|
||||
{#if data?.logs?.total}
|
||||
<Table columns={$columns} logs={data.logs} />
|
||||
|
||||
|
||||
Reference in new issue
Block a user