mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-09-23 08:00:55 +00:00
style: Adjust the display of license binding information (#8616)
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
<div v-if="row.status && row.status !== 'Free'">
|
||||
<div>
|
||||
{{ $t('license.pro') }}:
|
||||
{{ row.bindNode === '127.0.0.1' ? $t('xpack.node.master') : row.bindNode }}
|
||||
{{ loadBindNode(row) }}
|
||||
</div>
|
||||
<div>
|
||||
{{ $t('license.oss') }}:
|
||||
@@ -152,6 +152,18 @@ const onBindFree = async (row: any) => {
|
||||
});
|
||||
};
|
||||
|
||||
const loadBindNode = (row: any) => {
|
||||
if (!row.bindNode && row.freeNodes?.length) {
|
||||
return row.bindNode;
|
||||
}
|
||||
for (const item of row.freeNodes) {
|
||||
if (item.addr === row.bindNode) {
|
||||
return item.name === 'local' ? i18n.global.t('xpack.node.master') : item.addr;
|
||||
}
|
||||
}
|
||||
return row.bindNode;
|
||||
};
|
||||
|
||||
const onUnbind = async (row: any) => {
|
||||
if (row.freeNodes && (row.freeNodes.length > 1 || !row.freeNodes[0].isXpack)) {
|
||||
MsgError(i18n.global.t('license.licenseUnbindHelper'));
|
||||
|
||||
Reference in New Issue
Block a user