ydb-embedded-ui 3.4.4 → 3.5.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 +31 -0
  2. package/dist/components/Icon/Icon.tsx +6 -0
  3. package/dist/components/InfoViewer/InfoViewer.tsx +2 -2
  4. package/dist/components/InfoViewer/formatters/index.ts +0 -1
  5. package/dist/components/InfoViewer/formatters/table.ts +6 -0
  6. package/dist/components/LabelWithPopover/LabelWithPopover.tsx +3 -7
  7. package/dist/components/LagPopoverContent/LagPopoverContent.scss +13 -0
  8. package/dist/components/LagPopoverContent/LagPopoverContent.tsx +19 -0
  9. package/dist/components/LagPopoverContent/index.ts +1 -0
  10. package/dist/components/Tooltips/NodeEndpointsTooltip/NodeEndpointsTooltip.scss +5 -0
  11. package/dist/components/Tooltips/NodeEndpointsTooltip/NodeEndpointsTooltip.tsx +31 -0
  12. package/dist/components/TruncatedQuery/TruncatedQuery.js +1 -1
  13. package/dist/components/TruncatedQuery/TruncatedQuery.scss +7 -3
  14. package/dist/containers/Node/{NodePages.js → NodePages.ts} +1 -1
  15. package/dist/containers/Nodes/Nodes.tsx +2 -6
  16. package/dist/containers/Nodes/NodesTable.scss +11 -10
  17. package/dist/containers/Nodes/getNodesColumns.tsx +29 -24
  18. package/dist/containers/Storage/PDisk/PDisk.scss +2 -0
  19. package/dist/containers/Storage/PDiskPopup/PDiskPopup.tsx +6 -9
  20. package/dist/containers/Storage/Storage.js +12 -5
  21. package/dist/containers/Storage/StorageGroups/StorageGroups.tsx +3 -1
  22. package/dist/containers/Storage/StorageNodes/StorageNodes.scss +20 -7
  23. package/dist/containers/Storage/StorageNodes/StorageNodes.tsx +43 -7
  24. package/dist/containers/Storage/VDisk/VDisk.tsx +3 -2
  25. package/dist/containers/Storage/VDiskPopup/VDiskPopup.tsx +4 -2
  26. package/dist/containers/Tablet/TabletControls/TabletControls.tsx +2 -2
  27. package/dist/containers/Tenant/Diagnostics/Consumers/Headers/Headers.scss +0 -8
  28. package/dist/containers/Tenant/Diagnostics/Consumers/Headers/Headers.tsx +3 -10
  29. package/dist/containers/Tenant/Diagnostics/Consumers/i18n/ru.json +1 -1
  30. package/dist/containers/Tenant/Diagnostics/Overview/Overview.tsx +11 -43
  31. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/TableInfo.tsx +19 -17
  32. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo.ts +192 -37
  33. package/dist/containers/Tenant/Diagnostics/Overview/TopicStats/TopicStats.tsx +51 -32
  34. package/dist/containers/Tenant/Diagnostics/Overview/TopicStats/i18n/en.json +2 -1
  35. package/dist/containers/Tenant/Diagnostics/Overview/TopicStats/i18n/ru.json +2 -1
  36. package/dist/containers/Tenant/Diagnostics/Partitions/Headers/Headers.scss +0 -8
  37. package/dist/containers/Tenant/Diagnostics/Partitions/Headers/Headers.tsx +7 -21
  38. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.scss +20 -14
  39. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.tsx +49 -12
  40. package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.tsx +37 -18
  41. package/dist/containers/Tenant/QueryEditor/QueryEditor.js +1 -0
  42. package/dist/routes.ts +1 -1
  43. package/dist/services/api.d.ts +4 -0
  44. package/dist/services/api.js +3 -3
  45. package/dist/store/reducers/{executeQuery.js → executeQuery.ts} +51 -21
  46. package/dist/store/reducers/executeTopQueries.ts +5 -1
  47. package/dist/store/reducers/{nodesList.js → nodesList.ts} +19 -7
  48. package/dist/store/reducers/{olapStats.js → olapStats.ts} +8 -18
  49. package/dist/store/reducers/settings.js +1 -1
  50. package/dist/store/reducers/storage.js +8 -18
  51. package/dist/types/api/nodesList.ts +25 -0
  52. package/dist/types/api/query.ts +4 -1
  53. package/dist/types/api/schema.ts +523 -3
  54. package/dist/types/common.ts +1 -0
  55. package/dist/types/store/executeQuery.ts +42 -0
  56. package/dist/types/store/nodesList.ts +24 -0
  57. package/dist/types/store/olapStats.ts +14 -0
  58. package/dist/utils/index.js +9 -1
  59. package/dist/utils/nodes.ts +4 -0
  60. package/dist/utils/query.test.ts +42 -29
  61. package/dist/utils/query.ts +34 -22
  62. package/dist/utils/timeParsers/formatDuration.ts +30 -12
  63. package/dist/utils/timeParsers/i18n/en.json +4 -0
  64. package/dist/utils/timeParsers/i18n/ru.json +4 -0
  65. package/dist/utils/tooltip.js +2 -28
  66. package/package.json +1 -1
  67. package/dist/components/InfoViewer/formatters/topicStats.tsx +0 -29
@@ -229,19 +229,539 @@ interface DatabaseQuotas {
229
229
  ttl_min_run_internal_seconds: number;
230
230
  }
231
231
 
232
- // FIXME: incomplete
233
232
  export interface TTableDescription {
233
+ Name?: string;
234
+ /**
235
+ * @deprecated LocalPathId
236
+ *
237
+ * uint64
238
+ */
239
+ Id_Deprecated?: string;
240
+ Columns?: TColumnDescription[];
241
+ KeyColumnNames?: string[];
242
+ KeyColumnIds?: number[];
243
+ /**
244
+ * Describes uniform partitioning on first key column int on ranges.
245
+ * The first key column must be of integer type
246
+ */
247
+ UniformPartitionsCount?: number;
248
+
234
249
  PartitionConfig?: TPartitionConfig;
250
+ DropColumns?: TColumnDescription[];
251
+ Path?: string;
252
+
253
+ /** bytes */
254
+ PartitionRangeBegin?: unknown;
255
+ /** bytes */
256
+ PartitionRangeEnd?: unknown;
257
+ PartitionRangeBeginIsInclusive?: boolean;
258
+ PartitionRangeEndIsInclusive?: boolean;
259
+
260
+ CopyFromTable?: string;
261
+ /** Boundaries for non-uniform split */
262
+ SplitBoundary?: TSplitBoundary[];
263
+
264
+ TableIndexes?: TIndexDescription[];
265
+ /** uint64 */
266
+ TableSchemaVersion?: string;
267
+
268
+ PathId?: TPathID;
269
+
270
+ TTLSettings?: TTTLSettings;
271
+
272
+ /**
273
+ * used with CopyFromTable
274
+ *
275
+ * default false
276
+ */
277
+ OmitFollowers?: boolean;
278
+ /** default false */
279
+ IsBackup?: boolean;
280
+
281
+ CdcStreams?: TCdcStreamDescription[];
282
+ Sequences?: TSequenceDescription[];
283
+ }
284
+
285
+ interface TColumnDescription {
286
+ Name?: string;
287
+ Type?: string;
288
+ TypeId?: number;
289
+ TypeInfo?: TTypeInfo;
290
+ Id?: number;
291
+ Family?: number;
292
+ FamilyName?: string;
293
+ /** Path to sequence for default values */
294
+ DefaultFromSequence?: string;
295
+ NotNull?: boolean;
296
+ }
297
+
298
+ interface TSplitBoundary {
299
+ /** A tuple representing full key or key prefix */
300
+ KeyPrefix?: unknown;
301
+ /**
302
+ * Or same as KeyPrefix but already serialized
303
+ *
304
+ * bytes
305
+ */
306
+ SerializedKeyPrefix?: unknown;
307
+ }
308
+
309
+ export interface TTTLSettings {
310
+ Enabled?: TEnabled;
311
+ Disabled?: {};
312
+ UseTiering?: string;
313
+ }
314
+
315
+ interface TEnabled {
316
+ ColumnName?: string;
317
+ ExpireAfterSeconds?: number;
318
+ ColumnUnit?: EUnit;
319
+ SysSettings?: TSysSettings;
320
+ }
321
+
322
+ interface TSysSettings {
323
+ /**
324
+ * default 3600000000 (1 hour)
325
+ *
326
+ * uint64
327
+ */
328
+ RunInterval?: string;
329
+ /**
330
+ * default 300000000 (5 minutes)
331
+ *
332
+ * uint64
333
+ */
334
+ RetryInterval?: string;
335
+ /** default 512000 */
336
+ BatchMaxBytes?: number;
337
+ /** default 1 */
338
+ BatchMinKeys?: number;
339
+ /** default 256 */
340
+ BatchMaxKeys?: number;
341
+ /**
342
+ * zero means no limit
343
+ *
344
+ * default 0
345
+ */
346
+ MaxShardsInFlight?: number;
347
+ }
348
+
349
+ interface TSequenceDescription {
350
+ Name?: string;
351
+ /** sequence path id, assigned by schemeshard */
352
+ PathId?: TPathID;
353
+ /**
354
+ * incremented every time sequence is altered
355
+ *
356
+ * uint64
357
+ */
358
+ Version?: string;
359
+ /**
360
+ * current sequenceshard, assigned by schemeshard
361
+ *
362
+ * uint64
363
+ */
364
+ SequenceShard?: string;
365
+ /**
366
+ * minimum value, defaults to 1 or Min<i64>
367
+ *
368
+ * sint64
369
+ */
370
+ MinValue?: string;
371
+ /**
372
+ * maximum value, defaults to Max<i64> or -1
373
+ *
374
+ * sint64
375
+ */
376
+ MaxValue?: string;
377
+ /**
378
+ * start value, defaults to MinValue
379
+ *
380
+ * sint64
381
+ */
382
+ StartValue?: string;
383
+ /**
384
+ * number of items to cache, defaults to 1
385
+ *
386
+ * uint64
387
+ */
388
+ Cache?: string;
389
+ /**
390
+ * increment at each call, defaults to 1
391
+ *
392
+ * sint64
393
+ */
394
+ Increment?: string;
395
+ /** true when cycle on overflow is allowed */
396
+ Cycle?: boolean;
235
397
  }
236
398
 
237
- // FIXME: incomplete
238
399
  export interface TPartitionConfig {
400
+ /** One of the predefined policies*/
401
+ NamedCompactionPolicy?: string;
402
+ /** Customized policy */
403
+ CompactionPolicy?: TCompactionPolicy;
239
404
  /** uint64 */
240
405
  FollowerCount?: string;
406
+ /**
407
+ * Cache size for the whole tablet including all user and system tables
408
+ *
409
+ * uint64
410
+ */
411
+ ExecutorCacheSize?: string;
412
+ /**
413
+ * if true followers can upgrade to leader, if false followers only handle reads
414
+ *
415
+ * default true
416
+ */
417
+ AllowFollowerPromotion?: boolean;
418
+ /**
419
+ * Maximum size in bytes that is allowed to be read by a single Tx
420
+ *
421
+ * uint64
422
+ */
423
+ TxReadSizeLimit?: string;
241
424
  /** @deprecated use FollowerGroups */
242
425
  CrossDataCenterFollowerCount?: number;
426
+ /** for configuring erasure and disk categories */
427
+ ChannelProfileId?: number;
428
+ PartitioningPolicy?: TPartitioningPolicy;
429
+ PipelineConfig?: TPipelineConfig;
430
+ ColumnFamilies?: TFamilyDescription[];
431
+ ResourceProfile?: string;
432
+ DisableStatisticsCalculation?: boolean;
433
+ /**
434
+ * Build and use per-part bloom filter for fast key non-existence check
435
+ *
436
+ * default false
437
+ */
438
+ EnableFilterByKey?: boolean;
439
+ /**
440
+ * Commit log faster at the expense of bandwidth for cross-DC
441
+ *
442
+ * default true
443
+ */
444
+ ExecutorFastLogPolicy?: boolean;
445
+ StorageRooms?: TStorageRoom[];
446
+ /**
447
+ * Use erase cache for faster iteration over erased rows
448
+ *
449
+ * default true
450
+ */
451
+ EnableEraseCache?: boolean;
452
+ /**
453
+ * Minimum number of erased rows worth caching
454
+ *
455
+ * default 16
456
+ */
457
+ EraseCacheMinRows?: number;
458
+ /**
459
+ * Maximum number of bytes to use for cached rows
460
+ *
461
+ * default 1MB
462
+ */
463
+ EraseCacheMaxBytes?: number;
464
+ FreezeState?: EFreezeState;
465
+ ShadowData?: boolean;
243
466
  /** 0 or 1 items */
244
467
  FollowerGroups?: TFollowerGroup[];
468
+ /** uint64 milliseconds */
469
+ KeepSnapshotTimeout?: string;
470
+ }
471
+
472
+ enum EPurpose {
473
+ SysLog,
474
+ Log,
475
+ Data,
476
+ External,
477
+ }
478
+
479
+ interface TChannelPurpose {
480
+ Purpose?: EPurpose;
481
+ Channel?: number;
482
+ }
483
+
484
+ interface TStorageRoom {
485
+ RoomId?: number;
486
+ Explanation?: TChannelPurpose[];
487
+ }
488
+
489
+ interface TPipelineConfig {
490
+ /** default 8 */
491
+ NumActiveTx?: number;
492
+ DataTxCacheSize?: number;
493
+ /** default true */
494
+ EnableOutOfOrder?: boolean;
495
+ DisableImmediate?: boolean;
496
+ EnableSoftUpdates?: boolean;
497
+ }
498
+ interface TFamilyDescription {
499
+ Id?: number;
500
+ Room?: number;
501
+ /** @deprecated use ColumnCodec */
502
+ Codec?: number;
503
+ /** @deprecated use ColumnCache */
504
+ InMemory?: boolean;
505
+ Name?: string;
506
+ ColumnCodec?: EColumnCodec;
507
+ ColumnCache?: EColumnCache;
508
+ /** @deprecated use StorageConfig */
509
+ Storage?: EColumnStorage;
510
+ StorageConfig?: TStorageConfig;
511
+ }
512
+
513
+ interface TStorageConfig {
514
+ SysLog?: TStorageSettings;
515
+ Log?: TStorageSettings;
516
+ Data?: TStorageSettings;
517
+ External?: TStorageSettings;
518
+ DataThreshold?: number;
519
+ ExternalThreshold?: number;
520
+ }
521
+
522
+ enum EColumnCache {
523
+ ColumnCacheNone,
524
+ ColumnCacheOnce,
525
+ ColumnCacheEver,
526
+ }
527
+
528
+ enum EColumnStorage {
529
+ ColumnStorage1,
530
+ ColumnStorage2,
531
+ ColumnStorage1Ext1,
532
+ ColumnStorage1Ext2,
533
+ ColumnStorage2Ext1,
534
+ ColumnStorage2Ext2,
535
+ ColumnStorage1Med2Ext2,
536
+ ColumnStorage2Med2Ext2,
537
+ ColumnStorageTest_1_2_1k,
538
+ }
539
+
540
+ enum EFreezeState {
541
+ Unspecified,
542
+ Freeze,
543
+ Unfreeze,
544
+ }
545
+
546
+ interface TPartitioningPolicy {
547
+ /**
548
+ * Partition gets split when this threshold is exceeded
549
+ *
550
+ * uint64
551
+ */
552
+ SizeToSplit?: string;
553
+
554
+ MinPartitionsCount?: number;
555
+ MaxPartitionsCount?: number;
556
+
557
+ FastSplitSettings?: TFastSplitSettings;
558
+ SplitByLoadSettings?: TSplitByLoadSettings;
559
+ }
560
+
561
+ interface TFastSplitSettings {
562
+ /** uint64 */
563
+ SizeThreshold?: string;
564
+ /** uint64 */
565
+ RowCountThreshold?: string;
566
+ CpuPercentageThreshold?: number;
567
+ }
568
+
569
+ interface TSplitByLoadSettings {
570
+ Enabled?: boolean;
571
+ CpuPercentageThreshold?: number;
572
+ }
573
+
574
+ interface TCompactionPolicy {
575
+ /** uint64 */
576
+ InMemSizeToSnapshot?: string;
577
+ /** snapshot inmem state when size AND steps from last snapshot passed */
578
+ InMemStepsToSnapshot?: number;
579
+ InMemForceStepsToSnapshot?: number;
580
+ /** uint64 */
581
+ InMemForceSizeToSnapshot?: string;
582
+ /** @deprecated default 0 */
583
+ InMemCompactionBrokerQueue?: number;
584
+ /** uint64 default 67108864 */
585
+ ReadAheadHiThreshold?: string;
586
+ /** uint64 default 16777216 */
587
+ ReadAheadLoThreshold?: string;
588
+ /** default 7168 */
589
+ MinDataPageSize?: number;
590
+ /** @deprecated default 0*/
591
+ SnapBrokerQueue?: number;
592
+ /** @deprecated default 1*/
593
+ BackupBrokerQueue?: number;
594
+ /** default 5 */
595
+ DefaultTaskPriority?: number;
596
+ BackgroundSnapshotPolicy?: TBackgroundPolicy;
597
+ InMemResourceBrokerTask?: string;
598
+ SnapshotResourceBrokerTask?: string;
599
+ BackupResourceBrokerTask?: string;
600
+ /** uint64 */
601
+ LogOverheadSizeToSnapshot?: string;
602
+ LogOverheadCountToSnapshot?: number;
603
+ DroppedRowsPercentToCompact?: number;
604
+ /** default CompactionStrategyUnset */
605
+ CompactionStrategy?: ECompactionStrategy;
606
+ ShardPolicy?: TShardPolicy;
607
+ KeepEraseMarkers?: boolean;
608
+ Generation?: TGenerationPolicy[];
609
+ }
610
+
611
+ enum ECompactionStrategy {
612
+ CompactionStrategyUnset,
613
+ CompactionStrategyGenerational,
614
+ CompactionStrategySharded,
615
+ }
616
+
617
+ interface TShardPolicy {
618
+ /**
619
+ * Adjacent shards smaller than this will be merged
620
+ *
621
+ * default 33554432
622
+ *
623
+ * uint64
624
+ */
625
+ MinShardSize?: string;
626
+ /**
627
+ * Shards bigger than this will split in two or more pieces
628
+ *
629
+ * default 134217728
630
+ *
631
+ * uint64
632
+ */
633
+ MaxShardSize?: string;
634
+ /**
635
+ * Slices smaller than this will get prioritized compaction
636
+ *
637
+ * default 2097152
638
+ *
639
+ * uint64
640
+ */
641
+ MinSliceSize?: string;
642
+ /**
643
+ * Level will be compacted when there are more than this number of slices
644
+ *
645
+ * default 256
646
+ */
647
+ MaxSlicesPerLevel?: number;
648
+ /**
649
+ * Shard will be compacted when there are more than this number of levels
650
+ *
651
+ * default 16
652
+ */
653
+ MaxTotalLevels?: number;
654
+ /**
655
+ * Shard will avoid compacting less than this number of levels
656
+ *
657
+ * default 2
658
+ */
659
+ MinLevelsToCompact?: number;
660
+ /**
661
+ * Level will be compacted when it has X% of its data in upper levels
662
+ *
663
+ * default 100
664
+ */
665
+ NewDataPercentToCompact?: number;
666
+ /**
667
+ * Level will be compacted when it has X% of its rows in upper levels
668
+ *
669
+ * default 0
670
+ */
671
+ NewRowsPercentToCompact?: number;
672
+ /**
673
+ * Resource broker task type for compactions
674
+ *
675
+ * default 'compaction_gen1'
676
+ */
677
+ ResourceBrokerTask?: string;
678
+ /**
679
+ * Base priority for compaction tasks
680
+ *
681
+ * default 1000
682
+ */
683
+ TaskPriorityBase?: number;
684
+ /**
685
+ * Task priority will be increased for every N levels over the minimum
686
+ *
687
+ * default 1
688
+ */
689
+ TaskPriorityLevelsBoost?: number;
690
+ /**
691
+ * Task priority will be decreased for every N bytes of input
692
+ *
693
+ * default 4194304
694
+ *
695
+ * uint64
696
+ */
697
+ TaskPrioritySizePenalty?: string;
698
+ /**
699
+ * Part data may be reused, unless it would leave this much garbage
700
+ *
701
+ * default 20
702
+ */
703
+ MaxGarbagePercentToReuse?: number;
704
+ /**
705
+ * Minimum slice that that may be reused
706
+ *
707
+ * default 524288
708
+ *
709
+ * uint64
710
+ */
711
+ MinSliceSizeToReuse?: string;
712
+ }
713
+
714
+ interface TGenerationPolicy {
715
+ GenerationId?: number;
716
+ /** uint64 */
717
+ SizeToCompact?: string;
718
+ CountToCompact?: number;
719
+ ForceCountToCompact?: number;
720
+ /** uint64 */
721
+ ForceSizeToCompact?: string;
722
+ /** @deprecated */
723
+ CompactionBrokerQueue?: number;
724
+ KeepInCache?: boolean;
725
+ BackgroundCompactionPolicy?: TBackgroundPolicy;
726
+ ResourceBrokerTask?: string;
727
+ ExtraCompactionPercent?: number;
728
+ /** uint64 */
729
+ ExtraCompactionMinSize?: string;
730
+ ExtraCompactionExpPercent?: number;
731
+ /** uint64 */
732
+ ExtraCompactionExpMaxSize?: string;
733
+ /** uint64 */
734
+ UpliftPartSize?: string;
735
+ }
736
+
737
+ interface TBackgroundPolicy {
738
+ /**
739
+ * How much (in %) of forced compaction criteria should be met to submit background task.
740
+ *
741
+ * default 101 - no background compaction by default
742
+ */
743
+ Threshold?: number;
744
+ /**
745
+ * Base background compaction priority value (less priority means more important task).
746
+ * Value is used to compute real task priority basing on compaction criteria, time in queue etc.
747
+ *
748
+ * default 100
749
+ */
750
+ PriorityBase?: number;
751
+
752
+ /**
753
+ * Submitted background task may become more prioritized over time.
754
+ * New priority is computed as priority /= max(log(elapsed_seconds) * factor, 1);
755
+ *
756
+ * default 1.0
757
+ *
758
+ * double
759
+ */
760
+ TimeFactor?: number;
761
+
762
+ /** @deprecated default 5*/
763
+ TaskType?: number;
764
+ ResourceBrokerTask?: string;
245
765
  }
246
766
 
247
767
  export interface TFollowerGroup {
@@ -704,7 +1224,7 @@ enum EColumnCodec {
704
1224
  ColumnCodecZSTD = 'ColumnCodecZSTD',
705
1225
  }
706
1226
 
707
- interface TColumnDataLifeCycle {
1227
+ export interface TColumnDataLifeCycle {
708
1228
  Enabled?: TTtl;
709
1229
  Disabled?: {};
710
1230
  Tiering?: TStorageTiering;
@@ -0,0 +1 @@
1
+ export type ValueOf<T extends Object> = T[keyof T];
@@ -0,0 +1,42 @@
1
+ import {
2
+ SEND_QUERY,
3
+ changeUserInput,
4
+ saveQueryToHistory,
5
+ selectRunAction,
6
+ goToPreviousQuery,
7
+ setMonacoHotKey,
8
+ goToNextQuery,
9
+ MONACO_HOT_KEY_ACTIONS,
10
+ RUN_ACTIONS_VALUES,
11
+ } from '../../store/reducers/executeQuery';
12
+ import type {ApiRequestAction} from '../../store/utils';
13
+ import type {ValueOf} from '../common';
14
+ import type {IQueryResult} from './query';
15
+
16
+ export type MonacoHotKeyAction = ValueOf<typeof MONACO_HOT_KEY_ACTIONS>;
17
+ export type RunAction = ValueOf<typeof RUN_ACTIONS_VALUES>;
18
+
19
+ export interface ExecuteQueryState {
20
+ loading: boolean;
21
+ input: string;
22
+ history: {
23
+ queries: string[];
24
+ currentIndex: number;
25
+ };
26
+ runAction: RunAction;
27
+ monacoHotKey: null | MonacoHotKeyAction;
28
+ data?: IQueryResult;
29
+ stats?: IQueryResult['stats'];
30
+ error?: unknown;
31
+ }
32
+
33
+ type SendQueryAction = ApiRequestAction<typeof SEND_QUERY, IQueryResult, unknown>;
34
+
35
+ export type ExecuteQueryAction =
36
+ | SendQueryAction
37
+ | ReturnType<typeof goToNextQuery>
38
+ | ReturnType<typeof goToPreviousQuery>
39
+ | ReturnType<typeof changeUserInput>
40
+ | ReturnType<typeof saveQueryToHistory>
41
+ | ReturnType<typeof selectRunAction>
42
+ | ReturnType<typeof setMonacoHotKey>;
@@ -0,0 +1,24 @@
1
+ import {FETCH_NODES_LIST} from '../../store/reducers/nodesList';
2
+
3
+ import type {ApiRequestAction} from '../../store/utils';
4
+ import type {IResponseError} from '../api/error';
5
+ import type {TEvNodesInfo} from '../api/nodesList';
6
+
7
+ export interface NodesListState {
8
+ loading: boolean;
9
+ wasLoaded: boolean;
10
+ data?: TEvNodesInfo;
11
+ error?: IResponseError;
12
+ }
13
+
14
+ export type NodesListAction = ApiRequestAction<
15
+ typeof FETCH_NODES_LIST,
16
+ TEvNodesInfo,
17
+ IResponseError
18
+ >;
19
+
20
+ export type NodesMap = Map<number, string>;
21
+
22
+ export interface NodesListRootStateSlice {
23
+ nodesList: NodesListState;
24
+ }
@@ -0,0 +1,14 @@
1
+ import {FETCH_OLAP_STATS, resetLoadingState} from '../../store/reducers/olapStats';
2
+ import type {ApiRequestAction} from '../../store/utils';
3
+ import type {IQueryResult} from './query';
4
+
5
+ export interface OlapStatsState {
6
+ loading: boolean;
7
+ wasLoaded: boolean;
8
+ data?: IQueryResult;
9
+ error?: unknown;
10
+ }
11
+
12
+ export type OlapStatsAction =
13
+ | ApiRequestAction<typeof FETCH_OLAP_STATS, IQueryResult, unknown>
14
+ | ReturnType<typeof resetLoadingState>;
@@ -20,7 +20,15 @@ export const formatBytes = (bytes) => {
20
20
  return numeral(bytes).format('0 b');
21
21
  };
22
22
 
23
- export const formatBps = (bytes) => formatBytes(bytes) + '/s';
23
+ export const formatBps = (bytes) => {
24
+ const formattedBytes = formatBytes(bytes);
25
+
26
+ if (!formattedBytes) {
27
+ return '';
28
+ }
29
+
30
+ return formattedBytes + '/s';
31
+ };
24
32
 
25
33
  export const formatBytesToGigabyte = (bytes) => {
26
34
  return `${Math.floor(bytes / GIGABYTE)} GB`;
@@ -14,3 +14,7 @@ export const NodesUptimeFilterTitles = {
14
14
 
15
15
  export const isUnavailableNode = (node: INodesPreparedEntity | TSystemStateInfo) =>
16
16
  !node.SystemState || node.SystemState === EFlag.Grey;
17
+
18
+ export interface AdditionalNodesInfo extends Record<string, unknown> {
19
+ getNodeRef?: Function;
20
+ }