Make MAC Address lookup more generic
This commit is contained in:
parent
f3de43c8be
commit
40b8c62346
@ -2,8 +2,8 @@
|
|||||||
<span class="text-content">
|
<span class="text-content">
|
||||||
<div class="name">{{ name }}</div>
|
<div class="name">{{ name }}</div>
|
||||||
<div class="hostname">{{ asset.name }}</div>
|
<div class="hostname">{{ asset.name }}</div>
|
||||||
<div class="mac">{{ mac }}</div>
|
<div class="mac">{{ getCustom('MAC Address') }}</div>
|
||||||
<div class="mac">{{ mac2 }}</div>
|
<div class="mac">{{ getCustom('MAC Address 2') }}</div>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -21,11 +21,8 @@ export default class ComputersLabelText extends Vue {
|
|||||||
return numberToWords(this.asset.name.match(/[0-9]+$/)[0]).toUpperCase();
|
return numberToWords(this.asset.name.match(/[0-9]+$/)[0]).toUpperCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
get mac() {
|
getCustom(field) {
|
||||||
return this.asset.custom_fields['MAC Address']?.value;
|
return this.asset.custom_fields[field]?.value;
|
||||||
}
|
|
||||||
get mac2() {
|
|
||||||
return this.asset.custom_fields['MAC Address 2']?.value;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
Reference in New Issue
Block a user