mirror of
https://github.com/siemens-mobile-hacks/web-devtools.git
synced 2026-11-25 23:57:40 +00:00
wip: swilib merge
This commit is contained in:
parent
df94dba4a1
commit
d16c685e7e
13 changed files with 488 additions and 410 deletions
30
package.json
30
package.json
|
|
@ -12,39 +12,39 @@
|
|||
},
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@types/node": "^25.3.0",
|
||||
"@types/node": "^25.5.0",
|
||||
"solid-devtools": "^0.34.5",
|
||||
"vite": "^7.3.1",
|
||||
"vite-plugin-solid": "^2.11.10",
|
||||
"vite-plugin-solid": "^2.11.11",
|
||||
"vite-plugin-solid-svg": "^0.8.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@codemirror/autocomplete": "^6.20.0",
|
||||
"@codemirror/commands": "^6.10.2",
|
||||
"@codemirror/language": "^6.12.1",
|
||||
"@codemirror/lint": "^6.9.4",
|
||||
"@codemirror/autocomplete": "^6.20.1",
|
||||
"@codemirror/commands": "^6.10.3",
|
||||
"@codemirror/language": "^6.12.2",
|
||||
"@codemirror/lint": "^6.9.5",
|
||||
"@codemirror/search": "^6.6.0",
|
||||
"@codemirror/state": "^6.5.4",
|
||||
"@codemirror/state": "^6.6.0",
|
||||
"@codemirror/theme-one-dark": "^6.1.3",
|
||||
"@codemirror/view": "^6.39.15",
|
||||
"@codemirror/view": "^6.40.0",
|
||||
"@material-design-icons/svg": "^0.14.15",
|
||||
"@solid-primitives/context": "^0.3.2",
|
||||
"@solidjs/router": "^0.15.4",
|
||||
"@suid/types": "^0.8.0",
|
||||
"@types/debug": "^4.1.12",
|
||||
"@types/sprintf-js": "^1.1.4",
|
||||
"@uiw/codemirror-theme-dracula": "^4.25.5",
|
||||
"@uiw/codemirror-theme-github": "^4.25.5",
|
||||
"@uiw/codemirror-theme-xcode": "^4.25.5",
|
||||
"axios": "^1.13.5",
|
||||
"axios-cache-interceptor": "^1.11.4",
|
||||
"@uiw/codemirror-theme-dracula": "^4.25.8",
|
||||
"@uiw/codemirror-theme-github": "^4.25.8",
|
||||
"@uiw/codemirror-theme-xcode": "^4.25.8",
|
||||
"axios": "^1.13.6",
|
||||
"axios-cache-interceptor": "^1.12.0",
|
||||
"bootstrap": "^5.3.8",
|
||||
"bootstrap-icons": "^1.13.1",
|
||||
"clsx": "^2.1.1",
|
||||
"date-fns": "^3.6.0",
|
||||
"es-toolkit": "^1.44.0",
|
||||
"es-toolkit": "^1.45.1",
|
||||
"highlight.js": "^11.11.1",
|
||||
"sass": "^1.97.3",
|
||||
"sass": "^1.98.0",
|
||||
"solid-bootstrap": "^1.0.21",
|
||||
"solid-js": "^1.9.11",
|
||||
"typescript": "^5.9.3",
|
||||
|
|
|
|||
542
pnpm-lock.yaml
generated
542
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
|
@ -28,7 +28,10 @@ export class ApiNetworkError extends ApiError {
|
|||
apiClient.interceptors.response.use((response) => response, handleApiError)
|
||||
|
||||
async function handleApiError(error: AxiosError | unknown) {
|
||||
if (error instanceof AxiosError && error.name !== 'CanceledError') {
|
||||
if (axios.isCancel(error))
|
||||
return Promise.reject(error);
|
||||
|
||||
if (error instanceof AxiosError) {
|
||||
if (!error.response) {
|
||||
return Promise.reject(
|
||||
new ApiNetworkError(
|
||||
|
|
@ -54,5 +57,6 @@ async function handleApiError(error: AxiosError | unknown) {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
return Promise.reject(error)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ export const App: ParentComponent = (props) => {
|
|||
onSidebarToggle={() => setSidebarOpen((prev) => !prev)}
|
||||
/>
|
||||
<Container fluid class="p-0">
|
||||
<div class="d-flex flex-row gap-1">
|
||||
<div class="d-flex flex-row">
|
||||
<Show when={sidebarIsOffcanvas()} fallback={
|
||||
<Sidebar />
|
||||
}>
|
||||
|
|
|
|||
16
src/components/Layout/Sticky/Sticky.scss
Normal file
16
src/components/Layout/Sticky/Sticky.scss
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
.sticky {
|
||||
--sticky-y-padding: 0.5rem;
|
||||
--sticky-y-offset: -0.5rem;
|
||||
position: sticky;
|
||||
top: calc(var(--bs-header-height) + var(--sticky-y-padding));
|
||||
background: var(--bs-body-bg);
|
||||
z-index: 1020;
|
||||
padding: var(--sticky-y-padding) 0;
|
||||
transform: translateY(var(--sticky-y-offset));
|
||||
|
||||
&--is-sticky {
|
||||
box-shadow: var(--bs-box-shadow-sm);
|
||||
margin: 0 -1rem;
|
||||
padding: var(--sticky-y-padding) 1rem;
|
||||
}
|
||||
}
|
||||
30
src/components/Layout/Sticky/Sticky.tsx
Normal file
30
src/components/Layout/Sticky/Sticky.tsx
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
import "./Sticky.scss";
|
||||
import { createSignal, onCleanup, onMount, ParentComponent } from "solid-js";
|
||||
import clsx from "clsx";
|
||||
|
||||
export const Sticky: ParentComponent = (props) => {
|
||||
let ref!: HTMLDivElement;
|
||||
const [isSticky, setIsSticky] = createSignal(false);
|
||||
|
||||
onMount(() => {
|
||||
const observer = new IntersectionObserver(
|
||||
(entries) => {
|
||||
const e = entries[0];
|
||||
setIsSticky(e.intersectionRatio < 1);
|
||||
}, {
|
||||
threshold: [1],
|
||||
}
|
||||
);
|
||||
observer.observe(ref);
|
||||
onCleanup(() => observer.disconnect());
|
||||
});
|
||||
|
||||
return (
|
||||
<>
|
||||
<div ref={ref}></div>
|
||||
<div class={clsx("sticky", isSticky() && "sticky--is-sticky")}>
|
||||
{props.children}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
8
src/hooks/useResourcesGlobalError.tsx
Normal file
8
src/hooks/useResourcesGlobalError.tsx
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import { createEffect, Resource } from "solid-js";
|
||||
|
||||
export function useResourcesGlobalError(queries: Resource<any>[]): void {
|
||||
createEffect(() => {
|
||||
if (queries.some((query) => query.state === 'errored'))
|
||||
throw queries.find((query) => query.state == 'errored')?.error;
|
||||
});
|
||||
}
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
import { Resource } from "solid-js";
|
||||
import { useResourcesGlobalError } from "@/hooks/useResourcesGlobalError";
|
||||
|
||||
type MultiResourcesState = {
|
||||
isLoading: boolean;
|
||||
|
|
@ -12,7 +13,13 @@ type MultiResourcesState = {
|
|||
error?: Error;
|
||||
};
|
||||
|
||||
export function useResourcesState(queries: Resource<any>[]): MultiResourcesState {
|
||||
type MultiResourcesStateOptions = {
|
||||
catchError?: boolean;
|
||||
};
|
||||
|
||||
export function useResourcesState(queries: Resource<any>[], options: MultiResourcesStateOptions = {}): MultiResourcesState {
|
||||
if (options.catchError)
|
||||
useResourcesGlobalError(queries);
|
||||
return {
|
||||
get isLoading() {
|
||||
return queries.some((query) => query.state === 'pending' || query.state === 'refreshing');
|
||||
|
|
|
|||
|
|
@ -1,18 +1,17 @@
|
|||
import { Component, createMemo, createResource, createSignal, For, Show } from "solid-js";
|
||||
import { batch, Component, createMemo, createResource, For, Show } from "solid-js";
|
||||
import { getSwilibDiff, SwilibDiffAction } from "@/api/swilib";
|
||||
import { useTemporaryFilesStore } from "@/store/temporaryFiles";
|
||||
import { useSearchParams } from "@solidjs/router";
|
||||
import { formatAddress, formatId } from "@/utils/format";
|
||||
import { Alert, Form } from "solid-bootstrap";
|
||||
import { Alert, Button, Form } from "solid-bootstrap";
|
||||
import { SwilibEntryName } from "@/components/Swilib/SwilibEntryName";
|
||||
import clsx from "clsx";
|
||||
import { useSwilibMergeState } from "@/pages/SwilibMerge/store/swilibMergeState";
|
||||
import { Sticky } from "@/components/Layout/Sticky/Sticky";
|
||||
|
||||
export const SwilibMergeEditorPage: Component = () => {
|
||||
const [searchParams] = useSearchParams<{ platform: string }>();
|
||||
const platform = () => searchParams.platform ?? '';
|
||||
export const SwilibMergeEditorPage: Component = () => {;
|
||||
const [temporaryFiles] = useTemporaryFilesStore();
|
||||
const [swilibDiff] = createResource(() => getSwilibDiff(platform(), temporaryFiles.sourceVkp, temporaryFiles.destinationVkp));
|
||||
const [skipEntries, setSkipEntries] = createSignal<Set<number>>(new Set<number>());
|
||||
const [mergeState, setMergeState] = useSwilibMergeState();
|
||||
const [swilibDiff] = createResource(() => getSwilibDiff(mergeState.platform, temporaryFiles.sourceVkp, temporaryFiles.destinationVkp));
|
||||
|
||||
const conflicts = createMemo(() => {
|
||||
return swilibDiff()?.filter((row) => row.action == SwilibDiffAction.ASK || row.left?.error || row.right?.error);
|
||||
|
|
@ -20,87 +19,82 @@ export const SwilibMergeEditorPage: Component = () => {
|
|||
|
||||
const newEntries = createMemo(() => {
|
||||
return swilibDiff()?.filter((row) => row.action != SwilibDiffAction.ASK && !row.left?.error && !row.right?.error);
|
||||
})
|
||||
|
||||
createMemo(() => {
|
||||
console.log(swilibDiff());
|
||||
});
|
||||
|
||||
const handleRowClick = (e: MouseEvent) => {
|
||||
console.log('Row clicked', e);
|
||||
const isDone = createMemo(() => Object.values(mergeState.answers).every((action) => action != SwilibDiffAction.ASK));
|
||||
const conflictsCount = createMemo(() => conflicts()?.length ?? 0);
|
||||
const unresolvedConflictsCount = createMemo(() => Object.values(mergeState.answers).filter((action) => action == SwilibDiffAction.ASK).length);
|
||||
|
||||
const globalNewEntriesCheckState = createMemo(() => {
|
||||
const newEntriesDiff = newEntries();
|
||||
if (!newEntriesDiff)
|
||||
return true;
|
||||
return newEntriesDiff.every((row) => mergeState.answers[row.id] != SwilibDiffAction.DELETE);
|
||||
});
|
||||
|
||||
createMemo(() => {
|
||||
const diff = swilibDiff()
|
||||
if (!diff)
|
||||
return;
|
||||
const answers: Record<number, SwilibDiffAction> = { ...mergeState.answers };
|
||||
for (const row of diff) {
|
||||
if (!(row.id in answers))
|
||||
answers[row.id] = row.action;
|
||||
}
|
||||
setMergeState("answers", answers);
|
||||
});
|
||||
|
||||
const toggleNewEntry = (id: number, newState?: boolean) => {
|
||||
const row = newEntries()?.find((row) => row.id == id);
|
||||
if (!row)
|
||||
return;
|
||||
|
||||
if (newState === undefined)
|
||||
newState = mergeState.answers[id] == SwilibDiffAction.DELETE;
|
||||
|
||||
if (newState) {
|
||||
if (row.right) {
|
||||
setMergeState("answers", id, SwilibDiffAction.RIGHT);
|
||||
} else if (row.left) {
|
||||
setMergeState("answers", id, SwilibDiffAction.LEFT);
|
||||
}
|
||||
} else {
|
||||
setMergeState("answers", id, SwilibDiffAction.DELETE);
|
||||
}
|
||||
};
|
||||
|
||||
const markEntryAsSkip = (id: number, skip: boolean) => {
|
||||
setSkipEntries((prev) => {
|
||||
const newSet = new Set(prev);
|
||||
if (skip) {
|
||||
newSet.add(id);
|
||||
} else {
|
||||
newSet.delete(id);
|
||||
}
|
||||
return newSet;
|
||||
})
|
||||
}
|
||||
const toggleAllNewEntries = (state: boolean) => {
|
||||
batch(() => {
|
||||
const newEntriesDiff = newEntries();
|
||||
if (!newEntriesDiff)
|
||||
return;
|
||||
for (const row of newEntriesDiff)
|
||||
toggleNewEntry(row.id, state);
|
||||
});
|
||||
};
|
||||
|
||||
return <>
|
||||
<Show when={newEntries()?.length}>
|
||||
<h4>New entries ({newEntries()?.length})</h4>
|
||||
<table
|
||||
class="table table-bordered table-hover table-sticky-header"
|
||||
style={{"width": "auto"}}
|
||||
>
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>
|
||||
<Form.Check type="checkbox" />
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<small>ID</small>
|
||||
</th>
|
||||
<th>
|
||||
<small>Symbol</small>
|
||||
</th>
|
||||
<th>
|
||||
<small>source.vkp</small>
|
||||
</th>
|
||||
<th>
|
||||
<small>destination.vkp</small>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<For each={newEntries()}>{(row) => <>
|
||||
<tr
|
||||
class={clsx("cursor-pointer", skipEntries().has(row.id) ? "table-danger" : "table-success")}
|
||||
onClick={() => markEntryAsSkip(row.id, !skipEntries().has(row.id))}
|
||||
>
|
||||
<td>
|
||||
<Form.Check
|
||||
type="checkbox"
|
||||
checked={!skipEntries().has(row.id)}
|
||||
onChange={(e) => markEntryAsSkip(row.id, !e.currentTarget.checked)}
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
{formatId(row.id)}
|
||||
</td>
|
||||
<td>
|
||||
<SwilibEntryName name={row.name} />
|
||||
</td>
|
||||
<td>
|
||||
{row.left ? formatAddress(row.left.value) : ''}
|
||||
</td>
|
||||
<td>
|
||||
{row.right ? formatAddress(row.right.value) : ''}
|
||||
</td>
|
||||
</tr>
|
||||
</>}</For>
|
||||
</tbody>
|
||||
</table>
|
||||
</Show>
|
||||
<Sticky>
|
||||
<div class="d-flex gap-2 align-items-center ">
|
||||
<Button variant="outline-success" size="sm" disabled={!isDone()}>
|
||||
<i class="bi bi-download"></i> Download
|
||||
</Button>
|
||||
|
||||
<Show when={conflicts()?.length}>
|
||||
<h4>Conflicts ({conflicts()?.length})</h4>
|
||||
<Show when={conflictsCount() > 0}>
|
||||
<div>
|
||||
<Show when={isDone()} fallback={
|
||||
<i class="bi bi-x-circle text-danger me-1"></i>
|
||||
}>
|
||||
<i class="bi bi-check-circle text-success me-1"></i>
|
||||
</Show>
|
||||
Resolved <b>{conflictsCount() - unresolvedConflictsCount()}</b> of <b>{conflictsCount()}</b> conflicts.
|
||||
</div>
|
||||
</Show>
|
||||
</div>
|
||||
</Sticky>
|
||||
|
||||
<Show when={conflictsCount() > 0}>
|
||||
<h4>Conflicts ({conflictsCount()})</h4>
|
||||
|
||||
<Alert variant="warning">
|
||||
Some entries can't be merged automatically. Please resolve conflicts manually.<br />
|
||||
|
|
@ -114,7 +108,7 @@ export const SwilibMergeEditorPage: Component = () => {
|
|||
<div class="d-flex flex-column gap-1">
|
||||
<Form.Check
|
||||
inline
|
||||
checked={row.action == SwilibDiffAction.LEFT}
|
||||
checked={mergeState.answers[row.id] == SwilibDiffAction.LEFT}
|
||||
label={
|
||||
<span class={clsx(row.left?.error && "text-danger")}>
|
||||
<span class="font-monospace">
|
||||
|
|
@ -132,7 +126,7 @@ export const SwilibMergeEditorPage: Component = () => {
|
|||
/>
|
||||
<Form.Check
|
||||
inline
|
||||
checked={row.action == SwilibDiffAction.RIGHT}
|
||||
checked={mergeState.answers[row.id] == SwilibDiffAction.RIGHT}
|
||||
label={
|
||||
<span class={clsx(row.right?.error && "text-danger")}>
|
||||
<span class="font-monospace">
|
||||
|
|
@ -150,7 +144,7 @@ export const SwilibMergeEditorPage: Component = () => {
|
|||
/>
|
||||
<Form.Check
|
||||
inline
|
||||
checked={row.action == SwilibDiffAction.DELETE}
|
||||
checked={mergeState.answers[row.id] == SwilibDiffAction.DELETE}
|
||||
label="Remove from swilib"
|
||||
name={`diff_${row.id}`}
|
||||
id={`diff_${row.id}_delete`}
|
||||
|
|
@ -161,16 +155,22 @@ export const SwilibMergeEditorPage: Component = () => {
|
|||
<hr />
|
||||
</>}</For>
|
||||
</Show>
|
||||
</>;
|
||||
/*
|
||||
return (
|
||||
<div>
|
||||
|
||||
<Show when={newEntries()?.length}>
|
||||
<h4>New entries ({newEntries()?.length})</h4>
|
||||
<table
|
||||
class="table table-bordered table-hover table-sticky-header"
|
||||
style={{"width": "auto"}}
|
||||
>
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>
|
||||
<Form.Check
|
||||
type="checkbox"
|
||||
checked={globalNewEntriesCheckState()}
|
||||
onChange={(e) => toggleAllNewEntries(e.currentTarget.checked)}
|
||||
/>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<small>ID</small>
|
||||
</th>
|
||||
|
|
@ -183,49 +183,42 @@ export const SwilibMergeEditorPage: Component = () => {
|
|||
<th>
|
||||
<small>destination.vkp</small>
|
||||
</th>
|
||||
<th>
|
||||
<small>Symbol</small>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<For each={swilibDiff()}>{(row) =>
|
||||
<tr>
|
||||
<td>{row.id}</td>
|
||||
<For each={newEntries()}>{(row) => <>
|
||||
<tr
|
||||
class={clsx(
|
||||
"cursor-pointer",
|
||||
mergeState.answers[row.id] == SwilibDiffAction.DELETE ? "table-danger" : "table-success"
|
||||
)}
|
||||
onClick={() => toggleNewEntry(row.id)}
|
||||
>
|
||||
<td>
|
||||
{row.symbol}
|
||||
<Show when={row.left?.error}>
|
||||
<div class="text-danger">
|
||||
{row.left?.error}
|
||||
</div>
|
||||
</Show>
|
||||
<Form.Check
|
||||
type="checkbox"
|
||||
checked={mergeState.answers[row.id] != SwilibDiffAction.DELETE}
|
||||
onChange={(e) => toggleNewEntry(row.id, e.currentTarget.checked)}
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
<Show when={row.left}>
|
||||
{formatAddress(row.left!.value)}
|
||||
<input type="radio"/>
|
||||
</Show>
|
||||
{formatId(row.id)}
|
||||
</td>
|
||||
<td>
|
||||
<Show when={row.right}>
|
||||
<input type="radio"/>
|
||||
{formatAddress(row.right!.value)}
|
||||
</Show>
|
||||
<SwilibEntryName name={row.name} />
|
||||
</td>
|
||||
<td>
|
||||
{row.symbol}
|
||||
<Show when={row.right?.error}>
|
||||
<div class="text-danger">
|
||||
{row.right?.error}
|
||||
</div>
|
||||
</Show>
|
||||
{row.left ? formatAddress(row.left.value) : ''}
|
||||
</td>
|
||||
<td>
|
||||
{row.right ? formatAddress(row.right.value) : ''}
|
||||
</td>
|
||||
</tr>
|
||||
}</For>
|
||||
</>}</For>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
);*/
|
||||
</Show>
|
||||
</>;
|
||||
};
|
||||
|
||||
export default SwilibMergeEditorPage;
|
||||
|
|
|
|||
|
|
@ -6,11 +6,13 @@ import { SWILIB_PLATFORMS } from "@/api/swilib";
|
|||
import { useTemporaryFilesStore } from "@/store/temporaryFiles";
|
||||
import { makePersistedSignal } from "@/utils/makePersistedSignal";
|
||||
import { useNavigate } from "@solidjs/router";
|
||||
import { useSwilibMergeState } from "@/pages/SwilibMerge/store/swilibMergeState";
|
||||
|
||||
const SwilibMergePage: Component = () => {
|
||||
const navigate = useNavigate();
|
||||
const [selectedFile, setSelectedFile] = createSignal('source');
|
||||
const [temporaryFiles, setTemproraryFiles] = useTemporaryFilesStore();
|
||||
const [, setMergeState] = useSwilibMergeState();
|
||||
const [platform, setPlatform] = makePersistedSignal(createSignal("ELKA"), { name: 'swilibPlatform' });
|
||||
|
||||
const handleInput = async (e: Event) => {
|
||||
|
|
@ -34,7 +36,11 @@ const SwilibMergePage: Component = () => {
|
|||
|
||||
const handleSubmit = async (e: Event) => {
|
||||
e.preventDefault();
|
||||
navigate(`/swilib/merge/editor?platform=${platform()}`);
|
||||
setMergeState({
|
||||
answers: {},
|
||||
platform: platform(),
|
||||
});
|
||||
navigate(`/swilib/merge/editor`);
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
|
|||
13
src/pages/SwilibMerge/store/swilibMergeState.ts
Normal file
13
src/pages/SwilibMerge/store/swilibMergeState.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { makePersistedStore } from "@/utils/makePersistedStore";
|
||||
import { createStore } from "solid-js/store";
|
||||
import { createRoot } from "solid-js";
|
||||
import { SwilibDiffAction } from "@/api/swilib";
|
||||
|
||||
const swilibMergeStateStore = createRoot(() =>
|
||||
makePersistedStore(createStore({
|
||||
platform: "",
|
||||
answers: {} as Record<number, SwilibDiffAction>
|
||||
}), { name: 'swilibMergeState', debounce: 1000 })
|
||||
);
|
||||
|
||||
export const useSwilibMergeState = () => swilibMergeStateStore;
|
||||
|
|
@ -12,10 +12,11 @@ const SwilibSummaryAnalysisPage: Component = () => {
|
|||
const [tableOptions, setTableOptions] = useSwilibTableOptionsStore();
|
||||
const [devices] = createResource(getAvailableSwilibDevices);
|
||||
const [summaryAnalysis] = createResource(getSummarySwilibAnalysis);
|
||||
const resourcesState = useResourcesState([devices, summaryAnalysis]);
|
||||
const groups = () => tableOptions.groupByFile ? summaryAnalysis()?.files : ['swilib.h'];
|
||||
const [selectedEntry, setSelectedEntry] = createSignal<SummarySwilibAnalysisEntry>();
|
||||
|
||||
const resourcesState = useResourcesState([devices, summaryAnalysis], { catchError: true });
|
||||
|
||||
const handleFilterByType = (e: Event & { currentTarget: HTMLInputElement }) => {
|
||||
if (e.currentTarget.checked)
|
||||
setTableOptions("filterByType", e.currentTarget.value);
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ const SwilibTargetAnalysisPage: Component = () => {
|
|||
}
|
||||
});
|
||||
|
||||
const resourcesState = useResourcesState([devices, summaryAnalysis, targetAnalysis]);
|
||||
const resourcesState = useResourcesState([devices, summaryAnalysis, targetAnalysis], { catchError: true });
|
||||
|
||||
const groups = () => tableOptions.groupByFile ? summaryAnalysis()?.files : ['swilib.h'];
|
||||
const [selectedEntry, setSelectedEntry] = createSignal<SummarySwilibAnalysisEntry>();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue