1414 </p >
1515 </v-col >
1616 </v-row >
17+ <!-- not sure if i will split into tabs or expandable panels
18+ <template>
19+ <v-tabs>
20+ <v-tab>Appliccation</v-tab>
21+ <v-tab>Deployment</v-tab>
22+ <v-tab>Resources</v-tab>
23+ <v-tab>Cronjobs</v-tab>
24+ <v-tab>Env Vars</v-tab>
25+ <v-tab>Addons</v-tab>
26+ </v-tabs>
27+ </template>
28+ -->
1729 <v-row >
1830 <v-col
1931 cols =" 12"
3345
3446 <v-row >
3547 <v-col
36- cols =" 12 "
37- md =" 6 "
48+ cols =" 9 "
49+ md =" 5 "
3850 >
3951 <v-text-field
4052 v-model =" domain"
4456 required
4557 ></v-text-field >
4658 </v-col >
59+ <v-col
60+ cols =" 3"
61+ md =" 1"
62+ pullright
63+ >
64+ <v-switch
65+ v-model =" ssl"
66+ :label =" `SSL`"
67+ ></v-switch >
68+ </v-col >
4769 </v-row >
4870
4971 <v-divider class =" ma-5" ></v-divider >
5072 <!-- DEPLOYMENT-->
5173 <h4 class =" text-uppercase" >Deployment</h4 >
74+ <v-row >
75+ <v-col
76+ cols =" 12"
77+ md =" 6"
78+ >
79+ <v-text-field
80+ v-model =" containerPort"
81+ label =" Container Port"
82+ ></v-text-field >
83+ </v-col >
84+ </v-row >
5285
5386 <v-row >
5487 <v-col
6497 </v-col >
6598 </v-row >
6699
100+ <!-- DEPLOYMENT STRATEGY GIT -->
67101 <v-row
68102 v-if =" appDeploymentStrategy == 'git'" >
69103 <v-col
107141 </v-col >
108142 </v-row >
109143
144+ <v-divider class =" ma-5" ></v-divider >
145+ <!-- DEPLOYMENT BUILDPACKS -->
146+ <h4 class =" text-uppercase" >Buildpack</h4 >
147+
148+ <v-row
149+ v-if =" appDeploymentStrategy == 'git'" >
150+ <v-col
151+ cols =" 12"
152+ md =" 6"
153+ >
154+ <v-text-field
155+ v-model =" buildpack.build.command"
156+ label =" Build Command"
157+ ></v-text-field >
158+ </v-col >
159+ </v-row >
160+ <v-row
161+ v-if =" appDeploymentStrategy == 'git'" >
162+ <v-col
163+ cols =" 12"
164+ md =" 6"
165+ >
166+ <v-text-field
167+ v-model =" buildpack.run.command"
168+ label =" Run Command"
169+ ></v-text-field >
170+ </v-col >
171+ </v-row >
172+
173+ <!-- DEPLOYMENT STRATEGY CONTAINER -->
110174 <v-row
111175 v-if =" appDeploymentStrategy == 'docker'" >
112176 <v-col
213277 <v-divider class =" ma-5" ></v-divider >
214278 <!-- PROVISIONING -->
215279 <h4 class =" text-uppercase" >Resources</h4 >
216- <v-row >
217- <v-col
218- cols =" 12"
219- md =" 6"
220- >
221- <v-text-field
222- v-model =" containerPort"
223- label =" Container Port"
224- ></v-text-field >
225- </v-col >
226- </v-row >
227280
228281 <v-row >
229282 <v-col
@@ -496,7 +549,14 @@ export default {
496549 },
497550 data : () => ({
498551 valid: false ,
499- buildpack: undefined ,
552+ buildpack: {
553+ run: {
554+ command: ' ' ,
555+ },
556+ build: {
557+ command: ' ' ,
558+ },
559+ },
500560 deploymentstrategyGit: true ,
501561 pipelineData: {
502562 git: {
@@ -525,6 +585,7 @@ export default {
525585 },
526586 autodeploy: true ,
527587 domain: ' ' ,
588+ ssl: false ,
528589 envvars: [
529590 // { name: '', value: '' },
530591 ],
@@ -599,9 +660,9 @@ export default {
599660 }
600661 },
601662 mounted () {
602- this .loadApp ();
603- this .loadPodsizeList ();
604663 this .loadPipeline ();
664+ this .loadPodsizeList ();
665+ this .loadApp (); // this may lead into a race condition with the buildpacks loaded in loadPipeline
605666 },
606667 components: {
607668 Addons,
@@ -700,11 +761,21 @@ export default {
700761 axios .get (` /api/pipelines/${ this .pipeline } /${ this .phase } /${ this .app } ` ).then (response => {
701762 this .resourceVersion = response .data .metadata .resourceVersion ;
702763
764+ if (response .data .spec .ingress .tls .length > 0 ) {
765+ this .ssl = true ;
766+ } else {
767+ this .ssl = false ;
768+ }
703769
704770 this .deploymentstrategyGit = response .data .spec .deploymentstrategy == ' git' ;
705771 this .appname = response .data .spec .name ;
706- this .buildpack = response .data .spec .buildpack ;
772+ this .buildpack = {
773+ run: response .data .spec .image .run ,
774+ build: response .data .spec .image .build ,
775+ fetch: response .data .spec .image .fetch ,
776+ }
707777 this .gitrepo = response .data .spec .gitrepo ;
778+ this .domain = response .data .spec .domain ;
708779 this .branch = response .data .spec .branch ;
709780 this .imageTag = response .data .spec .imageTag ;
710781 this .docker .image = response .data .spec .image .repository || ' ' ;
@@ -742,6 +813,7 @@ export default {
742813 },
743814 autodeploy: this .autodeploy ,
744815 domain: this .domain ,
816+ ssl: this .ssl ,
745817 envvars: this .envvars ,
746818 podsize: this .podsize ,
747819 autoscale: this .autoscale ,
@@ -774,9 +846,19 @@ export default {
774846 });
775847 },
776848 createApp () {
849+ if (
850+ (this .buildpack .build .command !== this .pipelineData .buildpack .build .command ) ||
851+ (this .buildpack .run .command !== this .pipelineData .buildpack .run .command )
852+ ){
853+ this .buildpack .name = " custom" ;
854+ }
855+
856+ console .log (this .buildpack );
857+ console .log (this .pipelineData .buildpack );
858+
777859 axios .post (` /api/apps` , {
778860 pipeline: this .pipeline ,
779- buildpack: this .buildpack . name ,
861+ buildpack: this .buildpack ,
780862 phase: this .phase ,
781863 appname: this .appname .toLowerCase (),
782864 gitrepo: this .pipelineData .git .repository ,
@@ -792,6 +874,7 @@ export default {
792874 },
793875 autodeploy: this .autodeploy ,
794876 domain: this .domain .toLowerCase (),
877+ ssl: this .ssl ,
795878 envvars: this .envvars ,
796879 podsize: this .podsize ,
797880 autoscale: this .autoscale ,
0 commit comments