'CanaryIngress|Doing so will set a deployment change in progress. This temporarily blocks any further configuration until the deployment is finished.',
),
},
modal:{
modalId:CANARY_UPDATE_MODAL,
actionPrimary:{
text:s__('CanaryIngress|Change ratio'),
attributes:[{variant:'info'}],
},
actionCancel:{text:__('Cancel')},
static:true,
},
data(){
return{error:'',dismissed:true};
},
computed:{
stableWeight(){
return(100-this.weight).toString();
},
canaryWeight(){
returnthis.weight.toString();
},
hasError(){
returnBoolean(this.error);
},
environmentName(){
returnthis.environment?.name??'';
},
},
methods:{
submitCanaryChange(){
returnthis.$apollo
.mutate({
mutation:updateCanaryIngress,
variables:{
input:{
id:this.environment.global_id,
weight:this.weight,
},
},
})
.then(
({
data:{
environmentsCanaryIngressUpdate:{
errors:[error],
},
},
})=>{
this.error=error;
},
)
.catch(()=>{
this.error=__('Something went wrong. Please try again later');