Browse Source

community menou 1 public/private

master
zeus 2 years ago
parent
commit
e4164c7d66
  1. 4
      src/components/mynetwork/AdhocView.vue
  2. 30
      src/components/mynetwork/availablemicroservicescustom.vue
  3. 35
      src/components/mynetwork/buildermyservices.vue
  4. 31
      src/components/mynetwork/builderservices.vue
  5. 90
      src/components/mynetwork/customservices.vue
  6. 2
      src/components/mynetwork/mytable.vue
  7. 1
      src/store/modules/create_pipelineLLO.js

4
src/components/mynetwork/AdhocView.vue

@ -458,7 +458,7 @@ export default {
})
// from runLLO
this.$root.$on('hybrid_log_in', (log) => {
console.log(log)
//console.log(log)
//this.code += log.data
//this.code += "\n"
//console.log(" form socket log "+JSON.stringify(this.code))
@ -495,7 +495,7 @@ export default {
})
// from microservices not view icon
this.$root.$on('hybrid_console_not_view', (v) => {
console.log(v)
//console.log(v)
if(v){
this.vieconsoleicon = true
}else if (!v){

30
src/components/mynetwork/availablemicroservicescustom.vue

@ -456,7 +456,35 @@ export default {
titleClass: 'center aligned',
dataClass: 'left aligned w-25 text-muted',
visible:true,
width: '35%'
width: '25%'
},
{
name: 'visibility',
title: '<span class="orange"></span>Pub',
sortField: 'gitrepoCloneUrl',
dataClass: 'center aligned w-10 text-center',
visible:true,
width: '10%',
callback: function(value) {
//console.log('---- '+ value)
if (value == 'Public') {
var v = ` <span
class="ti-check text-info text-center"
round
>
</span>
`
return v
}else{
var v = ` <span
class="ti-lock text-info"
round
>
</span>
`
return v
}
}
},
{
name: 'gitrepo',

35
src/components/mynetwork/buildermyservices.vue

@ -28,6 +28,13 @@
<div class="input-group input-group-sm sm-3">
<button
class="btn btn-outline-success btn-sm"
round
type="button"
@click="setFilter">
Refresh Table</button>
<input type="text"
class="form-control"
aria-label="Small" aria-describedby="inputGroup-sizing-sm"
@ -222,6 +229,34 @@ export default {
visible:true,
width: '30%'
},
{
name: 'visibility',
title: '<span class="orange"></span>Pub',
sortField: 'gitrepoCloneUrl',
dataClass: 'center aligned w-10 text-center',
visible:true,
width: '10%',
callback: function(value) {
//console.log('---- '+ value)
if (value == 'Public') {
var v = ` <span
class="ti-check text-info text-center"
round
>
</span>
`
return v
}else{
var v = ` <span
class="ti-lock text-info"
round
>
</span>
`
return v
}
}
},
{
name: '__slot:actions', // <----
title: 'Actions',

31
src/components/mynetwork/builderservices.vue

@ -30,6 +30,12 @@
</div>
<div class="input-group input-group-sm sm-3">
<button
class="btn btn-outline-success btn-sm"
round
type="button"
@click="setFilter">
Refresh Table</button>
<input type="text"
class="form-control"
@ -82,6 +88,7 @@
wrapper-class="vuetable-wrapper"
loading-class="loading"
detail-row-id="id"
@vuetable:row-clicked="rowClicked"
@vuetable:pagination-data="onPaginationData"
@vuetable:load-success="loadsuccess"
@vuetable:load-error="onLoadError"
@ -92,7 +99,7 @@
<div class="d-flex justify-content-center">
<button
class="ti-cloud-up btn btn-sm"
title="Upload MicroService"
title="Select Base MicroService"
round
@click="onAction('upload-item', props.rowData, props.rowData._id)">
</button>
@ -229,6 +236,7 @@ export default {
title: 'Actions',
titleClass: 'col text-center',
dataClass: 'center aligned',
visible:false,
width: '10%'
},
],
@ -337,15 +345,15 @@ export default {
}
}else if(action == 'upload-item' ){
var log = await store.dispatch("pipelineLLO/getmyservices",{
token:this.token,
service:data.swarmlabname
})
// var log = await store.dispatch("pipelineLLO/getmyservices",{
// token:this.token,
// service:data.swarmlabname
// })
//console.log(log)
this.swarmlab=data
var service = {
data: data,
log: log
data: data
// log: log
}
this.$root.$emit('hybrid_build_micro_service', service)
}
@ -361,11 +369,15 @@ export default {
return this.playbookInfo=value
},
rowClicked(row, event) {
console.log(row)
this.onAction('upload-item', row, row._id)
/*
return {
html: true,
title: () => { return 'Hello <b>Popover:</b> ' + (++this.counter) },
content: () => { return 'The date is:<br><em>' + new Date() + '</em>' }
}
*/
},
loadsuccess(response) {
var data = response.data.data
@ -400,6 +412,11 @@ export default {
}
#idvuetablekeygmybuildservice1 tr td {
color: #2185d0;
cursor: pointer;
}
.flex-fixed-width-item {
flex: 0 0 100px;
}

90
src/components/mynetwork/customservices.vue

@ -9,7 +9,7 @@
<b-container fluid class="bv-example-row">
<div class="row text-center">
<div class="col-12">
<b>View and <span class="text-info">Manage your builds</span></b>
<b>View and <span class="text-info">Manage your build</span></b>
</div>
</div>
@ -125,6 +125,9 @@
round
@click="onAction('form_version')">
</button>
</div>
</div>
</div>
@ -133,7 +136,7 @@
</ValidationProvider>
<ValidationProvider
ref="hybrid_stackversion"
ref="hybrid_stackgitrepo"
name="myGitrepo"
rules="required|alpha_num_url"
v-slot="{ errors, ariaMsg, ariaInput, valid, invalid }"
@ -171,6 +174,56 @@
<span class="hybrid-field-error">{{ errors[0] }}</span>
</ValidationProvider>
<div class="row">
<div class="col-sm-12 sm-12">
<div class="input-group"
v-if="form_visibility == 'Public'"
>
<button
class="btn btn-success btn-sm"
type="radio"
name="options"
v-model="form_visibility"
>
<span class="text-light">Public</span>
</button>
<button
class="btn btn-outline-secondary btn-sm"
type="radio"
name="options"
v-model="form_visibility"
@click="onSwitch('Private')"
>
<span class="text-muted">Private</span>
</button>
</div>
<div class="input-group"
v-if="form_visibility == 'Private'"
>
<button
class="btn btn-outline-secondary btn-sm"
type="radio"
name="options"
v-model="form_visibility"
@click="onSwitch('Public')"
>
<span class="text-muted">Public</span>
</button>
<button
class="btn btn-success btn-sm"
type="radio"
name="options"
v-model="form_visibility"
>
<span class="text-light">Private</span>
</button>
</div>
</div>
</div>
<div class="row"
<b-col class="text-center" cols="12" sm="12" md="12">
@ -506,6 +559,7 @@ export default {
'form_port3':'',
'form_name3':'',
'form_gitrepo':'',
'form_visibility':'Public',
customservice: {
'myservicename':'',
'os':'',
@ -549,7 +603,7 @@ export default {
//console.log('false')
})
this.$root.$on('hybrid_build_micro_service', (service) => {
//console.log(service);
console.log(service)
this.setserviceform2null()
this.menou = true
this.myservicename = {}
@ -559,7 +613,8 @@ export default {
this.menouselect = false
this.customservice.microservice = service.data.swarmlabname
this.form_baseservice = service.data.swarmlabname
this.form_visibility = 'Public'
/*
if( service.log.hasOwnProperty('data')){
if( service.log.data.hasOwnProperty('data')){
if(service.log.data.data){
@ -574,6 +629,7 @@ export default {
//console.log(cc)
this.customservice.myservicename = service.log.data.data[cc].service
this.customservice.baseservice = service.log.data.data[cc].baseservice
this.customservice.visibility = 'Public'
this.customservice.sh = service.log.data.data[cc].sh
this.customservice.os = service.log.data.data[cc].packages
this.customservice.readme = service.log.data.data[cc].readme
@ -611,10 +667,12 @@ export default {
var vtmp1 = {"value":this.selected,"text":"Please select an option"}
Vue.set(this.options, this.selected, vtmp1)
//console.log('options '+ JSON.stringify(this.options))
*/
})
this.$root.$on('hybrid_build_micro_myservice', (service) => {
console.log(service)
this.menou = true
this.myservicename = {}
this.customserviceall = []
@ -627,6 +685,7 @@ export default {
if(service.log.data.data){
this.customservice.myservicename = service.log.data.data.service
this.customservice.baseservice = service.log.data.data.baseservice
this.customservice.visibility = service.log.data.data.visibility
this.customservice.sh = service.log.data.data.sh
this.customservice.os = service.log.data.data.packages
this.customservice.readme = service.log.data.data.readme
@ -674,6 +733,10 @@ export default {
},
methods: {
async onSwitch(value) {
console.log(value)
this.form_visibility = value
},
async onAction(value) {
//console.log(value)
var infotxt = ''
@ -764,6 +827,7 @@ export default {
service: this.form_myservicename,
readme: this.form_readme,
baseservice: this.form_baseservice,
visibility: this.form_visibility,
sh: this.form_sh,
packages: this.form_os,
gitrepo: this.form_gitrepo,
@ -850,6 +914,7 @@ export default {
setserviceform(data) {
this.form_myservicename = data.myservicename
this.form_baseservice = data.baseservice
this.form_visibility = data.visibility
this.form_sh = data.sh
this.form_os = data.os
this.form_readme = data.readme
@ -900,7 +965,8 @@ export default {
this.customservice.myservicename = this.customserviceall[cc].service
this.customservice.baseservice = this.customserviceall[cc].baseservice
this.customservice.baseservice = this.customserviceall[cc].baseservice
this.customservice.visibility = this.customserviceall[cc].visibility
this.customservice.sh = this.customserviceall[cc].sh
this.customservice.os = this.customserviceall[cc].packages
this.customservice.readme = this.customserviceall[cc].readme
@ -942,7 +1008,7 @@ export default {
}
}
else if(f == 'gitrepo'){
var field = await this.$refs.hybrid_stackversion.validate();
var field = await this.$refs.hybrid_stackgitrepo.validate();
if(field.valid == true){
this.isDeployValid.gitrepo = 1
}else{
@ -967,6 +1033,18 @@ export default {
<style lang="scss">
.switchsecondary {
background: var(--secondary);
color: #fff;
}
.flex-fixed-width-item {
flex: 0 0 100px;

2
src/components/mynetwork/mytable.vue

@ -616,7 +616,7 @@ export default {
//console.log(logdatacustom.data);
if(logdatacustom.data && logdatacustom.data.data){
this.hybridshowdata_user = JSON.parse(logdatacustom.data.data)
console.log(this.hybridshowdata_user);
//console.log(this.hybridshowdata_user);
var urlgeniGUIEDITOR = this.hybridshowdata.Names.split('_');
this.webinterfacegenericedit = true
var urlgeniGUI = this.hybridshowdata_user.servicedata.baseservice

1
src/store/modules/create_pipelineLLO.js

@ -254,6 +254,7 @@ export default {
service: value.service,
readme: value.readme,
baseservice: value.baseservice,
visibility: value.visibility,
sh: value.sh,
packages: value.packages,
gitrepo: value.gitrepo,

Loading…
Cancel
Save