mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
feat: add elements to array
This commit is contained in:
+1
-1
@@ -19,7 +19,7 @@
|
||||
"e2e:ui": "playwright test tests/e2e --ui"
|
||||
},
|
||||
"dependencies": {
|
||||
"@appwrite.io/console": "^0.6.2",
|
||||
"@appwrite.io/console": "npm:khushboo-console@0.0.3",
|
||||
"@appwrite.io/pink": "0.23.0",
|
||||
"@appwrite.io/pink-icons": "0.23.0",
|
||||
"@popperjs/core": "^2.11.8",
|
||||
|
||||
@@ -96,7 +96,7 @@ export function addFilter(
|
||||
) {
|
||||
const operator = operatorKey ? operators[operatorKey] : null;
|
||||
const column = columns.find((c) => c.id === columnId) as Column;
|
||||
|
||||
console.log(column, operator);
|
||||
if (!column || !operator) return;
|
||||
if (column.array) {
|
||||
queries.addFilter({ column, operator, value: arrayValues });
|
||||
|
||||
+63
-6
@@ -24,12 +24,69 @@
|
||||
|
||||
const columns = writable<Column[]>([
|
||||
{ id: '$id', title: 'Execution ID', type: 'string', show: true, width: 150 },
|
||||
{ id: 'status', title: 'Status', type: 'string', show: true, width: 110 },
|
||||
{ id: '$createdAt', title: 'Created', type: 'datetime', show: true, width: 140 },
|
||||
{ id: 'trigger', title: 'Trigger', type: 'string', show: true, filter: false, width: 90 },
|
||||
{ id: 'requestMethod', title: 'Method', type: 'string', show: true, width: 70 },
|
||||
{ id: 'requestPath', title: 'Path', type: 'string', show: true, width: 90 },
|
||||
{ id: 'duration', title: 'Duration', type: 'string', show: true, width: 80 }
|
||||
{
|
||||
id: 'status',
|
||||
title: 'Status',
|
||||
type: 'string',
|
||||
show: true,
|
||||
width: 110,
|
||||
array: true,
|
||||
format: 'enum',
|
||||
elements: ['completed', 'scheduled', 'waiting', 'processing', 'cancelled', 'failed']
|
||||
},
|
||||
{
|
||||
id: '$createdAt',
|
||||
title: 'Created',
|
||||
type: 'datetime',
|
||||
show: true,
|
||||
width: 140,
|
||||
format: 'datetime'
|
||||
},
|
||||
{
|
||||
id: 'trigger',
|
||||
title: 'Trigger',
|
||||
type: 'string',
|
||||
show: true,
|
||||
width: 90,
|
||||
array: true,
|
||||
format: 'enum',
|
||||
elements: ['http', 'scheduled', 'event']
|
||||
},
|
||||
{
|
||||
id: 'requestMethod',
|
||||
title: 'Method',
|
||||
type: 'string',
|
||||
show: true,
|
||||
width: 70,
|
||||
array: true,
|
||||
format: 'enum',
|
||||
elements: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE']
|
||||
},
|
||||
{
|
||||
id: 'responseStatusCode',
|
||||
title: 'Status code',
|
||||
type: 'string',
|
||||
show: true,
|
||||
width: 100,
|
||||
array: true,
|
||||
format: 'integer'
|
||||
},
|
||||
{
|
||||
id: 'requestPath',
|
||||
title: 'Path',
|
||||
type: 'string',
|
||||
show: true,
|
||||
width: 90,
|
||||
format: 'string'
|
||||
},
|
||||
{
|
||||
id: 'duration',
|
||||
title: 'Duration',
|
||||
type: 'string',
|
||||
show: true,
|
||||
width: 80,
|
||||
format: 'integer'
|
||||
}
|
||||
]);
|
||||
|
||||
onMount(() => {
|
||||
|
||||
+4
@@ -87,6 +87,10 @@
|
||||
<TableCellText width={column.width} title={column.title}>
|
||||
{execution.requestMethod}
|
||||
</TableCellText>
|
||||
{:else if column.id === 'responseStatusCode'}
|
||||
<TableCellText width={column.width} title={column.title}>
|
||||
{execution.responseStatusCode}
|
||||
</TableCellText>
|
||||
{:else if column.id === 'requestPath'}
|
||||
<TableCellText width={column.width} title={column.title}>
|
||||
{execution.requestPath}
|
||||
|
||||
Reference in New Issue
Block a user