@@ -309,23 +309,20 @@ private async Task ExecuteResourceCommandAsync(ResourceViewModel resource, Comma
309309 }
310310 }
311311
312- //var resourceName = resource.IsExecutable(allowSubtypes: true)
313- // ? resource.DisplayName
314- // : resource.Name;
315- var resourceName = resource . Name ;
312+ var response = await DashboardClient . ExecuteResourceCommandAsync ( resource . Name , resource . ResourceType , command , CancellationToken . None ) ;
316313
317- var response = await DashboardClient . ExecuteResourceCommandAsync ( resourceName , resource . ResourceType , command , CancellationToken . None ) ;
314+ var messageResourceName = GetResourceName ( resource ) ;
318315
319316 if ( response . Kind == ResourceCommandResponseKind . Succeeded )
320317 {
321- ToastService . ShowSuccess ( string . Format ( CultureInfo . InvariantCulture , Loc [ nameof ( Dashboard . Resources . Resources . ResourceCommandSuccess ) ] , command . DisplayName ) ) ;
318+ ToastService . ShowSuccess ( string . Format ( CultureInfo . InvariantCulture , Loc [ nameof ( Dashboard . Resources . Resources . ResourceCommandSuccess ) ] , command . DisplayName + " " + messageResourceName ) ) ;
322319 }
323320 else
324321 {
325322 ToastService . ShowCommunicationToast ( new ToastParameters < CommunicationToastContent > ( )
326323 {
327324 Intent = ToastIntent . Error ,
328- Title = string . Format ( CultureInfo . InvariantCulture , Loc [ nameof ( Dashboard . Resources . Resources . ResourceCommandFailed ) ] , command . DisplayName ) ,
325+ Title = string . Format ( CultureInfo . InvariantCulture , Loc [ nameof ( Dashboard . Resources . Resources . ResourceCommandFailed ) ] , command . DisplayName + " " + messageResourceName ) ,
329326 PrimaryAction = Loc [ nameof ( Dashboard . Resources . Resources . ResourceCommandToastViewLogs ) ] ,
330327 OnPrimaryAction = EventCallback . Factory . Create < ToastResult > ( this , ( ) => NavigationManager . NavigateTo ( DashboardUrls . ConsoleLogsUrl ( resource : resource . Name ) ) ) ,
331328 Content = new CommunicationToastContent ( )
0 commit comments