This repository was archived by the owner on Jan 20, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -153,29 +153,22 @@ export default {
153153 handleSubmit () {
154154 this .loading = true
155155
156- const apiName = this .resource .state === ' Stopped' ? ' changeServiceForVirtualMachine' : ' scaleVirtualMachine'
157156 if (' cpuspeed' in this .selectedOffering && this .selectedOffering .iscustomized ) {
158157 delete this .params [this .cpuSpeedKey ]
159158 }
160159
161- api (apiName, this .params ).then (response => {
162- if (apiName === ' scaleVirtualMachine' ) {
163- const jobId = response .scalevirtualmachineresponse .jobid
164- if (jobId) {
165- this .$pollJob ({
166- jobId,
167- successMethod : result => {
168- this .$notification .success ({
169- message: this .$t (' message.success.change.offering' )
170- })
171- },
172- loadingMessage: this .$t (' message.scale.processing' ),
173- catchMessage: this .$t (' error.fetching.async.job.result' )
174- })
175- }
176- } else {
177- this .$notification .success ({
178- message: this .$t (' message.success.change.offering' )
160+ api (' scaleVirtualMachine' , this .params ).then (response => {
161+ const jobId = response .scalevirtualmachineresponse .jobid
162+ if (jobId) {
163+ this .$pollJob ({
164+ jobId,
165+ successMethod : result => {
166+ this .$notification .success ({
167+ message: this .$t (' message.success.change.offering' )
168+ })
169+ },
170+ loadingMessage: this .$t (' message.scale.processing' ),
171+ catchMessage: this .$t (' error.fetching.async.job.result' )
179172 })
180173 }
181174 this .$parent .$parent .close ()
You can’t perform that action at this time.
0 commit comments