Merge branch 'dev' into pr@dev@perf_icon

This commit is contained in:
老广
2023-02-06 17:19:47 +08:00
committed by GitHub
36 changed files with 11210 additions and 11117 deletions

View File

@@ -4,11 +4,17 @@ root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.{js,jsx,ts,tsx,vue}]
indent_size = 2
[*.py]
indent_size = 4
[*.md]
insert_final_newline = false
trim_trailing_whitespace = false

1
.gitignore vendored
View File

@@ -16,3 +16,4 @@ tests/**/coverage/
*.njsproj
*.sln
.env.development
.python-version

View File

@@ -19,7 +19,9 @@
"vue-i18n-extract": "vue-i18n-extract",
"vue-i18n-report": "vue-i18n-extract report -v './src/**/*.?(js|vue)' -l './src/i18n/langs/**/*.json'",
"vue-i18n-report-json": "vue-i18n-extract report -v './src/**/*.?(js|vue)' -l './src/i18n/langs/**/*.json' -o /tmp/abc.json",
"vue-i18n-report-add-miss": "vue-i18n-extract report -v './src/**/*.?(js|vue)' -l './src/i18n/langs/**/*.json' -a"
"vue-i18n-report-add-miss": "vue-i18n-extract report -v './src/**/*.?(js|vue)' -l './src/i18n/langs/**/*.json' -a",
"diff-i18n": "python ./src/i18n/langs/i18n-util.py diff en ja",
"apply-i18n": "python ./src/i18n/langs/i18n-util.py apply en ja"
},
"dependencies": {
"@babel/plugin-proposal-optional-chaining": "^7.13.12",

View File

@@ -54,7 +54,7 @@ export default {
'secret_type', 'secret', 'ssh_key', 'token',
'api_key', 'passphrase'
]],
[this.$t('common.Other'), ['push_now', 'comment']]
[this.$t('common.Other'), ['push_now', 'is_active', 'comment']]
],
fieldsMeta: {
assets: {

View File

@@ -106,7 +106,7 @@ export default {
app: 'assets',
resource: 'account'
},
columnsExclude: ['specific'],
columnsExclude: ['spec_info'],
columnsShow: {
min: ['name', 'username', 'actions'],
default: [
@@ -244,7 +244,7 @@ export default {
hasLeftActions: this.hasLeftActions,
hasMoreActions: true,
hasCreate: false,
hasImport: true,
hasImport: this.hasImport,
hasExport: this.hasExport && this.$hasPerm('accounts.view_accountsecret'),
exportOptions: {
url: this.exportUrl,

View File

@@ -114,9 +114,11 @@ export default {
methods: {
handleConfirm() {
this.$emit('confirm', this.rowSelected, this.rowsAdd)
this.$eventBus.$emit('treeComponentKey')
},
handleCancel() {
this.$emit('cancel')
this.$eventBus.$emit('treeComponentKey')
},
addRowToSelect(row) {
const selectValueIndex = this.rowSelected.indexOf(row.id)

View File

@@ -14,6 +14,7 @@
:value="value"
:visible.sync="dialogVisible"
v-bind="$attrs"
:base-url="baseUrl"
@cancel="handleCancel"
@confirm="handleConfirm"
v-on="$listeners"

View File

@@ -39,8 +39,6 @@ export default {
showDelete: true,
showUpdate: true,
showSearch: false,
// 自定义header
customTreeHeader: false,
customTreeHeaderName: this.$t('assets.AssetTree'),
async: {
enable: true,

View File

@@ -361,28 +361,36 @@ export default {
*/
newText: {
type: String,
default: '新增'
default: function() {
return this.$t('ops.Add')
}
},
/**
* 修改按钮文案
*/
editText: {
type: String,
default: '修改'
default: function() {
return this.$t('ops.Modify')
}
},
/**
* 查看按钮文案
*/
viewText: {
type: String,
default: '查看'
default: function() {
return this.$t('ops.View')
}
},
/**
* 删除按钮文案
*/
deleteText: {
type: String,
default: '删除'
default: function() {
return this.$t('ops.Delete')
}
},
/**
* 删除提示语。接受要删除的数据(单个对象或数组);返回字符串
@@ -392,7 +400,7 @@ export default {
deleteMessage: {
type: Function,
default() {
return `确认${this.deleteText}吗?`
return this.$t('ops.Confirm') + this.deleteText + '?'
}
},
/**
@@ -451,7 +459,7 @@ export default {
onSuccess: {
type: Function,
default() {
return this.$message.success('操作成功')
return this.$message.success(this.$t('ops.SuccessfulOperation'))
}
},
/**
@@ -1159,7 +1167,7 @@ export default {
* @param {object|object[]} - 要删除的数据对象或数组
*/
onDefaultDelete(data) {
this.$confirm(this.deleteMessage(data), '提示', {
this.$confirm(this.deleteMessage(data), this.$t('common.Info'), {
type: 'warning',
confirmButtonClass: 'el-button--danger',
beforeClose: async(action, instance, done) => {

View File

@@ -1,43 +1,6 @@
<template>
<div>
<div
v-if="treeSetting.customTreeHeader"
class="tree-header treebox"
>
<div class="content">
<span class="title">
{{ treeSetting.customTreeHeaderName }}
</span>
<span class="tree-banner-icon-zone">
<a id="searchIcon" class="tree-search special">
<svg-icon
:icon-class="'search'"
class="tree-banner-icon"
style="font-size: 14px;"
@click.stop="treeSearch"
/>
<input
id="searchInput"
v-model="treeSearchValue"
autocomplete="off"
class="tree-input"
type="text"
>
</a>
<span v-if="treeSetting.showRefresh" class="icon-refresh" @click="refresh">
<svg-icon :icon-class="'refresh'" style="font-size: 14px;" />
</span>
</span>
</div>
<ul v-if="loading" class="ztree">
{{ this.$t('common.tree.Loading') }}...
</ul>
<ul v-else :id="iZTreeID" class="ztree tree-obj" />
<div v-if="treeSetting.treeUrl===''" class="tree-empty">
{{ this.$t('common.tree.Empty') }}
</div>
</div>
<div v-else class="treebox">
<div class="treebox">
<div>
<el-input
v-if="treeSetting.showSearch && showTreeSearch"
@@ -162,10 +125,8 @@ export default {
}
this.treeSetting.treeUrl = treeUrl
vm.zTree = $.fn.zTree.init($(`#${this.iZTreeID}`), this.treeSetting, res)
if (!this.treeSetting.customTreeHeader) {
const rootNode = this.zTree.getNodes()[0]
this.rootNodeAddDom(rootNode)
}
const rootNode = this.zTree.getNodes()[0]
this.rootNodeAddDom(rootNode)
// 手动上报事件, Tree加载完成
this.$emit('TreeInitFinish', this.zTree)
@@ -358,10 +319,8 @@ export default {
const newNode = { id: 'search', name: name, isParent: true, open: true, zAsync: true }
searchNode = this.zTree.addNodes(null, newNode)[0]
searchNode.zAsync = true
this.rootNodeAddDom(searchNode)
if (!this.treeSetting.customTreeHeader) {
this.rootNodeAddDom(searchNode)
}
const nodesGroupByOrg = this.groupBy(nodes, (node) => {
return node.meta?.data?.org_name
})

View File

@@ -97,6 +97,9 @@ export default {
},
async mounted() {
this.iActiveMenu = await this.getPropActiveTab()
this.$eventBus.$on('treeComponentKey', () => {
this.componentKey += 1
})
},
methods: {
hideRMenu() {

View File

@@ -6,7 +6,95 @@
"AccountHistoryHelpMessage": "Record the historical version of the current account",
"PleaseClickLeftAssetToViewAssetAccount": "Asset account list, please click on the assets on the left to view",
"PleaseClickLeftApplicationToViewApplicationAccount": "Application account list, please click on the application on the left to view",
"PleaseClickLeftAssetToViewGatheredUser": "Gathered user list, please click on the assets on the left to view"
"PleaseClickLeftAssetToViewGatheredUser": "Gathered user list, please click on the assets on the left to view",
"AccountGather": {
"ExecutionDetail": "Execution detail",
"AccountGatherTaskExecutionList": "Task execution list",
"ExecutionList": "Execution list",
"AccountGatherTaskUpdate": "Update task",
"AccountGatherTaskCreate": "Create task",
"AccountGather": "Account gather",
"AccountGatherTaskList": "Account gather",
"AccountGatherList": "Gather task"
},
"AccountChangeSecret": {
"Result": "Result",
"ExecutionTimes": "Execution times",
"TaskList": "Task record",
"TimerPeriod": "Timed execution cycle",
"DatabaseId": "Database ID",
"Database": "Database",
"SecretKeyStrategy": "Secret key strategy",
"HelpText": {
"UsernameOfCreateUpdatePage": "The username of the user on the target host; if it already exists, modify the user password; if it does not exist, add the user and set the password;",
"CrontabOfCreateUpdatePage": "For example: execute <5 3 * * 0> every Sunday at 03:05 <br/> Use the 5-digit Linux crontab expression <time-sharing day month weekday> (<a href=\"https://tool.lu/crontab /\" target=\"_blank\">online tool</a>) <br/> If both periodic execution and periodic execution are set at the same time, periodic execution is preferred",
"IntervalOfCreateUpdatePage": "Unit: hour"
},
"SymbolSetHelpText": "Please enter a set of special symbols supported by this type of database. If the generated random password contains special characters that are not supported by this type of database, the encryption plan will fail",
"ContainAttachment": "Contain attachment",
"PasswordStrategy": "Ciphertext Generation Strategy",
"Addressee": "Recipient",
"PasswordLength": "Password length",
"Asset": "Asset",
"SystemUserId": "System user ID",
"ChangePassword": "Change password",
"AssetAndNode": "Asset and Node",
"validatorMessage": {
"EnsureThisValueIsGreaterThanOrEqualTo1": "Make sure the value is greater than or equal to 1"
},
"ModifySSHKey": "Modify SSH Key",
"DateUpdated": "Date updated",
"AccountChangeSecret": "Account change",
"RegularlyPerform": "Regular execution",
"SystemUser": "SystemUser",
"AddNode": "Add node",
"NodeAmount": "Node amount",
"OnlyMailSend": "Currently only supports mail sending",
"Username": "Username",
"DateStart": "Date start",
"AssetAmount": "Asset amount",
"AddAsset": "Add asset",
"SymbolSet": "Collection of special symbols",
"DateJoined": "Date joined",
"ManualExecutePlan": "Manual execution plan",
"Log": "Log",
"CyclePerform": "Periodic execution",
"MailRecipient": "Mail recipient",
"ExecutionDetail": "Execution detail",
"Name": "Name",
"Retry": "Retry",
"Timer": "Timed execution",
"Detail": "Detail",
"TimeDelta": "Time delta",
"AppAmount": "Application amount",
"AssetChangeSecretCreate": "Create account change secret",
"ExecutionList": "Execution List",
"Execute": "Execute",
"SystemUserAmount": "SystemUser amount",
"AssetChangeSecretUpdate": "Update account change secret",
"Success": "Success",
"AddSystemUser": "Add system user"
},
"AccountPush": {
"AccountPushExecutionList": "Execution list",
"AccountPushCreate": "Account push create",
"AccountPushList": "Account push "
},
"AccountBackup": {
"IsSuccess": "Is success",
"ExecutionDetail": "Execution detail",
"MailRecipient": "Mail receiver",
"Types": "Type",
"AccountBackupUpdate": "Update account backup",
"AccountBackupCreate": "Create account backup",
"Backup": "Backup",
"ExecutionList": "Execution list",
"Reason": "Reason",
"AccountBackup": "Account backup"
},
"DynamicUsername": "Dynamic username",
"AutoCreate": "Auto create",
"TaskID": "Task ID"
},
"acl": {
"IgnoreCase": "Ignore case",
@@ -37,7 +125,12 @@
"apply_login_asset": "Apply login asset",
"apply_login_system_user": "Apply login system user",
"apply_login_user": "Apply login user",
"RuleDetail": "Rule detail"
"RuleDetail": "Rule detail",
"login_confirm_user": "Log in as the review assignee",
"users": "User",
"Rules": "Rule",
"Action": "Action",
"ip_group_help_text": "The format is a comma-separated string, * means match all. Example: 192.168.10.1, 192.168.1.0/24, 10.1.1.1-10.1.1.20, 2001:db8:2de::e13, 2001:db8:1a:1110::/64"
},
"applications": {
"": "",
@@ -59,7 +152,8 @@
"sqlserver": "SQLServer",
"redis": "Redis",
"mongodb": "MongoDB",
"k8s": "kubernetes"
"k8s": "kubernetes",
"clickhouse": "ClickHouse"
},
"applicationsCategory": {
"remote_app": "Remote app",
@@ -69,9 +163,8 @@
"appPath": "App path",
"appType": "App type",
"appName": "App name",
"host": "Asset",
"database": "Database",
"host": "Host",
"database": "Database",
"mysql": "Mysql",
"port": "Port",
"type": "Type",
@@ -300,7 +393,18 @@
"RDBProtocol": "RDS Protocol",
"NoSQLProtocol": "NoSQL Protocol",
"OtherProtocol": "Other Protocol",
"PasswordOrToken": "Password / Token"
"PasswordOrToken": "Password / Token",
"Accounts": "Account list",
"CustomTree": "Custom tree",
"AccessKey": "Access Key",
"Cloud": "Cloud",
"ApiKey": "API Key",
"SSHKey": "SSH Key",
"BuiltinTree": "Type tree",
"AccountDetail": "Account detail",
"Token": "Token",
"Category": "Category",
"AssetTree": "Asset tree"
},
"audits": {
"ChangeField": "Change field",
@@ -313,7 +417,9 @@
"View": "View",
"LoginIP": "Login IP",
"LoginCity": "Login city",
"LoginDate": "Login date"
"LoginDate": "Login date",
"BeforeChange": "Before change",
"AfterChange": "After the change"
},
"auth": {
"LoginRequiredMsg": "You account has logout, Please login again",
@@ -413,7 +519,7 @@
"DateLast3Months": "Last 3 months",
"DateLastMonth": "Last month",
"DateLastWeek": "Last week",
"DateStart": "Start date",
"DateStart": "Date start",
"Delete": "Delete",
"Disable": "Disable",
"Download": "Download",
@@ -491,7 +597,6 @@
"dateCreated": "Date created",
"dateFinished": "Date finished",
"dateExpired": "Date expired",
"DateStart": "Date start",
"deleteErrorMsg": "Delete failed",
"deleteFailedMsg": "Delete failed",
"deleteSelected": "Delete selected",
@@ -520,7 +625,8 @@
"updateSuccessMsg": "Update success, total: {count}",
"dragUploadFileInfo": "Drag file here or click here to upload",
"uploadCsvLth10MHelpText": "csv/xlsx files with a size less than 10M",
"hasImportErrorItemMsg": "There is an error item, click the x icon to view the details, and continue to import after editing"
"hasImportErrorItemMsg": "There is an error item, click the x icon to view the details, and continue to import after editing",
"ImportFail": "Import failed"
},
"isValid": "Is valid",
"nav": {
@@ -621,7 +727,29 @@
"SelectAll": "Select all",
"CanDragSelect": "Can drag the mouse to select a time period",
"WeekOrTime": "Week/Time"
}
},
"other": "Other setting",
"User": "User",
"CertificateKey": "Certificate Key",
"Radius": "Radius",
"OpenId": "OpenID",
"Inactive": "Disabled",
"Valid": "Valid",
"AllowInvalidCert": "Ignore certificate check",
"UseSSL": "Use SSL/TLS",
"ApprovaLevel": "Approval information",
"DateUpdated": "Date updated",
"requiredHasUserNameMapped": "Must contain a mapping for the username field, such as { 'uid': 'username' }",
"QuickSelect": "Quick select",
"ClientCertificate": "Client certificate",
"OfflineUpload": "Upload offline",
"CACertificate": "CA Certificate",
"SecretKey": "Secret Key",
"NotSpecialEmoji": "No special emoji allowed",
"Task": "Task",
"Cas": "CAS",
"Invalid": "Invalid",
"Filename": "Filename"
},
"dashboard": {
"ActiveAsset": "Asset active",
@@ -738,7 +866,102 @@
"PENDING": "Pending",
"RUNNING": "Running",
"SUCCESS": "Success",
"FAILURE": "Failure"
"FAILURE": "Failure",
"ScrollToBottom": "Roll to the bottom",
"VariableHelpText": "You can read built-in variables using {{ key }} in your command",
"RequiredEntryFile": "This file is used as the entry file for running and must exist",
"State": "State",
"AverageTimeCost": "Average time spent",
"RunJob": "Run job",
"failed": "Failed",
"DeleteConfirmMessage": "It cannot be restored after deletion, continue?",
"ClearScreen": "Clear screen",
"Workspace": "Workspace",
"Parameter": "Parameter",
"History": "Execution history",
"Cancel": "Cancel",
"SuccessAsset": "Successful assets",
"Asset": "Asset",
"Language": "Language",
"privilegeFirst": "Prefer privileged accounts",
"Material": "Material",
"createAdhoc": "Create Adhoc",
"Module": "Module",
"UseParameterDefine": "Define parameters",
"DeleteSuccess": "Successfully deleted",
"AssetResultDetail": "Asset result",
"total": "Total",
"Variable": "Variable",
"PlaybookDetail": "Playbook detail",
"DryRun": "Dry run",
"SelectAdhoc": "Select Adhoc",
"TimeoutHelpText": "When this value is -1, no timeout is specified",
"Command": "Command",
"PlaybookManage": "Playbook manage",
"ChdirHelpText": "The default execution directory is the home directory of the executing user",
"timeout": "Timeout",
"Skip": "Skip",
"Reason": "Reason",
"PrivilegedOnly": "Privileged accounts only",
"JobType": "Job type",
"OpenCommand": "Open command",
"PlaybookUpdate": "Update Playbook",
"NewDirectory": "New directory",
"skip": "Ignore current asset",
"ExecutionDetail": "Execution detail",
"ScriptDetail": "Script detail",
"SaveAdhoc": "Save Adhoc",
"AdhocManage": "Adhoc manage",
"LastPublishedTime": "Last published",
"CloseConfirmMessage": "The file has changed, do you want to save it?",
"privilegeOnly": "Select only privileged accounts",
"UploadPlaybook": "Upload Playbook",
"Rename": "Rename",
"instantAdhoc": "Instant command",
"Summary(success/total)": "Overview (Success/Total)",
"Queue": "Queue",
"history": "History record",
"Help": "Help",
"Timeout": "Timeout (seconds)",
"Confirm": "Confirm",
"RequiredAssetOrNode": "Please select at least one asset or node",
"SaveCommandSuccess": "Save command succeeded",
"Run": "Run",
"NewFile": "New file",
"Job": "Job",
"Type": "Type",
"running": "Runing",
"ScrollToTop": "Scroll to top",
"Plan": "Plan",
"ThisPeriodic": "This is a periodic job",
"QuickJob": "Shortcut command",
"DateLastRun": "last run date",
"FailedAsset": "Failed asset",
"AdhocDetail": "Adhoc detail",
"RequiredContent": "Please input the command",
"DateFinished": "Date finished",
"DeleteFile": "Delete file",
"AssetAmount": "Assets amount",
"Comment": "Comment",
"SaveSuccess": "Saved successfully",
"script": "Script list",
"SaveCommand": "Save command",
"Log": "Log",
"ExcludeAsset": "Skipped assets",
"DateCreated": "Date created",
"RunCommand": "Run command",
"Delete": "Delete",
"RunasPolicy": "Account policy",
"TaskDispatch": "The task was sent successfully",
"PrivilegedFirst": "Prefer privileged accounts",
"CloseConfirm": "Confirm close",
"SelectCreateMethod": "Choose how to create",
"View": "View",
"BuiltinVariable": "Builtin variable",
"Add": "Add",
"SuccessfulOperation": "Successful operation",
"Modify": "Modify",
"AdhocUpdate": "Update Adhoc"
},
"perms": {
"": "",
@@ -809,7 +1032,8 @@
"clipboardPaste": "Clipboard paste",
"userCount": "User count",
"userGroupCount": "User group count",
"usersAndUserGroups": "Users and user groups"
"usersAndUserGroups": "Users and user groups",
"Account": "Account"
},
"route": {
"": "",
@@ -984,7 +1208,41 @@
"NoPermissionVew": "No permission view current page",
"AjaxError404": "404 ajax error",
"CannotAccess": "Unable to access the current page",
"GoHomePage": "Go home page"
"GoHomePage": "Go home page",
"RemoteApps": "Remote application",
"MyTickets": "My tickets ",
"AssetPermissionList": "Asset permission list",
"Database": "Database",
"TicketFlowCreate": "Create Ticket flow",
"Device": "Device",
"JobUpdate": "Update job",
"TicketFlowUpdate": "Update approval flow",
"WorkBench": "Workbench",
"TemplateDetail": "Template detail",
"AppletCreate": "Create a remote application",
"TemplateCreate": "Create template",
"AppletHostUpdate": "Updating the Remote Application Publisher",
"Template": "Template",
"AppletHostDetail": "Remote Application Publisher Details",
"TicketFlow": "Ticket flow",
"TicketsDone": "Ticket Done",
"TemplateUpdate": "Update template",
"Session": "Session",
"Templates": "模版管理",
"AssetUserList": "Asset user",
"UserLoginACLUpdate": "Update User Login ACL",
"JobCreate": "Create job",
"JobExecutionLog": "Job Execution Log",
"JobList": "Job List",
"HostList": "Host list",
"UserLoginACLCreate": "Create User Login ACL",
"TicketsNew": "Submit ticket",
"TicketsTodo": "Todo ticket",
"AppletHostCreate": "Add a remote application publisher",
"Execution": "Execution history",
"AssignedTicketList": "Todo approval",
"JobDetail": "Job detail",
"Clouds": "Cloud"
},
"rbac": {
"Permissions": "Permissions",
@@ -998,7 +1256,9 @@
"AppletHosts": "Remote hosts",
"uploadZipTips": "Please upload zip file",
"HostDeployment": "Remote host deployment",
"TerminalStat": "CPU/MEM/DISK"
"TerminalStat": "CPU/MEM/DISK",
"DatabasePort": "Database protocol port",
"BasePort": "listening port"
},
"sessions": {
"SetToDefaultStorage": "Set to default storage",
@@ -1202,7 +1462,8 @@
"terminalHeartbeatInterval": "Units: seconds",
"terminalSessionKeepDuration": "Units: days, Session, record, command will be delete if more than duration, only in database",
"terminalTelnetRegex": "ex: Last\\\\s*login|success|\\u6210\\u529f",
"userGuideUrl": "User first login update profile done redirect to it"
"userGuideUrl": "User first login update profile done redirect to it",
"SecurityInsecureCommandEmailReceiver": "For multiple mailboxes, separate them with a comma ','"
},
"helpTip": {
"emailUserSSL": "If SMTP port is 465, may be select",
@@ -1213,7 +1474,8 @@
"securityPasswordNumber": "After opening, the user password changes and resets must contain numeric characters",
"securityPasswordSpecialChar": "After opening, the user password changes and resets must contain special characters",
"securityPasswordUpperCase": "After opening, the user password changes and resets must contain uppercase letters",
"securityServiceAccountRegistration": "Allow using bootstrap token register service account, when terminal setup, can disable it"
"securityServiceAccountRegistration": "Allow using bootstrap token register service account, when terminal setup, can disable it",
"SecurityInsecureCommand": "After it is enabled, when a dangerous command is executed on the asset, an email alarm notification will be sent"
},
"validatorMessage": {
"EnsureThisValueIsGreaterThanOrEqualTo3": "Ensure this value is greater than or equal to 3",
@@ -1267,7 +1529,29 @@
"weComTest": "Test",
"FeiShu": "FeiShu",
"feiShuTest": "Test",
"setting": "Setting"
"setting": "Setting",
"OtherAuth": "Other Auth",
"OAuth2LogoTip": "Tip: Authentication service provider (recommended image size: 64px*64px)",
"tokenHTTPMethod": "Token Obtain method",
"enableOAuth2Auth": "Enable OAuth2 authentication",
"Config": "Config",
"Senior": "Senior",
"HuaweiCloud": "Huawei Cloud",
"SecurityInsecureCommandEmailReceiver": "Alert receive email",
"JMSSSO": "SSO Token Login",
"AppAuth": "App auth",
"testPort": "Port",
"CMPP2": "CMPP v2.0",
"SignChannelNum": "Signature channel number",
"testHelpText": "Please enter the destination address for testing",
"OAuth2": "OAuth2",
"destinationIP": "Destination address",
"AppEndpoint": "Application access address",
"authCASAttrMap": "User Attribute Mapping",
"SignaturesAndTemplates": "Signatures and Templates",
"SystemTools": "System Tool",
"testTools": "Test",
"basicTools": "Basic tool"
},
"tickets": {
"PermissionName": "Permission name",
@@ -1322,7 +1606,23 @@
"ApplyRunSystemUser": "Apply run system user",
"ApplyRunCommand": "Apply run command",
"ApplyFromSession": "Session",
"ApplyFromCMDFilterRule": "Command filter rule"
"ApplyFromCMDFilterRule": "Command filter rule",
"RelevantSystemUser": "System user",
"CustomUser": "Custom user",
"SuperOrgAdmin": "Super administrator + organization administrator",
"OrgAdmin": "Organization administrator",
"TwoAssigneeType": "Type of secondary assignee",
"ApprovalLevel": "Approval level",
"OneAssigneeType": "Type of primary assignee",
"RelevantCommand": "Command",
"RelevantApp": "Application",
"RelevantAsset": "Asset",
"StateClosed": "closed",
"TwoAssignee": "Secondary Recipient",
"SuperAdmin": "Super administrator",
"FlowDetail": "Flow detail",
"OneAssignee": "First-level Assignee",
"RelevantAssignees": "Relevant assignees"
},
"tree": {
"AddAssetToNode": "Add asset to node",
@@ -1433,7 +1733,10 @@
"unbind": "Unbind",
"unblock": "Unblock",
"unblockSuccessMsg": "Account has unblocked",
"unblockUser": "Unblock login"
"unblockUser": "Unblock login",
"resetDingTalkLoginSuccessMsg": "The reset is successful, and the user can re-bind DingTalk",
"resetDingTalkLoginWarningMsg": "Are you sure you want to unbind the user's DingTalk?",
"resetDingTalk": "Untie DingTalk"
},
"removeFromOrgWarningMsg": "Are you sure remove ",
"tabs": {
@@ -1455,7 +1758,8 @@
"UpdatePublicKey": "",
"passwordExpired": "Password expired",
"passwordWillExpiredPrefixMsg": "The password will expire in ",
"passwordWillExpiredSuffixMsg": " days.Please change your password as soon as possible."
"passwordWillExpiredSuffixMsg": " days.Please change your password as soon as possible.",
"dateLastLogin": "Date last login"
},
"notifications": {
"MessageType": "Message Type",
@@ -1620,7 +1924,11 @@
"DateSync": "Date sync",
"Status": "Status",
"Log": "Log",
"DeleteReleasedAssets": "Delete released assets"
"DeleteReleasedAssets": "Delete released assets",
"QcloudLighthouse": "Tencent Cloud (lightweight application server)",
"KingSoftCloud": "KingSoft Cloud",
"CTYunPrivate": "CTYun Private",
"LAN": "LAN"
},
"Corporation": "Corporation",
"Edition": "Edition",
@@ -1706,6 +2014,14 @@
"CrontabOfCreateUpdatePage": "For example: every Sunday at 03:05 execute <5 3 * * 0> <br/> Using the 5-bit Linux crontab expression <minute hour day month week> (<a href=\"https://tool.lu/crontab/\" target=\"_blank\"> Online tool </a>) <br/> If both regularly perform and cycle perform execution are set, use regularly perform first",
"IntervalOfCreateUpdatePage": "Unit: hour",
"UsernameOfCreateUpdatePage": "The username of the user on the target host; If already existed, modify user password; If it doesn't exist, add the user and set the password."
},
"officialWebsite": "Official website link",
"Template": {
"Template": "Template"
}
},
"applets": {
"PublishStatus": "Publish status",
"NoPublished": "Unpublished"
}
}
}

137
src/i18n/langs/i18n-util.py Normal file
View File

@@ -0,0 +1,137 @@
"""
描述: Lina i18n 翻译 检测、更新 工具
两个功能:
1. 以 zh.json 文件为基础,检测 en.json 和 ja.json 文件是否有缺失的翻译,如果有会将缺少的翻译信息写入到新文件 diff-zh-en.json 和 diff-zh-ja.json 中
2. 用户直接修改 diff-zh-en.json 和 diff-zh-ja.json 文件中对应的翻译,然后执行命令,会将修改后的翻译写入到 en.json 和 ja.json 文件中
使用方法:
1. 生成差异文件: python i18n-util.py diff en ja
2. 修改差异文件: vi diff-zh-en.json 和 vi diff-zh-ja.json
3. 更新翻译文件: python i18n-util.py apply en ja
依赖包:
pip install data-tree
pip install pathdict
"""
import os
import json
import argparse
import data_tree
from pathdict import PathDict
actions_display_mapper = {
'diff': '检测',
'apply': '更新'
}
langs_display_map = {
'en': '英文',
'ja': '日文'
}
class I18NFileUtil(object):
dir_path = './src/i18n/langs'
def diff(self, lang):
zh_json = self.load_json(f'{self.dir_path}/zh.json')
zh_tree = data_tree.Data_tree_node(arg_data=zh_json)
zh_paths = list(zh_tree.paths(arg_bool_get_paths_as_strings=True))
lang_json = self.load_json(f'{self.dir_path}/{lang}.json')
lang_tree = data_tree.Data_tree_node(arg_data=lang_json)
lang_paths = list(lang_tree.paths(arg_bool_get_paths_as_strings=True))
diff_paths = set(zh_paths) - set(lang_paths)
data = {}
diff_filepath = f'{self.dir_path}/.diff-zh-{lang}.json'
with open(diff_filepath, 'w', encoding='utf-8') as f:
for path in diff_paths:
value = zh_tree.get(path)
if not isinstance(value, str):
continue
data[path] = value
json_data = json.dumps(data, ensure_ascii=False, indent=2)
f.write(json_data)
msg = f'\n' \
f'* 检测到 ./{lang}.json 有 {len(data)} 条翻译未处理, ' \
f'待翻译条目已写入到 {diff_filepath} 文件中. \n'
print(msg)
def apply(self, lang):
diff_filepath = f'{self.dir_path}/.diff-zh-{lang}.json'
diff_data = self.load_json(diff_filepath)
lang_data = self.load_json(f'{self.dir_path}/{lang}.json')
lang_pdict = PathDict(lang_data, create_if_not_exists=True)
for key_path, value in diff_data.items():
lang_pdict[key_path] = value
with open(f'{self.dir_path}/{lang}.json', 'w', encoding='utf-8') as f:
data = self.pathdict_to_dict(lang_pdict)
data = json.dumps(data, ensure_ascii=False, indent=2)
f.write(data)
print(f'\n翻译文件 {self.dir_path}/{lang}.json 已更新, 总共写入新的翻译 {len(diff_data)} 条.\n')
# 删除 diff 文件
os.remove(diff_filepath)
def pathdict_to_dict(self, data):
d = {}
for k, v in data.items():
if isinstance(v, PathDict):
v = self.pathdict_to_dict(v)
d[k] = v
return d
@staticmethod
def load_json(filename):
with open(filename, 'r') as f:
data = f.read()
return json.loads(data)
if __name__ == '__main__':
parser = argparse.ArgumentParser(
description="""
Lina i18n util
Example: \r\n
%(prog)s diff en(ja);
%(prog)s apply en(ja);
"""
)
parser.add_argument(
'action', type=str, choices=("diff", "apply"),
)
parser.add_argument(
'langs', type=str, choices=("en", "ja"), nargs='*'
)
args = parser.parse_args()
action = args.action
langs = args.langs
util = I18NFileUtil()
method = getattr(util, action)
action_display = actions_display_mapper[action]
print('-'*100)
for index, _lang in enumerate(langs):
lang_display = langs_display_map[_lang]
method(_lang)
print('-'*100)
if action == 'diff':
_langs = ' '.join(langs)
msg = f'\n* Tips: 修改差异文件后, 执行命令 ```npm run apply-i18n ``` 更新翻译文件 *\n'
print(msg)

View File

@@ -6,7 +6,95 @@
"AccountHistoryHelpMessage": "現在のアカウントの履歴バージョンを記録する",
"PleaseClickLeftAssetToViewAssetAccount": "資産のアカウントのリスト、左側の資産をクリックして表示します",
"PleaseClickLeftApplicationToViewApplicationAccount": "アカウントのリストを適用して、左側のアプリケーションをクリックして表示します",
"PleaseClickLeftAssetToViewGatheredUser": "ユーザーリストを収集し、左側の資産をクリックして表示します。"
"PleaseClickLeftAssetToViewGatheredUser": "ユーザーリストを収集し、左側の資産をクリックして表示します。",
"AccountGather": {
"ExecutionDetail": "タスクの詳細",
"AccountGatherTaskExecutionList": "タスク実行リスト",
"ExecutionList": "実行リスト",
"AccountGatherTaskUpdate": "更新タスク",
"AccountGatherTaskCreate": "タスクを作成",
"AccountGather": "アカウントのコレクション",
"AccountGatherTaskList": "アカウントのコレクション",
"AccountGatherList": "収集タスク"
},
"AccountChangeSecret": {
"Result": "結果",
"ExecutionTimes": "実行時間",
"TaskList": "タスク レコード",
"TimerPeriod": "時限実行サイクル",
"DatabaseId": "データベース ID",
"Database": "データベース",
"SecretKeyStrategy": "パスワード ポリシー",
"HelpText": {
"UsernameOfCreateUpdatePage": "ターゲット ホスト上のユーザーのユーザー名。既に存在する場合は、ユーザー パスワードを変更します。存在しない場合は、ユーザーを追加してパスワードを設定します。",
"CrontabOfCreateUpdatePage": "例: <5 3 * * 0> を毎週日曜日の 03:05 に実行 <br/> 5 桁の Linux crontab 式 <time-sharing day month weekday> (<a href=\"https://tool. lu/crontab /\" target=\"_blank\">オンライン ツール</a>) <br/> 定期実行と定期実行の両方を同時に設定した場合は、定期実行が優先されます",
"IntervalOfCreateUpdatePage": "単位:時間"
},
"SymbolSetHelpText": "このタイプのデータベースでサポートされている一連の特殊記号を入力してください。生成されたランダム パスワードに、このタイプのデータベースでサポートされていない特殊文字が含まれている場合、暗号化プランは失敗します。",
"ContainAttachment": "付属品付き",
"PasswordStrategy": "暗号文生成戦略",
"Addressee": "受取人",
"AssetAndNode": "アセットとノード",
"Asset": "資産",
"PasswordLength": "パスワードの長さ",
"SystemUserId": "システム ユーザー ID",
"ChangePassword": "パスワードを変更する",
"validatorMessage": {
"EnsureThisValueIsGreaterThanOrEqualTo1": "値が 1 以上であることを確認してください"
},
"ModifySSHKey": "改訂 SSH Key",
"DateUpdated": "更新しました",
"AccountChangeSecret": "アカウントのパスワード変更",
"RegularlyPerform": "定期実行",
"SystemUser": "システム ユーザー",
"AddNode": "ノードを追加",
"NodeAmount": "ノード数",
"OnlyMailSend": "現在メール送信のみ対応",
"Username": "ユーザー名",
"AssetAmount": "資産量",
"DateStart": "開始日",
"AddAsset": "アセットを追加",
"SymbolSet": "特殊記号のコレクション",
"DateJoined": "作成日",
"ManualExecutePlan": "手動実行計画",
"Log": "ログ",
"CyclePerform": "定期実行",
"MailRecipient": "メール受信者",
"ExecutionDetail": "実行の詳細",
"Name": "名前",
"Retry": "リトライ",
"Timer": "時限実行",
"Detail": "詳細",
"TimeDelta": "営業時間",
"AppAmount": "応募数",
"AssetChangeSecretCreate": "アカウントの作成とパスワードの変更",
"ExecutionList": "実行リスト",
"Execute": "埋め込む",
"SystemUserAmount": "システムユーザー数",
"AssetChangeSecretUpdate": "アカウントの更新とパスワードの変更",
"Success": "成功",
"AddSystemUser": "システムユーザーを追加"
},
"AccountPush": {
"AccountPushExecutionList": "実行リスト",
"AccountPushCreate": "アカウントのプッシュ作成",
"AccountPushList": "アカウントプッシュ"
},
"AccountBackup": {
"IsSuccess": "成功するかどうか",
"ExecutionDetail": "実行の詳細",
"MailRecipient": "メール受信者 ",
"Types": "タイプ",
"AccountBackupUpdate": "アカウントのバックアップを更新する",
"AccountBackupCreate": "アカウントのバックアップを作成する",
"Backup": "バックアップ",
"ExecutionList": "実行リスト",
"Reason": "理由",
"AccountBackup": "アカウントのバックアップ"
},
"DynamicUsername": "動的ユーザー名",
"AutoCreate": "自動作成",
"TaskID": "タスク ID"
},
"acl": {
"IgnoreCase": "大文字小文字を無視する",
@@ -75,9 +163,8 @@
"appPath": "適用パス",
"appType": "適用タイプ",
"appName": "アプリ名",
"host": "資産",
"database": "データベース",
"host": "本体",
"database": "データベース",
"mysql": "Mysql",
"port": "ポート",
"type": "タイプ",
@@ -301,7 +388,23 @@
"RDBProtocol": "リレーショナルデータベース",
"NoSQLProtocol": "非リレーショナルデータベース",
"OtherProtocol": "その他の契約",
"PasswordOrToken": "パスワード/トークン"
"PasswordOrToken": "パスワード/トークン",
"Accounts": "アカウント一覧",
"CustomTree": "カスタムツリー",
"AccessKey": "アクセスキー",
"Cloud": "クラウド サービス",
"Address": "アドレス",
"Secret": "パスワード",
"ApiKey": "API Key",
"SSHKey": "SSH 鍵",
"BuiltinTree": "タイプツリー",
"Network": "ネットワーク",
"AccountDetail": "アカウント詳細",
"Token": "トークン",
"GatewayList": "ゲートウェイ一覧",
"InitialDeploy": "初期展開",
"PrivateKey": "鍵",
"Category": "カテゴリー"
},
"audits": {
"ChangeField": "フィールドを変更します",
@@ -399,7 +502,7 @@
"BadConflictErrorMsg": "更新中です。後で再試行してください。",
"Basic": "基本",
"PleaseAgreeToTheTerms": "条項に同意してください",
"OpenId": "OpenId設定",
"OpenId": "OpenID設定",
"Radius": "Radius設定",
"Cas": "Cas設定",
"other": "その他の設定",
@@ -495,7 +598,6 @@
"dateCreated": "作成日",
"dateExpired": "失効日",
"dateFinished": "完了日",
"DateStart": "開始日",
"deleteErrorMsg": "削除に失敗しました",
"deleteFailedMsg": "削除に失敗しました",
"deleteSelected": "削除選択した",
@@ -630,7 +732,23 @@
"runningTimes": "直近5回の稼働時間",
"calculationResults": "Cron式エラー",
"failedConditions": "条件に達していない結果!"
}
},
"Deploy": "配備",
"Publish": "リリース",
"Icon": "アイコン",
"Automations": "オートメーション",
"Inactive": "無効",
"Valid": "効率的",
"Selector": "セレクタ",
"Version": "バージョン",
"Detail": "詳細",
"OfflineUpload": "オフラインでアップロード",
"DisplayName": "名前",
"Task": "タスク",
"Invalid": "無効",
"PublishAllApplets": "すべてのアプリを公開する",
"Sync": "同期する",
"Filename": "ファイル名"
},
"dashboard": {
"ActiveAsset": "最近ログインされました",
@@ -743,7 +861,106 @@
"version": "バージョン",
"versionDetail": "バージョンの詳細",
"versionRunExecution": "実行履歴",
"Unknown": "不明"
"Unknown": "不明",
"ScrollToBottom": "一番下までスクロール",
"VariableHelpText": "コマンドで {{ key }} を使用して組み込み変数を読み取ることができます",
"RequiredEntryFile": "このファイルは、実行のエントリ ファイルとして使用され、存在する必要があります。",
"State": "状況",
"AverageTimeCost": "平均滞在時間",
"RunJob": "ジョブを実行",
"failed": "失敗",
"DeleteConfirmMessage": "削除後は復元できません,続行しますか?",
"ClearScreen": "清屏",
"Workspace": "ワークスペース",
"Parameter": "パラメータ",
"History": "実行履歴",
"Cancel": "確認",
"SuccessAsset": "成功した資産",
"Asset": "資産",
"Language": "言語",
"privilegeFirst": "特権アカウントを優先",
"Material": "コンテンツ",
"createAdhoc": "作成コマンド",
"Module": "モジュール",
"UseParameterDefine": "パラメータを定義する",
"DeleteSuccess": "正常に削除されました",
"AssetResultDetail": "アセットの結果",
"total": "合計",
"Variable": "変数",
"PlaybookDetail": "Playbook 詳細",
"DryRun": "テスト走行",
"SelectAdhoc": "コマンドを選択",
"TimeoutHelpText": "この値が -1 の場合、タイムアウトは指定されません",
"Command": "注文",
"PlaybookManage": "Playbook 管理",
"ChdirHelpText": "デフォルトの実行ディレクトリは、実行ユーザーのホーム ディレクトリです。",
"timeout": "タイムアウト",
"Skip": "飛び越える",
"Reason": "理由",
"PrivilegedOnly": "特権アカウントのみ",
"JobType": "職種",
"OpenCommand": "コマンドを開く",
"PlaybookUpdate": "更新する Playbook",
"NewDirectory": "新しいディレクトリ",
"skip": "現在のアセットを無視",
"ExecutionDetail": "実行の詳細",
"ScriptDetail": "スクリプトの詳細",
"SaveAdhoc": "保存コマンド",
"AdhocManage": "コマンド管理",
"LastPublishedTime": "最終公開",
"CloseConfirmMessage": "ファイルが変更されました,保存しますか?",
"privilegeOnly": "特権アカウントのみを選択",
"UploadPlaybook": "アップロード Playbook",
"Rename": "名前を変更",
"RUNNING": "ランニング",
"instantAdhoc": "インスタントコマンド",
"Summary(success/total)": "概要 (成功/合計)",
"Queue": "列",
"history": "履歴書",
"Help": "ヘルプ",
"Timeout": "タイムアウト (秒)",
"Confirm": "確認",
"RequiredAssetOrNode": "少なくとも 1 つのアセットまたはノードを選択してください",
"Run": "走る",
"SaveCommandSuccess": "保存コマンドが成功しました",
"NewFile": "新しいファイルを作成する",
"Job": "手術",
"SUCCESS": "成功",
"Type": "タイプ",
"running": "ランニング",
"ScrollToTop": "トップにスクロールします",
"Plan": "プラン",
"ThisPeriodic": "定期的なお仕事です",
"QuickJob": "ショートカット コマンド",
"DateLastRun": "最終実行日",
"FailedAsset": "失敗したアセット",
"AdhocDetail": "コマンド詳細",
"RequiredContent": "コマンドを入力してください",
"DateFinished": "完了時間",
"DeleteFile": "ファイルの削除",
"AssetAmount": "資産",
"Comment": "述べる",
"SaveSuccess": "正常に保存",
"PENDING": "待っている",
"script": "スクリプト一覧",
"SaveCommand": "保存コマンド",
"FAILURE": "失敗",
"Log": "ログ",
"ExcludeAsset": "スキップされたアセット",
"DateCreated": "作成時間",
"RunCommand": "コマンドを実行",
"Delete": "消去",
"TaskDispatch": "タスクは正常に送信されました",
"RunasPolicy": "アカウント ポリシー",
"PrivilegedFirst": "優先特権アカウント",
"CloseConfirm": "閉じることを確認",
"SelectCreateMethod": "作り方を選ぶ",
"View": "チェック",
"BuiltinVariable": "組み込み変数",
"Add": "追加",
"SuccessfulOperation": "成功した操作",
"Modify": "改訂",
"AdhocUpdate": "更新コマンド"
},
"perms": {
"": "",
@@ -813,7 +1030,8 @@
"clipboardPaste": "クリップボードに貼り付ける",
"userCount": "ユーザー数",
"userGroupCount": "ユーザーグループ数",
"usersAndUserGroups": "ユーザーまたはユーザーグループ"
"usersAndUserGroups": "ユーザーまたはユーザーグループ",
"Account": "アカウント"
},
"route": {
"": "",
@@ -998,7 +1216,27 @@
"NoPermissionVew": "現在のページを表示する権限がありません",
"AjaxError404": "404リクエストエラー",
"CannotAccess": "現在のページにアクセスできません",
"GoHomePage": "トップページへ"
"GoHomePage": "トップページへ",
"RemoteApps": "リモート アプリケーション",
"MyTickets": "私のアプリケーション",
"AssetPermissionList": "アセット認可リスト",
"Database": "データベース",
"Device": "インターネット機器",
"JobUpdate": "更新ジョブ",
"TaskCenter": "タスクセンター",
"AppletCreate": "リモート アプリケーションを作成する",
"AppletHostUpdate": "リモート アプリケーション パブリッシャの更新",
"Template": "テンプレート管理",
"AppletHostDetail": "リモート アプリケーション パブリッシャの詳細",
"JobCreate": "ジョブを作成",
"JobExecutionLog": "ジョブログ",
"JobList": "ジョブ管理",
"BatchScript": "バッチ スクリプト",
"HostList": "ホスト リスト",
"AppletHostCreate": "リモート アプリケーション発行者を追加する",
"Execution": "実行履歴",
"JobDetail": "仕事の詳細",
"Clouds": "クラウド プラットフォーム"
},
"rbac": {
"Permissions": "権限",
@@ -1012,7 +1250,9 @@
"AppletHosts": "アプリケーションパブリッシャ",
"uploadZipTips": "zip形式のファイルをアップロードしてください",
"HostDeployment": "パブリッシャーの導入",
"TerminalStat": "CPU/メモリ/ディスク"
"TerminalStat": "CPU/メモリ/ディスク",
"DatabasePort": "データベース プロトコル ポート",
"BasePort": "リスニング ポート"
},
"sessions": {
"SetToDefaultStorage": "デフォルトストレージに設定",
@@ -1302,7 +1542,8 @@
"testPort": "テストポート",
"testTools": "テスト",
"testHelpText": "テストの宛先アドレスを入力してください",
"SMSProvider": "メールサービス業者 / プロトコル"
"SMSProvider": "メールサービス業者 / プロトコル",
"Applets": "リモート アプリケーション"
},
"tickets": {
"OneAssigneeType": "一次受付者タイプ",
@@ -1371,7 +1612,8 @@
"ApplyRunSystemUser": "実行を申請するシステムユーザー",
"ApplyRunCommand": "実行を申請するコマンド",
"ApplyFromSession": "会話",
"ApplyFromCMDFilterRule": "コマンドフィルタルール"
"ApplyFromCMDFilterRule": "コマンドフィルタルール",
"RelevantAssignees": "関連する譲受人"
},
"tree": {
"AddAssetToNode": "ノードにアセットを追加",
@@ -1768,5 +2010,9 @@
"IntervalOfCreateUpdatePage": "単位: 時",
"UsernameOfCreateUpdatePage": "ターゲットホスト上のユーザーのユーザー名存在する場合は、ユーザーパスワードを変更します存在しない場合は、ユーザーを追加してパスワードを設定します"
}
},
"applets": {
"PublishStatus": "投稿ステータス",
"NoPublished": "未発表"
}
}
}

View File

@@ -425,6 +425,7 @@
"ReLoginErr": "登录时长已超过 5 分钟,请重新登录"
},
"common": {
"Filename": "文件名",
"ApproverNumbers": "审批人数量",
"Overview": "概览",
"Now": "现在",
@@ -512,9 +513,9 @@
"BadConflictErrorMsg": "正在刷新中,请稍后再试",
"Basic": "基本",
"PleaseAgreeToTheTerms": "请同意条款",
"OpenId": "OpenId设置",
"OpenId": "OpenID设置",
"Radius": "Radius设置",
"Cas": "Cas设置",
"Cas": "CAS设置",
"other": "其它设置",
"ApplyInfo": "申请信息",
"Cancel": "取消",
@@ -812,8 +813,14 @@
"Weekly": "按周"
},
"ops": {
"AdhocUpdate": "更新命令",
"Add": "新增",
"Modify": "修改",
"View": "查看",
"Confirm": "确认",
"Cancel": "确认",
"Delete": "删除",
"SuccessfulOperation": "操作成功",
"Cancel": "取消",
"DeleteFile": "删除文件",
"DeleteConfirmMessage": "删除后无法恢复,是否继续?",
"CloseConfirm": "确认关闭",
@@ -823,7 +830,6 @@
"NewFile": "新建文件",
"NewDirectory": "新建目录",
"Rename": "重命名",
"Delete": "删除",
"SelectCreateMethod": "选择创建方式",
"Workspace": "工作空间",
"UploadPlaybook": "上传 Playbook",
@@ -858,6 +864,7 @@
"ScriptDetail": "脚本详情",
"AssetResultDetail": "资产结果",
"VariableHelpText": "您可以在命令中使用 {{ key }} 读取内置变量",
"BuiltinVariable": "内置变量",
"ChdirHelpText": "默认执行目录为执行用户的 home 目录",
"OpenCommand": "打开命令",
"SaveCommand": "保存命令 ",
@@ -1533,6 +1540,7 @@
"testHelpText": "请输入目的地址进行测试"
},
"tickets": {
"RelevantAssignees": "相关受理人",
"OneAssigneeType": "一级受理人类型",
"OneAssignee": "一级受理人",
"TwoAssigneeType": "二级受理人类型",
@@ -1770,6 +1778,7 @@
"AssetCount": "资产数量",
"Auditor": "审计员",
"Cloud": {
"LAN": "局域网",
"CloudSync": "云同步",
"ServerAccountKey": "服务账号密钥",
"IPNetworkSegment": "IP网段",

View File

@@ -187,7 +187,7 @@ export default {
component: () => import('@/views/ops/Template/Adhoc/AdhocUpdateCreate'),
hidden: true,
meta: {
title: i18n.t('route.updateAdhoc'),
title: i18n.t('ops.AdhocUpdate'),
permissions: ['ops.change_adhoc'],
activeMenu: '/workbench/ops/templates'
}

View File

@@ -52,6 +52,9 @@ export const getChangeSecretFields = () => {
rules: [
{ required: false }
],
el: {
baseUrl: '/api/v1/assets/assets/?change_secret_enabled=true'
},
label: i18n.t('xpack.Asset')
},
nodes: {

View File

@@ -5,6 +5,8 @@
<script>
import { GenericCreateUpdatePage } from '@/layout/components'
import { getChangeSecretFields } from '@/views/accounts/AccountChangeSecret/fields'
import { AssetSelect } from '@/components'
import i18n from '@/i18n/i18n'
export default {
name: 'AccountPushCreateUpdate',
@@ -24,13 +26,6 @@ export default {
},
url: '/api/v1/accounts/push-account-automations/',
fields: [
// ['触发方式', ['triggers']],
// [this.$t('assets.Account'), [
// 'username', 'dynamic_username',
// 'secret_type', 'secret_strategy', 'secret',
// 'password_rules', 'ssh_key', 'passphrase'
// ]],
// [this.$t('common.Action'), ['action', 'ssh_key_change_strategy']],
[this.$t('common.Basic'), ['name']],
[this.$t('xpack.Asset'), ['accounts', 'assets', 'nodes']],
[
@@ -46,6 +41,17 @@ export default {
],
fieldsMeta: {
...getChangeSecretFields(),
assets: {
type: 'assetSelect',
component: AssetSelect,
rules: [
{ required: false }
],
el: {
baseUrl: '/api/v1/assets/assets/?push_account_enabled=true'
},
label: i18n.t('xpack.Asset')
},
username: {
hidden: (formValue) => formValue['dynamic_username']
},

View File

@@ -25,7 +25,7 @@ export default {
tableConfig: {
url: '/api/v1/accounts/account-templates/',
columns: null,
columnsExclude: ['specific'],
columnsExclude: ['spec_info'],
columnsShow: {
min: ['name', 'actions'],
default: ['name', 'username', 'secret_type', 'has_secret', 'privileged', 'actions']

View File

@@ -27,7 +27,8 @@ export default {
iShowTree: true,
tableConfig: {
url: '/api/v1/accounts/accounts/',
hasLeftActions: true
hasLeftActions: true,
hasImport: true
},
treeSetting: {
showMenu: false,

View File

@@ -49,10 +49,6 @@ export default {
accounts: {
fields: ['username_group']
},
priority: {
// helpText: '优先级可选范围为1-1001最低优先级100最高优先级'
// helpText: this.$t('assets.CommandFilterRulePriorityHelpText')
},
action: {
},
command_groups: {

View File

@@ -64,10 +64,6 @@ export default {
},
helpText: ''
},
priority: {
// helpText: '优先级可选范围为1-1001最低优先级100最高优先级'
// helpText: this.$t('assets.CommandFilterRulePriorityHelpText')
},
reviewers: {
hidden: (item) => item.action !== 2,
rules: [rules.RequiredChange],

View File

@@ -23,11 +23,11 @@ export default {
component: AssetSelect,
label: this.$t('assets.Assets'),
el: {
value: []
value: [],
baseUrl: '/api/v1/assets/assets/?domain_enabled=true'
}
}
},
url: '/api/v1/assets/domains/'
}
}

View File

@@ -32,7 +32,7 @@ export default {
},
initial: {
comment: '',
charset: 'utf8',
charset: 'utf-8',
category_type: ['host', 'linux'],
automation: {
ansible_enabled: true

View File

@@ -214,7 +214,6 @@ export default {
showRefresh: true,
showMenu: false,
showSearch: true,
customTreeHeader: false,
check: {
enable: true
},

View File

@@ -31,7 +31,7 @@ export default {
},
data() {
return {
title: '内置变量',
title: this.$t('ops.BuiltinVariable'),
variables: {}
}
},

View File

@@ -1,7 +1,7 @@
<template>
<Dialog
v-if="iVisible"
title="新建文件"
:title="$tc('ops.NewFile')"
:visible.sync="iVisible"
width="20%"
top="1vh"
@@ -10,7 +10,7 @@
@confirm="onConfirm"
>
<el-form>
<el-form-item label="名称">
<el-form-item :label="$tc('common.DisplayName')">
<el-input v-model="name" />
</el-form-item>
</el-form>

View File

@@ -10,7 +10,7 @@
>
<el-form ref="form" label-width="80px">
<el-form-item label="文件名">
<el-form-item :label="$tc('common.Filename')">
<el-input v-model="newFileName" />
</el-form-item>
</el-form>

View File

@@ -105,7 +105,6 @@ export default {
showCreate: false,
showUpdate: false,
showSearch: false,
customTreeHeader: false,
callback: {
onSelected: function(event, treeNode) {
console.log(treeNode)

View File

@@ -1,6 +1,6 @@
<template>
<Dialog
title="离线上传"
:title="$tc('common.OfflineUpload')"
v-bind="$attrs"
@confirm="onSubmit"
v-on="$listeners"
@@ -83,6 +83,10 @@ export default {
const error = err.response.data?.error || this.$t('terminal.UploadFailed')
this.$message.error(error)
})
setTimeout(() => {
this.$refs.upload.clearFiles()
}, 400)
}
}
}

View File

@@ -19,6 +19,9 @@ export default {
return {
columnsMeta: {
name: {
formatter: (row) => <span>{row.name}</span>
},
asset: {
label: this.$t('assets.Asset'),
formatter: (row) => <span>{row.asset.name}</span>
}

View File

@@ -70,7 +70,7 @@ export default {
}
},
date_updated: {
label: '日期'
label: this.$t('ops.date')
},
actions: {
formatterArgs: {

View File

@@ -49,7 +49,6 @@ export default {
}
},
ANNOUNCEMENT_ENABLED: {
// label: '公告',
component: Announcement
}
},

View File

@@ -101,7 +101,7 @@ export default {
content.push(h('p', null, item),)
})
this.$msgbox({
title: '相关受理人',
title: this.$t('tickets.RelevantAssignees'),
customClass: 'acceptance',
message: h('p', null, content),
showCancelButton: false,

View File

@@ -53,7 +53,6 @@ export default {
showMenu: false,
showRefresh: true,
showSearch: false,
customTreeHeader: false,
treeUrl: '',
check: {
enable: true

21370
yarn.lock

File diff suppressed because it is too large Load Diff