ydb-embedded-ui 3.5.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/components/ClusterInfo/ClusterInfo.tsx +3 -3
  3. package/dist/{containers/Nodes/NodesTable.scss → components/NodeHostWrapper/NodeHostWrapper.scss} +4 -6
  4. package/dist/components/NodeHostWrapper/NodeHostWrapper.tsx +60 -0
  5. package/dist/containers/AsideNavigation/AsideNavigation.tsx +1 -11
  6. package/dist/containers/Header/Header.tsx +1 -1
  7. package/dist/containers/Nodes/getNodesColumns.tsx +7 -46
  8. package/dist/containers/Storage/StorageNodes/StorageNodes.scss +0 -24
  9. package/dist/containers/Storage/StorageNodes/StorageNodes.tsx +2 -39
  10. package/dist/containers/Tenant/QueryEditor/QueriesHistory/QueriesHistory.tsx +3 -3
  11. package/dist/containers/Tenant/QueryEditor/QueryDuration/QueryDuration.scss +8 -0
  12. package/dist/containers/Tenant/QueryEditor/QueryDuration/QueryDuration.tsx +21 -0
  13. package/dist/containers/Tenant/QueryEditor/QueryEditor.js +58 -83
  14. package/dist/containers/Tenant/QueryEditor/QueryEditor.scss +0 -33
  15. package/dist/containers/Tenant/QueryEditor/QueryEditorControls/OldQueryEditorControls.tsx +83 -0
  16. package/dist/containers/Tenant/QueryEditor/QueryEditorControls/QueryEditorControls.scss +57 -0
  17. package/dist/containers/Tenant/QueryEditor/QueryEditorControls/QueryEditorControls.tsx +84 -0
  18. package/dist/containers/Tenant/QueryEditor/QueryEditorControls/shared.ts +23 -0
  19. package/dist/containers/Tenant/QueryEditor/QueryExplain/QueryExplain.js +12 -23
  20. package/dist/containers/Tenant/QueryEditor/QueryResult/QueryResult.js +4 -6
  21. package/dist/containers/Tenant/QueryEditor/i18n/en.json +3 -0
  22. package/dist/containers/Tenant/QueryEditor/i18n/index.ts +11 -0
  23. package/dist/containers/Tenant/QueryEditor/i18n/ru.json +3 -0
  24. package/dist/containers/Tenants/Tenants.js +1 -1
  25. package/dist/containers/UserSettings/UserSettings.tsx +30 -1
  26. package/dist/services/api.ts +383 -0
  27. package/dist/store/reducers/{cluster.js → cluster/cluster.ts} +9 -14
  28. package/dist/store/reducers/cluster/types.ts +13 -0
  29. package/dist/store/reducers/executeQuery.ts +12 -37
  30. package/dist/store/reducers/executeTopQueries.ts +2 -2
  31. package/dist/store/reducers/{explainQuery.js → explainQuery.ts} +44 -59
  32. package/dist/store/reducers/index.ts +5 -4
  33. package/dist/store/reducers/settings.js +19 -17
  34. package/dist/store/reducers/{tenants.js → tenants/tenants.ts} +14 -9
  35. package/dist/store/reducers/tenants/types.ts +17 -0
  36. package/dist/store/utils.ts +3 -2
  37. package/dist/types/api/acl.ts +25 -0
  38. package/dist/types/api/cluster.ts +3 -0
  39. package/dist/types/api/compute.ts +5 -3
  40. package/dist/types/api/error.ts +14 -0
  41. package/dist/types/api/netInfo.ts +48 -0
  42. package/dist/types/api/nodes.ts +5 -3
  43. package/dist/types/api/pdisk.ts +11 -2
  44. package/dist/types/api/query.ts +226 -117
  45. package/dist/types/api/storage.ts +5 -3
  46. package/dist/types/api/tenant.ts +18 -3
  47. package/dist/types/api/vdisk.ts +10 -2
  48. package/dist/types/api/whoami.ts +19 -0
  49. package/dist/types/store/executeQuery.ts +4 -8
  50. package/dist/types/store/explainQuery.ts +38 -0
  51. package/dist/types/store/query.ts +23 -3
  52. package/dist/types/window.d.ts +5 -0
  53. package/dist/utils/constants.ts +2 -1
  54. package/dist/utils/error.ts +25 -0
  55. package/dist/utils/hooks/useTypedSelector.ts +2 -2
  56. package/dist/utils/index.js +0 -49
  57. package/dist/utils/nodes.ts +3 -1
  58. package/dist/utils/prepareQueryExplain.ts +7 -24
  59. package/dist/utils/query.test.ts +153 -231
  60. package/dist/utils/query.ts +44 -78
  61. package/dist/utils/timeParsers/i18n/en.json +9 -9
  62. package/dist/utils/timeParsers/i18n/ru.json +9 -9
  63. package/dist/utils/timeParsers/parsers.ts +9 -0
  64. package/dist/utils/utils.js +1 -2
  65. package/package.json +1 -1
  66. package/dist/services/api.d.ts +0 -86
  67. package/dist/services/api.js +0 -278
@@ -1,21 +1,33 @@
1
+ import type {Reducer} from 'redux';
2
+ import type {ExplainPlanNodeData, GraphNode, Link} from '@gravity-ui/paranoid';
1
3
  import _ from 'lodash';
2
4
 
3
5
  import '../../services/api';
6
+ import type {ExplainActions} from '../../types/api/query';
7
+ import type {
8
+ ExplainQueryAction,
9
+ ExplainQueryState,
10
+ PreparedExplainResponse,
11
+ } from '../../types/store/explainQuery';
12
+ import type {QueryRequestParams, QueryModes} from '../../types/store/query';
4
13
 
5
- import {getExplainNodeId, getMetaForExplainNode} from '../../utils';
6
14
  import {preparePlan} from '../../utils/prepareQueryExplain';
7
- import {parseQueryAPIExplainResponse} from '../../utils/query';
15
+ import {parseQueryAPIExplainResponse, parseQueryExplainPlan} from '../../utils/query';
16
+ import {parseQueryError} from '../../utils/error';
8
17
 
9
18
  import {createRequestActionTypes, createApiRequest} from '../utils';
10
19
 
11
- const GET_EXPLAIN_QUERY = createRequestActionTypes('query', 'GET_EXPLAIN_QUERY');
12
- const GET_EXPLAIN_QUERY_AST = createRequestActionTypes('query', 'GET_EXPLAIN_QUERY_AST');
20
+ export const GET_EXPLAIN_QUERY = createRequestActionTypes('query', 'GET_EXPLAIN_QUERY');
21
+ export const GET_EXPLAIN_QUERY_AST = createRequestActionTypes('query', 'GET_EXPLAIN_QUERY_AST');
13
22
 
14
23
  const initialState = {
15
24
  loading: false,
16
25
  };
17
26
 
18
- const explainQuery = (state = initialState, action) => {
27
+ const explainQuery: Reducer<ExplainQueryState, ExplainQueryAction> = (
28
+ state = initialState,
29
+ action,
30
+ ) => {
19
31
  switch (action.type) {
20
32
  case GET_EXPLAIN_QUERY.REQUEST: {
21
33
  return {
@@ -36,11 +48,10 @@ const explainQuery = (state = initialState, action) => {
36
48
  error: undefined,
37
49
  };
38
50
  }
39
- // 401 Unauthorized error is handled by GenericAPI
40
51
  case GET_EXPLAIN_QUERY.FAILURE: {
41
52
  return {
42
53
  ...state,
43
- error: action.error || 'Unauthorized',
54
+ error: parseQueryError(action.error),
44
55
  loading: false,
45
56
  };
46
57
  }
@@ -63,7 +74,7 @@ const explainQuery = (state = initialState, action) => {
63
74
  case GET_EXPLAIN_QUERY_AST.FAILURE: {
64
75
  return {
65
76
  ...state,
66
- errorAst: action.error || 'Unauthorized',
77
+ errorAst: parseQueryError(action.error),
67
78
  loadingAst: false,
68
79
  };
69
80
  }
@@ -73,7 +84,7 @@ const explainQuery = (state = initialState, action) => {
73
84
  }
74
85
  };
75
86
 
76
- export const getExplainQueryAst = ({query, database}) => {
87
+ export const getExplainQueryAst = ({query, database}: QueryRequestParams) => {
77
88
  return createApiRequest({
78
89
  request: window.api.getExplainQueryAst(query, database),
79
90
  actions: GET_EXPLAIN_QUERY_AST,
@@ -82,74 +93,48 @@ export const getExplainQueryAst = ({query, database}) => {
82
93
  };
83
94
 
84
95
  export const explainVersions = {
85
- v1: '0.1',
86
96
  v2: '0.2',
87
97
  };
88
98
 
89
99
  const supportedExplainQueryVersions = Object.values(explainVersions);
90
100
 
91
- export const getExplainQuery = ({query, database}) => {
101
+ interface ExplainQueryParams extends QueryRequestParams {
102
+ mode?: QueryModes;
103
+ }
104
+
105
+ export const getExplainQuery = ({query, database, mode}: ExplainQueryParams) => {
106
+ const action: ExplainActions = mode ? `explain-${mode}` : 'explain';
107
+
92
108
  return createApiRequest({
93
- request: window.api.getExplainQuery(query, database),
109
+ request: window.api.getExplainQuery(query, database, action),
94
110
  actions: GET_EXPLAIN_QUERY,
95
- dataHandler: (response) => {
96
- const {plan: result, ast} = parseQueryAPIExplainResponse(response);
111
+ dataHandler: (response): PreparedExplainResponse => {
112
+ const {plan: rawPlan, ast} = parseQueryAPIExplainResponse(response);
97
113
 
98
- if (!result) {
114
+ if (!rawPlan) {
99
115
  return {ast};
100
116
  }
101
117
 
102
- let links = [];
103
- let nodes = [];
104
- const {tables, meta, Plan} = result;
118
+ const {tables, meta, Plan} = parseQueryExplainPlan(rawPlan);
105
119
 
106
120
  if (supportedExplainQueryVersions.indexOf(meta.version) === -1) {
121
+ // Do not prepare plan for not supported versions
107
122
  return {
108
- pristine: result,
109
- version: meta.version,
123
+ plan: {
124
+ pristine: rawPlan,
125
+ version: meta.version,
126
+ },
127
+ ast,
110
128
  };
111
129
  }
112
- if (meta.version === explainVersions.v2) {
130
+
131
+ let links: Link[] = [];
132
+ let nodes: GraphNode<ExplainPlanNodeData>[] = [];
133
+
134
+ if (Plan) {
113
135
  const preparedPlan = preparePlan(Plan);
114
136
  links = preparedPlan.links;
115
137
  nodes = preparedPlan.nodes;
116
- } else {
117
- _.forEach(tables, (table) => {
118
- nodes.push({
119
- name: table.name,
120
- });
121
-
122
- const tableTypes = {};
123
-
124
- const {reads = [], writes = []} = table;
125
- let prevNodeId = table.name;
126
-
127
- _.forEach([...reads, ...writes], (node) => {
128
- if (tableTypes[node.type]) {
129
- tableTypes[node.type] = tableTypes[node.type] + 1;
130
- } else {
131
- tableTypes[node.type] = 1;
132
- }
133
-
134
- const nodeId = getExplainNodeId(
135
- table.name,
136
- node.type,
137
- tableTypes[node.type],
138
- );
139
-
140
- links.push({
141
- from: prevNodeId,
142
- to: nodeId,
143
- });
144
- nodes.push({
145
- name: nodeId,
146
- meta: getMetaForExplainNode(node),
147
- id: nodeId,
148
- });
149
-
150
- prevNodeId = nodeId;
151
- });
152
- });
153
138
  }
154
139
 
155
140
  return {
@@ -158,7 +143,7 @@ export const getExplainQuery = ({query, database}) => {
158
143
  nodes,
159
144
  tables,
160
145
  version: meta.version,
161
- pristine: result,
146
+ pristine: rawPlan,
162
147
  },
163
148
  ast,
164
149
  };
@@ -1,7 +1,7 @@
1
1
  import {combineReducers} from 'redux';
2
2
 
3
3
  import nodes from './nodes';
4
- import cluster from './cluster';
4
+ import cluster from './cluster/cluster';
5
5
  import tenant from './tenant';
6
6
  import storage from './storage';
7
7
  import node from './node';
@@ -15,7 +15,7 @@ import schema from './schema';
15
15
  import host from './host';
16
16
  import network from './network';
17
17
  import pool from './pool';
18
- import tenants from './tenants';
18
+ import tenants from './tenants/tenants';
19
19
  import tablet from './tablet';
20
20
  import topic from './topic';
21
21
  import consumer from './consumer';
@@ -82,7 +82,8 @@ const combinedReducer = combineReducers({
82
82
  ...rootReducer,
83
83
  });
84
84
 
85
- export type IRootReducer = typeof combinedReducer;
86
- export type IRootState = ReturnType<IRootReducer>;
85
+ export type RootReducer = typeof combinedReducer;
86
+ export type RootState = ReturnType<RootReducer>;
87
+ export type GetState = () => RootState;
87
88
 
88
89
  export default combinedReducer;
@@ -3,14 +3,16 @@ import {
3
3
  SAVED_QUERIES_KEY,
4
4
  THEME_KEY,
5
5
  TENANT_INITIAL_TAB_KEY,
6
- QUERY_INITIAL_RUN_ACTION_KEY,
7
6
  INVERTED_DISKS_KEY,
8
7
  ASIDE_HEADER_COMPACT_KEY,
9
8
  USE_NODES_ENDPOINT_IN_DIAGNOSTICS_KEY,
10
9
  PARTITIONS_SELECTED_COLUMNS_KEY,
10
+ QUERY_INITIAL_MODE_KEY,
11
+ ENABLE_QUERY_MODES_FOR_EXPLAIN,
11
12
  } from '../../utils/constants';
12
13
  import '../../services/api';
13
- import {getValueFromLS} from '../../utils/utils';
14
+ import {getValueFromLS, parseJson} from '../../utils/utils';
15
+ import {QueryModes} from '../../types/store/query';
14
16
 
15
17
  const CHANGE_PROBLEM_FILTER = 'settings/CHANGE_PROBLEM_FILTER';
16
18
  const SET_SETTING_VALUE = 'settings/SET_VALUE';
@@ -24,16 +26,6 @@ export function readSavedSettingsValue(key, defaultValue) {
24
26
  return savedValue ?? defaultValue;
25
27
  }
26
28
 
27
- // navigation managed its compact state internally before, and its approach is not compatible with settings
28
- // try reading the old localStorage entry to use it as a default value, for backward compatibility
29
- // assume it is safe to remove this code block if it is at least a few months old
30
- // there a two of these, search for a similar comment
31
- let legacyAsideNavCompactState = '';
32
- try {
33
- legacyAsideNavCompactState = String(JSON.parse(getValueFromLS('nvAsideHeader')).isCompact);
34
- localStorage.removeItem('nvAsideHeader');
35
- } catch {}
36
-
37
29
  export const initialState = {
38
30
  problemFilter: ALL,
39
31
  userSettings: {
@@ -44,13 +36,14 @@ export const initialState = {
44
36
  USE_NODES_ENDPOINT_IN_DIAGNOSTICS_KEY,
45
37
  'false',
46
38
  ),
39
+ [ENABLE_QUERY_MODES_FOR_EXPLAIN]: readSavedSettingsValue(
40
+ ENABLE_QUERY_MODES_FOR_EXPLAIN,
41
+ 'false',
42
+ ),
47
43
  [SAVED_QUERIES_KEY]: readSavedSettingsValue(SAVED_QUERIES_KEY, '[]'),
48
44
  [TENANT_INITIAL_TAB_KEY]: readSavedSettingsValue(TENANT_INITIAL_TAB_KEY),
49
- [QUERY_INITIAL_RUN_ACTION_KEY]: readSavedSettingsValue(QUERY_INITIAL_RUN_ACTION_KEY),
50
- [ASIDE_HEADER_COMPACT_KEY]: readSavedSettingsValue(
51
- ASIDE_HEADER_COMPACT_KEY,
52
- legacyAsideNavCompactState || 'true',
53
- ),
45
+ [QUERY_INITIAL_MODE_KEY]: readSavedSettingsValue(QUERY_INITIAL_MODE_KEY, QueryModes.script),
46
+ [ASIDE_HEADER_COMPACT_KEY]: readSavedSettingsValue(ASIDE_HEADER_COMPACT_KEY, 'true'),
54
47
  [PARTITIONS_SELECTED_COLUMNS_KEY]: readSavedSettingsValue(PARTITIONS_SELECTED_COLUMNS_KEY),
55
48
  },
56
49
  systemSettings,
@@ -97,6 +90,15 @@ export const getSettingValue = (state, name) => {
97
90
  return state.settings.userSettings[name];
98
91
  };
99
92
 
93
+ /**
94
+ * Returns parsed settings value.
95
+ * If value cannot be parsed, returns initially stored string
96
+ */
97
+ export const getParsedSettingValue = (state, name) => {
98
+ const value = state.settings.userSettings[name];
99
+ return parseJson(value);
100
+ };
101
+
100
102
  export const changeFilter = (filter) => {
101
103
  return {
102
104
  type: CHANGE_PROBLEM_FILTER,
@@ -1,12 +1,15 @@
1
- import _ from 'lodash';
2
- import {createRequestActionTypes, createApiRequest} from '../utils';
3
- import '../../services/api';
1
+ import type {Reducer} from 'redux';
4
2
 
5
- const FETCH_TENANTS = createRequestActionTypes('tenants', 'FETCH_TENANTS');
3
+ import '../../../services/api';
4
+ import {createRequestActionTypes, createApiRequest} from '../../utils';
6
5
 
7
- const initialState = {loading: true, wasLoaded: false, data: {}};
6
+ import type {TenantsAction, TenantsState} from './types';
8
7
 
9
- const tenants = function (state = initialState, action) {
8
+ export const FETCH_TENANTS = createRequestActionTypes('tenants', 'FETCH_TENANTS');
9
+
10
+ const initialState = {loading: true, wasLoaded: false};
11
+
12
+ const tenants: Reducer<TenantsState, TenantsAction> = (state = initialState, action) => {
10
13
  switch (action.type) {
11
14
  case FETCH_TENANTS.REQUEST: {
12
15
  return {
@@ -35,20 +38,22 @@ const tenants = function (state = initialState, action) {
35
38
  }
36
39
  };
37
40
 
38
- export function getTenantsInfo(clusterName) {
41
+ export function getTenantsInfo(clusterName?: string) {
39
42
  return createApiRequest({
40
43
  request: window.api.getTenants(clusterName),
41
44
  actions: FETCH_TENANTS,
42
45
  dataHandler: (response, getState) => {
43
46
  const {singleClusterMode} = getState();
47
+
44
48
  if (singleClusterMode) {
45
49
  return response.TenantInfo;
46
50
  } else {
47
- return response.databases?.map((tenant) => {
51
+ return response.TenantInfo?.map((tenant) => {
48
52
  const node = tenant.Nodes ? tenant.Nodes[0] : {};
49
53
  const address =
50
54
  node.Host && node.Endpoints
51
- ? _.find(node.Endpoints, {Name: 'http-mon'})?.Address
55
+ ? node.Endpoints.find((endpoint) => endpoint.Name === 'http-mon')
56
+ ?.Address
52
57
  : undefined;
53
58
  const backend = node.Host ? `${node.Host}${address ? address : ''}` : undefined;
54
59
  return {...tenant, backend};
@@ -0,0 +1,17 @@
1
+ import {FETCH_TENANTS} from './tenants';
2
+
3
+ import type {TTenant} from '../../../types/api/tenant';
4
+ import type {ApiRequestAction} from '../../utils';
5
+
6
+ export interface PreparedTenant extends TTenant {
7
+ backend?: string;
8
+ }
9
+
10
+ export interface TenantsState {
11
+ loading: boolean;
12
+ wasLoaded: boolean;
13
+ tenants?: PreparedTenant[];
14
+ error?: unknown;
15
+ }
16
+
17
+ export type TenantsAction = ApiRequestAction<typeof FETCH_TENANTS, PreparedTenant[], unknown>;
@@ -4,6 +4,7 @@ import {AxiosResponse} from 'axios';
4
4
  import createToast from '../utils/createToast';
5
5
 
6
6
  import {SET_UNAUTHENTICATED} from './reducers/authentication';
7
+ import type {GetState} from './reducers';
7
8
 
8
9
  export const nop = (result: any) => result;
9
10
 
@@ -24,7 +25,7 @@ const isAxiosResponse = (response: any): response is AxiosResponse =>
24
25
  type CreateApiRequestParams<Actions, Response, HandledResponse> = {
25
26
  actions: Actions;
26
27
  request: Promise<Response>;
27
- dataHandler?: (data: Response, getState?: () => any) => HandledResponse;
28
+ dataHandler?: (data: Response, getState: GetState) => HandledResponse;
28
29
  };
29
30
 
30
31
  export function createApiRequest<
@@ -36,7 +37,7 @@ export function createApiRequest<
36
37
  request,
37
38
  dataHandler = nop,
38
39
  }: CreateApiRequestParams<Actions, Response, HandledResponse>) {
39
- const doRequest = async function (dispatch: Dispatch, getState: () => any) {
40
+ const doRequest = async function (dispatch: Dispatch, getState: GetState) {
40
41
  dispatch({
41
42
  type: actions.REQUEST,
42
43
  });
@@ -0,0 +1,25 @@
1
+ /**
2
+ * endpoint: /viewer/json/acl
3
+ *
4
+ * source: https://github.com/ydb-platform/ydb/blob/main/ydb/core/viewer/protos/viewer.proto
5
+ *
6
+ * incomplete, only fields that present for ACL requests
7
+ */
8
+ export interface TMetaInfo {
9
+ Common: TMetaCommonInfo;
10
+ }
11
+
12
+ /** incomplete */
13
+ export interface TMetaCommonInfo {
14
+ Path: string;
15
+ Owner?: string;
16
+ ACL?: TACE[];
17
+ }
18
+
19
+ interface TACE {
20
+ AccessType: string;
21
+ AccessRights?: string[];
22
+ Subject: string;
23
+ InheritanceType?: string[];
24
+ AccessRule: string;
25
+ }
@@ -31,4 +31,7 @@ export interface TClusterInfo {
31
31
  Tenants?: string;
32
32
  /** uint64 */
33
33
  Tablets?: string;
34
+
35
+ Balancer?: string; // additional
36
+ Solomon?: string; // additional
34
37
  }
@@ -2,9 +2,11 @@ import {EFlag} from './enums';
2
2
  import {TEndpoint, TLegacyNodeLocation, TPoolStats} from './nodes';
3
3
  import {TMetrics} from './tenant';
4
4
 
5
- // endpoint: viewer/json/compute
6
- // source: https://github.com/ydb-platform/ydb/blob/main/ydb/core/viewer/protos/viewer.proto
7
-
5
+ /**
6
+ * endpoint: viewer/json/compute
7
+ *
8
+ * source: https://github.com/ydb-platform/ydb/blob/main/ydb/core/viewer/protos/viewer.proto
9
+ */
8
10
  export interface TComputeInfo {
9
11
  Overall: EFlag;
10
12
  Tenants?: TComputeTenantInfo[];
@@ -4,3 +4,17 @@ export interface IResponseError {
4
4
  statusText?: string;
5
5
  isCancelled?: boolean;
6
6
  }
7
+
8
+ // Error on offline backend or requests blocked by CORS
9
+ export interface NetworkError {
10
+ code?: unknown;
11
+ columnNumber?: unknown;
12
+ config?: Record<string, unknown>;
13
+ description?: unknown;
14
+ fileName?: unknown;
15
+ lineNumber?: unknown;
16
+ message?: 'Network Error';
17
+ name?: string;
18
+ number?: unknown;
19
+ stack?: string;
20
+ }
@@ -0,0 +1,48 @@
1
+ import type {EFlag} from './enums';
2
+
3
+ /**
4
+ * endpoint: /viewer/json/netinfo
5
+ *
6
+ * source: https://github.com/ydb-platform/ydb/blob/main/ydb/core/viewer/protos/viewer.proto
7
+ */
8
+ export interface TNetInfo {
9
+ Overall: EFlag;
10
+ Tenants?: TNetTenantInfo[];
11
+ }
12
+
13
+ interface TNetTenantInfo {
14
+ Overall: EFlag;
15
+ Name: string;
16
+ Nodes?: TNetNodeInfo[];
17
+ }
18
+
19
+ interface TNetNodeInfo {
20
+ NodeId: number;
21
+ Overall: EFlag;
22
+ Peers?: TNetNodePeerInfo[];
23
+ NodeType: ENodeType;
24
+ DataCenter: string;
25
+ Rack: string;
26
+ Host: string;
27
+ Port: number;
28
+ }
29
+
30
+ interface TNetNodePeerInfo {
31
+ NodeId: number;
32
+ PeerName: string;
33
+ Connected: boolean;
34
+ ConnectStatus: EFlag;
35
+ /** uint64 */
36
+ ChangeTime: string;
37
+ NodeType: ENodeType;
38
+ DataCenter: string;
39
+ Rack: string;
40
+ Host: string;
41
+ Port: number;
42
+ }
43
+
44
+ enum ENodeType {
45
+ UnknownNodeType,
46
+ Static,
47
+ Dynamic,
48
+ }
@@ -3,9 +3,11 @@ import {TPDiskStateInfo} from './pdisk';
3
3
  import {TTabletStateInfo} from './tablet';
4
4
  import {TVDiskStateInfo} from './vdisk';
5
5
 
6
- // endpoint: /viewer/json/nodes
7
- // source: https://github.com/ydb-platform/ydb/blob/main/ydb/core/viewer/protos/viewer.proto
8
-
6
+ /**
7
+ * endpoint: /viewer/json/nodes
8
+ *
9
+ * source: https://github.com/ydb-platform/ydb/blob/main/ydb/core/viewer/protos/viewer.proto
10
+ */
9
11
  export interface TNodesInfo {
10
12
  Overall?: EFlag;
11
13
  Nodes?: TNodeInfo[];
@@ -1,7 +1,16 @@
1
1
  import {EFlag} from './enums';
2
2
 
3
- // endpoint: /viewer/json/pdiskinfo
4
- // source: https://github.com/ydb-platform/ydb/blob/main/ydb/core/protos/node_whiteboard.proto
3
+ /**
4
+ * endpoint: /viewer/json/pdiskinfo
5
+ *
6
+ * source: https://github.com/ydb-platform/ydb/blob/main/ydb/core/protos/node_whiteboard.proto
7
+ */
8
+ export interface TEvPDiskStateResponse {
9
+ PDiskStateInfo?: TPDiskStateInfo[];
10
+ /** uint64 */
11
+ ResponseTime?: string;
12
+ ResponseDuration?: number;
13
+ }
5
14
 
6
15
  export interface TPDiskStateInfo {
7
16
  PDiskId?: number;