breadcrumb: display name or text instead of UUID in the breadcrumb

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2020-02-23 15:49:00 +05:30
parent 7d23c3e487
commit 75413a574e
2 changed files with 10 additions and 2 deletions

View File

@ -26,7 +26,7 @@
{{ $t(item.meta.title) }}
</router-link>
<span v-else-if="$route.params.id">
{{ $route.params.id }}
{{ resource.displayname || resource.displaytext || resource.name || resource.hostname || resource.username || resource.ipaddress || $route.params.id }}
</span>
<span v-else>
{{ $t(item.meta.title) }}
@ -56,6 +56,14 @@ import config from '@/config/settings'
export default {
name: 'Breadcrumb',
props: {
resource: {
type: Object,
default: function () {
return {}
}
}
},
data () {
return {
name: '',

View File

@ -20,7 +20,7 @@
<a-card class="breadcrumb-card">
<a-row>
<a-col :span="14" style="padding-left: 6px">
<breadcrumb>
<breadcrumb :resource="resource">
<a-tooltip placement="bottom" slot="end">
<template slot="title">
{{ "Refresh" }}