diff --git a/src/components/FormFields/WeekCronSelect.vue b/src/components/FormFields/WeekCronSelect.vue index 60a38e837..02637f450 100644 --- a/src/components/FormFields/WeekCronSelect.vue +++ b/src/components/FormFields/WeekCronSelect.vue @@ -2,10 +2,10 @@
- +
- + @@ -19,17 +19,17 @@ -
{{ this.$t('common.WeekCronSelect.WeekOrTime') }}{{ this.$t('common.WeekCronSelect.WeekOrTime') }} 00:00 - 12:00 12:00 - 24:00
+
{{ this.$t('common.WeekCronSelect.CanDragSelect') }} {{ this.$t('common.WeekCronSelect.ClearSelection') }} @@ -314,6 +314,7 @@ export default { min-width: 640px; position: relative; display: inline-block; + padding-right: 20px; } .c-schedue { background: #598fe6; diff --git a/src/components/Link/index.vue b/src/components/Link/index.vue new file mode 100644 index 000000000..481893588 --- /dev/null +++ b/src/components/Link/index.vue @@ -0,0 +1,36 @@ + + + diff --git a/src/components/TableFormatters/DetailFormatter.vue b/src/components/TableFormatters/DetailFormatter.vue index ca68157a2..459ef7c90 100644 --- a/src/components/TableFormatters/DetailFormatter.vue +++ b/src/components/TableFormatters/DetailFormatter.vue @@ -2,9 +2,9 @@
icon @@ -105,9 +105,6 @@ export default { } else { this.$router.push(this.detailRoute) } - // const routeName = this.formatterArgs.route - // this.$log.debug('Will go to detail route: ', routeName) - // this.$router.push({ name: routeName, params: { id: this.row.id }, query: routeQuery }) } } } diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index e432341b5..4780df725 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -148,7 +148,7 @@ "users": "User", "Rules": "Rule", "Action": "Action", - "ip_group_help_text": "* 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", + "ipGroupHelpText": "* 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", "apply_login_account": "Apply login account" }, "applications": { @@ -742,7 +742,7 @@ "noAnnouncement": "No announcement", "lastCannotBeDeleteMsg": "The last one can't be delete", "InvalidJson": "Not a valid json format", - "time_period": "Time period", + "timePeriod": "Time period", "CronTab": { "newCron": "new cron", "timeExpression": "time expression", diff --git a/src/i18n/langs/ja.json b/src/i18n/langs/ja.json index 3a4359d1f..318519474 100644 --- a/src/i18n/langs/ja.json +++ b/src/i18n/langs/ja.json @@ -127,7 +127,7 @@ "AccountUsername": "アカウント (ユーザー名)", "username": "ユーザー名", "ip_group": "IPグループ", - "ip_group_help_text": "* はすべてにマッチすることを示します。例: 192.168.10.1、192.168.1.0/24、10.1.1-10.1.1. 20、2001:db8:2de::e 13、2001:db8:1a:1110::/64", + "ipGroupHelpText": "* はすべてにマッチすることを示します。例: 192.168.10.1、192.168.1.0/24、10.1.1-10.1.1. 20、2001:db8:2de::e 13、2001:db8:1a:1110::/64", "action": "アクション", "Rules": "ルール", "Action": "アクション", @@ -745,7 +745,7 @@ "noAnnouncement": "公告なし", "lastCannotBeDeleteMsg": "最後の項目は削除できません", "InvalidJson": "JSONの合法的ではありません", - "time_period": "時間帯", + "timePeriod": "時間帯", "FormatError": "フォーマットエラー", "NotSpecialEmoji": "特殊な表情記号の入力は許可されていません", "notAlphanumericUnderscore": "数字、文字、アンダースコアのみ入力可能", diff --git a/src/i18n/langs/zh.json b/src/i18n/langs/zh.json index 83fededc7..47a946b44 100644 --- a/src/i18n/langs/zh.json +++ b/src/i18n/langs/zh.json @@ -115,6 +115,8 @@ } }, "acl": { + "LoginIP": "登录 IP", + "UserIP": "登录 IP", "apply_login_account": "申请登录账号", "IgnoreCase": "忽略大小写", "Content": "内容", @@ -128,7 +130,7 @@ "reviewer": "审批人", "username": "用户名", "ip_group": "IP 组", - "ip_group_help_text": "* 表示匹配所有。例如: 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", + "ipGroupHelpText": "* 表示匹配所有。例如: 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", "action": "动作", "Rules": "规则", "Action": "动作", @@ -463,6 +465,7 @@ "ReLoginErr": "登录时长已超过 5 分钟,请重新登录" }, "common": { + "OtherRules": "其它规则", "MatchedCount": "匹配结果", "SelectAttrs": "选择属性", "MatchResult": "匹配结果", @@ -510,7 +513,7 @@ "ConvenientOperate": "便捷操作", "Overview": "概览", "Now": "现在", - "EnterToContinue": "按回车继续输入", + "EnterToContinue": "按下 Enter 继续输入", "SpecificInfo": "特殊信息", "CollectionSucceed": "收藏成功", "CancelCollection": "取消收藏", @@ -629,7 +632,7 @@ "CopySuccess": "复制成功", "Enable": "启用", "On/Off": "启/停", - "EnterForSearch": "按回车进行搜索", + "EnterForSearch": "按下 Enter 进行搜索", "Export": "导出", "Import": "导入", "ContinueImport": "继续导入", @@ -788,7 +791,7 @@ "noAnnouncement": "暂无公告", "lastCannotBeDeleteMsg": "最后一项,不能被删除", "InvalidJson": "不是合法 JSON", - "time_period": "时段", + "timePeriod": "时段", "FormatError": "格式错误", "NotSpecialEmoji": "不允许输入特殊表情符号", "notAlphanumericUnderscore": "只能输入字母、数字、下划线", @@ -1365,7 +1368,8 @@ "AppletHosts": "应用发布机", "uploadZipTips": "请上传 zip 格式的文件", "HostDeployment": "发布机部署", - "TerminalStat": "CPU/内存/磁盘" + "TerminalStat": "CPU/内存/磁盘", + "Endpoint": "端点" }, "sessions": { "SetToDefaultStorage": "设置为默认存储", diff --git a/src/views/acl/AssetAcl/AssetAclCreateUpdate.vue b/src/views/acl/AssetAcl/AssetAclCreateUpdate.vue index ed79ca53b..495237b06 100644 --- a/src/views/acl/AssetAcl/AssetAclCreateUpdate.vue +++ b/src/views/acl/AssetAcl/AssetAclCreateUpdate.vue @@ -8,6 +8,7 @@ import rules from '@/components/DataForm/rules' import { userJSONSelectMeta } from '@/views/users/const' import { assetJSONSelectMeta } from '@/views/assets/const' import AccountFormatter from '@/views/perms/AssetPermission/components/AccountFormatter.vue' +import { WeekCronSelect } from '@/components/FormFields' export default { name: 'AclCreateUpdate', @@ -17,21 +18,42 @@ export default { data() { return { initial: { - accounts: ['@ALL'] + accounts: ['@ALL'], + rules: [ + { + ip_group: ['*'] + } + ] }, fields: [ - [this.$t('common.Basic'), ['name']], + [this.$t('common.Basic'), ['name', 'priority']], [this.$t('users.Users'), ['users']], [this.$t('assets.Asset'), ['assets']], [this.$t('accounts.Accounts'), ['accounts']], + [this.$t('acl.Rules'), ['rules']], [this.$t('common.Action'), ['action', 'reviewers']], - [this.$t('common.Other'), ['priority', 'is_active', 'comment']] + [this.$t('common.Other'), ['is_active', 'comment']] ], fieldsMeta: { priority: { rules: [rules.Required] }, assets: assetJSONSelectMeta(this), + rules: { + fields: [ + 'ip_group', 'time_period' + ], + fieldsMeta: { + ip_group: { + label: this.$t('acl.LoginIP'), + helpText: this.$t('acl.ipGroupHelpText') + }, + time_period: { + label: this.$t('common.timePeriod'), + component: WeekCronSelect + } + } + }, users: userJSONSelectMeta(this), accounts: { component: AccountFormatter, diff --git a/src/views/acl/CommandAcl/CommandFilterAcl/CommandFilterAclCreateUpdate.vue b/src/views/acl/CommandAcl/CommandFilterAcl/CommandFilterAclCreateUpdate.vue index 503449f5e..33150ce4e 100644 --- a/src/views/acl/CommandAcl/CommandFilterAcl/CommandFilterAclCreateUpdate.vue +++ b/src/views/acl/CommandAcl/CommandFilterAcl/CommandFilterAclCreateUpdate.vue @@ -27,13 +27,13 @@ export default { accounts: ['@ALL'] }, fields: [ - [this.$t('common.Basic'), ['name']], + [this.$t('common.Basic'), ['name', 'priority']], [this.$t('perms.User'), ['users']], [this.$t('perms.Asset'), ['assets']], [this.$t('perms.Account'), ['accounts']], [this.$t('acl.CommandGroup'), ['command_groups']], [this.$t('common.action'), ['action', 'reviewers']], - [this.$t('common.Other'), ['priority', 'is_active', 'comment']] + [this.$t('common.Other'), ['is_active', 'comment']] ], url: '/api/v1/acls/command-filter-acls/', createSuccessNextRoute: { name: 'CommandFilterAclList' }, diff --git a/src/views/acl/UserLoginACL/UserLoginACLCreateUpdate.vue b/src/views/acl/UserLoginACL/UserLoginACLCreateUpdate.vue index 7cb30cfc9..bae9d07b1 100644 --- a/src/views/acl/UserLoginACL/UserLoginACLCreateUpdate.vue +++ b/src/views/acl/UserLoginACL/UserLoginACLCreateUpdate.vue @@ -1,7 +1,7 @@ @@ -19,13 +19,15 @@ export default { return { initial: { action: 'reject', - rules: { - ip_group: ['*'] - }, user: this.$route.query.user, users: { username_group: '' - } + }, + rules: [ + { + ip_group: ['*'] + } + ] }, url: '/api/v1/acls/login-acls/', hasDetailInMsg: false, @@ -74,10 +76,10 @@ export default { fieldsMeta: { ip_group: { label: this.$t('acl.ip_group'), - helpText: this.$t('acl.ip_group_help_text') + helpText: this.$t('acl.ipGroupHelpText') }, time_period: { - label: this.$t('common.time_period'), + label: this.$t('common.timePeriod'), component: WeekCronSelect } } diff --git a/src/views/perms/AssetPermission/components/AccountFormatter.vue b/src/views/perms/AssetPermission/components/AccountFormatter.vue index a841cad51..d900a4704 100644 --- a/src/views/perms/AssetPermission/components/AccountFormatter.vue +++ b/src/views/perms/AssetPermission/components/AccountFormatter.vue @@ -23,7 +23,7 @@ @change="handleTagChange" /> - + {{ $t('common.TemplateAdd') }} {{ addTemplateHelpText }} diff --git a/src/views/settings/Terminal/EndpointRule/EndpointRuleCreateUpdate.vue b/src/views/settings/Terminal/EndpointRule/EndpointRuleCreateUpdate.vue index 43d034e6b..406129c0d 100644 --- a/src/views/settings/Terminal/EndpointRule/EndpointRuleCreateUpdate.vue +++ b/src/views/settings/Terminal/EndpointRule/EndpointRuleCreateUpdate.vue @@ -1,13 +1,14 @@