diff --git a/src/components/manageservices/deploy-bootstrap.vue b/src/components/manageservices/deploy-bootstrap.vue index 10654f2..8c8f1ba 100644 --- a/src/components/manageservices/deploy-bootstrap.vue +++ b/src/components/manageservices/deploy-bootstrap.vue @@ -223,6 +223,43 @@ + + + + + + +
+ +
+ +
+
+ {{ errors[0] }} +
+
+
+ @@ -402,6 +439,15 @@ extend('alpha_num_memory', value => { return 'The {_field_} field may contain numbers e.g 500' }); +extend('alpha_url', value => { + var regex = new RegExp(/https?:\/\/(git\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/,'i'); + //var regex = new RegExp(/^[0-9]+$/, 'i'); + if(regex.test(value)){ + return true; + } + return 'The {_field_} field may contain url' +}); + // Override the default message. extend('required', { ...required, @@ -434,6 +480,7 @@ export default { "stackname":3, "network":3, //"networkport":3, + "url":3, "cpu":3, "memory":3 }, @@ -541,6 +588,16 @@ Services running inside any of this networks containers have access (not limited
The field may contain alphabetic characters and numbers +` + }else if(action == 'url'){ + var info=`
Git Repo url
+
The location of the file describing your service. (most comonly README)
+
+
+ +
+
+ The field may contain any valid url BUT it must be under https://git.swarmlab.io ` }else if(action == 'networkport'){ var info=`
Network Port
@@ -645,6 +702,13 @@ This name is only for your own use. The system completely disregards it! }else{ this.isDeployValid.network = 2 } + }else if(f == 'url'){ + var field = await this.$refs.hybrid_url.validate(); + if(field.valid == true){ + this.isDeployValid.url = 1 + }else{ + this.isDeployValid.url = 2 + } }else if(f == 'networkport'){ var field = await this.$refs.hybrid_networkport.validate(); console.log('port '+JSON.stringify(field)) diff --git a/src/components/manageservices/join-service.vue b/src/components/manageservices/join-service.vue index 68032b7..ff5190c 100644 --- a/src/components/manageservices/join-service.vue +++ b/src/components/manageservices/join-service.vue @@ -64,8 +64,8 @@ class="btn btn-outline-info" round type="button" + v-if="hybridshowdata.bootstrapstackname" @click="onActionHybrid('service-info')" - v-if="hybridshowdata.bootstrapnameid && hybridshowdata.status" > Service Info @@ -539,14 +539,28 @@ export default { } }else if(action == 'service-info' ){ console.log(JSON.stringify(action)) - /* - var log = await store.dispatch("pipelineLLO/hybrid_servicerm",{ - token:this.token, - bootstrapstackid:this.hybridshowdata.bootstrapstackid, - bootstrapnameid:this.hybridshowdata.bootstrapnameid - }) - Vue.nextTick( () => this.$refs.vuetable.refresh()) - */ + console.log('CONFIG '+JSON.stringify(this.hybridshowdata)) + var url = this.hybridshowdata.bootstrapurl + var info=`
You will be redirected to the README page of the repository (OUTSIDE Swarmlab-Hybrid)
+click here to continue +
+
+` + this.$swal({ + type: 'Info', + title: 'README', + icon:'info', + html: info, + showCloseButton: true, + showLoaderOnConfirm: false, + allowOutsideClick: false, + cancelButtonText: 'No, cancel!', + showCancelButton: false, + showLoaderOnConfirm: false, + reverseButtons: true, + focusCancel: true, + confirmButtonText: 'Ok!' + }) } },