Skip to content

Commit

Permalink
Merge pull request #42 from grycap/devel/diana
Browse files Browse the repository at this point in the history
fixing problem with  new function form
  • Loading branch information
dianamariand92 authored Apr 12, 2019
2 parents 9c936fc + 8f98d47 commit 41b4e10
Showing 1 changed file with 22 additions and 12 deletions.
34 changes: 22 additions & 12 deletions vue_app/src/components/forms/FunctionForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -492,9 +492,8 @@
></v-text-field>
</v-flex>
<v-flex xs12 sm2 md2 style="padding-top:10px;">
<select id="classmemory" class="custom-select" >
<option style="display:none" selected></option>
<option value="1">Mi</option>
<select id="classmemory" class="custom-select" >
<option selected value="1">Mi</option>
<option value="2">Gi</option>
</select>
</v-flex>
Expand All @@ -518,9 +517,8 @@
></v-text-field>
</v-flex>
<v-flex xs12 sm2 md2 style="padding-top:10px;">
<select id="classmemory2" class="custom-select" >
<option style="display:none" selected></option>
<option value="1">Mi</option>
<select id="classmemory2" class="custom-select" >
<option selected value="1">Mi</option>
<option value="2">Gi</option>
</select>
</v-flex>
Expand Down Expand Up @@ -682,6 +680,8 @@ export default {
labels:{},
consts: [],
secrets: [],
limits_mem: '',
request_mem: '',
form: {
valid: false,
Expand Down Expand Up @@ -982,14 +982,24 @@ export default {
this.envVarsAll = this.extend (this.envVars, this.envVarsOneData);
}
var value = $("#classmemory option:selected").text();
var value2 = $("#classmemory2 option:selected").text();
console.log(this.envVarsAll)
var limits_mem = this.form.limits_memory + value;
var request_mem= this.form.request_memory + value2;
if (this.form.limits_memory == ""){
this.limits_mem = ''
}else{
this.limits_mem = this.form.limits_memory + value;
}
if (this.form.request_memory == ""){
this.request_mem = ''
}else{
this.request_mem= this.form.request_memory + value2;
}
console.log(limits_mem,request_mem)
// console.log(this.limits_mem,this.request_mem)
var params = {
'url': this.openFaaS.endpoint,
Expand All @@ -1004,12 +1014,12 @@ export default {
'labels': this.labels,
'limits':
{'cpu': this.form.limits_cpu,
'memory': limits_mem}
'memory': this.limits_mem}
,
'registryAuth': this.form.regAuth,
'requests':
{'cpu': this.form.request_cpu,
'memory': request_mem}
'memory': this.request_mem}
,
'secrets': this.secrets }
Expand Down

0 comments on commit 41b4e10

Please sign in to comment.