|
@ -223,6 +223,43 @@ |
|
|
</b-row> |
|
|
</b-row> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- --------------------------------------------------------- --> |
|
|
|
|
|
<!-- -------- lab url ----------------------------------- --> |
|
|
|
|
|
<!-- --------------------------------------------------------- --> |
|
|
|
|
|
<b-row> |
|
|
|
|
|
<b-col cols="12"> |
|
|
|
|
|
<ValidationProvider |
|
|
|
|
|
ref="hybrid_url" |
|
|
|
|
|
name="Url" |
|
|
|
|
|
rules="required|alpha_url" |
|
|
|
|
|
v-slot="{ errors, ariaMsg, ariaInput, valid, invalid }" |
|
|
|
|
|
> |
|
|
|
|
|
<div class="input-group input-group-sm sm-3"> |
|
|
|
|
|
<input type="text" |
|
|
|
|
|
class="form-control" |
|
|
|
|
|
v-bind:class="{'is-valid': isDeployValid.url == 1, 'is-invalid': isDeployValid.url == 2}" |
|
|
|
|
|
name="Url" |
|
|
|
|
|
aria-label="Small" |
|
|
|
|
|
aria-describedby="inputGroup-sizing-sm" |
|
|
|
|
|
placeholder="link to README file (see info button for more)" |
|
|
|
|
|
v-model="deploy.url" |
|
|
|
|
|
v-on:keyup="isValid('url')" |
|
|
|
|
|
> |
|
|
|
|
|
<div class="input-group-append"> |
|
|
|
|
|
<button |
|
|
|
|
|
class="ti-info btn btn-outline-secondary" |
|
|
|
|
|
round |
|
|
|
|
|
type="button" |
|
|
|
|
|
@click="showInfo('url')" |
|
|
|
|
|
> |
|
|
|
|
|
</button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<span class="hybrid-field-error">{{ errors[0] }}</span> |
|
|
|
|
|
</ValidationProvider> |
|
|
|
|
|
</b-col> |
|
|
|
|
|
</b-row> |
|
|
|
|
|
|
|
|
<!-- --------------------------------------------------------- --> |
|
|
<!-- --------------------------------------------------------- --> |
|
|
<!-- -------- lab startdate ----------------------------------- --> |
|
|
<!-- -------- lab startdate ----------------------------------- --> |
|
|
<!-- --------------------------------------------------------- --> |
|
|
<!-- --------------------------------------------------------- --> |
|
@ -402,6 +439,15 @@ extend('alpha_num_memory', value => { |
|
|
return 'The {_field_} field may contain numbers e.g 500' |
|
|
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. |
|
|
// Override the default message. |
|
|
extend('required', { |
|
|
extend('required', { |
|
|
...required, |
|
|
...required, |
|
@ -434,6 +480,7 @@ export default { |
|
|
"stackname":3, |
|
|
"stackname":3, |
|
|
"network":3, |
|
|
"network":3, |
|
|
//"networkport":3, |
|
|
//"networkport":3, |
|
|
|
|
|
"url":3, |
|
|
"cpu":3, |
|
|
"cpu":3, |
|
|
"memory":3 |
|
|
"memory":3 |
|
|
}, |
|
|
}, |
|
@ -541,6 +588,16 @@ Services running inside any of this networks containers have access (not limited |
|
|
<br> |
|
|
<br> |
|
|
The field may contain alphabetic characters and numbers |
|
|
The field may contain alphabetic characters and numbers |
|
|
|
|
|
|
|
|
|
|
|
` |
|
|
|
|
|
}else if(action == 'url'){ |
|
|
|
|
|
var info=`<h5><b>Git Repo url </b></h5> |
|
|
|
|
|
<br> The location of the file describing your service. (most comonly README)</br> |
|
|
|
|
|
<br> |
|
|
|
|
|
</br> |
|
|
|
|
|
</h5> |
|
|
|
|
|
<br> |
|
|
|
|
|
<br> |
|
|
|
|
|
The field may contain any valid url BUT it must be under https://git.swarmlab.io |
|
|
` |
|
|
` |
|
|
}else if(action == 'networkport'){ |
|
|
}else if(action == 'networkport'){ |
|
|
var info=`<h5><b>Network Port </b></h5> |
|
|
var info=`<h5><b>Network Port </b></h5> |
|
@ -645,6 +702,13 @@ This name is only for your own use. The system completely disregards it! |
|
|
}else{ |
|
|
}else{ |
|
|
this.isDeployValid.network = 2 |
|
|
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'){ |
|
|
}else if(f == 'networkport'){ |
|
|
var field = await this.$refs.hybrid_networkport.validate(); |
|
|
var field = await this.$refs.hybrid_networkport.validate(); |
|
|
console.log('port '+JSON.stringify(field)) |
|
|
console.log('port '+JSON.stringify(field)) |
|
|