File tree Expand file tree Collapse file tree 4 files changed +14
-4
lines changed
components/CriticalActionDialog Expand file tree Collapse file tree 4 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 1515 & __body {
1616 display : flex ;
1717 align-items : center ;
18-
19- padding : 16px 16px 0 ;
2018 }
2119}
Original file line number Diff line number Diff line change @@ -58,7 +58,12 @@ export function PDiskPage() {
5858
5959 const handleRestart = async ( ) => {
6060 if ( valueIsDefined ( nodeId ) && valueIsDefined ( pDiskId ) ) {
61- return window . api . restartPDisk ( nodeId , pDiskId ) ;
61+ return window . api . restartPDisk ( nodeId , pDiskId ) . then ( ( res ) => {
62+ if ( res ?. result === false ) {
63+ const err = { statusText : res . error } ;
64+ throw err ;
65+ }
66+ } ) ;
6267 }
6368
6469 return undefined ;
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import type {
2424 Schemas ,
2525} from '../types/api/query' ;
2626import type { JsonRenderRequestParams , JsonRenderResponse } from '../types/api/render' ;
27+ import type { RestartPDiskResponse } from '../types/api/restartPDisk' ;
2728import type { TEvDescribeSchemeResult } from '../types/api/schema' ;
2829import type { TStorageInfo } from '../types/api/storage' ;
2930import type { TEvSystemStateResponse } from '../types/api/systemState' ;
@@ -509,7 +510,7 @@ export class YdbEmbeddedAPI extends AxiosWrapper {
509510 host : this . getPath ( '' ) ,
510511 } ) ;
511512
512- return this . post (
513+ return this . post < RestartPDiskResponse > (
513514 pDiskPath ,
514515 'restartPDisk=' ,
515516 { } ,
Original file line number Diff line number Diff line change 1+ export interface RestartPDiskResponse {
2+ // true if successful, false if not
3+ result ?: boolean ;
4+ // Error message, example: "GroupId# 2181038081 ExpectedStatus# DISINTEGRATED"
5+ error ?: string ;
6+ }
You can’t perform that action at this time.
0 commit comments