web: expressing success (#7830)
* web: expressing success Ever see an idiom that just, I dunno, *annoyed* you? Automated tools for the win. * web: repetition, repetition, repetition! [throws chair] * web: giving the de-duplication treatment to policy mappings. * Created a BaseStageForm with success message and canonical primary key type for for Providers, Sources, and Stages.
This commit is contained in:
@ -79,11 +79,9 @@ export class OutpostForm extends ModelForm<Outpost, string> {
|
||||
}
|
||||
|
||||
getSuccessMessage(): string {
|
||||
if (this.instance) {
|
||||
return msg("Successfully updated outpost.");
|
||||
} else {
|
||||
return msg("Successfully created outpost.");
|
||||
}
|
||||
return this.instance
|
||||
? msg("Successfully updated outpost.")
|
||||
: msg("Successfully created outpost.");
|
||||
}
|
||||
|
||||
async send(data: Outpost): Promise<Outpost> {
|
||||
|
||||
@ -21,11 +21,9 @@ export class ServiceConnectionDockerForm extends ModelForm<DockerServiceConnecti
|
||||
}
|
||||
|
||||
getSuccessMessage(): string {
|
||||
if (this.instance) {
|
||||
return msg("Successfully updated integration.");
|
||||
} else {
|
||||
return msg("Successfully created integration.");
|
||||
}
|
||||
return this.instance
|
||||
? msg("Successfully updated integration.")
|
||||
: msg("Successfully created integration.");
|
||||
}
|
||||
|
||||
async send(data: DockerServiceConnection): Promise<DockerServiceConnection> {
|
||||
|
||||
@ -25,11 +25,9 @@ export class ServiceConnectionKubernetesForm extends ModelForm<
|
||||
}
|
||||
|
||||
getSuccessMessage(): string {
|
||||
if (this.instance) {
|
||||
return msg("Successfully updated integration.");
|
||||
} else {
|
||||
return msg("Successfully created integration.");
|
||||
}
|
||||
return this.instance
|
||||
? msg("Successfully updated integration.")
|
||||
: msg("Successfully created integration.");
|
||||
}
|
||||
|
||||
async send(data: KubernetesServiceConnection): Promise<KubernetesServiceConnection> {
|
||||
|
||||
Reference in New Issue
Block a user