Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/Exceptionless.Web/ClientApp/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { includeIgnoreFile } from '@eslint/compat';
import js from '@eslint/js';
import stylistic from '@stylistic/eslint-plugin';
import pluginQuery from '@tanstack/eslint-plugin-query';
import prettier from 'eslint-config-prettier';
import perfectionist from 'eslint-plugin-perfectionist';
Expand Down Expand Up @@ -44,9 +45,15 @@ export default ts.config(
}
},
{
files: ['**/*.svelte', '**/*.svelte.ts'],
plugins: {
'@stylistic': stylistic
},
rules: {
'@stylistic/brace-style': ['error', '1tbs', { allowSingleLine: false }],
'@stylistic/object-curly-newline': ['error', { ObjectExpression: { minProperties: 1 } }],
curly: ['error', 'all'],
'padding-line-between-statements': ['error', { blankLine: 'always', next: '*', prev: 'block-like' }]
'padding-line-between-statements': ['error', { blankLine: 'always', next: ['if', 'while', 'for', 'do'], prev: 'block-like' }]
}
},
{
Expand Down
53 changes: 53 additions & 0 deletions src/Exceptionless.Web/ClientApp/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/Exceptionless.Web/ClientApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"@storybook/addon-docs": "^10.5.5",
"@storybook/addon-svelte-csf": "^5.1.2",
"@storybook/sveltekit": "^10.5.5",
"@stylistic/eslint-plugin": "^5.10.0",
"@sveltejs/adapter-static": "^3.0.10",
"@sveltejs/kit": "^2.70.1",
"@sveltejs/vite-plugin-svelte": "^7.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ export function deleteOAuthApplicationMutation() {
}
},
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: queryKeys.oauthApplications });
queryClient.invalidateQueries({
queryKey: queryKeys.oauthApplications
});
}
}));
}
Expand Down Expand Up @@ -198,7 +200,9 @@ export function postOAuthApplicationMutation() {
return response.data!;
},
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: queryKeys.oauthApplications });
queryClient.invalidateQueries({
queryKey: queryKeys.oauthApplications
});
}
}));
}
Expand All @@ -218,7 +222,9 @@ export function putOAuthApplicationMutation() {
return response.data!;
},
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: queryKeys.oauthApplications });
queryClient.invalidateQueries({
queryKey: queryKeys.oauthApplications
});
}
}));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@
return problemDetailsToFormErrors(error);
}

return { form: 'An unexpected error occurred, please try again.' };
return {
form: 'An unexpected error occurred, please try again.'
};
}
}
}
Expand Down Expand Up @@ -199,7 +201,9 @@

<form.Field
name="confirmText"
validators={{ onChange: ({ value }) => (value === action.name ? undefined : `Type "${action.name}" to confirm`) }}
validators={{
onChange: ({ value }) => (value === action.name ? undefined : `Type "${action.name}" to confirm`)
}}
>
{#snippet children(field)}
<Field.Field data-invalid={ariaInvalid(field)}>
Expand Down Expand Up @@ -227,7 +231,9 @@
{#snippet children(isDisabled)}
<AlertDialog.Action
type="submit"
class={buttonVariants({ variant: action.dangerous ? 'destructive' : 'default' })}
class={buttonVariants({
variant: action.dangerous ? 'destructive' : 'default'
})}
disabled={isDisabled}
>
{isDisabled && form.state.isSubmitting ? 'Running...' : 'Run Job'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,19 @@ export function getColumns(): ColumnDef<StockFeatures, ElasticsearchSnapshot, un
},
{
accessorKey: 'status',
cell: (info) => renderComponent(SnapshotStatusCell, { value: info.getValue() as string | undefined }),
cell: (info) =>
renderComponent(SnapshotStatusCell, {
value: info.getValue() as string | undefined
}),
enableSorting: true,
header: 'Status'
},
{
accessorKey: 'start_time',
cell: (info) => renderComponent(DateTime, { value: (info.getValue() as null | string) ?? undefined }),
cell: (info) =>
renderComponent(DateTime, {
value: (info.getValue() as null | string) ?? undefined
}),
enableSorting: true,
header: 'Started'
},
Expand All @@ -48,7 +54,10 @@ export function getColumns(): ColumnDef<StockFeatures, ElasticsearchSnapshot, un
},
{
accessorKey: 'indices_count',
cell: (info) => renderComponent(Number, { value: info.getValue() as null | number }),
cell: (info) =>
renderComponent(Number, {
value: info.getValue() as null | number
}),
enableSorting: true,
header: 'Indices',
meta: {
Expand Down Expand Up @@ -82,7 +91,14 @@ export function getTableOptions(queryParameters: TableMemoryPagingParameters, ge
return {
...withClientSortedRowModel(options),
getRowId: (row) => row.repository + '/' + row.name,
initialState: { sorting: [{ desc: true, id: 'start_time' }] },
initialState: {
sorting: [
{
desc: true,
id: 'start_time'
}
]
},
manualSorting: false
};
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ export function getColumns(): ColumnDef<StockFeatures, ElasticsearchIndexDetail,
},
{
accessorKey: 'health',
cell: (info) => renderComponent(HealthBadgeCell, { value: info.getValue() as null | string | undefined }),
cell: (info) =>
renderComponent(HealthBadgeCell, {
value: info.getValue() as null | string | undefined
}),
enableSorting: true,
header: 'Health'
},
Expand All @@ -33,7 +36,10 @@ export function getColumns(): ColumnDef<StockFeatures, ElasticsearchIndexDetail,
},
{
accessorKey: 'primary',
cell: (info) => renderComponent(Number, { value: info.getValue() as null | number }),
cell: (info) =>
renderComponent(Number, {
value: info.getValue() as null | number
}),
enableSorting: true,
header: 'Primary',
meta: {
Expand All @@ -42,7 +48,10 @@ export function getColumns(): ColumnDef<StockFeatures, ElasticsearchIndexDetail,
},
{
accessorKey: 'replica',
cell: (info) => renderComponent(Number, { value: info.getValue() as null | number }),
cell: (info) =>
renderComponent(Number, {
value: info.getValue() as null | number
}),
enableSorting: true,
header: 'Replica',
meta: {
Expand All @@ -51,7 +60,10 @@ export function getColumns(): ColumnDef<StockFeatures, ElasticsearchIndexDetail,
},
{
accessorKey: 'unassigned_shards',
cell: (info) => renderComponent(UnassignedShardsCell, { value: info.getValue() as number }),
cell: (info) =>
renderComponent(UnassignedShardsCell, {
value: info.getValue() as number
}),
enableSorting: true,
header: 'Unassigned',
meta: {
Expand All @@ -60,7 +72,10 @@ export function getColumns(): ColumnDef<StockFeatures, ElasticsearchIndexDetail,
},
{
accessorKey: 'docs_count',
cell: (info) => renderComponent(Number, { value: info.getValue() as null | number }),
cell: (info) =>
renderComponent(Number, {
value: info.getValue() as null | number
}),
enableSorting: true,
header: 'Documents',
meta: {
Expand All @@ -69,7 +84,10 @@ export function getColumns(): ColumnDef<StockFeatures, ElasticsearchIndexDetail,
},
{
accessorKey: 'store_size_in_bytes',
cell: (info) => renderComponent(Bytes, { value: info.getValue() as null | number }),
cell: (info) =>
renderComponent(Bytes, {
value: info.getValue() as null | number
}),
enableSorting: true,
header: 'Size',
meta: {
Expand All @@ -88,7 +106,14 @@ export function getTableOptions(queryParameters: TableMemoryPagingParameters, ge
configureOptions: (options) => {
return {
...withClientSortedRowModel(options),
initialState: { sorting: [{ desc: true, id: 'store_size_in_bytes' }] },
initialState: {
sorting: [
{
desc: true,
id: 'store_size_in_bytes'
}
]
},
manualSorting: false
};
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,22 @@
let { status }: Props = $props();

const styles = {
Completed: { colorClass: 'text-muted-foreground', icon: CheckCircle2 },
Failed: { colorClass: 'text-destructive', icon: XCircle },
Pending: { colorClass: 'text-amber-500', icon: Clock },
Running: { colorClass: 'text-blue-500', icon: Loader }
Completed: {
colorClass: 'text-muted-foreground',
icon: CheckCircle2
},
Failed: {
colorClass: 'text-destructive',
icon: XCircle
},
Pending: {
colorClass: 'text-amber-500',
icon: Clock
},
Running: {
colorClass: 'text-blue-500',
icon: Loader
}
} as const;

const style = $derived(styles[status]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,37 @@ export function getColumns(): ColumnDef<StockFeatures, MigrationStateRow, unknow
},
{
accessorKey: 'migration_type',
cell: (info) => renderComponent(MigrationTypeCell, { value: info.getValue() as number }),
cell: (info) =>
renderComponent(MigrationTypeCell, {
value: info.getValue() as number
}),
enableSorting: true,
header: 'Type'
},
{
accessorKey: 'status',
cell: (info) => renderComponent(MigrationStatusCell, { status: info.getValue() as MigrationStatus }),
cell: (info) =>
renderComponent(MigrationStatusCell, {
status: info.getValue() as MigrationStatus
}),
enableSorting: true,
header: 'Status'
},
{
accessorKey: 'started_utc',
cell: (info) => renderComponent(DateTime, { value: (info.getValue() as null | string) ?? undefined }),
cell: (info) =>
renderComponent(DateTime, {
value: (info.getValue() as null | string) ?? undefined
}),
enableSorting: true,
header: 'Started'
},
{
accessorKey: 'completed_utc',
cell: (info) => renderComponent(DateTime, { value: (info.getValue() as null | string) ?? undefined }),
cell: (info) =>
renderComponent(DateTime, {
value: (info.getValue() as null | string) ?? undefined
}),
enableSorting: true,
header: 'Completed'
},
Expand All @@ -67,7 +79,10 @@ export function getColumns(): ColumnDef<StockFeatures, MigrationStateRow, unknow
},
{
accessorKey: 'error_message',
cell: (info) => renderComponent(MigrationErrorCell, { value: info.getValue() as null | string | undefined }),
cell: (info) =>
renderComponent(MigrationErrorCell, {
value: info.getValue() as null | string | undefined
}),
enableSorting: false,
header: 'Error',
meta: {
Expand All @@ -88,7 +103,12 @@ export function getTableOptions(queryParameters: TableMemoryPagingParameters, ge
...withClientSortedRowModel(options),
getRowId: (row) => row.id,
initialState: {
sorting: [{ desc: true, id: 'version' }]
sorting: [
{
desc: true,
id: 'version'
}
]
},
manualSorting: false
};
Expand Down
Loading
Loading