mirror of
https://github.com/itdoginfo/podkop.git
synced 2025-12-08 20:46:50 +03:00
Merge remote-tracking branch 'origin/rc/7.x.x' into rc/7.x.x
This commit is contained in:
@@ -1,10 +1,20 @@
|
|||||||
import { IDiagnosticsChecksStoreItem, store } from '../../../store';
|
import { IDiagnosticsChecksStoreItem, store } from '../../../store';
|
||||||
|
|
||||||
export function updateDiagnosticsCheck(check: IDiagnosticsChecksStoreItem) {
|
export function updateDiagnosticsCheck(
|
||||||
|
check: IDiagnosticsChecksStoreItem,
|
||||||
|
minified?: boolean,
|
||||||
|
) {
|
||||||
const diagnosticsChecks = store.get().diagnosticsChecks;
|
const diagnosticsChecks = store.get().diagnosticsChecks;
|
||||||
const other = diagnosticsChecks.filter((item) => item.code !== check.code);
|
const other = diagnosticsChecks.filter((item) => item.code !== check.code);
|
||||||
|
|
||||||
|
const smallCheck: IDiagnosticsChecksStoreItem = {
|
||||||
|
...check,
|
||||||
|
items: check.items.filter((item) => item.state !== 'success'),
|
||||||
|
};
|
||||||
|
|
||||||
|
const targetCheck = minified ? smallCheck : check;
|
||||||
|
|
||||||
store.set({
|
store.set({
|
||||||
diagnosticsChecks: [...other, check],
|
diagnosticsChecks: [...other, targetCheck],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2610,11 +2610,16 @@ function renderCheckSection(props) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// src/podkop/tabs/diagnostic/updateDiagnosticsCheck.ts
|
// src/podkop/tabs/diagnostic/updateDiagnosticsCheck.ts
|
||||||
function updateDiagnosticsCheck(check) {
|
function updateDiagnosticsCheck(check, minified) {
|
||||||
const diagnosticsChecks = store.get().diagnosticsChecks;
|
const diagnosticsChecks = store.get().diagnosticsChecks;
|
||||||
const other = diagnosticsChecks.filter((item) => item.code !== check.code);
|
const other = diagnosticsChecks.filter((item) => item.code !== check.code);
|
||||||
|
const smallCheck = {
|
||||||
|
...check,
|
||||||
|
items: check.items.filter((item) => item.state !== "success")
|
||||||
|
};
|
||||||
|
const targetCheck = minified ? smallCheck : check;
|
||||||
store.set({
|
store.set({
|
||||||
diagnosticsChecks: [...other, check]
|
diagnosticsChecks: [...other, targetCheck]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user