ydb-embedded-ui 6.3.0 → 6.5.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +39 -17
- package/dist/assets/icons/disableFullscreen.svg +4 -0
- package/dist/assets/icons/emptyState.svg +13 -0
- package/dist/assets/icons/key.svg +6 -0
- package/dist/assets/icons/monitoring.svg +9 -0
- package/dist/assets/icons/network.svg +21 -0
- package/dist/components/AsyncReplicationState/AsyncReplicationState.d.ts +6 -0
- package/dist/components/AsyncReplicationState/AsyncReplicationState.js +20 -0
- package/dist/components/AsyncReplicationState/index.d.ts +1 -0
- package/dist/components/AsyncReplicationState/index.js +1 -0
- package/dist/components/BasicNodeViewer/BasicNodeViewer.js +11 -5
- package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.d.ts +6 -2
- package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.js +12 -3
- package/dist/components/CriticalActionDialog/CriticalActionDialog.js +3 -4
- package/dist/components/CriticalActionDialog/CriticalActionDialog.scss +2 -0
- package/dist/components/EmptyState/EmptyState.js +3 -2
- package/dist/components/EnableFullscreenButton/EnableFullscreenButton.js +3 -3
- package/dist/components/Errors/ResponseError/ResponseError.js +3 -0
- package/dist/components/Fullscreen/Fullscreen.js +3 -3
- package/dist/components/MonitoringButton/MonitoringButton.js +3 -3
- package/dist/components/NodeHostWrapper/NodeHostWrapper.js +3 -3
- package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
- package/dist/components/QueryExecutionStatus/QueryExecutionStatus.d.ts +1 -2
- package/dist/components/QueryExecutionStatus/QueryExecutionStatus.js +6 -6
- package/dist/components/StatusIcon/StatusIcon.js +5 -7
- package/dist/components/VDiskInfo/i18n/index.d.ts +1 -1
- package/dist/containers/App/App.js +1 -2
- package/dist/containers/AsideNavigation/AsideNavigation.js +4 -9
- package/dist/containers/AsideNavigation/YdbInternalUser/YdbInternalUser.js +2 -3
- package/dist/containers/AsideNavigation/useNavigationMenuItems.js +5 -6
- package/dist/containers/Authentication/Authentication.js +2 -4
- package/dist/containers/Clusters/Clusters.js +7 -2
- package/dist/containers/Clusters/constants.d.ts +1 -3
- package/dist/containers/Clusters/constants.js +0 -18
- package/dist/containers/Node/NodeStructure/Pdisk.js +4 -4
- package/dist/containers/Nodes/Nodes.js +19 -15
- package/dist/containers/Nodes/VirtualNodes.js +23 -6
- package/dist/containers/PDiskPage/PDiskPage.js +3 -2
- package/dist/containers/PDiskPage/i18n/en.json +2 -1
- package/dist/containers/PDiskPage/i18n/index.d.ts +1 -1
- package/dist/containers/Storage/Storage.js +50 -22
- package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.js +2 -2
- package/dist/containers/Storage/VirtualStorage.js +32 -10
- package/dist/containers/Storage/utils/index.d.ts +4 -1
- package/dist/containers/Storage/utils/index.js +29 -0
- package/dist/containers/Tablet/Tablet.js +3 -3
- package/dist/containers/Tablet/TabletControls/TabletControls.js +3 -1
- package/dist/containers/Tablet/i18n/en.json +3 -0
- package/dist/containers/Tablet/i18n/index.d.ts +1 -1
- package/dist/containers/Tablet/i18n/index.js +1 -2
- package/dist/containers/Tablets/Tablets.d.ts +1 -2
- package/dist/containers/Tablets/Tablets.js +113 -53
- package/dist/containers/Tablets/i18n/en.json +10 -4
- package/dist/containers/Tablets/i18n/index.d.ts +1 -1
- package/dist/containers/Tablets/i18n/index.js +1 -2
- package/dist/containers/Tenant/Diagnostics/Diagnostics.js +5 -5
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.d.ts +7 -0
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js +2 -0
- package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +31 -19
- package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.scss +14 -4
- package/dist/containers/Tenant/Diagnostics/HotKeys/i18n/en.json +2 -1
- package/dist/containers/Tenant/Diagnostics/HotKeys/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/Network/Network.js +3 -3
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/AsyncReplicationInfo.d.ts +7 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/AsyncReplicationInfo.js +39 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/Credentials.d.ts +6 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/Credentials.js +14 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/i18n/en.json +7 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/i18n/index.d.ts +2 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/i18n/index.js +4 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/index.d.ts +1 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/index.js +1 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/AsyncReplicationPaths.d.ts +7 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/AsyncReplicationPaths.js +34 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/AsyncReplicationPaths.scss +7 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/i18n/en.json +7 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/i18n/index.d.ts +2 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/i18n/index.js +4 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/index.d.ts +1 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/index.js +1 -0
- package/dist/containers/Tenant/Diagnostics/Overview/Overview.js +2 -0
- package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckPreview.js +2 -2
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js +2 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopShards.js +2 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopTables.js +2 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +3 -3
- package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js +3 -3
- package/dist/containers/Tenant/ObjectGeneral/ObjectGeneral.js +2 -8
- package/dist/containers/Tenant/ObjectSummary/ObjectSummary.js +23 -9
- package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.d.ts +2 -2
- package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js +5 -6
- package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.js +6 -14
- package/dist/containers/Tenant/Query/Issues/Issues.js +6 -9
- package/dist/containers/Tenant/Query/Preview/Preview.js +5 -5
- package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.d.ts +2 -8
- package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +18 -19
- package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.js +4 -4
- package/dist/containers/Tenant/Query/SavedQueries/SavedQueries.js +3 -3
- package/dist/containers/Tenant/Schema/SchemaViewer/helpers.js +3 -2
- package/dist/containers/Tenant/Tenant.js +3 -2
- package/dist/containers/Tenant/utils/ToggleButton.scss +0 -2
- package/dist/containers/Tenant/utils/paneVisibilityToggleHelpers.js +4 -4
- package/dist/containers/Tenant/utils/schema.js +8 -0
- package/dist/containers/Tenant/utils/schemaActions.js +1 -0
- package/dist/containers/Tenant/utils/schemaControls.js +4 -3
- package/dist/containers/VDiskPage/VDiskPage.js +3 -2
- package/dist/containers/VDiskPage/i18n/en.json +2 -1
- package/dist/containers/VDiskPage/i18n/index.d.ts +1 -1
- package/dist/routes.d.ts +1 -1
- package/dist/services/api.d.ts +3 -3
- package/dist/services/settings.d.ts +19 -1
- package/dist/services/settings.js +2 -1
- package/dist/store/configureStore.d.ts +0 -12
- package/dist/store/defaultStore.d.ts +0 -6
- package/dist/store/reducers/authentication/authentication.d.ts +187 -13
- package/dist/store/reducers/authentication/authentication.js +12 -3
- package/dist/store/reducers/authentication/types.d.ts +5 -1
- package/dist/store/reducers/cluster/cluster.js +4 -0
- package/dist/store/reducers/executeQuery.d.ts +4 -65
- package/dist/store/reducers/executeQuery.js +38 -34
- package/dist/store/reducers/executeTopQueries/executeTopQueries.js +4 -1
- package/dist/store/reducers/explainQuery/explainQuery.d.ts +9 -0
- package/dist/store/reducers/explainQuery/explainQuery.js +32 -0
- package/dist/store/reducers/explainQuery/types.d.ts +12 -0
- package/dist/store/reducers/explainQuery/utils.d.ts +6 -0
- package/dist/store/reducers/explainQuery/utils.js +40 -0
- package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +0 -60
- package/dist/store/reducers/host.d.ts +61 -4
- package/dist/store/reducers/index.d.ts +0 -9
- package/dist/store/reducers/index.js +0 -6
- package/dist/store/reducers/node/selectors.d.ts +0 -3
- package/dist/store/reducers/nodes/nodes.d.ts +1 -5
- package/dist/store/reducers/nodes/nodes.js +0 -27
- package/dist/store/reducers/nodes/types.d.ts +4 -13
- package/dist/store/reducers/nodesList.d.ts +0 -3
- package/dist/store/reducers/olapStats.js +4 -1
- package/dist/store/reducers/preview.js +4 -1
- package/dist/store/reducers/schema/schema.d.ts +61 -4
- package/dist/store/reducers/schemaAcl/schemaAcl.d.ts +61 -4
- package/dist/store/reducers/shardsWorkload/shardsWorkload.js +4 -1
- package/dist/store/reducers/storage/selectors.d.ts +2 -17
- package/dist/store/reducers/storage/selectors.js +1 -36
- package/dist/store/reducers/storage/storage.d.ts +2 -6
- package/dist/store/reducers/storage/storage.js +0 -44
- package/dist/store/reducers/storage/types.d.ts +15 -22
- package/dist/store/reducers/storage/types.js +4 -1
- package/dist/store/reducers/tablets.d.ts +91 -1
- package/dist/store/reducers/tablets.js +16 -1
- package/dist/store/reducers/tabletsFilters.d.ts +61 -4
- package/dist/store/reducers/tenant/tenant.d.ts +2 -2
- package/dist/store/reducers/tenant/tenant.js +10 -1
- package/dist/store/reducers/tenant/types.d.ts +8 -3
- package/dist/store/reducers/tenant/types.js +3 -1
- package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.js +6 -3
- package/dist/store/reducers/tenantOverview/topQueries/tenantOverviewTopQueries.js +6 -3
- package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.js +6 -3
- package/dist/store/reducers/tenants/selectors.d.ts +0 -27
- package/dist/store/reducers/tenants/utils.d.ts +4 -4
- package/dist/store/reducers/tenants/utils.js +8 -8
- package/dist/store/reducers/topic.d.ts +0 -45
- package/dist/store/state-url-mapping.js +0 -22
- package/dist/store/utils.d.ts +2 -3
- package/dist/store/utils.js +1 -1
- package/dist/types/api/schema/replication.d.ts +74 -0
- package/dist/types/api/schema/replication.js +7 -0
- package/dist/types/api/schema/schema.d.ts +4 -1
- package/dist/types/api/schema/schema.js +1 -0
- package/dist/types/api/whoami.d.ts +6 -0
- package/dist/types/store/executeQuery.d.ts +2 -9
- package/dist/utils/constants.d.ts +1 -0
- package/dist/utils/constants.js +1 -0
- package/dist/utils/monaco/yql/constants.d.ts +2 -0
- package/dist/utils/monaco/yql/constants.js +33 -0
- package/dist/utils/monaco/yql/generateSuggestions.d.ts +1 -0
- package/dist/utils/monaco/yql/generateSuggestions.js +28 -11
- package/dist/utils/monaco/yql/yqlSuggestions.js +6 -1
- package/dist/utils/nodes.d.ts +2 -0
- package/dist/utils/nodes.js +4 -0
- package/dist/utils/query.d.ts +5 -3
- package/dist/utils/query.js +27 -4
- package/dist/utils/response.d.ts +4 -0
- package/dist/utils/response.js +9 -0
- package/dist/utils/tablet.d.ts +2 -0
- package/dist/utils/tablet.js +14 -0
- package/package.json +4 -3
- package/dist/assets/icons/bug.svg +0 -1
- package/dist/assets/icons/circle-exclamation.svg +0 -1
- package/dist/assets/icons/circle-info.svg +0 -1
- package/dist/assets/icons/circle-xmark.svg +0 -1
- package/dist/assets/icons/close.svg +0 -1
- package/dist/assets/icons/control-menu-button.svg +0 -1
- package/dist/assets/icons/dots.svg +0 -1
- package/dist/assets/icons/hide.svg +0 -1
- package/dist/assets/icons/question.svg +0 -1
- package/dist/assets/icons/server.svg +0 -1
- package/dist/assets/icons/settings-with-dot.svg +0 -1
- package/dist/assets/icons/settings.svg +0 -1
- package/dist/assets/icons/shield.svg +0 -3
- package/dist/assets/icons/show.svg +0 -1
- package/dist/assets/icons/signIn.svg +0 -1
- package/dist/assets/icons/signOut.svg +0 -1
- package/dist/assets/icons/storage.svg +0 -1
- package/dist/assets/icons/support.svg +0 -1
- package/dist/assets/icons/triangle-exclamation.svg +0 -1
- package/dist/assets/icons/update-arrow.svg +0 -6
- package/dist/components/Icon/Icon.d.ts +0 -14
- package/dist/components/Icon/Icon.js +0 -16
- package/dist/components/Icon/index.d.ts +0 -1
- package/dist/components/Icon/index.js +0 -1
- package/dist/containers/AppIcons/AppIcons.d.ts +0 -2
- package/dist/containers/AppIcons/AppIcons.js +0 -9
- package/dist/containers/Tablet/i18n/ru.json +0 -10
- package/dist/containers/Tablets/Tablets.scss +0 -35
- package/dist/containers/Tablets/i18n/ru.json +0 -6
- package/dist/store/reducers/explainQuery.d.ts +0 -149
- package/dist/store/reducers/explainQuery.js +0 -94
- package/dist/types/store/explainQuery.d.ts +0 -27
- package/dist/utils/error.d.ts +0 -2
- package/dist/utils/error.js +0 -13
- /package/dist/{types/store/explainQuery.js → store/reducers/explainQuery/types.js} +0 -0
@@ -1,10 +1,68 @@
|
|
1
|
-
export function getTabletsInfo(data: any): (dispatch: import("redux").
|
1
|
+
export function getTabletsInfo(data: any): (dispatch: import("redux-thunk").ThunkDispatch<{
|
2
|
+
api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
|
3
|
+
singleClusterMode: boolean;
|
4
|
+
cluster: import("./cluster/types").ClusterState;
|
5
|
+
tenant: import("./tenant/types").TenantState;
|
6
|
+
tooltip: import("../../types/store/tooltip").ITooltipState;
|
7
|
+
tablets: import("../../types/store/tablets").TabletsState;
|
8
|
+
schema: import("./schema/types").SchemaState;
|
9
|
+
host: import("../../types/store/host").IHostState;
|
10
|
+
tenants: import("./tenants/types").TenantsState;
|
11
|
+
partitions: import("./partitions/types").PartitionsState;
|
12
|
+
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
13
|
+
tabletsFilters: {
|
14
|
+
loading: boolean;
|
15
|
+
requestTime: number;
|
16
|
+
data: undefined;
|
17
|
+
wasLoaded: boolean;
|
18
|
+
stateFilter: never[];
|
19
|
+
typeFilter: never[];
|
20
|
+
} | {
|
21
|
+
tabletsData: any;
|
22
|
+
nodes: any;
|
23
|
+
loading: boolean;
|
24
|
+
wasLoaded: boolean;
|
25
|
+
timeoutForRequest: number;
|
26
|
+
error: undefined;
|
27
|
+
data: undefined;
|
28
|
+
stateFilter: never[];
|
29
|
+
typeFilter: never[];
|
30
|
+
} | {
|
31
|
+
error: any;
|
32
|
+
loading: boolean;
|
33
|
+
data: undefined;
|
34
|
+
wasLoaded: boolean;
|
35
|
+
stateFilter: never[];
|
36
|
+
typeFilter: never[];
|
37
|
+
} | {
|
38
|
+
stateFilter: any;
|
39
|
+
data: undefined;
|
40
|
+
loading: boolean;
|
41
|
+
wasLoaded: boolean;
|
42
|
+
typeFilter: never[];
|
43
|
+
} | {
|
44
|
+
typeFilter: any;
|
45
|
+
data: undefined;
|
46
|
+
loading: boolean;
|
47
|
+
wasLoaded: boolean;
|
48
|
+
stateFilter: never[];
|
49
|
+
};
|
50
|
+
heatmap: import("../../types/store/heatmap").IHeatmapState;
|
51
|
+
settings: import("./settings/types").SettingsState;
|
52
|
+
schemaAcl: import("./schemaAcl/types").SchemaAclState;
|
53
|
+
executeTopQueries: import("./executeTopQueries/types").TopQueriesFilters;
|
54
|
+
shardsWorkload: import("./shardsWorkload/types").ShardsWorkloadFilters;
|
55
|
+
hotKeys: import("./hotKeys/types").HotKeysState;
|
56
|
+
authentication: import("./authentication/types").AuthenticationState;
|
57
|
+
header: import("./header/types").HeaderState;
|
58
|
+
saveQuery: string | null;
|
59
|
+
fullscreen: boolean;
|
60
|
+
clusters: import("./clusters/types").ClustersFilters;
|
61
|
+
}, undefined, import("redux").UnknownAction> & import("redux").Dispatch<any>, getState: () => {
|
2
62
|
api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
|
3
63
|
singleClusterMode: boolean;
|
4
|
-
nodes: import("./nodes/types").NodesState;
|
5
64
|
cluster: import("./cluster/types").ClusterState;
|
6
65
|
tenant: import("./tenant/types").TenantState;
|
7
|
-
storage: import("./storage/types").StorageState;
|
8
66
|
tooltip: import("../../types/store/tooltip").ITooltipState;
|
9
67
|
tablets: import("../../types/store/tablets").TabletsState;
|
10
68
|
schema: import("./schema/types").SchemaState;
|
@@ -12,7 +70,6 @@ export function getTabletsInfo(data: any): (dispatch: import("redux").Dispatch<i
|
|
12
70
|
tenants: import("./tenants/types").TenantsState;
|
13
71
|
partitions: import("./partitions/types").PartitionsState;
|
14
72
|
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
15
|
-
explainQuery: import("../../types/store/explainQuery").ExplainQueryState;
|
16
73
|
tabletsFilters: {
|
17
74
|
loading: boolean;
|
18
75
|
requestTime: number;
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import type { TenantDiagnosticsTab, TenantMetricsTab,
|
1
|
+
import type { TenantDiagnosticsTab, TenantMetricsTab, TenantQueryTab, TenantState, TenantSummaryTab } from './types';
|
2
2
|
declare const _default: import("redux").Reducer<TenantState>;
|
3
3
|
export default _default;
|
4
|
-
export declare const setTenantPage: import("@reduxjs/toolkit").ActionCreatorWithPayload<
|
4
|
+
export declare const setTenantPage: import("@reduxjs/toolkit").ActionCreatorWithPayload<"query" | "diagnostics", "tenant/setTenantPage">, setQueryTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<TenantQueryTab, "tenant/setQueryTab">, setDiagnosticsTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<TenantDiagnosticsTab, "tenant/setDiagnosticsTab">, setSummaryTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<TenantSummaryTab, "tenant/setSummaryTab">, setMetricsTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<TenantMetricsTab, "tenant/setMetricsTab">;
|
5
5
|
export declare const tenantApi: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, {
|
6
6
|
getTenantInfo: import("@reduxjs/toolkit/query").QueryDefinition<{
|
7
7
|
path: string;
|
@@ -1,8 +1,17 @@
|
|
1
1
|
import { createSlice } from '@reduxjs/toolkit';
|
2
|
+
import { DEFAULT_USER_SETTINGS, settingsManager } from '../../../services/settings';
|
3
|
+
import { TENANT_INITIAL_PAGE_KEY } from '../../../utils/constants';
|
2
4
|
import { api } from '../api';
|
5
|
+
import { tenantPageSchema } from './types';
|
6
|
+
const tenantPage = tenantPageSchema
|
7
|
+
.catch(DEFAULT_USER_SETTINGS[TENANT_INITIAL_PAGE_KEY])
|
8
|
+
.parse(settingsManager.readUserSettingsValue(TENANT_INITIAL_PAGE_KEY));
|
9
|
+
const initialState = {
|
10
|
+
tenantPage,
|
11
|
+
};
|
3
12
|
const slice = createSlice({
|
4
13
|
name: 'tenant',
|
5
|
-
initialState
|
14
|
+
initialState,
|
6
15
|
reducers: {
|
7
16
|
setTenantPage: (state, action) => {
|
8
17
|
state.tenantPage = action.payload;
|
@@ -1,12 +1,17 @@
|
|
1
|
+
import { z } from 'zod';
|
1
2
|
import type { ValueOf } from '../../../types/common';
|
2
|
-
import type { TENANT_DIAGNOSTICS_TABS_IDS, TENANT_METRICS_TABS_IDS,
|
3
|
-
export
|
3
|
+
import type { TENANT_DIAGNOSTICS_TABS_IDS, TENANT_METRICS_TABS_IDS, TENANT_QUERY_TABS_ID, TENANT_SUMMARY_TABS_IDS } from './constants';
|
4
|
+
export declare const tenantPageSchema: z.ZodNativeEnum<{
|
5
|
+
readonly query: "query";
|
6
|
+
readonly diagnostics: "diagnostics";
|
7
|
+
}>;
|
8
|
+
export type TenantPage = z.infer<typeof tenantPageSchema>;
|
4
9
|
export type TenantQueryTab = ValueOf<typeof TENANT_QUERY_TABS_ID>;
|
5
10
|
export type TenantDiagnosticsTab = ValueOf<typeof TENANT_DIAGNOSTICS_TABS_IDS>;
|
6
11
|
export type TenantSummaryTab = ValueOf<typeof TENANT_SUMMARY_TABS_IDS>;
|
7
12
|
export type TenantMetricsTab = ValueOf<typeof TENANT_METRICS_TABS_IDS>;
|
8
13
|
export interface TenantState {
|
9
|
-
tenantPage
|
14
|
+
tenantPage: TenantPage;
|
10
15
|
queryTab?: TenantQueryTab;
|
11
16
|
diagnosticsTab?: TenantDiagnosticsTab;
|
12
17
|
summaryTab?: TenantSummaryTab;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { TENANT_OVERVIEW_TABLES_LIMIT } from '../../../../utils/constants';
|
2
|
-
import { parseQueryAPIExecuteResponse } from '../../../../utils/query';
|
2
|
+
import { isQueryErrorResponse, parseQueryAPIExecuteResponse } from '../../../../utils/query';
|
3
3
|
import { api } from '../../api';
|
4
4
|
const getQueryText = (path) => {
|
5
5
|
return `
|
@@ -16,13 +16,16 @@ export const topTablesApi = api.injectEndpoints({
|
|
16
16
|
getTopTables: builder.query({
|
17
17
|
queryFn: async ({ path }, { signal }) => {
|
18
18
|
try {
|
19
|
-
const
|
19
|
+
const response = await window.api.sendQuery({
|
20
20
|
schema: 'modern',
|
21
21
|
query: getQueryText(path),
|
22
22
|
database: path,
|
23
23
|
action: 'execute-scan',
|
24
24
|
}, { signal });
|
25
|
-
|
25
|
+
if (isQueryErrorResponse(response)) {
|
26
|
+
return { error: response };
|
27
|
+
}
|
28
|
+
return { data: parseQueryAPIExecuteResponse(response) };
|
26
29
|
}
|
27
30
|
catch (error) {
|
28
31
|
return { error: error || 'Unauthorized' };
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { TENANT_OVERVIEW_TABLES_LIMIT } from '../../../../utils/constants';
|
2
|
-
import { parseQueryAPIExecuteResponse } from '../../../../utils/query';
|
2
|
+
import { isQueryErrorResponse, parseQueryAPIExecuteResponse } from '../../../../utils/query';
|
3
3
|
import { api } from '../../api';
|
4
4
|
const getQueryText = (path) => {
|
5
5
|
return `
|
@@ -16,13 +16,16 @@ export const topQueriesApi = api.injectEndpoints({
|
|
16
16
|
getOverviewTopQueries: builder.query({
|
17
17
|
queryFn: async ({ database }, { signal }) => {
|
18
18
|
try {
|
19
|
-
const
|
19
|
+
const response = await window.api.sendQuery({
|
20
20
|
schema: 'modern',
|
21
21
|
query: getQueryText(database),
|
22
22
|
database,
|
23
23
|
action: 'execute-scan',
|
24
24
|
}, { signal });
|
25
|
-
|
25
|
+
if (isQueryErrorResponse(response)) {
|
26
|
+
return { error: response };
|
27
|
+
}
|
28
|
+
return { data: parseQueryAPIExecuteResponse(response) };
|
26
29
|
}
|
27
30
|
catch (error) {
|
28
31
|
return { error: error || new Error('Unauthorized') };
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { TENANT_OVERVIEW_TABLES_LIMIT } from '../../../../utils/constants';
|
2
|
-
import { parseQueryAPIExecuteResponse } from '../../../../utils/query';
|
2
|
+
import { isQueryErrorResponse, parseQueryAPIExecuteResponse } from '../../../../utils/query';
|
3
3
|
import { api } from '../../api';
|
4
4
|
function createShardQuery(path, tenantName) {
|
5
5
|
const pathSelect = tenantName
|
@@ -22,13 +22,16 @@ export const topShardsApi = api.injectEndpoints({
|
|
22
22
|
getTopShards: builder.query({
|
23
23
|
queryFn: async ({ database, path = '' }, { signal }) => {
|
24
24
|
try {
|
25
|
-
const
|
25
|
+
const response = await window.api.sendQuery({
|
26
26
|
schema: 'modern',
|
27
27
|
query: createShardQuery(path, database),
|
28
28
|
database,
|
29
29
|
action: queryAction,
|
30
30
|
}, { signal });
|
31
|
-
|
31
|
+
if (isQueryErrorResponse(response)) {
|
32
|
+
return { error: response };
|
33
|
+
}
|
34
|
+
return { data: parseQueryAPIExecuteResponse(response) };
|
32
35
|
}
|
33
36
|
catch (error) {
|
34
37
|
return { error: error || new Error('Unauthorized') };
|
@@ -4,10 +4,8 @@ import type { PreparedTenant, TenantsStateSlice } from './types';
|
|
4
4
|
export declare const selectTenants: ((state: {
|
5
5
|
api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
|
6
6
|
singleClusterMode: boolean;
|
7
|
-
nodes: import("../nodes/types").NodesState;
|
8
7
|
cluster: import("../cluster/types").ClusterState;
|
9
8
|
tenant: import("../tenant/types").TenantState;
|
10
|
-
storage: import("../storage/types").StorageState;
|
11
9
|
tooltip: import("../../../types/store/tooltip").ITooltipState;
|
12
10
|
tablets: import("../../../types/store/tablets").TabletsState;
|
13
11
|
schema: import("../schema/types").SchemaState;
|
@@ -15,7 +13,6 @@ export declare const selectTenants: ((state: {
|
|
15
13
|
tenants: import("./types").TenantsState;
|
16
14
|
partitions: import("../partitions/types").PartitionsState;
|
17
15
|
executeQuery: import("../../../types/store/executeQuery").ExecuteQueryState;
|
18
|
-
explainQuery: import("../../../types/store/explainQuery").ExplainQueryState;
|
19
16
|
tabletsFilters: {
|
20
17
|
loading: boolean;
|
21
18
|
requestTime: number;
|
@@ -72,10 +69,8 @@ export declare const selectTenants: ((state: {
|
|
72
69
|
resultFunc: (resultFuncArgs_0: {
|
73
70
|
api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
|
74
71
|
singleClusterMode: boolean;
|
75
|
-
nodes: import("../nodes/types").NodesState;
|
76
72
|
cluster: import("../cluster/types").ClusterState;
|
77
73
|
tenant: import("../tenant/types").TenantState;
|
78
|
-
storage: import("../storage/types").StorageState;
|
79
74
|
tooltip: import("../../../types/store/tooltip").ITooltipState;
|
80
75
|
tablets: import("../../../types/store/tablets").TabletsState;
|
81
76
|
schema: import("../schema/types").SchemaState;
|
@@ -83,7 +78,6 @@ export declare const selectTenants: ((state: {
|
|
83
78
|
tenants: import("./types").TenantsState;
|
84
79
|
partitions: import("../partitions/types").PartitionsState;
|
85
80
|
executeQuery: import("../../../types/store/executeQuery").ExecuteQueryState;
|
86
|
-
explainQuery: import("../../../types/store/explainQuery").ExplainQueryState;
|
87
81
|
tabletsFilters: {
|
88
82
|
loading: boolean;
|
89
83
|
requestTime: number;
|
@@ -206,10 +200,8 @@ export declare const selectTenants: ((state: {
|
|
206
200
|
memoizedResultFunc: ((resultFuncArgs_0: {
|
207
201
|
api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
|
208
202
|
singleClusterMode: boolean;
|
209
|
-
nodes: import("../nodes/types").NodesState;
|
210
203
|
cluster: import("../cluster/types").ClusterState;
|
211
204
|
tenant: import("../tenant/types").TenantState;
|
212
|
-
storage: import("../storage/types").StorageState;
|
213
205
|
tooltip: import("../../../types/store/tooltip").ITooltipState;
|
214
206
|
tablets: import("../../../types/store/tablets").TabletsState;
|
215
207
|
schema: import("../schema/types").SchemaState;
|
@@ -217,7 +209,6 @@ export declare const selectTenants: ((state: {
|
|
217
209
|
tenants: import("./types").TenantsState;
|
218
210
|
partitions: import("../partitions/types").PartitionsState;
|
219
211
|
executeQuery: import("../../../types/store/executeQuery").ExecuteQueryState;
|
220
|
-
explainQuery: import("../../../types/store/explainQuery").ExplainQueryState;
|
221
212
|
tabletsFilters: {
|
222
213
|
loading: boolean;
|
223
214
|
requestTime: number;
|
@@ -345,10 +336,8 @@ export declare const selectTenants: ((state: {
|
|
345
336
|
dependencies: [(state: RootState) => {
|
346
337
|
api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
|
347
338
|
singleClusterMode: boolean;
|
348
|
-
nodes: import("../nodes/types").NodesState;
|
349
339
|
cluster: import("../cluster/types").ClusterState;
|
350
340
|
tenant: import("../tenant/types").TenantState;
|
351
|
-
storage: import("../storage/types").StorageState;
|
352
341
|
tooltip: import("../../../types/store/tooltip").ITooltipState;
|
353
342
|
tablets: import("../../../types/store/tablets").TabletsState;
|
354
343
|
schema: import("../schema/types").SchemaState;
|
@@ -356,7 +345,6 @@ export declare const selectTenants: ((state: {
|
|
356
345
|
tenants: import("./types").TenantsState;
|
357
346
|
partitions: import("../partitions/types").PartitionsState;
|
358
347
|
executeQuery: import("../../../types/store/executeQuery").ExecuteQueryState;
|
359
|
-
explainQuery: import("../../../types/store/explainQuery").ExplainQueryState;
|
360
348
|
tabletsFilters: {
|
361
349
|
loading: boolean;
|
362
350
|
requestTime: number;
|
@@ -488,10 +476,8 @@ export declare const selectTenantsSearchValue: (state: TenantsStateSlice) => str
|
|
488
476
|
export declare const selectFilteredTenants: ((state: {
|
489
477
|
api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
|
490
478
|
singleClusterMode: boolean;
|
491
|
-
nodes: import("../nodes/types").NodesState;
|
492
479
|
cluster: import("../cluster/types").ClusterState;
|
493
480
|
tenant: import("../tenant/types").TenantState;
|
494
|
-
storage: import("../storage/types").StorageState;
|
495
481
|
tooltip: import("../../../types/store/tooltip").ITooltipState;
|
496
482
|
tablets: import("../../../types/store/tablets").TabletsState;
|
497
483
|
schema: import("../schema/types").SchemaState;
|
@@ -499,7 +485,6 @@ export declare const selectFilteredTenants: ((state: {
|
|
499
485
|
tenants: import("./types").TenantsState;
|
500
486
|
partitions: import("../partitions/types").PartitionsState;
|
501
487
|
executeQuery: import("../../../types/store/executeQuery").ExecuteQueryState;
|
502
|
-
explainQuery: import("../../../types/store/explainQuery").ExplainQueryState;
|
503
488
|
tabletsFilters: {
|
504
489
|
loading: boolean;
|
505
490
|
requestTime: number;
|
@@ -563,10 +548,8 @@ export declare const selectFilteredTenants: ((state: {
|
|
563
548
|
dependencies: [((state: {
|
564
549
|
api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
|
565
550
|
singleClusterMode: boolean;
|
566
|
-
nodes: import("../nodes/types").NodesState;
|
567
551
|
cluster: import("../cluster/types").ClusterState;
|
568
552
|
tenant: import("../tenant/types").TenantState;
|
569
|
-
storage: import("../storage/types").StorageState;
|
570
553
|
tooltip: import("../../../types/store/tooltip").ITooltipState;
|
571
554
|
tablets: import("../../../types/store/tablets").TabletsState;
|
572
555
|
schema: import("../schema/types").SchemaState;
|
@@ -574,7 +557,6 @@ export declare const selectFilteredTenants: ((state: {
|
|
574
557
|
tenants: import("./types").TenantsState;
|
575
558
|
partitions: import("../partitions/types").PartitionsState;
|
576
559
|
executeQuery: import("../../../types/store/executeQuery").ExecuteQueryState;
|
577
|
-
explainQuery: import("../../../types/store/explainQuery").ExplainQueryState;
|
578
560
|
tabletsFilters: {
|
579
561
|
loading: boolean;
|
580
562
|
requestTime: number;
|
@@ -631,10 +613,8 @@ export declare const selectFilteredTenants: ((state: {
|
|
631
613
|
resultFunc: (resultFuncArgs_0: {
|
632
614
|
api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
|
633
615
|
singleClusterMode: boolean;
|
634
|
-
nodes: import("../nodes/types").NodesState;
|
635
616
|
cluster: import("../cluster/types").ClusterState;
|
636
617
|
tenant: import("../tenant/types").TenantState;
|
637
|
-
storage: import("../storage/types").StorageState;
|
638
618
|
tooltip: import("../../../types/store/tooltip").ITooltipState;
|
639
619
|
tablets: import("../../../types/store/tablets").TabletsState;
|
640
620
|
schema: import("../schema/types").SchemaState;
|
@@ -642,7 +622,6 @@ export declare const selectFilteredTenants: ((state: {
|
|
642
622
|
tenants: import("./types").TenantsState;
|
643
623
|
partitions: import("../partitions/types").PartitionsState;
|
644
624
|
executeQuery: import("../../../types/store/executeQuery").ExecuteQueryState;
|
645
|
-
explainQuery: import("../../../types/store/explainQuery").ExplainQueryState;
|
646
625
|
tabletsFilters: {
|
647
626
|
loading: boolean;
|
648
627
|
requestTime: number;
|
@@ -765,10 +744,8 @@ export declare const selectFilteredTenants: ((state: {
|
|
765
744
|
memoizedResultFunc: ((resultFuncArgs_0: {
|
766
745
|
api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
|
767
746
|
singleClusterMode: boolean;
|
768
|
-
nodes: import("../nodes/types").NodesState;
|
769
747
|
cluster: import("../cluster/types").ClusterState;
|
770
748
|
tenant: import("../tenant/types").TenantState;
|
771
|
-
storage: import("../storage/types").StorageState;
|
772
749
|
tooltip: import("../../../types/store/tooltip").ITooltipState;
|
773
750
|
tablets: import("../../../types/store/tablets").TabletsState;
|
774
751
|
schema: import("../schema/types").SchemaState;
|
@@ -776,7 +753,6 @@ export declare const selectFilteredTenants: ((state: {
|
|
776
753
|
tenants: import("./types").TenantsState;
|
777
754
|
partitions: import("../partitions/types").PartitionsState;
|
778
755
|
executeQuery: import("../../../types/store/executeQuery").ExecuteQueryState;
|
779
|
-
explainQuery: import("../../../types/store/explainQuery").ExplainQueryState;
|
780
756
|
tabletsFilters: {
|
781
757
|
loading: boolean;
|
782
758
|
requestTime: number;
|
@@ -904,10 +880,8 @@ export declare const selectFilteredTenants: ((state: {
|
|
904
880
|
dependencies: [(state: RootState) => {
|
905
881
|
api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
|
906
882
|
singleClusterMode: boolean;
|
907
|
-
nodes: import("../nodes/types").NodesState;
|
908
883
|
cluster: import("../cluster/types").ClusterState;
|
909
884
|
tenant: import("../tenant/types").TenantState;
|
910
|
-
storage: import("../storage/types").StorageState;
|
911
885
|
tooltip: import("../../../types/store/tooltip").ITooltipState;
|
912
886
|
tablets: import("../../../types/store/tablets").TabletsState;
|
913
887
|
schema: import("../schema/types").SchemaState;
|
@@ -915,7 +889,6 @@ export declare const selectFilteredTenants: ((state: {
|
|
915
889
|
tenants: import("./types").TenantsState;
|
916
890
|
partitions: import("../partitions/types").PartitionsState;
|
917
891
|
executeQuery: import("../../../types/store/executeQuery").ExecuteQueryState;
|
918
|
-
explainQuery: import("../../../types/store/explainQuery").ExplainQueryState;
|
919
892
|
tabletsFilters: {
|
920
893
|
loading: boolean;
|
921
894
|
requestTime: number;
|
@@ -11,13 +11,13 @@ export interface TenantMetricStats<T = string> {
|
|
11
11
|
export type TenantPoolsStats = TenantMetricStats<PoolName>;
|
12
12
|
export type TenantStorageStats = TenantMetricStats<EType>;
|
13
13
|
export declare const calculateTenantMetrics: (tenant?: TTenant) => {
|
14
|
-
memory: number
|
15
|
-
blobStorage: number
|
16
|
-
tabletStorage: number
|
14
|
+
memory: number;
|
15
|
+
blobStorage: number;
|
16
|
+
tabletStorage: number;
|
17
17
|
memoryLimit: number | undefined;
|
18
18
|
blobStorageLimit: number | undefined;
|
19
19
|
tabletStorageLimit: number | undefined;
|
20
|
-
cpu: number
|
20
|
+
cpu: number;
|
21
21
|
poolsStats: TenantPoolsStats[] | undefined;
|
22
22
|
memoryStats: TenantMetricStats<string>[];
|
23
23
|
blobStorageStats: TenantStorageStats[];
|
@@ -25,7 +25,7 @@ const calculatePoolsStats = (poolsStats) => {
|
|
25
25
|
return poolsStats
|
26
26
|
.map((pool) => {
|
27
27
|
if (pool.Name) {
|
28
|
-
const usage = Number(pool.Usage);
|
28
|
+
const usage = Number(pool.Usage) || 0;
|
29
29
|
const limit = Number(pool.Threads);
|
30
30
|
const used = limit * usage;
|
31
31
|
// Multiply usage by 100 to match with usage to status checkers
|
@@ -37,16 +37,16 @@ const calculatePoolsStats = (poolsStats) => {
|
|
37
37
|
};
|
38
38
|
export const calculateTenantMetrics = (tenant = {}) => {
|
39
39
|
const { CoresUsed, MemoryUsed, StorageAllocatedSize, MemoryLimit, StorageAllocatedLimit, PoolStats, Metrics = {}, DatabaseQuotas = {}, StorageUsage, QuotaUsage, } = tenant;
|
40
|
-
const cpu =
|
41
|
-
const memory =
|
42
|
-
const blobStorage =
|
43
|
-
const tabletStorage =
|
40
|
+
const cpu = Number(CoresUsed) * 1000000 || 0;
|
41
|
+
const memory = Number(MemoryUsed) || 0;
|
42
|
+
const blobStorage = Number(StorageAllocatedSize) || 0;
|
43
|
+
const tabletStorage = Number(Metrics.Storage) || 0;
|
44
44
|
const memoryLimit = isNumeric(MemoryLimit) ? Number(MemoryLimit) : undefined;
|
45
45
|
const blobStorageLimit = isNumeric(StorageAllocatedLimit)
|
46
46
|
? Number(StorageAllocatedLimit)
|
47
47
|
: undefined;
|
48
|
-
const tabletStorageLimit = isNumeric(DatabaseQuotas.
|
49
|
-
? Number(DatabaseQuotas.
|
48
|
+
const tabletStorageLimit = isNumeric(DatabaseQuotas.data_size_soft_quota)
|
49
|
+
? Number(DatabaseQuotas.data_size_soft_quota)
|
50
50
|
: undefined;
|
51
51
|
const poolsStats = calculatePoolsStats(PoolStats);
|
52
52
|
let blobStorageStats;
|
@@ -87,7 +87,7 @@ export const calculateTenantMetrics = (tenant = {}) => {
|
|
87
87
|
};
|
88
88
|
});
|
89
89
|
}
|
90
|
-
else if (
|
90
|
+
else if (tabletStorageLimit) {
|
91
91
|
tabletStorageStats = [
|
92
92
|
{
|
93
93
|
name: EType.SSD,
|