Add a link to service on router detail view
This commit is contained in:
parent
63bb770b9c
commit
401c171bbd
1 changed files with 15 additions and 1 deletions
|
@ -62,7 +62,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="routerByName.item.service" class="col-12 col-md-3 q-mb-lg path-block">
|
<div v-if="routerByName.item.service"
|
||||||
|
class="service col-12 col-md-3 q-mb-lg path-block"
|
||||||
|
@click="$router.push({ path: `/${protocol}/services/${getServiceId(routerByName.item)}`})">
|
||||||
<div class="row no-wrap items-center q-mb-lg app-title">
|
<div class="row no-wrap items-center q-mb-lg app-title">
|
||||||
<q-icon name="eva-flash"></q-icon>
|
<q-icon name="eva-flash"></q-icon>
|
||||||
<div class="app-title-label">Service</div>
|
<div class="app-title-label">Service</div>
|
||||||
|
@ -270,6 +272,14 @@ export default {
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.log('Error -> routers/byName', error)
|
console.log('Error -> routers/byName', error)
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
getServiceId (data) {
|
||||||
|
const words = data.service.split('@')
|
||||||
|
if (words.length === 2) {
|
||||||
|
return data.service
|
||||||
|
}
|
||||||
|
|
||||||
|
return `${data.service}@${data.provider}`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
|
@ -297,6 +307,10 @@ export default {
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
color: #b2b2b2;
|
color: #b2b2b2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.service {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in a new issue