Skip to content

Commit

Permalink
fix(orb-ui): #1098 Users can't redo CREATE request after a error
Browse files Browse the repository at this point in the history
  • Loading branch information
joao-mendonca-encora committed Aug 28, 2023
1 parent 57bcce8 commit 9cea9cf
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ kind: collection`;
'Failed to create Agent Policy',
`Error: ${error.status} - ${error.statusText} - ${error.error.error}`,
);
this.isRequesting = false;
},
);
}
Expand Down
4 changes: 4 additions & 0 deletions ui/src/app/pages/fleet/agents/add/agent.add.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { NotificationsService } from 'app/common/services/notifications/notifica
import { AgentKeyComponent } from '../key/agent.key.component';
import { Tags } from 'app/common/interfaces/orb/tag';


@Component({
selector: 'ngx-agent-add-component',
templateUrl: './agent.add.component.html',
Expand Down Expand Up @@ -127,6 +128,9 @@ export class AgentAddComponent {
} else {
this.agentsService.addAgent(payload).subscribe((resp) => {
this.openKeyModal(resp);
},
(error) => {
this.isRequesting = false;
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,9 @@ export class AgentGroupAddComponent
'',
);
this.goBack();
},
(error) => {
this.isRequesting = false;
});
}
}
Expand Down
3 changes: 3 additions & 0 deletions ui/src/app/pages/sinks/add/sink-add.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ export class SinkAddComponent {
this.sinksService.addSink(payload).subscribe(() => {
this.notificationsService.success('Sink successfully created', '');
this.goBack();
},
(error) => {
this.isRequesting = false;
});
}

Expand Down

0 comments on commit 9cea9cf

Please sign in to comment.