ydb-embedded-ui 7.2.0 → 8.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/Graph/Graph.d.ts +1 -2
- package/dist/components/Graph/Graph.js +1 -1
- package/dist/components/Graph/Graph.js.map +1 -1
- package/dist/containers/Cluster/Cluster.js +2 -2
- package/dist/containers/Cluster/Cluster.js.map +1 -1
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js +24 -8
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js.map +1 -1
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.scss +7 -26
- package/dist/containers/Cluster/ClusterInfo/utils.d.ts +2 -4
- package/dist/containers/Cluster/ClusterInfo/utils.js +2 -19
- package/dist/containers/Cluster/ClusterInfo/utils.js.map +1 -1
- package/dist/containers/Cluster/i18n/en.json +3 -1
- package/dist/containers/Cluster/i18n/index.d.ts +1 -1
- package/dist/containers/Node/Node.d.ts +0 -1
- package/dist/containers/Node/Node.js +5 -3
- package/dist/containers/Node/Node.js.map +1 -1
- package/dist/containers/Operations/Operations.js +2 -1
- package/dist/containers/Operations/Operations.js.map +1 -1
- package/dist/containers/PDiskPage/PDiskPage.js +5 -2
- package/dist/containers/PDiskPage/PDiskPage.js.map +1 -1
- package/dist/containers/ReduxTooltip/ReduxTooltip.scss +0 -30
- package/dist/containers/Storage/PaginatedStorage.d.ts +1 -1
- package/dist/containers/Storage/StorageGroups/columns/hooks.d.ts +0 -2
- package/dist/containers/Storage/StorageGroups/columns/hooks.js +2 -5
- package/dist/containers/Storage/StorageGroups/columns/hooks.js.map +1 -1
- package/dist/containers/Storage/StorageGroups/columns/types.d.ts +2 -2
- package/dist/containers/Storage/StorageNodes/PaginatedStorageNodesTable.d.ts +1 -0
- package/dist/containers/Storage/StorageNodes/PaginatedStorageNodesTable.js +5 -2
- package/dist/containers/Storage/StorageNodes/PaginatedStorageNodesTable.js.map +1 -1
- package/dist/containers/Storage/StorageNodes/columns/types.d.ts +1 -1
- package/dist/containers/Storage/StorageVisibleEntitiesFilter/StorageVisibleEntitiesFilter.d.ts +0 -5
- package/dist/containers/Storage/StorageVisibleEntitiesFilter/StorageVisibleEntitiesFilter.js +1 -1
- package/dist/containers/Storage/StorageVisibleEntitiesFilter/StorageVisibleEntitiesFilter.js.map +1 -1
- package/dist/containers/Storage/utils/index.d.ts +3 -6
- package/dist/containers/Storage/utils/index.js +7 -34
- package/dist/containers/Storage/utils/index.js.map +1 -1
- package/dist/containers/StorageGroupPage/StorageGroupPage.js +4 -2
- package/dist/containers/StorageGroupPage/StorageGroupPage.js.map +1 -1
- package/dist/containers/Tablet/Tablet.d.ts +0 -1
- package/dist/containers/Tablet/Tablet.js +1 -1
- package/dist/containers/Tablet/Tablet.js.map +1 -1
- package/dist/containers/Tablet/components/TabletInfo/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/Diagnostics.js +2 -2
- package/dist/containers/Tenant/Diagnostics/Diagnostics.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.d.ts +0 -163
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js +10 -10
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByCpu.d.ts +0 -5
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByCpu.js +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByCpu.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/utils.d.ts +2 -2
- package/dist/containers/Tenant/Diagnostics/TopShards/utils.d.ts +1 -1
- package/dist/containers/Tenant/Query/Issues/models.d.ts +2 -2
- package/dist/containers/Tenant/Query/Issues/models.js +2 -2
- package/dist/containers/Tenant/Query/Issues/models.js.map +1 -1
- package/dist/containers/Tenant/Query/QueryEditor/helpers.d.ts +0 -1
- package/dist/containers/Tenant/Query/QueryEditor/helpers.js +1 -1
- package/dist/containers/Tenant/Query/QueryEditor/helpers.js.map +1 -1
- package/dist/containers/Tenant/Query/QueryResult/components/PlanToSvgButton/PlanToSvgButton.js +49 -8
- package/dist/containers/Tenant/Query/QueryResult/components/PlanToSvgButton/PlanToSvgButton.js.map +1 -1
- package/dist/containers/Tenant/Query/QueryResult/i18n/en.json +2 -1
- package/dist/containers/Tenant/Query/QueryResult/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.d.ts +0 -104
- package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.js +4 -4
- package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.js.map +1 -1
- package/dist/containers/Tenant/Schema/SchemaViewer/columns.d.ts +0 -12
- package/dist/containers/Tenant/Schema/SchemaViewer/columns.js +1 -1
- package/dist/containers/Tenant/Schema/SchemaViewer/columns.js.map +1 -1
- package/dist/containers/Tenant/Schema/SchemaViewer/prepareData.d.ts +1 -2
- package/dist/containers/Tenant/Schema/SchemaViewer/prepareData.js +1 -1
- package/dist/containers/Tenant/Schema/SchemaViewer/prepareData.js.map +1 -1
- package/dist/containers/Tenant/utils/schema.d.ts +0 -1
- package/dist/containers/Tenant/utils/schema.js +0 -18
- package/dist/containers/Tenant/utils/schema.js.map +1 -1
- package/dist/containers/UserSettings/i18n/en.json +1 -3
- package/dist/containers/UserSettings/i18n/index.d.ts +1 -1
- package/dist/containers/UserSettings/settings.d.ts +0 -1
- package/dist/containers/UserSettings/settings.js +2 -7
- package/dist/containers/UserSettings/settings.js.map +1 -1
- package/dist/containers/VDiskPage/VDiskPage.js +7 -2
- package/dist/containers/VDiskPage/VDiskPage.js.map +1 -1
- package/dist/containers/Versions/GroupedNodesTree/GroupedNodesTree.d.ts +0 -1
- package/dist/containers/Versions/GroupedNodesTree/GroupedNodesTree.js +1 -1
- package/dist/containers/Versions/GroupedNodesTree/GroupedNodesTree.js.map +1 -1
- package/dist/lib.d.ts +2 -2
- package/dist/lib.js +1 -1
- package/dist/lib.js.map +1 -1
- package/dist/routes.d.ts +2 -2
- package/dist/services/settings.d.ts +0 -1
- package/dist/services/settings.js +1 -2
- package/dist/services/settings.js.map +1 -1
- package/dist/store/reducers/cluster/cluster.d.ts +0 -164
- package/dist/store/reducers/cluster/cluster.js +1 -1
- package/dist/store/reducers/cluster/cluster.js.map +1 -1
- package/dist/store/reducers/cluster/types.d.ts +2 -6
- package/dist/store/reducers/executeTopQueries/types.d.ts +0 -3
- package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +0 -195
- package/dist/store/reducers/healthcheckInfo/healthcheckInfo.js +1 -1
- package/dist/store/reducers/healthcheckInfo/healthcheckInfo.js.map +1 -1
- package/dist/store/reducers/nodes/types.d.ts +1 -6
- package/dist/store/reducers/query/types.d.ts +2 -1
- package/dist/store/reducers/schema/schema.d.ts +0 -6
- package/dist/store/reducers/schema/schema.js +1 -1
- package/dist/store/reducers/schema/schema.js.map +1 -1
- package/dist/store/reducers/shardsWorkload/types.d.ts +0 -3
- package/dist/store/reducers/storage/types.d.ts +1 -6
- package/dist/store/reducers/storage/types.js.map +1 -1
- package/dist/store/reducers/storage/utils.d.ts +2 -5
- package/dist/store/reducers/storage/utils.js +3 -3
- package/dist/store/reducers/storage/utils.js.map +1 -1
- package/dist/store/reducers/tableSchemaData.d.ts +2 -1
- package/dist/store/reducers/tablets.d.ts +0 -131
- package/dist/store/reducers/tablets.js +1 -1
- package/dist/store/reducers/tablets.js.map +1 -1
- package/dist/store/reducers/tenants/utils.d.ts +0 -11
- package/dist/store/reducers/tenants/utils.js +1 -14
- package/dist/store/reducers/tenants/utils.js.map +1 -1
- package/dist/store/reducers/tooltip.d.ts +1 -1
- package/dist/store/reducers/tooltip.js +1 -1
- package/dist/store/reducers/vdisk/types.d.ts +0 -2
- package/dist/types/additionalProps.d.ts +2 -2
- package/dist/types/api/error.d.ts +1 -1
- package/dist/types/components.d.ts +5 -0
- package/dist/types/components.js +2 -0
- package/dist/types/components.js.map +1 -0
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/store/tablet.d.ts +1 -8
- package/dist/types/store/tablets.d.ts +0 -8
- package/dist/types/store/tooltip.d.ts +2 -4
- package/dist/utils/constants.d.ts +0 -38
- package/dist/utils/constants.js +1 -28
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/dataFormatters/__test__/formatUptime.test.js +39 -4
- package/dist/utils/dataFormatters/__test__/formatUptime.test.js.map +1 -1
- package/dist/utils/dataFormatters/dataFormatters.d.ts +6 -3
- package/dist/utils/dataFormatters/dataFormatters.js +34 -16
- package/dist/utils/dataFormatters/dataFormatters.js.map +1 -1
- package/dist/utils/dataFormatters/i18n/en.json +3 -1
- package/dist/utils/dataFormatters/i18n/index.d.ts +1 -1
- package/dist/utils/dataFormatters/i18n/index.js +1 -2
- package/dist/utils/dataFormatters/i18n/index.js.map +1 -1
- package/dist/utils/errors/i18n/en.json +3 -0
- package/dist/utils/errors/i18n/index.d.ts +2 -0
- package/dist/utils/errors/i18n/index.js +5 -0
- package/dist/utils/errors/i18n/index.js.map +1 -0
- package/dist/utils/errors/index.d.ts +6 -0
- package/dist/utils/errors/index.js +33 -0
- package/dist/utils/errors/index.js.map +1 -0
- package/dist/utils/hooks/useTableSort.d.ts +1 -1
- package/dist/utils/monitoring.d.ts +3 -2
- package/dist/utils/nodes.js.map +1 -1
- package/dist/utils/tablet.d.ts +0 -2
- package/dist/utils/tablet.js +0 -10
- package/dist/utils/tablet.js.map +1 -1
- package/dist/utils/tooltip.d.ts +0 -4
- package/dist/utils/tooltip.js +1 -23
- package/dist/utils/tooltip.js.map +1 -1
- package/dist/utils/utils.d.ts +0 -1
- package/dist/utils/utils.js +0 -10
- package/dist/utils/utils.js.map +1 -1
- package/package.json +2 -2
- package/dist/components/GroupInfo/GroupInfo.d.ts +0 -7
- package/dist/components/GroupInfo/GroupInfo.js +0 -27
- package/dist/components/GroupInfo/GroupInfo.js.map +0 -1
- package/dist/components/GroupInfo/i18n/en.json +0 -6
- package/dist/components/GroupInfo/i18n/index.d.ts +0 -1
- package/dist/components/GroupInfo/i18n/index.js +0 -5
- package/dist/components/GroupInfo/i18n/index.js.map +0 -1
- package/dist/components/QuerySettingsDescription/index.d.ts +0 -1
- package/dist/components/QuerySettingsDescription/index.js +0 -2
- package/dist/components/QuerySettingsDescription/index.js.map +0 -1
- package/dist/components/Tablet/Tablet.d.ts +0 -8
- package/dist/components/Tablet/Tablet.js +0 -18
- package/dist/components/Tablet/Tablet.js.map +0 -1
- package/dist/components/Tablet/Tablet.scss +0 -40
- package/dist/components/Tablet/index.d.ts +0 -1
- package/dist/components/Tablet/index.js +0 -2
- package/dist/components/Tablet/index.js.map +0 -1
- package/dist/components/TabletsOverall/TabletsOverall.d.ts +0 -8
- package/dist/components/TabletsOverall/TabletsOverall.js +0 -69
- package/dist/components/TabletsOverall/TabletsOverall.js.map +0 -1
- package/dist/components/TabletsOverall/TabletsOverall.scss +0 -18
- package/dist/containers/ClusterModeGuard/index.d.ts +0 -1
- package/dist/containers/ClusterModeGuard/index.js +0 -2
- package/dist/containers/ClusterModeGuard/index.js.map +0 -1
- package/dist/containers/Nodes/columns/hooks.d.ts +0 -6
- package/dist/containers/Nodes/columns/hooks.js +0 -12
- package/dist/containers/Nodes/columns/hooks.js.map +0 -1
- package/dist/containers/Nodes/index.d.ts +0 -1
- package/dist/containers/Nodes/index.js +0 -2
- package/dist/containers/Nodes/index.js.map +0 -1
- package/dist/containers/PDiskPage/shared.d.ts +0 -1
- package/dist/containers/PDiskPage/shared.js +0 -3
- package/dist/containers/PDiskPage/shared.js.map +0 -1
- package/dist/containers/Storage/Storage.d.ts +0 -17
- package/dist/containers/Storage/Storage.js +0 -101
- package/dist/containers/Storage/Storage.js.map +0 -1
- package/dist/containers/Storage/StorageGroups/StorageGroupsTable.d.ts +0 -14
- package/dist/containers/Storage/StorageGroups/StorageGroupsTable.js +0 -14
- package/dist/containers/Storage/StorageGroups/StorageGroupsTable.js.map +0 -1
- package/dist/containers/Storage/StorageNodes/StorageNodesTable.d.ts +0 -16
- package/dist/containers/Storage/StorageNodes/StorageNodesTable.js +0 -22
- package/dist/containers/Storage/StorageNodes/StorageNodesTable.js.map +0 -1
- package/dist/containers/Storage/StorageNodes/shared.d.ts +0 -3
- package/dist/containers/Storage/StorageNodes/shared.js +0 -5
- package/dist/containers/Storage/StorageNodes/shared.js.map +0 -1
- package/dist/containers/Storage/StorageWrapper.d.ts +0 -10
- package/dist/containers/Storage/StorageWrapper.js +0 -20
- package/dist/containers/Storage/StorageWrapper.js.map +0 -1
- package/dist/store/reducers/nodes/selectors.d.ts +0 -4
- package/dist/store/reducers/nodes/selectors.js +0 -13
- package/dist/store/reducers/nodes/selectors.js.map +0 -1
- package/dist/store/reducers/schema/types.d.ts +0 -10
- package/dist/store/reducers/schema/types.js +0 -2
- package/dist/store/reducers/schema/types.js.map +0 -1
- package/dist/store/reducers/storage/selectors.d.ts +0 -4
- package/dist/store/reducers/storage/selectors.js +0 -37
- package/dist/store/reducers/storage/selectors.js.map +0 -1
- package/dist/utils/dataFormatters/i18n/ru.json +0 -3
@@ -1,5 +0,0 @@
|
|
1
|
-
import { cn } from '../../../utils/cn';
|
2
|
-
import { isUnavailableNode } from '../../../utils/nodes';
|
3
|
-
export const b = cn('ydb-storage-nodes');
|
4
|
-
export const getRowUnavailableClassName = (row) => b('node', { unavailable: isUnavailableNode(row) });
|
5
|
-
//# sourceMappingURL=shared.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../../src/containers/Storage/StorageNodes/shared.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,EAAE,EAAC,MAAM,mBAAmB,CAAC;AACrC,OAAO,EAAC,iBAAiB,EAAC,MAAM,sBAAsB,CAAC;AAEvD,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,mBAAmB,CAAC,CAAC;AAEzC,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,GAAwB,EAAE,EAAE,CACnE,CAAC,CAAC,MAAM,EAAE,EAAC,WAAW,EAAE,iBAAiB,CAAC,GAAG,CAAC,EAAC,CAAC,CAAC"}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
interface StorageWrapperProps {
|
2
|
-
database?: string;
|
3
|
-
nodeId?: string | number;
|
4
|
-
pDiskId?: string | number;
|
5
|
-
groupId?: string | number;
|
6
|
-
vDiskSlotId?: string | number;
|
7
|
-
parentRef: React.RefObject<HTMLElement>;
|
8
|
-
}
|
9
|
-
export declare const StorageWrapper: ({ parentRef, ...props }: StorageWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
10
|
-
export {};
|
@@ -1,20 +0,0 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import { USE_PAGINATED_TABLES_KEY } from '../../utils/constants';
|
3
|
-
import { useSetting } from '../../utils/hooks';
|
4
|
-
import { PaginatedStorage } from './PaginatedStorage';
|
5
|
-
import { Storage } from './Storage';
|
6
|
-
export const StorageWrapper = ({ parentRef, ...props }) => {
|
7
|
-
var _a, _b, _c, _d;
|
8
|
-
const [usePaginatedTables] = useSetting(USE_PAGINATED_TABLES_KEY);
|
9
|
-
const viewContext = {
|
10
|
-
nodeId: (_a = props.nodeId) === null || _a === void 0 ? void 0 : _a.toString(),
|
11
|
-
pDiskId: (_b = props.pDiskId) === null || _b === void 0 ? void 0 : _b.toString(),
|
12
|
-
groupId: (_c = props.groupId) === null || _c === void 0 ? void 0 : _c.toString(),
|
13
|
-
vDiskSlotId: (_d = props.vDiskSlotId) === null || _d === void 0 ? void 0 : _d.toString(),
|
14
|
-
};
|
15
|
-
if (usePaginatedTables) {
|
16
|
-
return _jsx(PaginatedStorage, { parentRef: parentRef, viewContext: viewContext, ...props });
|
17
|
-
}
|
18
|
-
return _jsx(Storage, { viewContext: viewContext, ...props });
|
19
|
-
};
|
20
|
-
//# sourceMappingURL=StorageWrapper.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"StorageWrapper.js","sourceRoot":"","sources":["../../../src/containers/Storage/StorageWrapper.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,wBAAwB,EAAC,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAYlC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAC,SAAS,EAAE,GAAG,KAAK,EAAsB,EAAE,EAAE;;IACzE,MAAM,CAAC,kBAAkB,CAAC,GAAG,UAAU,CAAU,wBAAwB,CAAC,CAAC;IAE3E,MAAM,WAAW,GAAuB;QACpC,MAAM,EAAE,MAAA,KAAK,CAAC,MAAM,0CAAE,QAAQ,EAAE;QAChC,OAAO,EAAE,MAAA,KAAK,CAAC,OAAO,0CAAE,QAAQ,EAAE;QAClC,OAAO,EAAE,MAAA,KAAK,CAAC,OAAO,0CAAE,QAAQ,EAAE;QAClC,WAAW,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,QAAQ,EAAE;KAC7C,CAAC;IAEF,IAAI,kBAAkB,EAAE,CAAC;QACrB,OAAO,KAAC,gBAAgB,IAAC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,KAAM,KAAK,GAAI,CAAC;IAC3F,CAAC;IAED,OAAO,KAAC,OAAO,IAAC,WAAW,EAAE,WAAW,KAAM,KAAK,GAAI,CAAC;AAC5D,CAAC,CAAC"}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import { HOUR_IN_SECONDS } from '../../../utils/constants';
|
2
|
-
import { calcTimeDiffInSec } from '../../../utils/dataFormatters/dataFormatters';
|
3
|
-
import { NodesUptimeFilterValues } from '../../../utils/nodes';
|
4
|
-
// ==== Filters ====
|
5
|
-
export const filterNodesByUptime = (nodesList = [], nodesUptimeFilter) => {
|
6
|
-
if (nodesUptimeFilter === NodesUptimeFilterValues.All) {
|
7
|
-
return nodesList;
|
8
|
-
}
|
9
|
-
return nodesList.filter(({ StartTime }) => {
|
10
|
-
return !StartTime || calcTimeDiffInSec(StartTime) < HOUR_IN_SECONDS;
|
11
|
-
});
|
12
|
-
};
|
13
|
-
//# sourceMappingURL=selectors.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"selectors.js","sourceRoot":"","sources":["../../../../src/store/reducers/nodes/selectors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAC,iBAAiB,EAAC,MAAM,8CAA8C,CAAC;AAC/E,OAAO,EAAC,uBAAuB,EAAC,MAAM,sBAAsB,CAAC;AAE7D,oBAAoB;AAEpB,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAC/B,YAAiB,EAAE,EACnB,iBAA0C,EAC5C,EAAE;IACA,IAAI,iBAAiB,KAAK,uBAAuB,CAAC,GAAG,EAAE,CAAC;QACpD,OAAO,SAAS,CAAC;IACrB,CAAC;IACD,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,EAAC,SAAS,EAAC,EAAE,EAAE;QACpC,OAAO,CAAC,SAAS,IAAI,iBAAiB,CAAC,SAAS,CAAC,GAAG,eAAe,CAAC;IACxE,CAAC,CAAC,CAAC;AACP,CAAC,CAAC"}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import type { TEvDescribeSchemeResult } from '../../../types/api/schema';
|
2
|
-
import type { setShowPreview } from './schema';
|
3
|
-
export type SchemaData = Record<string, TEvDescribeSchemeResult>;
|
4
|
-
export interface SchemaState {
|
5
|
-
showPreview: boolean;
|
6
|
-
}
|
7
|
-
export type SchemaAction = ReturnType<typeof setShowPreview>;
|
8
|
-
export interface SchemaStateSlice {
|
9
|
-
schema: SchemaState;
|
10
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/store/reducers/schema/types.ts"],"names":[],"mappings":""}
|
@@ -1,4 +0,0 @@
|
|
1
|
-
import type { NodesUptimeFilterValues } from '../../../utils/nodes';
|
2
|
-
import type { PreparedStorageGroup, PreparedStorageNode } from './types';
|
3
|
-
export declare function filterNodes(storageNodes: PreparedStorageNode[], textFilter: string, uptimeFilter: NodesUptimeFilterValues): PreparedStorageNode[];
|
4
|
-
export declare function filterGroups(storageGroups: PreparedStorageGroup[], textFilter: string): PreparedStorageGroup[];
|
@@ -1,37 +0,0 @@
|
|
1
|
-
import { filterNodesByUptime } from '../nodes/selectors';
|
2
|
-
// ==== Filters ====
|
3
|
-
const prepareSearchText = (text) => text.trim().toLowerCase();
|
4
|
-
const filterNodesByText = (entities, text) => {
|
5
|
-
const preparedSearch = prepareSearchText(text);
|
6
|
-
if (!preparedSearch) {
|
7
|
-
return entities;
|
8
|
-
}
|
9
|
-
return entities.filter((entity) => {
|
10
|
-
var _a, _b;
|
11
|
-
return (((_a = entity.NodeId) === null || _a === void 0 ? void 0 : _a.toString().includes(preparedSearch)) ||
|
12
|
-
((_b = entity.Host) === null || _b === void 0 ? void 0 : _b.toLowerCase().includes(preparedSearch)));
|
13
|
-
});
|
14
|
-
};
|
15
|
-
const filterGroupsByText = (entities, text) => {
|
16
|
-
const preparedSearch = prepareSearchText(text);
|
17
|
-
if (!preparedSearch) {
|
18
|
-
return entities;
|
19
|
-
}
|
20
|
-
return entities.filter((entity) => {
|
21
|
-
var _a, _b;
|
22
|
-
return (((_a = entity.PoolName) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(preparedSearch)) ||
|
23
|
-
((_b = entity.GroupId) === null || _b === void 0 ? void 0 : _b.toString().includes(preparedSearch)));
|
24
|
-
});
|
25
|
-
};
|
26
|
-
export function filterNodes(storageNodes, textFilter, uptimeFilter) {
|
27
|
-
let result = storageNodes || [];
|
28
|
-
result = filterNodesByText(result, textFilter);
|
29
|
-
result = filterNodesByUptime(result, uptimeFilter);
|
30
|
-
return result;
|
31
|
-
}
|
32
|
-
export function filterGroups(storageGroups, textFilter) {
|
33
|
-
let result = storageGroups || [];
|
34
|
-
result = filterGroupsByText(result, textFilter);
|
35
|
-
return result;
|
36
|
-
}
|
37
|
-
//# sourceMappingURL=selectors.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"selectors.js","sourceRoot":"","sources":["../../../../src/store/reducers/storage/selectors.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AAIvD,oBAAoB;AAEpB,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AAEtE,MAAM,iBAAiB,GAAG,CAAC,QAA+B,EAAE,IAAY,EAAE,EAAE;IACxE,MAAM,cAAc,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAE/C,IAAI,CAAC,cAAc,EAAE,CAAC;QAClB,OAAO,QAAQ,CAAC;IACpB,CAAC;IAED,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE;;QAC9B,OAAO,CACH,CAAA,MAAA,MAAM,CAAC,MAAM,0CAAE,QAAQ,GAAG,QAAQ,CAAC,cAAc,CAAC;aAClD,MAAA,MAAM,CAAC,IAAI,0CAAE,WAAW,GAAG,QAAQ,CAAC,cAAc,CAAC,CAAA,CACtD,CAAC;IACN,CAAC,CAAC,CAAC;AACP,CAAC,CAAC;AACF,MAAM,kBAAkB,GAAG,CAAC,QAAgC,EAAE,IAAY,EAAE,EAAE;IAC1E,MAAM,cAAc,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAE/C,IAAI,CAAC,cAAc,EAAE,CAAC;QAClB,OAAO,QAAQ,CAAC;IACpB,CAAC;IAED,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE;;QAC9B,OAAO,CACH,CAAA,MAAA,MAAM,CAAC,QAAQ,0CAAE,WAAW,GAAG,QAAQ,CAAC,cAAc,CAAC;aACvD,MAAA,MAAM,CAAC,OAAO,0CAAE,QAAQ,GAAG,QAAQ,CAAC,cAAc,CAAC,CAAA,CACtD,CAAC;IACN,CAAC,CAAC,CAAC;AACP,CAAC,CAAC;AAEF,MAAM,UAAU,WAAW,CACvB,YAAmC,EACnC,UAAkB,EAClB,YAAqC;IAErC,IAAI,MAAM,GAAG,YAAY,IAAI,EAAE,CAAC;IAChC,MAAM,GAAG,iBAAiB,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAC/C,MAAM,GAAG,mBAAmB,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAEnD,OAAO,MAAM,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,aAAqC,EAAE,UAAkB;IAClF,IAAI,MAAM,GAAG,aAAa,IAAI,EAAE,CAAC;IACjC,MAAM,GAAG,kBAAkB,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAEhD,OAAO,MAAM,CAAC;AAClB,CAAC"}
|