- 订阅模型:{{ ciType.alias || ciType.name }}
+ {{ $t('cmdb.components.subCIType') }}: {{ ciType.alias || ciType.name }}
{{
- `(${treeSubscribed ? '已' : '未'}订阅)`
- }}
+ `(${treeSubscribed ? $t('cmdb.components.already') : $t('cmdb.components.not')}`
+ }}{{ $t('cmdb.components.sub') }})
@@ -179,7 +179,7 @@ export default {
},
subTreeSubmit() {
subscribeTreeView(this.ciType.type_id, this.treeViews).then((res) => {
- this.$message.success('订阅成功')
+ this.$message.success(this.$t('cmdb.components.subSuccess'))
if (this.treeViews.length > 0) {
this.treeSubscribed = true
} else {
@@ -194,7 +194,7 @@ export default {
return [item, !!this.fixedList.includes(item)]
})
).then((res) => {
- this.$message.success('订阅成功')
+ this.$message.success(this.$t('cmdb.components.subSuccess'))
this.resetRoute()
if (this.selectedAttrList.length > 0) {
this.instanceSubscribed = true
diff --git a/cmdb-ui/src/modules/cmdb/components/webhook/authorization.vue b/cmdb-ui/src/modules/cmdb/components/webhook/authorization.vue
index 3afb659..67e0ad8 100644
--- a/cmdb-ui/src/modules/cmdb/components/webhook/authorization.vue
+++ b/cmdb-ui/src/modules/cmdb/components/webhook/authorization.vue
@@ -1,144 +1,144 @@
-
-
-
-
-
-
-
-
-
-
-
-
- |
-
-
-
-
- |
-
-
-
-
- |
-
-
-
-
- |
-
-
- |
-
-
-
-
- |
-
-
-
-
-
- 暂无请求认证
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+
+ {{ $t('cmdb.components.noAuthRequest') }}
+
+
+
+
+
+
+
+
diff --git a/cmdb-ui/src/modules/cmdb/components/webhook/header.vue b/cmdb-ui/src/modules/cmdb/components/webhook/header.vue
index d039016..486f4d7 100644
--- a/cmdb-ui/src/modules/cmdb/components/webhook/header.vue
+++ b/cmdb-ui/src/modules/cmdb/components/webhook/header.vue
@@ -1,101 +1,101 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/cmdb-ui/src/modules/cmdb/components/webhook/index.vue b/cmdb-ui/src/modules/cmdb/components/webhook/index.vue
index 036b495..52b460e 100644
--- a/cmdb-ui/src/modules/cmdb/components/webhook/index.vue
+++ b/cmdb-ui/src/modules/cmdb/components/webhook/index.vue
@@ -1,147 +1,147 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cmdb-ui/src/modules/cmdb/components/webhook/paramaters.vue b/cmdb-ui/src/modules/cmdb/components/webhook/paramaters.vue
index 93238e3..a5e7fc5 100644
--- a/cmdb-ui/src/modules/cmdb/components/webhook/paramaters.vue
+++ b/cmdb-ui/src/modules/cmdb/components/webhook/paramaters.vue
@@ -1,100 +1,100 @@
-
-
-
-
-
-
- 暂无请求参数
-
- 添加
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ {{ $t('cmdb.components.noParamRequest') }}
+
+ {{ $t('add') }}
+
+
+
+
+
+
+
+
diff --git a/cmdb-ui/src/modules/cmdb/lang/en.js b/cmdb-ui/src/modules/cmdb/lang/en.js
new file mode 100644
index 0000000..c022a84
--- /dev/null
+++ b/cmdb-ui/src/modules/cmdb/lang/en.js
@@ -0,0 +1,483 @@
+const cmdb_en = {
+ relation: 'Relation',
+ attribute: 'Attributes',
+ menu: {
+ views: 'Views',
+ config: 'Configuration',
+ backend: 'Management',
+ ciTable: 'Resource Views',
+ ciTree: 'Tree Views',
+ ciSearch: 'Search',
+ adCIs: 'AutoDiscovery Pool',
+ preference: 'Preference',
+ batchUpload: 'Batch Import',
+ citypeManage: 'Modeling',
+ backendManage: 'Backend',
+ customDashboard: 'Custom Dashboard',
+ serviceTreeDefine: 'Service Tree',
+ citypeRelation: 'CIType Relation',
+ operationHistory: 'Operation Audit',
+ relationType: 'Relation Type',
+ ad: 'AutoDiscovery',
+ },
+ ciType: {
+ ciType: 'CIType',
+ attributes: 'Attributes',
+ relation: 'Relation',
+ trigger: 'Triggers',
+ attributeAD: 'Attributes AutoDiscovery',
+ relationAD: 'Relation AutoDiscovery',
+ grant: 'Grant',
+ addGroup: 'New Group',
+ editGroup: 'Edit Group',
+ group: 'Group',
+ attributeLibray: 'Attribute Library',
+ addCITypeInGroup: 'Add a new CIType to the group',
+ addCIType: 'Add CIType',
+ editGroupName: 'Edit group name',
+ deleteGroup: 'Delete this group',
+ CITypeName: 'Name(English)',
+ English: 'English',
+ inputAttributeName: 'Please enter the attribute name',
+ attributeNameTips: 'It cannot start with a number, it can be English numbers and underscores (_)',
+ editCIType: 'Edit CIType',
+ defaultSort: 'Default sort',
+ selectDefaultOrderAttr: 'Select default sorting attributes',
+ asec: 'Forward order',
+ desc: 'Reverse order',
+ uniqueKey: 'Uniquely Identifies',
+ uniqueKeySelect: 'Please select a unique identifier',
+ notfound: 'Can\'t find what you want?',
+ cannotDeleteGroupTips: 'There is data under this group and cannot be deleted!',
+ confirmDeleteGroup: 'Are you sure you want to delete group [{groupName}]?',
+ confirmDeleteCIType: 'Are you sure you want to delete model [{typeName}]?',
+ uploading: 'Uploading',
+ uploadFailed: 'Upload failed, please try again later',
+ addPlugin: 'New plugin',
+ deletePlugin: 'Delete plugin',
+ confirmDeleteADT: 'Do you confirm to delete [{pluginName}]',
+ attributeMap: 'Attribute mapping',
+ autoDiscovery: 'AutoDiscovery',
+ node: 'Node',
+ adExecConfig: 'Execute configuration',
+ adExecTarget: 'Execute targets',
+ oneagentIdTips: 'Please enter the hexadecimal OneAgent ID starting with 0x',
+ selectFromCMDBTips: 'Select from CMDB ',
+ adAutoInLib: 'Save as CI auto',
+ adInterval: 'Collection frequency',
+ byInterval: 'by interval',
+ allNodes: 'All nodes',
+ specifyNodes: 'Specify Node',
+ specifyNodesTips: 'Please fill in the specify node!',
+ username: 'Username',
+ password: 'Password',
+ link: 'Link',
+ list: 'List',
+ listTips: 'The value of the field is one or more, and the type of the value returned by the interface is list.',
+ computeForAllCITips: 'All CI trigger computes',
+ confirmcomputeForAllCITips: 'Confirm triggering computes for all CIs?',
+ isUnique: 'Is it unique',
+ unique: 'Unique',
+ isChoice: 'Choiced',
+ defaultShow: 'Default Display',
+ defaultShowTips: 'The CI instance table displays this field by default',
+ isSortable: 'Sortable',
+ isIndex: 'Indexed',
+ index: 'Index',
+ indexTips: 'Fields can be used for retrieval to speed up queries',
+ confirmDelete: 'Confirm to delete [{name}]?',
+ confirmDelete2: 'Confirm to delete?',
+ computeSuccess: 'Triggered successfully!',
+ basicConfig: 'Basic Settings',
+ AttributeName: 'Name(English)',
+ DataType: 'Data Type',
+ defaultValue: 'Default value',
+ autoIncID: 'Auto-increment ID',
+ customTime: 'Custom time',
+ advancedSettings: 'Advanced Settings',
+ font: 'Font',
+ color: 'Color',
+ choiceValue: 'Predefined value',
+ computedAttribute: 'Computed Attribute',
+ computedAttributeTips: 'The value of this attribute is calculated through an expression constructed from other attributes of the CIType or by executing a piece of code. The reference method of the attribute is: {{ attribute name }}',
+ addAttribute: 'New attribute',
+ existedAttributes: 'Already have attributes',
+ editAttribute: 'Edit attribute',
+ addAttributeTips1: 'If sorting is selected, it must also be selected!',
+ uniqueConstraint: 'Unique Constraint',
+ up: 'Move up',
+ down: 'Move down',
+ selectAttribute: 'Select Attribute',
+ groupExisted: 'Group name already exists',
+ attributeSortedTips: 'Attributes in other groups cannot be sorted. If you need to sort, please drag them to a custom group first!',
+ buildinAttribute: 'built-in attributes',
+ expr: 'Expression',
+ code: 'Code',
+ apply: 'apply',
+ continueAdd: 'Keep adding',
+ filter: 'Filter',
+ choiceOther: 'Other CIType Attributes',
+ choiceWebhookTips: 'The returned results are filtered by fields, and the hierarchical nesting is separated by ##, such as k1##k2. The web request returns {k1: [{k2: 1}, {k2: 2}]}, and the parsing result is [1, 2 ]',
+ selectCIType: 'Please select a CMDB CIType',
+ selectCITypeAttributes: 'Please select CIType attributes',
+ selectAttributes: 'Please select attributes',
+ choiceScriptDemo: 'class ChoiceValue(object):\n @staticmethod\n def values():\n """\n Execution entry, returns predefined value\n :return: Returns a list, the type of the value is the same as the type of the attribute\n For example:\n return ["online", "offline"]\n """\n return []',
+ valueExisted: 'The current value already exists!',
+ addRelation: 'Add Relation',
+ sourceCIType: 'Source CIType',
+ sourceCITypeTips: 'Please select Source CIType',
+ dstCIType: 'Target CIType',
+ dstCITypeTips: 'Please select target CIType',
+ relationType: 'Relation Type',
+ relationTypeTips: 'Please select relation type',
+ isParent: 'is parent',
+ relationConstraint: 'Constraints',
+ relationConstraintTips: 'please select a relationship constraint',
+ one2Many: 'One to Many',
+ one2One: 'One to One',
+ many2Many: 'Many to Many',
+ basicInfo: 'Basic Information',
+ nameInputTips: 'Please enter name',
+ triggerDataChange: 'Data changes',
+ triggerDate: 'Date attribute',
+ triggerEnable: 'Turn on',
+ descInput: 'Please enter remarks',
+ triggerCondition: 'Triggering conditions',
+ addInstance: 'Add new instance',
+ deleteInstance: 'Delete instance',
+ changeInstance: 'Instance changes',
+ selectMutipleAttributes: 'Please select attributes (multiple selections)',
+ selectSingleAttribute: 'Please select an attribute (single choice)',
+ beforeDays: 'ahead of time',
+ days: 'Days',
+ notifyAt: 'Send time',
+ notify: 'Notify',
+ triggerAction: 'Trigger action',
+ receivers: 'Recipients',
+ emailTips: 'Please enter your email address, separate multiple email addresses with ;',
+ customEmail: 'Custom recipients',
+ notifySubject: 'Notification title',
+ notifySubjectTips: 'Please enter notification title',
+ notifyContent: 'Content',
+ notifyMethod: 'Notify methods',
+ botSelect: 'Please select a robot',
+ refAttributeTips: 'The title and content can reference the attribute value of the CIType. The reference method is: {{ attr_name }}',
+ webhookRefAttributeTips: 'Request parameters can reference the attribute value of the model. The reference method is: {{ attr_name }}',
+ newTrigger: 'Add trigger',
+ editTriggerTitle: 'Edit trigger {name}',
+ newTriggerTitle: 'Add trigger {name}',
+ confirmDeleteTrigger: 'Are you sure to delete this trigger?',
+ int: 'Integer',
+ float: 'Float',
+ text: 'Text',
+ datetime: 'DateTime',
+ date: 'Date',
+ time: 'Time',
+ json: 'JSON',
+ event: 'Event'
+ },
+ components: {
+ unselectAttributes: 'Unselected',
+ selectAttributes: 'Selected',
+ downloadCI: 'Export data',
+ filename: 'Filename',
+ filenameInputTips: 'Please enter filename',
+ saveType: 'Save type',
+ saveTypeTips: 'Please select save type',
+ xlsx: 'Excel workbook (*.xlsx)',
+ csv: 'CSV (comma separated) (*.csv)',
+ html: 'Web page (*.html)',
+ xml: 'XML data (*.xml)',
+ txt: 'Text file (tab delimited) (*.txt)',
+ grantUser: 'Grant User/Department',
+ grantRole: 'Grant Role',
+ confirmRevoke: 'Confirm to delete the [Authorization] permission of [{name}]?',
+ readAttribute: 'View Attributes',
+ readCI: 'View CIs',
+ config: 'Configuration',
+ ciTypeGrant: 'Grant CIType',
+ ciGrant: 'Grant CI',
+ attributeGrant: 'Grant Attribute',
+ relationGrant: 'Grant Relation',
+ perm: 'Permissions',
+ all: 'All',
+ customize: 'Customize',
+ none: 'None',
+ customizeFilterName: 'Please enter a custom filter name',
+ colorPickerError: 'Initialization color format error, use #fff or rgb format',
+ example: 'Example value',
+ aliyun: 'aliyun',
+ tencentcloud: 'Tencent Cloud',
+ huaweicloud: 'Huawei Cloud',
+ beforeChange: 'Before change',
+ afterChange: 'After change',
+ noticeContentTips: 'Please enter notification content',
+ saveQuery: 'Save Filters',
+ pleaseSearch: 'Please search',
+ conditionFilter: 'Conditional filtering',
+ attributeDesc: 'Attribute Description',
+ ciSearchTips: '1. JSON attributes cannot be searched
2. If the search content includes commas, they need to be escaped,
3. Only index attributes are searched, non-index attributes use conditional filtering',
+ ciSearchTips2: 'For example: q=hostname:*0.0.0.0*',
+ subCIType: 'Subscription CIType',
+ already: 'already',
+ not: 'not',
+ sub: 'subscription',
+ selectBelow: 'Please select below',
+ subSuccess: 'Subscription successful',
+ selectMethods: 'Please select a method',
+ noAuthRequest: 'No certification requested yet',
+ noParamRequest: 'No parameter certification yet',
+ requestParam: 'Request parameters',
+ param: 'Parameter{param}',
+ value: 'Value{value}',
+ clear: 'Clear',
+ },
+ batch: {
+ downloadFailed: 'Download failed',
+ unselectCIType: 'No CIType selected yet',
+ pleaseUploadFile: 'Please upload files',
+ batchUploadCanceled: 'Batch upload canceled',
+ selectCITypeTips: 'Please select CIType',
+ downloadTemplate: 'Download Template',
+ drawTips: 'Click or drag files here to upload!',
+ supportFileTypes: 'Supported file types: xls, xlsx',
+ uploadResult: 'Upload results',
+ total: 'total',
+ successItems: 'items, succeeded',
+ failedItems: 'items, failed',
+ items: 'items',
+ errorTips: 'Error message',
+ requestFailedTips: 'An error occurred with the request, please try again later',
+ requestSuccessTips: 'Upload completed',
+ },
+ preference: {
+ mySub: 'My Subscription',
+ sub: 'Subscribe',
+ cancelSub: 'Unsubscribe',
+ editSub: 'Edit subscription',
+ peopleSub: ' people subscribed',
+ noSub: 'No subscribed',
+ cancelSubSuccess: 'Unsubscribe successfully',
+ confirmcancelSub: 'Are you sure to cancel your subscription?',
+ confirmcancelSub2: 'Are you sure you want to unsubscribe {name}?',
+ of: 'of',
+ hoursAgo: 'hours ago',
+ daysAgo: 'days ago',
+ monthsAgo: 'month ago',
+ yearsAgo: 'years ago',
+ just: 'just now',
+ },
+ custom_dashboard: {
+ charts: 'Chart',
+ newChart: 'Add Chart',
+ editChart: 'Edit Chart',
+ title: 'Title',
+ titleTips: 'Please enter a chart title',
+ calcIndicators: 'Counter',
+ dimensions: 'Dimensions',
+ selectDimensions: 'Please select a dimension',
+ quantity: 'Quantity',
+ childCIType: 'Relational CIType',
+ level: 'Level',
+ levelTips: 'Please enter the relationship level',
+ preview: 'Preview',
+ showIcon: 'Display icon',
+ chartType: 'Chart Type',
+ dataFilter: 'Data Filtering',
+ format: 'Formats',
+ fontColor: 'Font Color',
+ backgroundColor: 'Background',
+ chartColor: 'Chart Color',
+ chartLength: 'Length',
+ barType: 'Bar Type',
+ stackedBar: 'Stacked Bar',
+ multipleSeriesBar: 'Multiple Series Bar ',
+ axis: 'Axis',
+ direction: 'Direction',
+ lowerShadow: 'Lower Shadow',
+ count: 'Indicator',
+ bar: 'Bar',
+ line: 'Line',
+ pie: 'Pie',
+ table: 'Table',
+ default: 'default',
+ relation: 'Relation',
+ noCustomDashboard: 'The administrator has not customized the dashboard yet',
+ },
+ preference_relation: {
+ newServiceTree: 'Add ServiceTree',
+ serviceTreeName: 'Name',
+ public: 'Public',
+ saveLayout: 'Save Layout',
+ childNodesNotFound: 'There are no child nodes and no business relationship can be formed. Please select again!',
+ tips1: 'Cannot form a view with the currently selected node, please select again!',
+ tips2: 'Please enter the new serviceTree name!',
+ tips3: 'Please select at least two nodes!',
+ },
+ history: {
+ ciChange: 'CI',
+ relationChange: 'Relation',
+ ciTypeChange: 'CIType',
+ triggerHistory: 'Triggers',
+ opreateTime: 'Operate Time',
+ user: 'User',
+ userTips: 'Enter filter username',
+ filter: 'Search',
+ filterOperate: 'fitler operation',
+ attribute: 'Attribute',
+ old: 'Old',
+ new: 'New',
+ noUpdate: 'No update',
+ itemsPerPage: '/page',
+ triggerName: 'Name',
+ event: 'Event',
+ action: 'Actoin',
+ status: 'Status',
+ done: 'Done',
+ undone: 'Undone',
+ triggerTime: 'Trigger Time',
+ totalItems: '{total} records in total',
+ pleaseSelect: 'Please select',
+ startTime: 'Start Time',
+ endTime: 'End Time',
+ deleteCIType: 'Delete CIType',
+ addCIType: 'Add CIType',
+ updateCIType: 'Update CIType',
+ addAttribute: 'Add Attribute',
+ updateAttribute: 'Update Attribute',
+ deleteAttribute: 'Delete Attribute',
+ addTrigger: 'Add Trigger',
+ updateTrigger: 'Update Trigger',
+ deleteTrigger: 'Delete Trigger',
+ addUniqueConstraint: 'Add Unique Constraint',
+ updateUniqueConstraint: 'Update Unique Constraint',
+ deleteUniqueConstraint: 'Delete Unique Constraint',
+ addRelation: 'Add Relation',
+ deleteRelation: 'Delete Relation',
+ noModifications: 'No Modifications',
+ attr: 'attribute',
+ attrId: 'attribute id',
+ changeDescription: 'attribute id: {attr_id}, {before_days} day(s) in advance, Subject: {subject}\nContent: {body}\nNotify At: {notify_at}'
+ },
+ relation_type: {
+ addRelationType: 'New',
+ nameTips: 'Please enter a type name',
+ },
+ ad: {
+ upload: 'Import',
+ download: 'Export',
+ accpet: 'Accept',
+ accpetBy: 'Accept By',
+ acceptTime: 'Accept Time',
+ confirmAccept: 'Confirm Accept?',
+ accpetSuccess: 'Accept successfully',
+ isAccpet: 'Is accept',
+ deleteADC: 'Confirm to delete this data?',
+ batchDelete: 'Confirm to delete this data?',
+ agent: 'Built-in & Plug-ins',
+ snmp: 'Network Devices',
+ http: 'Public Clouds',
+ rule: 'AutoDiscovery Rules',
+ timeout: 'Timeout error',
+ mode: 'Mode',
+ collectSettings: 'Collection Settings',
+ updateFields: 'Update Field',
+ pluginScript: `# -*- coding:utf-8 -*-
+
+ import json
+
+
+ class AutoDiscovery(object):
+
+ @property
+ def unique_key(self):
+ """
+
+ :return: Returns the name of a unique attribute
+ """
+ return
+
+ @staticmethod
+ def attributes():
+ """
+ Define attribute fields
+ :return: Returns a list of attribute fields. The list items are (name, type, description). The name must be in English.
+ type: String Integer Float Date DateTime Time JSON
+ For example:
+ return [
+ ("ci_type", "String", "CIType name"),
+ ("private_ip", "String", "Internal IP, multiple values separated by commas")
+ ]
+ """
+ return []
+
+ @staticmethod
+ def run():
+ """
+ Execution entry, returns collected attribute values
+ :return:
+ Returns a list, the list item is a dictionary, the dictionary key is the attribute name, and the value is the attribute value
+ For example:
+ return [dict(ci_type="server", private_ip="192.168.1.1")]
+ """
+ return []
+
+
+ if __name__ == "__main__":
+ result = AutoDiscovery().run()
+ if isinstance(result, list):
+ print("AutoDiscovery::Result::{}".format(json.dumps(result)))
+ else:
+ print("ERROR: The collection return must be a list")
+ `,
+ server: 'Server',
+ vserver: 'VServer',
+ nic: 'NIC',
+ disk: 'harddisk',
+ },
+ ci: {
+ attributeDesc: 'Attribute Description',
+ selectRows: 'Select: {rows} items',
+ addRelation: 'Add Relation',
+ all: 'All',
+ batchUpdate: 'Batch Update',
+ batchUpdateConfirm: 'Are you sure you want to make batch updates?',
+ batchUpdateInProgress: 'Currently being updated in batches',
+ batchUpdateInProgress2: 'Updating in batches, {total} in total, {successNum} successful, {errorNum} failed',
+ batchDeleting: 'Deleting...',
+ batchDeleting2: 'Deleting {total} items in total, {successNum} items successful, {errorNum} items failed',
+ copyFailed: 'Copy failed',
+ noLevel: 'No hierarchical relationship!',
+ batchAddRelation: 'Batch Add Relation',
+ history: 'History',
+ topo: 'Topology',
+ table: 'Table',
+ m2mTips: 'The current CIType relationship is many-to-many, please go to the SerivceTree(relation view) to add or delete',
+ confirmDeleteRelation: 'Confirm to delete the relationship?',
+ tips1: 'Use commas to separate multiple values',
+ tips2: 'The field can be modified as needed. When the value is empty, the field will be left empty.',
+ tips3: 'Please select the fields that need to be modified',
+ tips4: 'At least one field must be selected',
+ tips5: 'Search name | alias',
+ tips6: 'Speed up retrieval, full-text search possible, no need to use conditional filtering\n\n json currently does not support indexing \n\nText characters longer than 190 cannot be indexed',
+ tips7: 'The form of expression is a drop-down box, and the value must be in the predefined value',
+ tips8: 'Multiple values, such as intranet IP',
+ tips9: 'For front-end only',
+ tips10: 'Other attributes of the CIType are computed using expressions\n\nA code snippet computes the returned value.',
+ newUpdateField: 'Add a Attribute',
+ attributeSettings: 'Attribute Settings',
+ },
+ serviceTree: {
+ deleteNode: 'Delete Node',
+ tips1: 'For example: q=os_version:centos&sort=os_version',
+ tips2: 'Expression search',
+ alert1: 'The administrator has not configured the ServiceTree(relation view), or you do not have permission to access it!',
+ copyFailed: 'Copy failed',
+ deleteRelationConfirm: 'Confirm to remove selected {name} from current relationship?',
+ },
+ tree: {
+ tips1: 'Please go to Preference page first to complete your subscription!',
+ subSettings: 'Settings',
+ }
+}
+export default cmdb_en
diff --git a/cmdb-ui/src/modules/cmdb/lang/zh.js b/cmdb-ui/src/modules/cmdb/lang/zh.js
new file mode 100644
index 0000000..5b448c6
--- /dev/null
+++ b/cmdb-ui/src/modules/cmdb/lang/zh.js
@@ -0,0 +1,482 @@
+const cmdb_zh = {
+ relation: '关系',
+ attribute: '属性',
+ menu: {
+ views: '视图',
+ config: '配置',
+ backend: '管理端',
+ ciTable: '资源数据',
+ ciTree: '资源层级',
+ ciSearch: '资源搜索',
+ adCIs: '自动发现池',
+ preference: '我的订阅',
+ batchUpload: '批量导入',
+ citypeManage: '模型配置',
+ backendManage: '后台管理',
+ customDashboard: '定制仪表盘',
+ serviceTreeDefine: '服务树定义',
+ citypeRelation: '模型关系',
+ operationHistory: '操作审计',
+ relationType: '关系类型',
+ ad: '自动发现',
+ },
+ ciType: {
+ ciType: '模型',
+ attributes: '模型属性',
+ relation: '模型关联',
+ trigger: '触发器',
+ attributeAD: '属性自动发现',
+ relationAD: '关系自动发现',
+ grant: '权限配置',
+ addGroup: '新增分组',
+ editGroup: '修改分组',
+ group: '分组',
+ attributeLibray: '属性库',
+ addCITypeInGroup: '在该组中新增CI模型',
+ addCIType: '新增CI模型',
+ editGroupName: '编辑组名称',
+ deleteGroup: '删除该组',
+ CITypeName: '模型名(英文)',
+ English: '英文',
+ inputAttributeName: '请输入属性名',
+ attributeNameTips: '不能以数字开头,可以是英文 数字以及下划线 (_)',
+ editCIType: '编辑模型',
+ defaultSort: '默认排序',
+ selectDefaultOrderAttr: '选择默认排序属性',
+ asec: '正序',
+ desc: '倒序',
+ uniqueKey: '唯一标识',
+ uniqueKeySelect: '请选择唯一标识',
+ notfound: '找不到想要的?',
+ cannotDeleteGroupTips: '该分组下有数据, 不能删除!',
+ confirmDeleteGroup: '确定要删除分组 【{groupName}】 吗?',
+ confirmDeleteCIType: '确定要删除模型 【{typeName}】 吗?',
+ uploading: '正在导入中',
+ uploadFailed: '导入失败,请稍后重试',
+ addPlugin: '新建plugin',
+ deletePlugin: '删除plugin',
+ confirmDeleteADT: '确认删除 【{pluginName}】',
+ attributeMap: '字段映射',
+ autoDiscovery: '自动发现',
+ node: '节点',
+ adExecConfig: '执行配置',
+ adExecTarget: '执行机器',
+ oneagentIdTips: '请输入以0x开头的16进制OneAgent ID',
+ selectFromCMDBTips: '从CMDB中选择 ',
+ adAutoInLib: '自动入库',
+ adInterval: '采集频率',
+ byInterval: '按间隔',
+ allNodes: '所有节点',
+ specifyNodes: '指定节点',
+ specifyNodesTips: '请填写指定节点!',
+ username: '用户名',
+ password: '密码',
+ link: '链接',
+ list: '多值',
+ listTips: '字段的值是1个或者多个,接口返回的值的类型是list',
+ computeForAllCITips: '所有CI触发计算',
+ confirmcomputeForAllCITips: '确认触发所有CI的计算?',
+ isUnique: '是否唯一',
+ unique: '唯一',
+ isChoice: '是否选择',
+ defaultShow: '默认显示',
+ defaultShowTips: 'CI实例表格默认展示该字段',
+ isSortable: '可排序',
+ isIndex: '是否索引',
+ index: '索引',
+ indexTips: '字段可被用于检索,加速查询',
+ confirmDelete: '确认删除【{name}】?',
+ confirmDelete2: '确认删除?',
+ computeSuccess: '触发成功!',
+ basicConfig: '基础设置',
+ AttributeName: '属性名(英文)',
+ DataType: '数据类型',
+ defaultValue: '默认值',
+ autoIncID: '自增ID',
+ customTime: '自定义时间',
+ advancedSettings: '高级设置',
+ font: '字体',
+ color: '颜色',
+ choiceValue: '预定义值',
+ computedAttribute: '计算属性',
+ computedAttributeTips: '该属性的值是通过模型的其它属性构建的表达式或者执行一段代码的方式计算而来,属性的引用方法为: {{ 属性名 }}',
+ addAttribute: '新增属性',
+ existedAttributes: '已有属性',
+ editAttribute: '编辑属性',
+ addAttributeTips1: '选中排序,则必须也要选中!',
+ uniqueConstraint: '唯一校验',
+ up: '上移',
+ down: '下移',
+ selectAttribute: '添加属性',
+ groupExisted: '分组名称已存在',
+ attributeSortedTips: '其他分组中的属性不能进行排序,如需排序请先拖至自定义的分组!',
+ buildinAttribute: '内置字段',
+ expr: '表达式',
+ code: '代码',
+ apply: '应用',
+ continueAdd: '继续添加',
+ filter: '过滤',
+ choiceOther: '其他模型属性',
+ choiceWebhookTips: '返回的结果按字段来过滤,层级嵌套用##分隔,比如k1##k2,web请求返回{k1: [{k2: 1}, {k2: 2}]}, 解析结果为[1, 2]',
+ selectCIType: '请选择CMDB模型',
+ selectCITypeAttributes: '请选择模型属性',
+ selectAttributes: '请选择属性',
+ choiceScriptDemo: 'class ChoiceValue(object):\n @staticmethod\n def values():\n """\n 执行入口, 返回预定义值\n :return: 返回一个列表, 值的类型同属性的类型\n 例如:\n return ["在线", "下线"]\n """\n return []',
+ valueExisted: '当前值已存在!',
+ addRelation: '新增关系',
+ sourceCIType: '源模型',
+ sourceCITypeTips: '请选择源模型',
+ dstCIType: '目标模型名',
+ dstCITypeTips: '请选择目标模型',
+ relationType: '关联类型',
+ relationTypeTips: '请选择关联类型',
+ isParent: '被',
+ relationConstraint: '关系约束',
+ relationConstraintTips: '请选择关系约束',
+ one2Many: '一对多',
+ one2One: '一对一',
+ many2Many: '多对多',
+ basicInfo: '基本信息',
+ nameInputTips: '请输入名称',
+ triggerDataChange: '数据变更',
+ triggerDate: '日期属性',
+ triggerEnable: '开启',
+ descInput: '请输入备注',
+ triggerCondition: '触发条件',
+ addInstance: '新增实例',
+ deleteInstance: '删除实例',
+ changeInstance: '实例变更',
+ selectMutipleAttributes: '请选择属性(多选)',
+ selectSingleAttribute: '请选择属性(单选)',
+ beforeDays: '提前',
+ days: '天',
+ notifyAt: '发送时间',
+ notify: '通知',
+ triggerAction: '触发动作',
+ receivers: '收件人',
+ emailTips: '请输入邮箱,多个邮箱用;分隔',
+ customEmail: '自定义收件人',
+ notifySubject: '通知标题',
+ notifySubjectTips: '请输入通知标题',
+ notifyContent: '内容',
+ notifyMethod: '通知方式',
+ botSelect: '请选择机器人',
+ refAttributeTips: '标题、内容可以引用该模型的属性值,引用方法为: {{ attr_name }}',
+ webhookRefAttributeTips: '请求参数可以引用该模型的属性值,引用方法为: {{ attr_name }}',
+ newTrigger: '新增触发器',
+ editTriggerTitle: '编辑触发器 {name}',
+ newTriggerTitle: '新增触发器 {name}',
+ confirmDeleteTrigger: '确认删除该触发器吗?',
+ int: '整数',
+ float: '浮点数',
+ text: '文本',
+ datetime: '日期时间',
+ date: '日期',
+ time: '时间',
+ json: 'JSON',
+ event: '事件'
+ },
+ components: {
+ unselectAttributes: '未选属性',
+ selectAttributes: '已选属性',
+ downloadCI: '导出数据',
+ filename: '文件名',
+ filenameInputTips: '请输入文件名',
+ saveType: '保存类型',
+ saveTypeTips: '请选择保存类型',
+ xlsx: 'Excel工作簿(*.xlsx)',
+ csv: 'CSV(逗号分隔)(*.csv)',
+ html: '网页(*.html)',
+ xml: 'XML数据(*.xml)',
+ txt: '文本文件(制表符分隔)(*.txt)',
+ grantUser: '授权用户/部门',
+ grantRole: '授权角色',
+ confirmRevoke: '确认删除 【{name}】 的 【授权】 权限?',
+ readAttribute: '查看字段',
+ readCI: '查看实例',
+ config: '配置',
+ ciTypeGrant: '模型权限',
+ ciGrant: '实例权限',
+ attributeGrant: '字段权限',
+ relationGrant: '关系权限',
+ perm: '权限',
+ all: '全部',
+ customize: '自定义',
+ none: '无',
+ customizeFilterName: '请输入自定义筛选条件名',
+ colorPickerError: '初始化颜色格式错误,使用#fff或rgb格式',
+ example: '示例值',
+ aliyun: '阿里云',
+ tencentcloud: '腾讯云',
+ huaweicloud: '华为云',
+ beforeChange: '变更前',
+ afterChange: '变更后',
+ noticeContentTips: '请输入通知内容',
+ saveQuery: '保存筛选条件',
+ pleaseSearch: '请查找',
+ conditionFilter: '条件过滤',
+ attributeDesc: '属性说明',
+ ciSearchTips: '1. json属性不能搜索
2. 搜索内容包括逗号, 则需转义 ,
3. 只搜索索引属性, 非索引属性使用条件过滤',
+ ciSearchTips2: '例: q=hostname:*0.0.0.0*',
+ subCIType: '订阅模型',
+ already: '已',
+ not: '未',
+ sub: '订阅',
+ selectBelow: '请在下方进行选择',
+ subSuccess: '订阅成功',
+ selectMethods: '请选择方式',
+ noAuthRequest: '暂无请求认证',
+ noParamRequest: '暂无参数认证',
+ requestParam: '请求参数',
+ param: '参数{param}',
+ value: '值{value}',
+ clear: '清空',
+ },
+ batch: {
+ downloadFailed: '失败下载',
+ unselectCIType: '尚未选择模板类型',
+ pleaseUploadFile: '请上传文件',
+ batchUploadCanceled: '批量上传已取消',
+ selectCITypeTips: '请选择模板类型',
+ downloadTemplate: '下载模板',
+ drawTips: '点击或拖拽文件至此上传!',
+ supportFileTypes: '支持文件类型:xls,xlsx',
+ uploadResult: '上传结果',
+ total: '共',
+ successItems: '条,已成功',
+ failedItems: '条,失败',
+ items: '条',
+ errorTips: '错误信息',
+ requestFailedTips: '请求出现错误,请稍后再试',
+ requestSuccessTips: '批量上传已完成',
+ },
+ preference: {
+ mySub: '我的订阅',
+ sub: '订阅',
+ cancelSub: '取消订阅',
+ editSub: '编辑订阅',
+ peopleSub: '位同事已订阅',
+ noSub: '暂无同事订阅',
+ cancelSubSuccess: '取消订阅成功',
+ confirmcancelSub: '确认取消订阅',
+ confirmcancelSub2: '确认取消订阅 {name} 吗?',
+ of: '的',
+ hoursAgo: '小时前',
+ daysAgo: '天前',
+ monthsAgo: '月前',
+ yearsAgo: '年前',
+ just: '刚刚',
+ },
+ custom_dashboard: {
+ charts: '图表',
+ newChart: '新增图表',
+ editChart: '编辑图表',
+ title: '标题',
+ titleTips: '请输入图表标题',
+ calcIndicators: '计算指标',
+ dimensions: '维度',
+ selectDimensions: '请选择维度',
+ quantity: '数量',
+ childCIType: '关系模型',
+ level: '层级',
+ levelTips: '请输入关系层级',
+ preview: '预览',
+ showIcon: '是否显示icon',
+ chartType: '图表类型',
+ dataFilter: '数据筛选',
+ format: '格式',
+ fontColor: '字体颜色',
+ backgroundColor: '背景颜色',
+ chartColor: '图表颜色',
+ chartLength: '图表长度',
+ barType: '柱状图类型',
+ stackedBar: '堆积柱状图',
+ multipleSeriesBar: '多系列柱状图',
+ axis: '轴',
+ direction: '方向',
+ lowerShadow: '下方阴影',
+ count: '指标',
+ bar: '柱状图',
+ line: '折线图',
+ pie: '饼状图',
+ table: '表格',
+ default: '默认',
+ relation: '关系',
+ noCustomDashboard: '管理员暂未定制仪表盘',
+ },
+ preference_relation: {
+ newServiceTree: '新增服务树',
+ serviceTreeName: '服务树名',
+ public: '公开',
+ saveLayout: '保存布局',
+ childNodesNotFound: '不存在子节点,不能形成业务关系,请重新选择!',
+ tips1: '不能与当前选中节点形成视图,请重新选择!',
+ tips2: '请输入新增服务树名!',
+ tips3: '请选择至少两个节点!',
+ },
+ history: {
+ ciChange: 'CI变更',
+ relationChange: '关系变更',
+ ciTypeChange: '模型变更',
+ triggerHistory: '触发历史',
+ opreateTime: '操作时间',
+ user: '用户',
+ userTips: '输入筛选用户名',
+ filter: '筛选',
+ filterOperate: '筛选操作',
+ attribute: '属性',
+ old: '旧',
+ new: '新',
+ noUpdate: '没有修改',
+ itemsPerPage: '/页',
+ triggerName: '触发器名称',
+ event: '事件',
+ action: '动作',
+ status: '状态',
+ done: '已完成',
+ undone: '未完成',
+ triggerTime: '触发时间',
+ totalItems: '共 {total} 条记录',
+ pleaseSelect: '请选择',
+ startTime: '开始时间',
+ endTime: '结束时间',
+ deleteCIType: '删除模型',
+ addCIType: '新增模型',
+ updateCIType: '修改模型',
+ addAttribute: '新增属性',
+ updateAttribute: '修改属性',
+ deleteAttribute: '删除属性',
+ addTrigger: '新增触发器',
+ updateTrigger: '修改触发器',
+ deleteTrigger: '删除触发器',
+ addUniqueConstraint: '新增联合唯一',
+ updateUniqueConstraint: '修改联合唯一',
+ deleteUniqueConstraint: '删除联合唯一',
+ addRelation: '新增关系',
+ deleteRelation: '删除关系',
+ noModifications: '没有修改',
+ attr: '属性名',
+ attrId: '属性ID',
+ changeDescription: '属性ID:{attr_id},提前:{before_days}天,主题:{subject}\n内容:{body}\n通知时间:{notify_at}'
+ },
+ relation_type: {
+ addRelationType: '新增关系类型',
+ nameTips: '请输入类型名',
+ },
+ ad: {
+ upload: '规则导入',
+ download: '规则导出',
+ accpet: '入库',
+ accpetBy: '入库人',
+ acceptTime: '入库时间',
+ confirmAccept: '确认入库?',
+ accpetSuccess: '入库成功',
+ isAccpet: '是否入库',
+ deleteADC: '确认删除该条数据?',
+ batchDelete: '确认删除这些数据?',
+ agent: '内置 & 插件',
+ snmp: '网络设备',
+ http: '公有云资源',
+ rule: '自动发现规则',
+ timeout: '超时错误',
+ mode: '模式',
+ collectSettings: '采集设置',
+ updateFields: '更新字段',
+ pluginScript: `# -*- coding:utf-8 -*-
+
+ import json
+
+
+ class AutoDiscovery(object):
+
+ @property
+ def unique_key(self):
+ """
+
+ :return: 返回唯一属性的名字
+ """
+ return
+
+ @staticmethod
+ def attributes():
+ """
+ 定义属性字段
+ :return: 返回属性字段列表, 列表项是(名称, 类型, 描述), 名称必须是英文
+ 类型: String Integer Float Date DateTime Time JSON
+ 例如:
+ return [
+ ("ci_type", "String", "模型名称"),
+ ("private_ip", "String", "内网IP, 多值逗号分隔")
+ ]
+ """
+ return []
+
+ @staticmethod
+ def run():
+ """
+ 执行入口, 返回采集的属性值
+ :return: 返回一个列表, 列表项是字典, 字典key是属性名称, value是属性值
+ 例如:
+ return [dict(ci_type="server", private_ip="192.168.1.1")]
+ """
+ return []
+
+
+ if __name__ == "__main__":
+ result = AutoDiscovery().run()
+ if isinstance(result, list):
+ print("AutoDiscovery::Result::{}".format(json.dumps(result)))
+ else:
+ print("ERROR: 采集返回必须是列表")
+ `,
+ server: '物理机',
+ vserver: '虚拟机',
+ nic: '网卡',
+ disk: '硬盘',
+ },
+ ci: {
+ attributeDesc: '属性说明',
+ selectRows: '选取:{rows} 项',
+ addRelation: '添加关系',
+ all: '全部',
+ batchUpdate: '批量修改',
+ batchUpdateConfirm: '确认要批量修改吗?',
+ batchUpdateInProgress: '正在批量修改',
+ batchUpdateInProgress2: '正在批量修改,共{total}个,成功{successNum}个,失败{errorNum}个',
+ batchDeleting: '正在删除...',
+ batchDeleting2: '正在删除,共{total}个,成功{successNum}个,失败{errorNum}个',
+ copyFailed: '复制失败!',
+ noLevel: '无层级关系!',
+ batchAddRelation: '批量添加关系',
+ history: '操作历史',
+ topo: '拓扑',
+ table: '表格',
+ m2mTips: '当前模型关系为多对多,请前往关系视图进行增删操作',
+ confirmDeleteRelation: '确认删除关系?',
+ tips1: '多个值使用,分割',
+ tips2: '可根据需要修改字段,当值为 空 时,则该字段 置空',
+ tips3: '请选择需要修改的字段',
+ tips4: '必须至少选择一个字段',
+ tips5: '搜索 名称 | 别名',
+ tips6: '加快检索, 可以全文搜索, 无需使用条件过滤\n\n json目前不支持建索引 \n\n文本字符长度超过190不能建索引',
+ tips7: '表现形式是下拉框, 值必须在预定义值里',
+ tips8: '多值, 比如内网IP',
+ tips9: '仅针对前端',
+ tips10: '模型的其他属性通过表达式的方式计算出来\n\n一个代码片段计算返回的值',
+ newUpdateField: '新增修改字段',
+ attributeSettings: '字段设置',
+ },
+ serviceTree: {
+ deleteNode: '删除节点',
+ tips1: '例:q=os_version:centos&sort=os_version',
+ tips2: '表达式搜索',
+ alert1: '管理员 还未配置业务关系, 或者你无权限访问!',
+ copyFailed: '复制失败',
+ deleteRelationConfirm: '确认将选中的 {name} 从当前关系中删除?',
+ },
+ tree: {
+ tips1: '请先到 我的订阅 页面完成订阅!',
+ subSettings: '订阅设置',
+ }
+}
+export default cmdb_zh
diff --git a/cmdb-ui/src/modules/cmdb/router/index.js b/cmdb-ui/src/modules/cmdb/router/index.js
index 8bb1365..eaadc4b 100644
--- a/cmdb-ui/src/modules/cmdb/router/index.js
+++ b/cmdb-ui/src/modules/cmdb/router/index.js
@@ -13,19 +13,19 @@ const genCmdbRoutes = async () => {
{
path: '/cmdb/dashboard',
name: 'cmdb_dashboard',
- meta: { title: '仪表盘', icon: 'ops-cmdb-dashboard', selectedIcon: 'ops-cmdb-dashboard-selected', keepAlive: false },
+ meta: { title: 'dashboard', icon: 'ops-cmdb-dashboard', selectedIcon: 'ops-cmdb-dashboard-selected', keepAlive: false },
component: () => import('../views/dashboard/index_v2.vue')
},
{
path: '/cmdb/disabled1',
name: 'cmdb_disabled1',
- meta: { title: '视图', disabled: true },
+ meta: { title: 'cmdb.menu.views', disabled: true },
},
{
path: '/cmdb/resourceviews',
name: 'cmdb_resource_views',
component: RouteView,
- meta: { title: '资源数据', icon: 'ops-cmdb-resource', selectedIcon: 'ops-cmdb-resource-selected', keepAlive: true },
+ meta: { title: 'cmdb.menu.ciTable', icon: 'ops-cmdb-resource', selectedIcon: 'ops-cmdb-resource-selected', keepAlive: true },
hideChildrenInMenu: false,
children: []
},
@@ -33,108 +33,108 @@ const genCmdbRoutes = async () => {
path: '/cmdb/tree_views',
component: () => import('../views/tree_views'),
name: 'cmdb_tree_views',
- meta: { title: '资源层级', icon: 'ops-cmdb-tree', selectedIcon: 'ops-cmdb-tree-selected', keepAlive: false },
+ meta: { title: 'cmdb.menu.ciTree', icon: 'ops-cmdb-tree', selectedIcon: 'ops-cmdb-tree-selected', keepAlive: false },
hideChildrenInMenu: true,
children: [
{
path: '/cmdb/tree_views/:typeId',
name: 'cmdb_tree_views_item',
component: () => import('../views/tree_views'),
- meta: { title: '资源层级', keepAlive: false },
+ meta: { title: 'cmdb.menu.ciTree', keepAlive: false },
hidden: true
}]
},
{
path: '/cmdb/resourcesearch',
name: 'cmdb_resource_search',
- meta: { title: '资源搜索', icon: 'ops-cmdb-search', selectedIcon: 'ops-cmdb-search-selected', keepAlive: false },
+ meta: { title: 'cmdb.menu.ciSearch', icon: 'ops-cmdb-search', selectedIcon: 'ops-cmdb-search-selected', keepAlive: false },
component: () => import('../views/resource_search/index.vue')
},
{
path: '/cmdb/adc',
name: 'cmdb_auto_discovery_ci',
- meta: { title: '自动发现池', icon: 'ops-cmdb-adc', selectedIcon: 'ops-cmdb-adc-selected', keepAlive: false },
+ meta: { title: 'cmdb.menu.adCIs', icon: 'ops-cmdb-adc', selectedIcon: 'ops-cmdb-adc-selected', keepAlive: false },
component: () => import('../views/discoveryCI/index.vue')
},
{
path: '/cmdb/disabled2',
name: 'cmdb_disabled2',
- meta: { title: '配置', disabled: true, },
+ meta: { title: 'cmdb.menu.config', disabled: true, },
},
{
path: '/cmdb/preference',
component: () => import('../views/preference/index'),
name: 'cmdb_preference',
- meta: { title: '我的订阅', icon: 'ops-cmdb-preference', selectedIcon: 'ops-cmdb-preference-selected', keepAlive: false }
+ meta: { title: 'cmdb.menu.preference', icon: 'ops-cmdb-preference', selectedIcon: 'ops-cmdb-preference-selected', keepAlive: false }
},
{
path: '/cmdb/batch',
component: () => import('../views/batch'),
name: 'cmdb_batch',
- meta: { 'title': '批量导入', icon: 'ops-cmdb-batch', selectedIcon: 'ops-cmdb-batch-selected', keepAlive: false }
+ meta: { 'title': 'cmdb.menu.batchUpload', icon: 'ops-cmdb-batch', selectedIcon: 'ops-cmdb-batch-selected', keepAlive: false }
},
{
path: '/cmdb/ci_types',
name: 'ci_type',
component: () => import('../views/ci_types/index'),
- meta: { title: '模型配置', icon: 'ops-cmdb-citype', selectedIcon: 'ops-cmdb-citype-selected', keepAlive: false, permission: ['cmdb_admin', 'admin'] }
+ meta: { title: 'cmdb.menu.citypeManage', icon: 'ops-cmdb-citype', selectedIcon: 'ops-cmdb-citype-selected', keepAlive: false, permission: ['cmdb_admin', 'admin'] }
},
{
path: '/cmdb/disabled3',
name: 'cmdb_disabled3',
- meta: { title: '管理端', disabled: true, permission: ['cmdb_admin', 'OneOPS_Application_Admin', 'admin'], },
+ meta: { title: 'cmdb.menu.backend', disabled: true, permission: ['cmdb_admin', 'OneOPS_Application_Admin', 'admin'], },
},
{
path: '/cmdb/citypes',
name: 'cmdb_ci_type',
component: RouteView,
redirect: '/cmdb/ci_type',
- meta: { title: '后台管理', icon: 'setting', permission: ['cmdb_admin', 'OneOPS_Application_Admin', 'admin'], },
+ meta: { title: 'cmdb.menu.backendManage', icon: 'setting', permission: ['cmdb_admin', 'OneOPS_Application_Admin', 'admin'], },
children: [
{
path: '/cmdb/customdashboard',
name: 'cmdb_custom_dashboard',
component: () => import('../views/custom_dashboard/index'),
- meta: { title: '定制仪表盘', keepAlive: false, icon: 'ops-cmdb-customdashboard', selectedIcon: 'ops-cmdb-customdashboard-selected' }
+ meta: { title: 'cmdb.menu.customDashboard', keepAlive: false, icon: 'ops-cmdb-customdashboard', selectedIcon: 'ops-cmdb-customdashboard-selected' }
},
{
path: '/cmdb/preferencerelation',
name: 'preference_relation',
component: () => import('../views/preference_relation/index'),
- meta: { title: '业务关系定义', keepAlive: false, icon: 'ops-cmdb-preferencerelation', selectedIcon: 'ops-cmdb-preferencerelation-selected' }
+ meta: { title: 'cmdb.menu.serviceTreeDefine', keepAlive: false, icon: 'ops-cmdb-preferencerelation', selectedIcon: 'ops-cmdb-preferencerelation-selected' }
},
{
path: '/cmdb/modelrelation',
name: 'model_relation',
hideChildrenInMenu: true,
component: () => import('../views/model_relation/index'),
- meta: { title: '模型关系', keepAlive: false, icon: 'ops-cmdb-modelrelation', selectedIcon: 'ops-cmdb-modelrelation-selected' }
+ meta: { title: 'cmdb.menu.citypeRelation', keepAlive: false, icon: 'ops-cmdb-modelrelation', selectedIcon: 'ops-cmdb-modelrelation-selected' }
},
{
path: '/cmdb/operationhistory',
name: 'operation_history',
hideChildrenInMenu: true,
component: () => import('../views/operation_history/index'),
- meta: { title: '操作审计', keepAlive: false, icon: 'ops-cmdb-operation', selectedIcon: 'ops-cmdb-operation-selected' }
+ meta: { title: 'cmdb.menu.operationHistory', keepAlive: false, icon: 'ops-cmdb-operation', selectedIcon: 'ops-cmdb-operation-selected' }
},
{
path: '/cmdb/relationtype',
name: 'relation_type',
hideChildrenInMenu: true,
component: () => import('../views/relation_type/index'),
- meta: { title: '关系类型', keepAlive: false, icon: 'ops-cmdb-relationtype', selectedIcon: 'ops-cmdb-relationtype-selected' }
+ meta: { title: 'cmdb.menu.relationType', keepAlive: false, icon: 'ops-cmdb-relationtype', selectedIcon: 'ops-cmdb-relationtype-selected' }
},
{
path: '/cmdb/discovery',
name: 'discovery',
component: () => import('../views/discovery/index'),
- meta: { title: '自动发现', keepAlive: false, icon: 'ops-cmdb-adr', selectedIcon: 'ops-cmdb-adr-selected' }
+ meta: { title: 'cmdb.menu.ad', keepAlive: false, icon: 'ops-cmdb-adr', selectedIcon: 'ops-cmdb-adr-selected' }
},
]
}
]
}
- // 动态添加订阅的条目及业务关系
+ // Dynamically add subscription items and business relationships
const [preference, relation] = await Promise.all([getPreference(), getRelationView()])
preference.forEach(item => {
@@ -143,7 +143,7 @@ const genCmdbRoutes = async () => {
component: () => import(`../views/ci/index`),
name: `cmdb_${item.id}`,
meta: { title: item.alias, keepAlive: false, typeId: item.id, name: item.name, customIcon: item.icon },
- // hideChildrenInMenu: true // 强制显示 MenuItem 而不是 SubMenu
+ // hideChildrenInMenu: true // Force display of MenuItem instead of SubMenu
})
})
const lastTypeId = window.localStorage.getItem('ops_ci_typeid') || undefined
diff --git a/cmdb-ui/src/modules/cmdb/utils/const.js b/cmdb-ui/src/modules/cmdb/utils/const.js
index 326690e..10e6fd5 100644
--- a/cmdb-ui/src/modules/cmdb/utils/const.js
+++ b/cmdb-ui/src/modules/cmdb/utils/const.js
@@ -1,28 +1,32 @@
-export const valueTypeMap = {
- '0': '整数',
- '1': '浮点数',
- '2': '文本',
- '3': '日期时间',
- '4': '日期',
- '5': '时间',
- '6': 'JSON',
- '7': '密码',
- '8': '链接'
-}
-
-export const defautValueColor = [
- { value: '#d9d9d9' },
- { value: '#ffccc7' },
- { value: '#ffd8bf' },
- { value: '#ffe7ba' },
- { value: '#fff1b8' },
- { value: '#f4ffb8' },
- { value: '#d9f7be' },
- { value: '#b5f5ec' },
- { value: '#bae7ff' },
- { value: '#d6e4ff' },
- { value: '#efdbff' },
- { value: '#ffd6e7' },
-]
-
-export const defaultBGColors = ['#ffccc7', '#ffd8bf', '#ffe7ba', '#fff1b8', '#d9f7be', '#b5f5ec', '#bae7ff', '#d6e4ff', '#efdbff', '#ffd6e7']
+import i18n from '@/lang'
+
+export const valueTypeMap = () => {
+ return {
+ '0': i18n.t('cmdb.ciType.int'),
+ '1': i18n.t('cmdb.ciType.float'),
+ '2': i18n.t('cmdb.ciType.text'),
+ '3': i18n.t('cmdb.ciType.datetime'),
+ '4': i18n.t('cmdb.ciType.date'),
+ '5': i18n.t('cmdb.ciType.time'),
+ '6': 'JSON',
+ '7': i18n.t('cmdb.ciType.password'),
+ '8': i18n.t('cmdb.ciType.link')
+ }
+}
+
+export const defautValueColor = [
+ { value: '#d9d9d9' },
+ { value: '#ffccc7' },
+ { value: '#ffd8bf' },
+ { value: '#ffe7ba' },
+ { value: '#fff1b8' },
+ { value: '#f4ffb8' },
+ { value: '#d9f7be' },
+ { value: '#b5f5ec' },
+ { value: '#bae7ff' },
+ { value: '#d6e4ff' },
+ { value: '#efdbff' },
+ { value: '#ffd6e7' },
+]
+
+export const defaultBGColors = ['#ffccc7', '#ffd8bf', '#ffe7ba', '#fff1b8', '#d9f7be', '#b5f5ec', '#bae7ff', '#d6e4ff', '#efdbff', '#ffd6e7']
diff --git a/cmdb-ui/src/modules/cmdb/views/batch/index.vue b/cmdb-ui/src/modules/cmdb/views/batch/index.vue
index d9f8a4a..17eb136 100644
--- a/cmdb-ui/src/modules/cmdb/views/batch/index.vue
+++ b/cmdb-ui/src/modules/cmdb/views/batch/index.vue
@@ -16,9 +16,9 @@
- 取消
- 上传
- 失败下载
+ {{ $t('cancel') }}
+ {{ $t('upload') }}
+ {{ $t('cmdb.batch.downloadFailed') }}
@@ -109,7 +109,7 @@ export default {
},
handleUpload() {
if (!this.ciType) {
- this.$message.error('尚未选择模板类型')
+ this.$message.error(this.$t('cmdb.batch.unselectCIType'))
return
}
if (this.uploadData && this.uploadData.length > 0) {
@@ -118,7 +118,7 @@ export default {
this.$refs.uploadResult.upload2Server()
})
} else {
- this.$message.error('请上传文件')
+ this.$message.error(this.$t('cmdb.batch.pleaseUploadFile'))
}
},
handleCancel() {
@@ -127,7 +127,7 @@ export default {
this.$refs.ciTypeChoice.selectNum = null
this.hasError = false
} else {
- this.$message.warning('批量上传已取消')
+ this.$message.warning(this.$t('cmdb.batch.batchUploadCanceled'))
this.isUploading = false
}
},
diff --git a/cmdb-ui/src/modules/cmdb/views/batch/modules/CiTypeChoice.vue b/cmdb-ui/src/modules/cmdb/views/batch/modules/CiTypeChoice.vue
index 219947a..59c837c 100644
--- a/cmdb-ui/src/modules/cmdb/views/batch/modules/CiTypeChoice.vue
+++ b/cmdb-ui/src/modules/cmdb/views/batch/modules/CiTypeChoice.vue
@@ -1,9 +1,9 @@
- 模板类型:
+ {{ $t('cmdb.ciType.ciType') }}:
下载模板{{ $t('cmdb.batch.downloadTemplate') }}
- 模型属性
+ {{ $t('cmdb.ciType.attributes') }}
- 全选
+ {{ $t('checkAll') }}
@@ -52,7 +52,7 @@
- 模型关联
+ {{ $t('cmdb.ciType.relation') }}
@@ -150,7 +150,7 @@ export default {
},
methods: {
selectCiType(el) {
- // 当选择好模板类型时的回调函数
+ // Callback function when a template type is selected
getCITypeAttributesById(el).then((res) => {
this.$emit('getCiTypeAttr', res)
this.selectCiTypeAttrList = res
diff --git a/cmdb-ui/src/modules/cmdb/views/batch/modules/UploadFileForm.vue b/cmdb-ui/src/modules/cmdb/views/batch/modules/UploadFileForm.vue
index bac1322..d18a048 100644
--- a/cmdb-ui/src/modules/cmdb/views/batch/modules/UploadFileForm.vue
+++ b/cmdb-ui/src/modules/cmdb/views/batch/modules/UploadFileForm.vue
@@ -10,8 +10,8 @@
:disabled="!ciType || isUploading"
>
- 点击或拖拽文件至此上传!
- 支持文件类型:xls,xlsx
+ {{ $t('cmdb.batch.drawTips') }}
+ {{ $t('cmdb.batch.supportFileTypes') }}
{{ item.name }}
diff --git a/cmdb-ui/src/modules/cmdb/views/batch/modules/UploadResult.vue b/cmdb-ui/src/modules/cmdb/views/batch/modules/UploadResult.vue
index 55c3b54..1ccab2c 100644
--- a/cmdb-ui/src/modules/cmdb/views/batch/modules/UploadResult.vue
+++ b/cmdb-ui/src/modules/cmdb/views/batch/modules/UploadResult.vue
@@ -1,13 +1,13 @@
-
上传结果
+
{{ $t('cmdb.batch.uploadResult') }}
- 共 {{ total }} 条,已成功
- {{ success }} 条,失败 {{ errorNum }} 条
+ {{ $t('cmdb.batch.total') }} {{ total }} {{ $t('cmdb.batch.successItems') }}
+ {{ success }} {{ $t('cmdb.batch.failedItems') }} {{ errorNum }} {{ $t('cmdb.batch.items') }}
-
错误信息:
+
{{ $t('cmdb.batch.errorTips') }}:
- {{ item }}
@@ -71,7 +71,7 @@ export default {
if (r.status === 'fulfilled') {
this.success += 1
} else {
- this.errorItems.push(r?.reason?.response?.data.message ?? '请求出现错误,请稍后再试')
+ this.errorItems.push(r?.reason?.response?.data.message ?? this.$t('cmdb.batch.requestFailedTips'))
this.errorNum += 1
this.$emit('uploadResultError', 6 * i + j)
}
@@ -86,7 +86,7 @@ export default {
}
if (this.isUploading) {
this.$emit('uploadResultDone')
- this.$message.success('批量上传已完成')
+ this.$message.success(this.$t('cmdb.batch.requestSuccessTips'))
}
},
},
diff --git a/cmdb-ui/src/modules/cmdb/views/ci/index.vue b/cmdb-ui/src/modules/cmdb/views/ci/index.vue
index 8a484a5..46bc6fb 100644
--- a/cmdb-ui/src/modules/cmdb/views/ci/index.vue
+++ b/cmdb-ui/src/modules/cmdb/views/ci/index.vue
@@ -1,954 +1,1027 @@
-
-
-
-
-
-
-
-
-
修改
-
-
下载
-
-
删除
-
选取:{{ selectedRowKeys.length }} 项
-
-
-
-
-
-
-
-
-
-
- {{ col.title }}
-
-
-
-
-
-
-
-
-
-
-
- {{ choice[0] }}
-
-
-
-
-
-
-
- {{ row[col.field] }}
- {{ row[col.field] }}
-
-
-
-
-
- {{ value }}
-
-
-
-
-
- {{ row[col.field] }}
-
-
-
-
-
-
- 操作
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 加载中...
-
-
![]()
-
暂无数据
-
-
-
-
-
{
- currentPage = page
- }
- "
- >
-
- {{ props.value }}条/页
- 全部
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
{{ $t('update') }}
+
+
{{ $t('download') }}
+
+
{{ $t('delete') }}
+
{{ $t('cmdb.ci.selectRows', { rows: selectedRowKeys.length }) }}
+
+
+
+
+
+
+
+
+
+
+ {{ col.title }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ choice[0] }}
+
+
+
+
+
+
+
+ {{ row[col.field] }}
+ {{ row[col.field] }}
+
+
+
+
+
+ {{ value }}
+
+
+
+
+
+ {{ row[col.field] }}
+
+
+
+
+
+
+ {{ $t('operation') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('loading') }}
+
+
![]()
+
{{ $t('noData') }}
+
+
+
+
+
{
+ currentPage = page
+ }
+ "
+ >
+
+ {{ props.value }}{{ $t('itemsPerPage') }}
+ {{ $t('cmdb.ci.all') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cmdb-ui/src/modules/cmdb/views/ci/modules/BatchUpdateRelation.vue b/cmdb-ui/src/modules/cmdb/views/ci/modules/BatchUpdateRelation.vue
index c066801..429feae 100644
--- a/cmdb-ui/src/modules/cmdb/views/ci/modules/BatchUpdateRelation.vue
+++ b/cmdb-ui/src/modules/cmdb/views/ci/modules/BatchUpdateRelation.vue
@@ -1,6 +1,6 @@
{ visible = false; $emit('refresh', true) }"
:visible="visible"
diff --git a/cmdb-ui/src/modules/cmdb/views/ci/modules/CiDetail.vue b/cmdb-ui/src/modules/cmdb/views/ci/modules/CiDetail.vue
index c9abc1f..87cce17 100644
--- a/cmdb-ui/src/modules/cmdb/views/ci/modules/CiDetail.vue
+++ b/cmdb-ui/src/modules/cmdb/views/ci/modules/CiDetail.vue
@@ -1,342 +1,344 @@
-
- {
- visible = false
- }
- "
- :visible="visible"
- :hasTitle="false"
- :hasFooter="false"
- :bodyStyle="{ padding: 0, height: '100vh' }"
- wrapClassName="ci-detail"
- destroyOnClose
- >
-
-
- 属性
-
-
-
-
-
-
-
-
-
- 关系
-
-
-
-
-
- 操作历史
-
-
-
-
-
-
- {{ operateTypeMap[row.operate_type] }}
-
-
-
-
-
-
-
-
-
- 触发历史
-
-
-
-
-
-
-
-
-
-
-
-
+
+ {
+ visible = false
+ }
+ "
+ :visible="visible"
+ :hasTitle="false"
+ :hasFooter="false"
+ :bodyStyle="{ padding: 0, height: '100vh' }"
+ wrapClassName="ci-detail"
+ destroyOnClose
+ >
+
+
+ {{ $t('cmdb.attribute') }}
+
+
+
+
+
+
+
+
+
+ {{ $t('cmdb.relation') }}
+
+
+
+
+
+ {{ $t('cmdb.ci.history') }}
+
+
+
+
+
+
+ {{ operateTypeMap[row.operate_type] }}
+
+
+
+
+
+
+
+
+
+ {{ $t('cmdb.history.triggerHistory') }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cmdb-ui/src/modules/cmdb/views/ci/modules/CreateInstanceForm.vue b/cmdb-ui/src/modules/cmdb/views/ci/modules/CreateInstanceForm.vue
index ffadaa2..49fe39b 100644
--- a/cmdb-ui/src/modules/cmdb/views/ci/modules/CreateInstanceForm.vue
+++ b/cmdb-ui/src/modules/cmdb/views/ci/modules/CreateInstanceForm.vue
@@ -1,386 +1,388 @@
-
-
-
-
-
-
-
-
- 模型关系
-
-
-
-
-
-
-
- {{ attr.alias || attr.name }}
-
-
-
-
-
-
-
-
-
-
-
-
- 可根据需要修改字段,当值为空时,则该字段置空
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ choice[0] }}
-
-
-
-
-
- handleFocusInput(e, list)"
- v-decorator="[list.name, { rules: [{ required: false }] }]"
- />
-
-
-
-
-
-
-
-
-
-
- 新增修改字段
-
-
-
-
-
-
-
-
+
+
+
+
{{ $t('cancel') }}
+
{{ $t('submit') }}
+
+
+
+
+
+
+ {{ $t('cmdb.menu.citypeRelation') }}
+
+
+
+
+
+
+
+ {{ attr.alias || attr.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('cmdb.ci.tips2') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ choice[0] }}
+
+
+
+
+
+ handleFocusInput(e, list)"
+ v-decorator="[list.name, { rules: [{ required: false }] }]"
+ />
+
+
+
+
+
+
+
+
+
+
+ {{ $t('cmdb.ci.newUpdateField') }}
+
+
+
+
+
+
+
+
diff --git a/cmdb-ui/src/modules/cmdb/views/ci/modules/MetadataDrawer.vue b/cmdb-ui/src/modules/cmdb/views/ci/modules/MetadataDrawer.vue
index 4597ac1..42cbdc8 100644
--- a/cmdb-ui/src/modules/cmdb/views/ci/modules/MetadataDrawer.vue
+++ b/cmdb-ui/src/modules/cmdb/views/ci/modules/MetadataDrawer.vue
@@ -1,225 +1,228 @@
-
- {
- visible = false
- }
- "
- title="属性说明"
- width="72%"
- :bodyStyle="{ height: '100vh' }"
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ {
+ visible = false
+ }
+ "
+ :title="$t('cmdb.ci.attributeDesc')"
+ width="72%"
+ :bodyStyle="{ height: '100vh' }"
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cmdb-ui/src/modules/cmdb/views/ci/modules/ciDetailAttrContent.vue b/cmdb-ui/src/modules/cmdb/views/ci/modules/ciDetailAttrContent.vue
index 8b0e905..55ad9f4 100644
--- a/cmdb-ui/src/modules/cmdb/views/ci/modules/ciDetailAttrContent.vue
+++ b/cmdb-ui/src/modules/cmdb/views/ci/modules/ciDetailAttrContent.vue
@@ -1,318 +1,318 @@
-
-
-
-
- {{ JSON.stringify(ci[attr.name] || {}) }}
-
-
-
-
-
- {{ value }}
-
-
-
-
- {{ ci[attr.name] }}
-
-
-
- {{ ci[attr.name].join(',') }}
-
- {{ getName(ci[attr.name]) }}
-
-
-
-
-
-
-
-
-
-
-
- {{ choice[0] }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ {{ JSON.stringify(ci[attr.name] || {}) }}
+
+
+
+
+
+ {{ value }}
+
+
+
+
+ {{ ci[attr.name] }}
+
+
+
+ {{ ci[attr.name].join(',') }}
+
+ {{ getName(ci[attr.name]) }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ choice[0] }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cmdb-ui/src/modules/cmdb/views/ci/modules/ciDetailRelation.vue b/cmdb-ui/src/modules/cmdb/views/ci/modules/ciDetailRelation.vue
index f89028c..44d0251 100644
--- a/cmdb-ui/src/modules/cmdb/views/ci/modules/ciDetailRelation.vue
+++ b/cmdb-ui/src/modules/cmdb/views/ci/modules/ciDetailRelation.vue
@@ -2,10 +2,10 @@
- 拓扑
+ {{ $t('cmdb.ci.topo') }}
- 表格
+ {{ $t('cmdb.ci.table') }}
@@ -24,7 +24,7 @@
>
-
(当前模型关系为多对多,请前往关系视图进行增删操作)
+
({{ $t('cmdb.ci.m2mTips') }})
-
+
- (当前模型关系为多对多,请前往关系视图进行增删操作)
+ ({{ $t('cmdb.ci.m2mTips') }})
-
+
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/cmdb-ui/src/modules/cmdb/views/ci/modules/ciDetailRelationTopo/node.js b/cmdb-ui/src/modules/cmdb/views/ci/modules/ciDetailRelationTopo/node.js
index af8cd49..3680d6b 100644
--- a/cmdb-ui/src/modules/cmdb/views/ci/modules/ciDetailRelationTopo/node.js
+++ b/cmdb-ui/src/modules/cmdb/views/ci/modules/ciDetailRelationTopo/node.js
@@ -1,56 +1,57 @@
-/* eslint-disable no-useless-constructor */
-import { TreeNode } from 'butterfly-dag'
-
-import $ from 'jquery'
-
-class BaseNode extends TreeNode {
- constructor(opts) {
- super(opts)
- }
-
- draw = (opts) => {
- const container = $(`
`)
- .css('top', opts.top)
- .css('left', opts.left)
- .attr('id', opts.id)
- let icon
- if (opts.options.icon) {
- if (opts.options.icon.split('$$')[2]) {
- icon = $(`
[3]})
`)
- } else {
- icon = $(`
`)
- }
- } else {
- icon = $(`
${opts.options.name[0].toUpperCase()}`)
- }
-
- const titleContent = $(`
${opts.options.title}
`)
- const uniqueDom = $(`
${opts.options.unique_alias || opts.options.unique_name}:${opts.options.unique_value}
`)
- container.append(icon)
- container.append(titleContent)
- container.append(uniqueDom)
-
- if (opts.options.side && (!opts.options.children.length && !(opts.options.edges && opts.options.edges.length && opts.options.edges.find(e => e.source === opts.options.side && e.sourceNode === opts.options.id)))) {
- const addIcon = $(`
`)
- container.append(addIcon)
- addIcon.on('click', () => {
- if (opts.options.side === 'left') {
- this.emit('events', {
- type: 'custom:clickLeft',
- data: { ...this }
- })
- }
- if (opts.options.side === 'right') {
- this.emit('events', {
- type: 'custom:clickRight',
- data: { ...this }
- })
- }
- })
- }
-
- return container[0]
- }
-}
-
-export default BaseNode
+/* eslint-disable no-useless-constructor */
+import { TreeNode } from 'butterfly-dag'
+import i18n from '@/lang'
+
+import $ from 'jquery'
+
+class BaseNode extends TreeNode {
+ constructor(opts) {
+ super(opts)
+ }
+
+ draw = (opts) => {
+ const container = $(`
`)
+ .css('top', opts.top)
+ .css('left', opts.left)
+ .attr('id', opts.id)
+ let icon
+ if (opts.options.icon) {
+ if (opts.options.icon.split('$$')[2]) {
+ icon = $(`
[3]})
`)
+ } else {
+ icon = $(`
`)
+ }
+ } else {
+ icon = $(`
${opts.options.name[0].toUpperCase()}`)
+ }
+
+ const titleContent = $(`
${opts.options.title}
`)
+ const uniqueDom = $(`
${opts.options.unique_alias || opts.options.unique_name}:${opts.options.unique_value}
`)
+ container.append(icon)
+ container.append(titleContent)
+ container.append(uniqueDom)
+
+ if (opts.options.side && (!opts.options.children.length && !(opts.options.edges && opts.options.edges.length && opts.options.edges.find(e => e.source === opts.options.side && e.sourceNode === opts.options.id)))) {
+ const addIcon = $(`
`)
+ container.append(addIcon)
+ addIcon.on('click', () => {
+ if (opts.options.side === 'left') {
+ this.emit('events', {
+ type: 'custom:clickLeft',
+ data: { ...this }
+ })
+ }
+ if (opts.options.side === 'right') {
+ this.emit('events', {
+ type: 'custom:clickRight',
+ data: { ...this }
+ })
+ }
+ })
+ }
+
+ return container[0]
+ }
+}
+
+export default BaseNode
diff --git a/cmdb-ui/src/modules/cmdb/views/ci/modules/createInstanceFormByGroup.vue b/cmdb-ui/src/modules/cmdb/views/ci/modules/createInstanceFormByGroup.vue
index ba51a5a..ed8e2c4 100644
--- a/cmdb-ui/src/modules/cmdb/views/ci/modules/createInstanceFormByGroup.vue
+++ b/cmdb-ui/src/modules/cmdb/views/ci/modules/createInstanceFormByGroup.vue
@@ -1,6 +1,6 @@
- {{ group.name || '其他' }}
+ {{ group.name || $t('other') }}
- 没数据
+ {{ $t('noData') }}
-
确定
+
{{ $t('confirm') }}
@@ -79,16 +79,17 @@ export default {
this.selectedAttrList = targetKeys
},
handleSubmit() {
+ const that = this
if (this.selectedAttrList.length) {
subscribeCIType(this.typeId, this.selectedAttrList).then(res => {
- this.$message.success('订阅成功!')
+ this.$message.success(this.$t('cmdb.components.subSuccess'))
this.visible = false
this.$emit('refresh')
})
} else {
this.$confirm({
- title: '警告',
- content: '必须至少选择一个字段',
+ title: that.$t('warning'),
+ content: that.$t('cmdb.ci.tips4'),
})
}
},
diff --git a/cmdb-ui/src/modules/cmdb/views/ci/modules/editAttrsPopover.vue b/cmdb-ui/src/modules/cmdb/views/ci/modules/editAttrsPopover.vue
index 45bb789..4766add 100644
--- a/cmdb-ui/src/modules/cmdb/views/ci/modules/editAttrsPopover.vue
+++ b/cmdb-ui/src/modules/cmdb/views/ci/modules/editAttrsPopover.vue
@@ -75,12 +75,12 @@ export default {
return [item, !!this.fixedList.includes(item)]
})
).then((res) => {
- this.$message.success('订阅成功!')
+ this.$message.success(this.$t('cmdb.components.subSuccess'))
this.visible = false
this.$emit('refresh')
})
} else {
- this.$message.error('请至少选择一个字段!')
+ this.$message.error(this.$t('cmdb.ci.tips4'))
}
},
setTargetKeys(targetKeys) {
diff --git a/cmdb-ui/src/modules/cmdb/views/ci_types/adModal.vue b/cmdb-ui/src/modules/cmdb/views/ci_types/adModal.vue
index 0f071fc..ff049d8 100644
--- a/cmdb-ui/src/modules/cmdb/views/ci_types/adModal.vue
+++ b/cmdb-ui/src/modules/cmdb/views/ci_types/adModal.vue
@@ -3,9 +3,9 @@
- 取消
- 确认
- 新建plugin
+ {{ $t('cancel') }}
+ {{ $t('confirm') }}
+ {{ $t('cmdb.ciType.addPlugin') }}
@@ -55,7 +55,7 @@ export default {
await Promise.all(promises)
.then((res) => {
this.getCITypeDiscovery(res[0].id)
- this.$message.success('添加成功')
+ this.$message.success(this.$t('addSuccess'))
})
.catch(() => {
this.getCITypeDiscovery()
diff --git a/cmdb-ui/src/modules/cmdb/views/ci_types/attrAD.vue b/cmdb-ui/src/modules/cmdb/views/ci_types/attrAD.vue
index 1e705ac..ea79501 100644
--- a/cmdb-ui/src/modules/cmdb/views/ci_types/attrAD.vue
+++ b/cmdb-ui/src/modules/cmdb/views/ci_types/attrAD.vue
@@ -29,7 +29,7 @@
slot="tabBarExtraContent"
:style="{ cursor: 'pointer' }"
>
-
添加
+
{{ $t('add') }}
@@ -40,7 +40,7 @@
}"
>
![]()
-
暂无数据
+
{{ $t('noData') }}
{
@@ -52,7 +52,7 @@
icon="plus"
class="ops-button-primary"
>
- 添加
+ {{ $t('add') }}
@@ -158,10 +158,10 @@ export default {
e.stopPropagation()
const that = this
this.$confirm({
- title: `确认删除 【${item?.extra_option?.alias || this.getADCITypeParam(item.adr_id)}】`,
+ title: that.$t('cmdb.ciType.confirmDeleteADT', { pluginName: `${item?.extra_option?.alias || this.getADCITypeParam(item.adr_id)}` }),
content: (h) => (
-
删除插件
+
{that.$t('cmdb.ciType.deletePlugin')}
),
onOk() {
@@ -169,7 +169,7 @@ export default {
if (that.currentTab === item.id) {
that.currentTab = ''
}
- that.$message.success('删除成功!')
+ that.$message.success(that.$t('deleteSuccess'))
that.getCITypeDiscovery()
if (that.deletePlugin) {
await deleteDiscovery(item.adr_id).finally(() => {
diff --git a/cmdb-ui/src/modules/cmdb/views/ci_types/attrADTabpane.vue b/cmdb-ui/src/modules/cmdb/views/ci_types/attrADTabpane.vue
index 7a2659c..3fa87c6 100644
--- a/cmdb-ui/src/modules/cmdb/views/ci_types/attrADTabpane.vue
+++ b/cmdb-ui/src/modules/cmdb/views/ci_types/attrADTabpane.vue
@@ -1,396 +1,398 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/cmdb-ui/src/modules/cmdb/views/ci_types/attributeCard.vue b/cmdb-ui/src/modules/cmdb/views/ci_types/attributeCard.vue
index 6c9bd78..3d2d425 100644
--- a/cmdb-ui/src/modules/cmdb/views/ci_types/attributeCard.vue
+++ b/cmdb-ui/src/modules/cmdb/views/ci_types/attributeCard.vue
@@ -1,278 +1,282 @@
-
-
-
-
-
-
-
-
- {{ property.alias || property.name }}
-
-
密码
-
链接
-
{{ valueTypeMap[property.value_type] }}
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ {{ property.alias || property.name }}
+
+
{{ $t('cmdb.ciType.password') }}
+
{{ $t('cmdb.ciType.link') }}
+
{{ valueTypeMap[property.value_type] }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cmdb-ui/src/modules/cmdb/views/ci_types/attributeEditForm.vue b/cmdb-ui/src/modules/cmdb/views/ci_types/attributeEditForm.vue
index c650e91..7db4c35 100644
--- a/cmdb-ui/src/modules/cmdb/views/ci_types/attributeEditForm.vue
+++ b/cmdb-ui/src/modules/cmdb/views/ci_types/attributeEditForm.vue
@@ -1,715 +1,717 @@
-
-
-
- 基础设置
-
-
-
-
-
-
-
-
-
- {{ value }}
-
-
-
-
-
-
-
-
-
- 自增ID
-
-
-
-
-
-
-
-
- 创建时间
-
-
- 更新时间
-
-
- 自定义时间
-
-
-
-
-
-
-
-
- 创建时间
-
-
- 更新时间
-
-
-
-
-
-
-
-
-
-
-
- onChange(checked, 'is_required')"
- name="is_required"
- v-decorator="['is_required', { rules: [], valuePropName: 'checked' }]"
- />
-
-
-
-
-
-
-
-
-
-
- {{ `索引` }}
-
- {
- e.stopPropagation()
- e.preventDefault()
- }
- "
- />
-
-
-
-
-
-
-
-
-
- {{ `显示` }}
-
- {
- e.stopPropagation()
- e.preventDefault()
- }
- "
- />
-
-
-
-
-
-
-
-
- onChange(checked, 'is_sortable')"
- name="is_sortable"
- v-decorator="['is_sortable', { rules: [], valuePropName: 'checked' }]"
- />
-
-
-
-
-
-
- {{ `多值` }}
-
- {
- e.stopPropagation()
- e.preventDefault()
- }
- "
- />
-
-
-
- onChange(checked, 'is_list')"
- name="is_list"
- v-decorator="['is_list', { rules: [], valuePropName: 'checked' }]"
- />
-
-
- 高级设置
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ `计算属性` }}
-
- {
- e.stopPropagation()
- e.preventDefault()
- }
- "
- />
-
-
-
- onChange(checked, 'is_computed')"
- name="is_computed"
- v-decorator="['is_computed', { rules: [], valuePropName: 'checked' }]"
- />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ {{ $t('cmdb.ciType.basicConfig') }}
+
+
+
+
+
+
+
+
+
+ {{ value }}
+
+
+
+
+
+
+
+
+
+ {{ $t('cmdb.ciType.autoIncID') }}
+
+
+
+
+
+
+
+
+ {{ $t('createdAt') }}
+
+
+ {{ $t('updatedAt') }}
+
+
+ {{ $t('cmdb.ciType.customTime') }}
+
+
+
+
+
+
+
+
+ {{ $t('createdAt') }}
+
+
+ {{ $t('updatedAt') }}
+
+
+
+
+
+
+
+
+
+
+
+ onChange(checked, 'is_required')"
+ name="is_required"
+ v-decorator="['is_required', { rules: [], valuePropName: 'checked' }]"
+ />
+
+
+
+
+
+
+
+
+
+
+ {{ $t('cmdb.ciType.index') }}
+
+ {
+ e.stopPropagation()
+ e.preventDefault()
+ }
+ "
+ />
+
+
+
+
+
+
+
+
+
+ {{ $t('cmdb.ciType.defaultShow') }}
+
+ {
+ e.stopPropagation()
+ e.preventDefault()
+ }
+ "
+ />
+
+
+
+
+
+
+
+
+ onChange(checked, 'is_sortable')"
+ name="is_sortable"
+ v-decorator="['is_sortable', { rules: [], valuePropName: 'checked' }]"
+ />
+
+
+
+
+
+
+ {{ $t('cmdb.ciType.list') }}
+
+ {
+ e.stopPropagation()
+ e.preventDefault()
+ }
+ "
+ />
+
+
+
+ onChange(checked, 'is_list')"
+ name="is_list"
+ v-decorator="['is_list', { rules: [], valuePropName: 'checked' }]"
+ />
+
+
+ {{ $t('cmdb.ciType.advancedSettings') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('cmdb.ciType.computedAttribute') }}
+
+ {
+ e.stopPropagation()
+ e.preventDefault()
+ }
+ "
+ />
+
+
+
+ onChange(checked, 'is_computed')"
+ name="is_computed"
+ v-decorator="['is_computed', { rules: [], valuePropName: 'checked' }]"
+ />
+
+
+
+
+
+
+
+
+
+
{{ $t('cancel') }}
+
{{ $t('confirm') }}
+
+
+
+
+
+
+
+
+
diff --git a/cmdb-ui/src/modules/cmdb/views/ci_types/attributeStore.vue b/cmdb-ui/src/modules/cmdb/views/ci_types/attributeStore.vue
index 0c28b7b..f8b2876 100644
--- a/cmdb-ui/src/modules/cmdb/views/ci_types/attributeStore.vue
+++ b/cmdb-ui/src/modules/cmdb/views/ci_types/attributeStore.vue
@@ -2,15 +2,15 @@
@@ -57,7 +57,7 @@ export default {
return this.rule?.option?.icon ?? { color: '', name: 'caise-wuliji' }
},
isDeletable() {
- return !['物理机', '虚拟机', '网卡', '硬盘', 'server', 'vserver', 'NIC', 'harddisk'].includes(this.rule.name)
+ return ![this.$t('cmdb.ad.server'), this.$t('cmdb.ad.vserver'), this.$t('cmdb.ad.nic'), this.$t('cmdb.ad.disk'), 'server', 'vserver', 'NIC', 'harddisk'].includes(this.rule.name)
},
},
inject: {
diff --git a/cmdb-ui/src/modules/cmdb/views/discovery/editDrawer.vue b/cmdb-ui/src/modules/cmdb/views/discovery/editDrawer.vue
index 0aa2fc0..b18c4d1 100644
--- a/cmdb-ui/src/modules/cmdb/views/discovery/editDrawer.vue
+++ b/cmdb-ui/src/modules/cmdb/views/discovery/editDrawer.vue
@@ -1,344 +1,298 @@
-
-
-
-
- 基础设置
-
-
-
-
-
-
-
-
- 默认
- plugin
-
-
-
- 采集设置
-
-
- 新增
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ {{ $t('cmdb.ciType.basicConfig') }}
+
+
+
+
+
+
+
+
+ {{ $t('cmdb.custom_dashboard.default') }}
+ plugin
+
+
+
+ {{ $t('cmdb.ad.collectSettings') }}
+
+
+
{{ $t('cmdb.ad.updateFields') }}
+
+ {{ $t('new') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ $t('cancel') }}
+
{{ $t('save') }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cmdb-ui/src/modules/cmdb/views/discovery/index.vue b/cmdb-ui/src/modules/cmdb/views/discovery/index.vue
index e2442fd..f34b1fa 100644
--- a/cmdb-ui/src/modules/cmdb/views/discovery/index.vue
+++ b/cmdb-ui/src/modules/cmdb/views/discovery/index.vue
@@ -3,9 +3,9 @@
@@ -45,22 +45,26 @@ export default {
},
data() {
return {
- typeCategory: [
+ typeCategoryChildren: { agent: [], snmp: [], http: [] },
+ }
+ },
+ computed: {
+ typeCategory() {
+ return [
{
type: 'agent',
- label: '内置 & 插件',
+ label: this.$t('cmdb.ad.agent'),
},
{
type: 'snmp',
- label: '网络设备',
+ label: this.$t('cmdb.ad.snmp'),
},
{
type: 'http',
- label: '公有云资源',
+ label: this.$t('cmdb.ad.http'),
},
- ],
- typeCategoryChildren: { agent: [], snmp: [], http: [] },
- }
+ ]
+ },
},
provide() {
return {
@@ -87,11 +91,11 @@ export default {
deleteRule(rule) {
const that = this
this.$confirm({
- title: '警告',
- content: `确认删除 【${rule.name}】?`,
+ title: that.$t('warning'),
+ content: that.$t('confirmDelete', { name: `${rule.name}` }),
onOk() {
deleteDiscovery(rule.id).then(() => {
- that.$message.success('删除成功!')
+ that.$message.success(that.$t('deleteSuccess'))
that.getDiscovery()
})
},
@@ -99,13 +103,14 @@ export default {
},
download() {
const x = new XMLHttpRequest()
+ const that = this
x.open('GET', `/api/v0.1/adr/template/export/file`, true)
x.responseType = 'blob'
x.onload = function(e) {
const url = window.URL.createObjectURL(x.response)
const a = document.createElement('a')
a.href = url
- a.download = `自动发现规则`
+ a.download = that.$t('cmdb.ad.rule')
a.click()
}
x.send()
@@ -120,13 +125,13 @@ export default {
const state = Number(xhr.readyState)
if (state === 4) {
if (xhr.status === 200) {
- that.$message.success('上传成功')
+ that.$message.success(that.$t('uploadSuccess'))
that.getDiscovery()
}
}
}
xhr.ontimeout = function() {
- that.$httpError('超时错误')
+ that.$httpError(that.$t('cmdb.ad.timeout'))
}
xhr.send(formData)
diff --git a/cmdb-ui/src/modules/cmdb/views/discoveryCI/index.vue b/cmdb-ui/src/modules/cmdb/views/discoveryCI/index.vue
index 581e46b..21450ff 100644
--- a/cmdb-ui/src/modules/cmdb/views/discoveryCI/index.vue
+++ b/cmdb-ui/src/modules/cmdb/views/discoveryCI/index.vue
@@ -3,7 +3,7 @@
- {{ group.name || '其他' }}{{ group.name || $t('other') }}({{ group.ci_types.length }})
-
入库
+
{{ $t('cmdb.ad.accept') }}
-
删除
-
选取:{{ selectedRowKeys.length }} 项
+
{{ $t('delete') }}
+
{{ $t('cmdb.ci.selectRows', { rows: selectedRowKeys.length }) }}
- {{ row.is_accept ? '是' : '否' }}
+ {{ row.is_accept ? $t('yes') : $t('no') }}
-
+
-
+
@@ -115,7 +115,7 @@
![]()
-
暂无数据
+
{{ $t('noData') }}
@@ -242,11 +242,11 @@ export default {
this.$refs.xTable.getVxetableRef().clearCheckboxReserve()
const that = this
this.$confirm({
- title: '警告',
- content: `确认入库?`,
+ title: that.$t('warning'),
+ content: that.$t('cmdb.ad.confirmAccept'),
onOk() {
updateADCAccept(row.id).then(() => {
- that.$message.success('入库成功')
+ that.$message.success(that.$t('cmdb.ad.accpetSuccess'))
that.getAdc(false)
})
},
@@ -258,11 +258,11 @@ export default {
this.$refs.xTable.getVxetableRef().clearCheckboxReserve()
const that = this
this.$confirm({
- title: '警告',
- content: `确认删除该条数据?`,
+ title: that.$t('warning'),
+ content: that.$t('cmdb.ad.deleteADC'),
onOk() {
deleteAdc(row.id).then(() => {
- that.$message.success('删除成功')
+ that.$message.success(that.$t('deleteSuccess'))
that.getAdc(false)
})
},
@@ -273,7 +273,7 @@ export default {
for (let i = 0; i < this.selectedRowKeys.length; i++) {
await updateADCAccept(this.selectedRowKeys[i])
}
- this.$message.success('入库成功')
+ this.$message.success(this.$t('cmdb.ad.acceptSuccess'))
this.getAdc(false)
this.selectedRowKeys = []
this.$refs.xTable.getVxetableRef().clearCheckboxRow()
@@ -283,13 +283,13 @@ export default {
async batchDelete() {
const that = this
this.$confirm({
- title: '警告',
- content: `确认删除这些数据?`,
+ title: that.$t('warning'),
+ content: that.$t('cmdb.ad.batchDelete'),
async onOk() {
for (let i = 0; i < that.selectedRowKeys.length; i++) {
await deleteAdc(that.selectedRowKeys[i])
}
- that.$message.success('删除成功')
+ that.$message.success(that.$t('deleteSuccess'))
that.getAdc(false)
that.selectedRowKeys = []
that.$refs.xTable.getVxetableRef().clearCheckboxRow()
diff --git a/cmdb-ui/src/modules/cmdb/views/model_relation/index.vue b/cmdb-ui/src/modules/cmdb/views/model_relation/index.vue
index e383790..4275634 100644
--- a/cmdb-ui/src/modules/cmdb/views/model_relation/index.vue
+++ b/cmdb-ui/src/modules/cmdb/views/model_relation/index.vue
@@ -1,6 +1,8 @@
-
新增关系
+
{{
+ $t('cmdb.ciType.addRelation')
+ }}
-
+
@@ -24,11 +29,11 @@
}}
-
+
@@ -38,10 +43,13 @@
-
+
{{
relationType.name
@@ -49,11 +57,16 @@
-
-
- 一对多
- 一对一
- 多对多
+
+
+ {{ $t('cmdb.ciType.one2Many') }}
+ {{ $t('cmdb.ciType.one2One') }}
+ {{ $t('cmdb.ciType.many2Many') }}
@@ -66,7 +79,7 @@ import ModelRelationTable from './modules/modelRelationTable.vue'
import { searchResourceType } from '@/modules/acl/api/resource'
import { getCITypeGroupsConfig } from '@/modules/cmdb/api/ciTypeGroup'
import { getCITypes } from '@/modules/cmdb/api/CIType'
-import { createRelation, deleteRelation, getRelationTypes } from '@/modules/cmdb/api/CITypeRelation'
+import { createRelation, deleteRelation, getCITypeChildren, getRelationTypes } from '@/modules/cmdb/api/CITypeRelation'
export default {
name: 'Index',
components: {
@@ -85,16 +98,40 @@ export default {
drawerTitle: '',
CITypes: [],
relationTypes: [],
- constraintMap: {
- '0': '一对多',
- '1': '一对一',
- '2': '多对多',
- },
sourceCITypeId: undefined,
targetCITypeId: undefined,
}
},
+ computed: {
+ currentCId() {
+ if (this.currentId) {
+ if (this.currentId.split('%')[1] !== 'null') {
+ return Number(this.currentId.split('%')[1])
+ }
+ return null
+ }
+ return null
+ },
+ displayCITypes() {
+ return this.CITypes
+ // return this.CITypes.filter((c) => c.id !== this.targetCITypeId)
+ },
+ displayTargetCITypes() {
+ return this.CITypes
+ // return this.CITypes.filter((c) => c.id !== this.sourceCITypeId)
+ },
+ CITypeId() {
+ return this.currentCId
+ },
+ constraintMap() {
+ return {
+ '0': this.$t('cmdb.ciType.one2Many'),
+ '1': this.$t('cmdb.ciType.one2One'),
+ '2': this.$t('cmdb.ciType.many2Many'),
+ }
+ },
+ },
provide() {
return {
resource_type: () => {
@@ -116,26 +153,6 @@ export default {
})
this.loadCITypes(!_currentId)
},
- computed: {
- currentCId() {
- if (this.currentId) {
- if (this.currentId.split('%')[1] !== 'null') {
- return Number(this.currentId.split('%')[1])
- }
- return null
- }
- return null
- },
- displayCITypes() {
- return this.CITypes
- },
- displayTargetCITypes() {
- return this.CITypes
- },
- CITypeId() {
- return this.currentCId
- },
- },
methods: {
async loadCITypes(isResetCurrentId = false) {
const groups = await getCITypeGroupsConfig({ need_other: true })
@@ -146,7 +163,6 @@ export default {
this.$nextTick(() => {
groups.forEach((g) => {
if (!g.id) {
- // 给未分组增加一个假的id
g.id = -1
}
if (isResetCurrentId && !alreadyReset && g.ci_types && g.ci_types.length) {
@@ -172,7 +188,7 @@ export default {
})
},
handleCreate() {
- this.drawerTitle = '新增关系'
+ this.drawerTitle = this.$t('cmdb.ciType.addRelation')
this.visible = true
this.$nextTick(() => {
this.form.setFieldsValue({
@@ -192,7 +208,7 @@ export default {
if (!err) {
createRelation(values.source_ci_type_id, values.ci_type_id, values.relation_type_id, values.constraint).then(
(res) => {
- this.$message.success(`添加成功`)
+ this.$message.success(this.$t('addSuccess'))
this.onClose()
this.handleOk()
}
@@ -207,7 +223,7 @@ export default {
},
handleDelete(record) {
deleteRelation(record.source_ci_type_id, record.id).then((res) => {
- this.$message.success(`删除成功!`)
+ this.$message.success(this.$t('deleteSuccess'))
this.handleOk()
})
diff --git a/cmdb-ui/src/modules/cmdb/views/model_relation/modules/modelRelationTable.vue b/cmdb-ui/src/modules/cmdb/views/model_relation/modules/modelRelationTable.vue
index 13d5f48..69c40ae 100644
--- a/cmdb-ui/src/modules/cmdb/views/model_relation/modules/modelRelationTable.vue
+++ b/cmdb-ui/src/modules/cmdb/views/model_relation/modules/modelRelationTable.vue
@@ -11,22 +11,27 @@
:data="tableData"
:sort-config="{ defaultSort: { field: 'created_at', order: 'desc' } }"
>
-
-
-
+
+
+
{{ row.relation_type.name }}
-
-
-
+
+
+
-
+
@@ -48,11 +53,6 @@ export default {
drawerVisible: false,
tableData: [],
relationTypeList: null,
- constraintMap: {
- '0': '一对多',
- '1': '一对一',
- '2': '多对多',
- },
}
},
components: {
@@ -65,6 +65,13 @@ export default {
windowHeight() {
return this.$store.state.windowHeight
},
+ constraintMap() {
+ return {
+ '0': this.$t('cmdb.ciType.one2Many'),
+ '1': this.$t('cmdb.ciType.one2One'),
+ '2': this.$t('cmdb.ciType.many2Many'),
+ }
+ },
},
methods: {
async refresh() {
@@ -103,7 +110,8 @@ export default {
},
deleteRelation(row) {
deleteRelation(row.parent_id, row.child_id).then((res) => {
- this.$message.success(`删除成功!`)
+ this.$message.success(this.$t('deleteSuccess'))
+ this.getRelationTypes()
this.refresh()
})
},
diff --git a/cmdb-ui/src/modules/cmdb/views/operation_history/index.vue b/cmdb-ui/src/modules/cmdb/views/operation_history/index.vue
index d81a97c..618b657 100644
--- a/cmdb-ui/src/modules/cmdb/views/operation_history/index.vue
+++ b/cmdb-ui/src/modules/cmdb/views/operation_history/index.vue
@@ -1,43 +1,43 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cmdb-ui/src/modules/cmdb/views/operation_history/modules/ciTable.vue b/cmdb-ui/src/modules/cmdb/views/operation_history/modules/ciTable.vue
index 76e2fed..f5d1950 100644
--- a/cmdb-ui/src/modules/cmdb/views/operation_history/modules/ciTable.vue
+++ b/cmdb-ui/src/modules/cmdb/views/operation_history/modules/ciTable.vue
@@ -1,421 +1,407 @@
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/cmdb-ui/src/modules/cmdb/views/operation_history/modules/pager.vue b/cmdb-ui/src/modules/cmdb/views/operation_history/modules/pager.vue
index 266c9db..11b5705 100644
--- a/cmdb-ui/src/modules/cmdb/views/operation_history/modules/pager.vue
+++ b/cmdb-ui/src/modules/cmdb/views/operation_history/modules/pager.vue
@@ -1,116 +1,116 @@
-
-
-
-
-
-
- {{ currentPage }}
-
-
-
-
- {{ size }}条/页
-
-
- {{ pageSize }}条/页
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ {{ currentPage }}
+
+
+
+
+ {{ size }}{{ $t('cmdb.history.itemsPerPage') }}
+
+
+ {{ pageSize }}{{ $t('cmdb.history.itemsPerPage') }}
+
+
+
+
+
+
+
+
+
+
diff --git a/cmdb-ui/src/modules/cmdb/views/operation_history/modules/relation.vue b/cmdb-ui/src/modules/cmdb/views/operation_history/modules/relation.vue
index d177ca1..45b954c 100644
--- a/cmdb-ui/src/modules/cmdb/views/operation_history/modules/relation.vue
+++ b/cmdb-ui/src/modules/cmdb/views/operation_history/modules/relation.vue
@@ -1,404 +1,395 @@
-
-
-
-
-
-
-
- {{ column.title }}
-
-
-
-
- 筛选
- 重置
-
-
-
-
-
-
- {{ column.title }}
-
-
-
-
-
- {{ Object.keys(choice)[0] }}
-
-
- 筛选
- 重置
-
-
-
-
-
- {{ row.operate_type }}
-
-
- {{ row.operate_type }}
-
-
- {{ row.operate_type }}
-
-
-
-
-
-
- {{
- `${row.first.ci_type_alias}${
- row.first.unique_alias && row.first[row.first.unique]
- ? `(${row.first.unique_alias}:${row.first[row.first.unique]})`
- : ''
- }`
- }}
-
-
- {{ row.relation_type_id }}
-
-
-
- {{ tag }}
-
-
-
- {{ row.relation_type_id }}
-
-
- {{ row.relation_type_id }}
-
-
- {{
- `${row.second.ci_type_alias}${
- row.second.unique_alias && row.second[row.second.unique]
- ? `(${row.second.unique_alias}:${row.second[row.second.unique]})`
- : ''
- }`
- }}
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+ {{ column.title }}
+
+
+
+
+ {{ $t('cmdb.history.filter') }}
+ {{ $t('reset') }}
+
+
+
+
+
+
+ {{ column.title }}
+
+
+
+
+
+ {{ Object.keys(choice)[0] }}
+
+
+ {{
+ $t('cmdb.history.filter')
+ }}
+ {{ $t('reset') }}
+
+
+
+
+
+ {{ row.operate_type }}
+
+
+ {{ row.operate_type }}
+
+
+ {{ row.operate_type }}
+
+
+
+
+
+
+ {{
+ `${row.first.ci_type_alias}${
+ row.first.unique_alias && row.first[row.first.unique]
+ ? `(${row.first.unique_alias}:${row.first[row.first.unique]})`
+ : ''
+ }`
+ }}
+
+
+ {{ row.relation_type_id }}
+
+
+
+ {{ tag }}
+
+
+
+ {{ row.relation_type_id }}
+
+
+ {{ row.relation_type_id }}
+
+
+ {{
+ `${row.second.ci_type_alias}${
+ row.second.unique_alias && row.second[row.second.unique]
+ ? `(${row.second.unique_alias}:${row.second[row.second.unique]})`
+ : ''
+ }`
+ }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cmdb-ui/src/modules/cmdb/views/operation_history/modules/searchForm.vue b/cmdb-ui/src/modules/cmdb/views/operation_history/modules/searchForm.vue
index 2491035..66d80c5 100644
--- a/cmdb-ui/src/modules/cmdb/views/operation_history/modules/searchForm.vue
+++ b/cmdb-ui/src/modules/cmdb/views/operation_history/modules/searchForm.vue
@@ -1,191 +1,195 @@
-
-
-
-
-
-
-
-
- {{ Object.keys(choice)[0] }}
-
-
-
-
-
-
-
-
-
-
-
-
- {{ Object.keys(choice)[0] }}
-
-
-
-
-
-
-
-
-
-
-
- 查询
-
-
- 重置
-
-
- {{ expand?'隐藏':'展开' }}
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ {{ Object.keys(choice)[0] }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ Object.keys(choice)[0] }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('query') }}
+
+
+ {{ $t('reset') }}
+
+
+ {{ expand?$t('hide'):$t('expand') }}
+
+
+
+
+
+
+
+
+
+
diff --git a/cmdb-ui/src/modules/cmdb/views/operation_history/modules/triggerTable.vue b/cmdb-ui/src/modules/cmdb/views/operation_history/modules/triggerTable.vue
index 21ee144..c32416b 100644
--- a/cmdb-ui/src/modules/cmdb/views/operation_history/modules/triggerTable.vue
+++ b/cmdb-ui/src/modules/cmdb/views/operation_history/modules/triggerTable.vue
@@ -1,123 +1,123 @@
-
-
-
-
-
-
- 日期属性
- 数据变更
-
-
-
-
- 新增实例
- 删除实例
- 实例变更
-
-
-
-
- Webhook
- 通知
-
-
-
-
- 已完成
- 未完成
-
-
-
-
- {{ row.updated_at || row.created_at }}
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ {{ $t('cmdb.ciType.triggerDate') }}
+ {{ $t('cmdb.ciType.triggerDataChange') }}
+
+
+
+
+ {{ $t('cmdb.ciType.addInstance') }}
+ {{ $t('cmdb.ciType.deleteInstance') }}
+ {{ $t('cmdb.ciType.changeInstance') }}
+
+
+
+
+ Webhook
+ {{ $t('cmdb.ciType.notify') }}
+
+
+
+
+ {{ $t('cmdb.history.done') }}
+ {{ $t('cmdb.history.undone') }}
+
+
+
+
+ {{ row.updated_at || row.created_at }}
+
+
+
+
+
+
+
+
+
+
diff --git a/cmdb-ui/src/modules/cmdb/views/operation_history/modules/typeTable.vue b/cmdb-ui/src/modules/cmdb/views/operation_history/modules/typeTable.vue
index c58eec7..5925aa8 100644
--- a/cmdb-ui/src/modules/cmdb/views/operation_history/modules/typeTable.vue
+++ b/cmdb-ui/src/modules/cmdb/views/operation_history/modules/typeTable.vue
@@ -1,478 +1,484 @@
-
-
-
-
-
-
-
-
- {{ column.title }}
-
-
-
-
-
- {{ Object.keys(choice)[0] }}
-
-
- 筛选
- 重置
-
-
-
-
-
- {{ row.operate_type }}
-
-
- {{ row.operate_type }}
-
-
- {{ row.operate_type }}
-
-
-
-
-
- {{ row.operate_type === '删除模型' ? row.change.alias : row.type_id }}
-
-
-
-
-
- {{ row.changeDescription }}
-
-
-
- {{ tag }}
-
-
-
- {{ row.changeDescription }}
-
-
- {{ row.changeDescription }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/cmdb-ui/src/modules/cmdb/views/preference/index.vue b/cmdb-ui/src/modules/cmdb/views/preference/index.vue
index 0987d23..8fd2003 100644
--- a/cmdb-ui/src/modules/cmdb/views/preference/index.vue
+++ b/cmdb-ui/src/modules/cmdb/views/preference/index.vue
@@ -2,10 +2,10 @@
-
我的订阅
+
{{ $t('cmdb.preference.mySub') }}
资源数据:
+ >{{ $t('cmdb.menu.ciTable') }}:
资源层级:
+ >{{ $t('cmdb.menu.ciTree') }}:
{{ ciType.alias || ciType.name }}
-
+
-
+
{{ type_id2users[item.id].length > 99 ? '99+' : type_id2users[item.id].length }}位同事已订阅{{ type_id2users[item.id].length > 99 ? '99+' : type_id2users[item.id].length
+ }}{{ $t('cmdb.preference.peopleSub') }}
@@ -135,11 +136,11 @@
...
- 暂无同事订阅
+ {{ $t('cmdb.preference.noSub') }}
- 自动发现
+ {{ $t('cmdb.menu.ad') }}
{{ item.integrity }}%
@@ -148,15 +149,13 @@
@@ -242,7 +243,7 @@ export default {
}
if (!group.id) {
group.id = -1
- group.name = '其他'
+ group.name = this.$t('other')
}
})
this.citypeData = ciTypeGroup
@@ -251,7 +252,7 @@ export default {
this.type_id2users = type_id2users
const _myPreferences = [
{
- name: '资源数据',
+ name: this.$t('cmdb.menu.ciTable'),
ci_types: self.instance.map((item) => {
const _find = pref.find((ci) => ci.id === item)
return _find
@@ -260,7 +261,7 @@ export default {
type: 'ci',
},
{
- name: '资源层级',
+ name: this.$t('cmdb.menu.ciTree'),
ci_types: self.tree.map((item) => {
const _find = pref.find((ci) => ci.id === item)
return _find
@@ -285,23 +286,28 @@ export default {
moment.duration(moment().diff(moment(subscribedTime)))
const day = moment().diff(moment(subscribedTime), 'day')
if (day > 0 && day < 1) {
- return `${moment().diff(moment(subscribedTime), 'hour')}小时前`
+ return `${moment().diff(moment(subscribedTime), 'hour')}` + this.$t('cmdb.preference.hoursAgo')
} else if (day >= 1 && day <= 31) {
- return `${day}天前`
+ return `${day} ` + this.$t('cmdb.preference.daysAgo')
} else if (day > 31 && day < 365) {
- return `${moment().diff(moment(subscribedTime), 'month')}月前`
+ return `${moment().diff(moment(subscribedTime), 'month')}` + this.$t('cmdb.preference.monthsAgo')
} else if (day >= 365) {
- return `${moment().diff(moment(subscribedTime), 'year')}年前`
+ return `${moment().diff(moment(subscribedTime), 'year')}` + this.$t('cmdb.preference.yearsAgo')
}
- return '刚刚'
+ return this.$t('cmdb.preference.just')
},
unsubscribe(ciType, type = 'all') {
const that = this
this.$confirm({
- title: '警告',
- content: `确认取消订阅 ${ciType.alias || ciType.name} ${
- type !== 'all' ? `的${type === 'ci' ? '资源数据' : '资源层级'}` : ''
- } 吗?`,
+ title: that.$t('warning'),
+ content:
+ that.$t('cmdb.preference.confirmcancelSub') +
+ ` ${ciType.alias || ciType.name} ${
+ type !== 'all'
+ ? that.$t('cmdb.preference.of') +
+ `${type === 'ci' ? this.$t('cmdb.menu.ciTable') : that.$t('cmdb.menu.ciTree')}`
+ : ''
+ } ?`,
onOk() {
const promises = []
if (type === 'all' || type === 'ci') {
@@ -320,7 +326,7 @@ export default {
localStorage.setItem('ops_ci_typeid', '')
}
}
- that.$message.success('取消订阅成功')
+ that.$message.success(that.$t('cmdb.preference.cancelSubSuccess'))
that.resetRoute()
})
},
diff --git a/cmdb-ui/src/modules/cmdb/views/preference_relation/index.vue b/cmdb-ui/src/modules/cmdb/views/preference_relation/index.vue
index e9f2d9c..f0b246b 100644
--- a/cmdb-ui/src/modules/cmdb/views/preference_relation/index.vue
+++ b/cmdb-ui/src/modules/cmdb/views/preference_relation/index.vue
@@ -12,12 +12,12 @@
isEdit = true
}
"
- >新增业务关系{{ $t('cmdb.preference_relation.newServiceTree') }}
-
- 公开
- 保存
+
+ {{ $t('cmdb.preference_relation.public') }}
+ {{ $t('save') }}
取消{{ $t('cancel') }}
-
保存布局
+
{{ $t('cmdb.preference_relation.saveLayout') }}
@@ -59,7 +59,7 @@
>
{{ view }}
-
+
@@ -246,7 +246,7 @@ export default {
if (e.target.checked) {
const graph = this.$refs.ciTypeRelationGraph
if (!graph.getNodeById(node.id).targetTo.length) {
- this.$message.warning(`${node.text} 不存在子节点,不能形成业务关系,请重新选择!`)
+ this.$message.warning(`${node.text} ` + this.$t('cmdb.preference_relation.childNodesNotFound'))
return
}
if (!this.checkedNodes.length) {
@@ -278,7 +278,7 @@ export default {
const idFrom = startNode.targetFrom.findIndex((item) => item.id === node.id)
const idTo = endNode.targetTo.findIndex((item) => item.id === node.id)
if (idFrom <= -1 && idTo <= -1) {
- this.$message.warning(`${node.text} 不能与当前选中节点形成视图,请重新选择!`)
+ this.$message.warning(`${node.text} ` + this.$t('cmdb.preference_relation.tips1'))
return
}
if (idFrom > -1) {
@@ -290,11 +290,11 @@ export default {
},
async handleSaveRelationViews() {
if (!this.newRelationViewName) {
- this.$message.warning('请输入新增业务关系名!')
+ this.$message.warning(this.$t('cmdb.preference_relation.tips2'))
return
}
if (this.checkedNodes.length < 2) {
- this.$message.warning('请选择至少两个节点!')
+ this.$message.warning(this.$t('cmdb.preference_relation.tips3'))
return
}
// eslint-disable-next-line camelcase
@@ -341,7 +341,7 @@ export default {
}
}),
}).then((res) => {
- this.$message.success('保存成功!')
+ this.$message.success(this.$t('saveSuccess'))
})
}
},
diff --git a/cmdb-ui/src/modules/cmdb/views/preference_relation/modules/RelationViewForm.vue b/cmdb-ui/src/modules/cmdb/views/preference_relation/modules/RelationViewForm.vue
index 262b369..6e09246 100644
--- a/cmdb-ui/src/modules/cmdb/views/preference_relation/modules/RelationViewForm.vue
+++ b/cmdb-ui/src/modules/cmdb/views/preference_relation/modules/RelationViewForm.vue
@@ -1,18 +1,18 @@
-
+
@@ -21,8 +21,8 @@
-
取消
-
提交
+
{{ $t('cancel') }}
+
{{ $t('submit') }}
@@ -35,7 +35,6 @@ export default {
name: 'RelationViewForm',
data() {
return {
- drawerTitle: '新增业务关系',
drawerVisible: false,
formLayout: 'vertical',
crIds: [],
@@ -95,7 +94,7 @@ export default {
createRelationView(data) {
data.cr_ids = this.crIds
subscribeRelationView(data).then(res => {
- this.$message.success('新增成功!')
+ this.$message.success(this.$t('addSuccess'))
this.onClose()
this.$emit('refresh')
})
diff --git a/cmdb-ui/src/modules/cmdb/views/relation_type/index.vue b/cmdb-ui/src/modules/cmdb/views/relation_type/index.vue
index 6d4bfa6..3dc62c8 100644
--- a/cmdb-ui/src/modules/cmdb/views/relation_type/index.vue
+++ b/cmdb-ui/src/modules/cmdb/views/relation_type/index.vue
@@ -1,7 +1,7 @@
-
新增关系类型
+
{{ $t('cmdb.relation_type.addRelationType') }}
-
+
{{ row.updated_at || row.created_at }}
-
+
-
+
@@ -50,6 +50,7 @@ import {
export default {
name: 'RelationType',
+ components: {},
data() {
return {
tableData: [],
@@ -97,14 +98,14 @@ export default {
},
updateRelationType(id, data) {
updateRelationType(id, data).then((res) => {
- this.$message.success('更新成功!')
+ this.$message.success(this.$t('updateSuccess'))
this.loadData()
})
},
createRelationType(data) {
addRelationType(data).then((res) => {
- this.$message.success('新增成功!')
+ this.$message.success(this.$t('addSuccess'))
this.loadData()
})
},
@@ -113,12 +114,12 @@ export default {
},
deleteRelationType(id) {
deleteRelationType(id).then((res) => {
- this.$message.success('删除成功!')
+ this.$message.success(this.$t('deleteSuccess'))
this.loadData()
})
},
customCloseEdit(value, $event) {
- // 回车结束编辑
+ // enter, close edit
if ($event.keyCode === 13) {
const $table = this.$refs.relationTypeTable
$table.clearActived()
diff --git a/cmdb-ui/src/modules/cmdb/views/relation_views/index.vue b/cmdb-ui/src/modules/cmdb/views/relation_views/index.vue
index ac0df19..ad2ab74 100644
--- a/cmdb-ui/src/modules/cmdb/views/relation_views/index.vue
+++ b/cmdb-ui/src/modules/cmdb/views/relation_views/index.vue
@@ -1,1510 +1,1517 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 新建
-
-
-
- 修改
-
- 下载
-
- 删除实例
-
- 删除关系
- 选取:{{ selectedRowKeys.length }} 项
-
-
-
-
-
-
-
-
-
-
-
- {{ col.title }}
-
-
-
-
-
-
-
-
-
-
- {{ choice[0] }}
-
-
-
-
-
-
-
- {{ row[col.field] }}
- {{ row[col.field] }}
-
-
-
-
-
- {{ value }}
-
-
-
- {{ row[col.field] }}
-
-
-
-
-
- 操作
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 加载中...
-
-
![]()
-
暂无数据
-
-
-
-
-
-
- {{ props.value }}条/页
- 全部
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('create') }}
+
+
+
+ {{ $t('update') }}
+
+ {{ $t('download') }}
+
+ {{ $t('cmdb.ciType.deleteInstance') }}
+
+ {{ $t('cmdb.history.deleteRelation') }}
+ {{ $t('cmdb.ci.selectRows', { rows: selectedRowKeys.length }) }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ col.title }}
+
+
+
+
+
+
+
+
+
+
+ {{ choice[0] }}
+
+
+
+
+
+
+
+ {{ row[col.field] }}
+ {{ row[col.field] }}
+
+
+
+
+
+ {{ value }}
+
+
+
+ {{ row[col.field] }}
+
+
+
+
+
+ {{ $t('operation') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('loading') }}
+
+
![]()
+
{{ $t('noData') }}
+
+
+
+
+
+
+ {{ props.value }}{{ $t('cmdb.history.itemsPerPage') }}
+ {{ $t('cmdb.components.all') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cmdb-ui/src/modules/cmdb/views/relation_views/modules/AddTableModal.vue b/cmdb-ui/src/modules/cmdb/views/relation_views/modules/AddTableModal.vue
index 737e42f..4ccc2e5 100644
--- a/cmdb-ui/src/modules/cmdb/views/relation_views/modules/AddTableModal.vue
+++ b/cmdb-ui/src/modules/cmdb/views/relation_views/modules/AddTableModal.vue
@@ -11,12 +11,24 @@
>
+
+
@@ -94,7 +113,7 @@ export default {
return this.$store.state.windowHeight - 250
},
placeholder() {
- return this.isFocusExpression ? '例:q=os_version:centos&sort=os_version' : '表达式搜索'
+ return this.isFocusExpression ? this.$t('cmdb.serviceTreetips1') : this.$t('cmdb.serviceTreetips2')
},
width() {
return this.isFocusExpression ? '500px' : '100px'
@@ -103,6 +122,7 @@ export default {
watch: {},
methods: {
async openModal(ciObj, ciId, addTypeId, type, ancestor_ids = undefined) {
+ console.log(ciObj, ciId, addTypeId, type)
this.visible = true
this.ciObj = ciObj
this.ciId = ciId
@@ -121,6 +141,10 @@ export default {
},
async fetchData(isInit) {
this.loading = true
+ // if (isInit) {
+ // const subscribed = await getSubscribeAttributes(this.addTypeId)
+ // this.preferenceAttrList = subscribed.attributes // 已经订阅的全部列
+ // }
let sort, fuzzySearch, expression, exp
if (!isInit) {
fuzzySearch = this.$refs['searchForm'].fuzzySearch
@@ -179,7 +203,7 @@ export default {
await batchUpdateCIRelationParents(ciIds, [this.ciId])
}
setTimeout(() => {
- this.$message.success('添加成功!')
+ this.$message.success(this.$t('addSuccess'))
this.handleClose()
this.$emit('reload')
}, 500)
diff --git a/cmdb-ui/src/modules/cmdb/views/relation_views/modules/ContextMenu.vue b/cmdb-ui/src/modules/cmdb/views/relation_views/modules/ContextMenu.vue
index 29bc3e2..126883b 100644
--- a/cmdb-ui/src/modules/cmdb/views/relation_views/modules/ContextMenu.vue
+++ b/cmdb-ui/src/modules/cmdb/views/relation_views/modules/ContextMenu.vue
@@ -1,8 +1,8 @@
this.onContextMenuClick(this.treeKey, menuKey)">
- 新增{{ item.alias }}
- 删除节点
+ {{ $t('new') }} {{ item.alias }}
+ {{ $t('cmdb.serviceTree.deleteNode') }}
-
-
-
-
-
-
-
-
-
- {{ colGroup.label }}
-
-
-
-
-
- {{ JSON.stringify(row[col.field]) }}
- {{ row[col.field] }}
-
-
-
- {{ value }}
-
-
-
- {{ row[col.field] }}
-
-
-
-
-
-
- 加载中...
-
-
![]()
-
暂无数据
-
-
-
-
-
{
- currentPage = page
- loadInstance(sortByTable)
- }
- "
- >
-
- {{ props.value }}条/页
- 全部
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
{{
+ $t('download')
+ }}
+
+
+
+
+
+
+
+ {{ colGroup.label }}
+
+
+
+
+
+ {{ JSON.stringify(row[col.field]) }}
+ {{ row[col.field] }}
+
+
+
+ {{ value }}
+
+
+
+ {{ row[col.field] }}
+
+
+
+
+
+
+
+
![]()
+
{{ $t('noData') }}
+
+
+
+ {{ $t('loading') }}
+
+
+
+
{
+ currentPage = page
+ loadInstance(sortByTable)
+ }
+ "
+ >
+
+ {{ props.value }}{{ $t('itemsPerPage') }}
+ {{ $t('all') }}
+
+
+
+
+
+
+
+
+
+
diff --git a/cmdb-ui/src/modules/cmdb/views/tree_views/index.vue b/cmdb-ui/src/modules/cmdb/views/tree_views/index.vue
index d2896be..85f41c5 100644
--- a/cmdb-ui/src/modules/cmdb/views/tree_views/index.vue
+++ b/cmdb-ui/src/modules/cmdb/views/tree_views/index.vue
@@ -1,1343 +1,1329 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- cancelSubscribe(e, ciType)">
-
-
-
-
- subscribeSetting(e, ciType)">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 修改
-
- 下载
-
- 删除
- 选取:{{ selectedRowKeys.length }} 项
-
-
-
-
-
-
-
-
-
- {{ col.title }}
-
-
-
-
-
-
-
-
-
-
- {{ choice[0] }}
-
-
-
-
-
-
-
- {{ row[col.field] }}
- {{ row[col.field] }}
-
-
-
-
-
- {{ value }}
-
-
-
- {{ row[col.field] }}
-
-
-
-
-
- 操作
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 加载中...
-
-
![]()
-
暂无数据
-
-
-
- {{ loadTip || '加载中...' }}
-
-
-
-
{
- currentPage = page
- handleLoadInstance({ sortByTable })
- }
- "
- >
-
- {{ props.value }}条/页
- 全部
-
-
-
-
-
-
-
-
{
- reload()
- }
- "
- />
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cancelSubscribe(e, ciType)">
+
+
+
+
+ subscribeSetting(e, ciType)">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('update') }}
+
+ {{ $t('download') }}
+
+ {{ $t('delete') }}
+ {{ $t('cmdb.ci.selectRows', { rows: selectedRowKeys.length }) }}
+
+
+
+
+
+
+
+
+
+ {{ col.title }}
+
+
+
+
+
+
+
+
+
+
+ {{ choice[0] }}
+
+
+
+
+
+
+
+ {{ row[col.field] }}
+ {{ row[col.field] }}
+
+
+
+
+
+ {{ value }}
+
+
+
+ {{ row[col.field] }}
+
+
+
+
+
+ {{ $t('operation') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('loading') }}
+
+
![]()
+
{{ $t('noData') }}
+
+
+
+ {{ loadTip || $t('loading') }}
+
+
+
+
{
+ currentPage = page
+ handleLoadInstance({ sortByTable })
+ }
+ "
+ >
+
+ {{ props.value }}{{ $t('itemsPerPage') }}
+ {{ $t('all') }}
+
+
+
+
+
+
+
+
{
+ reload()
+ }
+ "
+ />
+
+
+
+
+
+
+
+
+
+
+