From a432af1a6d0b9d43b01b08f99238d276dbb62113 Mon Sep 17 00:00:00 2001 From: ibuler Date: Mon, 15 Apr 2024 16:34:02 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BF=AE=E6=94=B9=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/i18n/lina/en.json | 68 +++++++++++++----------- apps/i18n/lina/zh.json | 8 +++ apps/perms/serializers/permission.py | 10 ++-- apps/static/css/jumpserver.css | 78 ++++++++++++++-------------- 4 files changed, 92 insertions(+), 72 deletions(-) diff --git a/apps/i18n/lina/en.json b/apps/i18n/lina/en.json index c792c3e2c..5e467addf 100644 --- a/apps/i18n/lina/en.json +++ b/apps/i18n/lina/en.json @@ -125,7 +125,7 @@ "AssetBulkUpdateTips": "Network Devices, Cloud Services, Web, Batch Updating of Domains Not Supported", "AssetChangeSecretCreate": "Create a change account credentials task", "AssetChangeSecretUpdate": "Update the change account credentials task", - "AssetData": "Asset Data", + "AssetData": "Asset", "AssetDetail": "Asset Detail", "AssetList": "Assets", "AssetListHelpMessage": "On the left is the asset tree. Right-click to create, delete or modify tree nodes. Assets are also organized in node form. On the right are the assets under this node. \n", @@ -162,7 +162,7 @@ "AutoPush": "Auto Push", "Automations": "Automations", "AverageTimeCost": "Average spend time", - "AwaitingMyApproval": "Awaiting my approval", + "AwaitingMyApproval": "Assigned to me", "Azure": "Azure (China)", "Backup": "Backup", "BackupAccounts": "Backup Accounts", @@ -214,6 +214,13 @@ "Certificate": "Certificate", "CertificateKey": "Client Key", "ChangeCredentials": "Change Secrets", + "ChangeCredentialsHelpText": "The secret is the password or key used to connect to the asset. When the secret is changed, the asset will be updated with the new secret", + "GatherAccountsHelpText": "Collect account information on assets. The collected account information can be imported into the system for centralized management.", + "BackupAccountsHelpText": "Backup account information externally. It can be stored in an external system or sent via email, supporting segmented delivery.", + "CommandFilterACLHelpText": "By filtering commands, you can control if commands can be sent to assets. Based on your set rules, some commands can be allowed while others are prohibited.", + "AssetLoginACLHelpText": "When logging into assets, it can be audited based on the user's login IP and time segment to determine whether the assets can be logged into", + "ConnectMethodACLHelpText": "Connect Methods can be filtered to control whether users can use a certain Connect Method to log in to the asset. According to your set rules, some Connect Methods can be allowed, while others can be prohibited.", + "UserLoginACLHelpText": "When logging in, it can be audited based on the user's login IP and time segment to determine whether the user can log in", "ChangeField": "Change Field", "ChangeOrganization": "Change organization", "ChangePassword": "Change Password", @@ -398,7 +405,7 @@ "DownloadImportTemplateMsg": "Download creation template", "DownloadReplay": "Download Recording", "DownloadUpdateTemplateMsg": "Download update template", - "DragUploadFileInfo": "Drag files here, or click here to upload", + "DragUploadFileInfo": "Drag files here, or click to upload", "DuplicateFileExists": "Uploading a file with the same name is not allowed, please delete the file with the same name", "Duration": "Duration", "DynamicUsername": "Dynamic Username", @@ -417,7 +424,7 @@ "Endswith": "Ending with...", "EnsureThisValueIsGreaterThanOrEqualTo1": "Please Make Sure this Number is Greater Than or Equal to 1", "EnterForSearch": "Press Enter to Search", - "EnterRunUser": "Enter running user", + "EnterRunUser": "Enter running account", "EnterRunningPath": "Enter Running Path", "EnterToContinue": "Press Enter to Continue", "EnterUploadPath": "Enter Upload Path", @@ -436,7 +443,7 @@ "Execute": "Execute", "ExecuteOnce": "Execute Once", "ExecutionDetail": "Execution History Details", - "ExecutionHistory": "Execution history", + "ExecutionHistory": "History", "ExecutionList": "Execute History", "ExistError": "This Element Already Exists", "Existing": "Already Exists", @@ -502,8 +509,10 @@ "HelpSupportTip": "Support URL for the navigation bar 'Help -> Support' redirection.", "HighLoad": "Higher", "HistoricalSessionNum": "Historical Session Count", - "History": "History Record", + "History": "History", "HistoryDate": "Date", + "CommandJob": "Command", + "PlayBookJob": "Playbook", "HistoryPassword": "Historical Password", "HistoryRecord": "History record", "Host": "Asset", @@ -552,8 +561,8 @@ "InstanceAddress": "Instance Address", "InstanceName": "Instance Name", "InstancePlatformName": "Instance Platform Name", - "Interface": "Network Interface", - "InterfaceSettings": "Interface", + "Interface": "Appearance", + "InterfaceSettings": "Appearance", "IntervalOfCreateUpdatePage": "Unit: Hour", "InvalidJson": "Invalid JSON", "InviteSuccess": "Invitation Successful", @@ -612,7 +621,7 @@ "LogOfLoginSuccessNum": "The successful login logs", "Logging": "Log Record", "LoginAssetConfirm": "Asset Connect Review", - "LoginAssetToday": "Today's Active Assets", + "LoginAssetToday": "Active Assets Today", "LoginAssets": "Active Assets", "LoginConfirm": "Login review", "LoginCount": "Login Times", @@ -620,19 +629,19 @@ "LoginFailed": "Login Failed", "LoginFrom": "Login Source", "LoginImageTip": "Note: It will appear on the enterprise user login page (recommended image size: 492*472px)", - "LoginLog": "Login Log", + "LoginLog": "Login Logs", "LoginNum": "Login Count", "LoginPasswordSetting": "Login Password", "LoginRequiredMsg": "The account has logged out, please log in again.", "LoginSucceeded": "Login Successful", "LoginTitleTip": "Note: It will be displayed on the enterprise edition user SSH login KoKo login page (e.g.: Welcome to use JumpServer Open Source Bastion)", "LoginUserRanking": "Login Account Ranking", - "LoginUserToday": "Accounts Logged in Today", + "LoginUserToday": "Users Logged Today", "LoginUsers": "Active Account", "LogoIndexTip": "Tip: It will be displayed in the upper left corner of the page (Recommended image size: 185px*55px)", "LogoLogoutTip": "Tip: It will be displayed on the web terminal page of Enterprise Edition users (recommended image size: 82px*82px)", "Logout": "Logout", - "LogsAudit": "Log auditing", + "LogsAudit": "Logs", "Lowercase": "Lowercase", "LunaSettingUpdate": "Luna", "MFAErrorMsg": "MFA errors, please check", @@ -676,7 +685,7 @@ "SpecificUser": "Specific user", "SpecificAsset": "Specific asset", "MyAssets": "My Assets", - "MyTickets": "I Initiated", + "MyTickets": "Submitted by me", "Name": "Name", "NavHelp": "Navigation", "NeedReLogin": "Need to Re-Login", @@ -695,7 +704,7 @@ "NoPermission": "No Permissions", "NoPermission403": "403 No Permission", "NoPermissionVew": "No Permission to View the Current Page", - "NoUnreadMsg": "No Unread Messages", + "NoUnreadMsg": "No unread messages", "Node": "Node", "NodeAmount": "Nodes", "NodeInformation": "Node Information", @@ -721,7 +730,7 @@ "OneAssignee": "First-Level Approver", "OneAssigneeType": "First-Level Handler Type", "OneClickReadMsg": "Are you sure you want to mark the current information as read?", - "OnlineSession": "Online users", + "OnlineSession": "Online devices", "OnlineSessionHelpMsg": "Unable to log out of the current session because it is the current user's online session. Currently only users logged in via Web are being logged.", "OnlineSessions": "Online Sessions", "OnlineUserDevices": "Online User Devices", @@ -731,7 +740,7 @@ "OpenStack": "OpenStack", "OpenStatus": "In Approval", "OpenTicket": "Create a Ticket", - "OperateLog": "Operation Log", + "OperateLog": "Operation Logs", "OperationLogNum": "Operation Logs", "OrgAdmin": "Organization Admin", "OrgAuditor": "Org Auditors", @@ -758,7 +767,7 @@ "PasskeyAddDisableInfo": "Your authentication source is {source}, and adding a Passkey is not supported", "Passphrase": "Key Password", "Password": "Password", - "PasswordChangeLog": "Password Change Log", + "PasswordChangeLog": "Password Change", "PasswordExpired": "Password Expired", "PasswordPlaceholder": "Please Enter Password", "PasswordRecord": "Password Record", @@ -818,6 +827,7 @@ "Push": "Push", "PushAccount": "Push Account", "PushAccounts": "Push Accounts", + "PushAccountsHelpText": "Pushing the account to the target asset allows for configuring different push methods for assets on different platforms.", "PushParams": "Push Parameters", "Qcloud": "Tencent Cloud", "QcloudLighthouse": "Tencent Cloud (Lightweight Application Server)", @@ -831,7 +841,7 @@ "RazorNotSupport": "RDP Client Session, Monitoring Not Supported", "ReLogin": "Log in Again", "ReLoginTitle": "Current Third-party Login User (CAS/SAML), Not Bound to MFA and Does Not Support Password Verification, Please Log in Again.", - "RealTimeData": "Real-Time Data", + "RealTimeData": "Real-Time", "Reason": "Reason", "Receivers": "Receiver", "RecentLogin": "Recent Login", @@ -867,9 +877,9 @@ "ReplayStorageCreateUpdateHelpMessage": "Notice: Current SFTP storage only supports account backup, video storage is not yet supported.", "ReplayStorageUpdate": "Update the object storage", "Reply": "Reply", - "RequestAssetPerm": "Apply for Asset Authorization", + "RequestAssetPerm": "Request asset authorization", "RequestPerm": "Authorization Request", - "RequestTickets": "Apply for Work Order", + "RequestTickets": "New ticket", "RequiredAssetOrNode": "Please Select at Least One Asset or Node", "RequiredContent": "Please Input Command", "RequiredEntryFile": "This file acts as the entry point for running and must be present", @@ -996,7 +1006,7 @@ "SessionTerminate": "Session Termination", "SessionTrend": "Session Trends", "Sessions": "Sessions", - "SessionsAudit": "Session Audit", + "SessionsAudit": "Sessions", "SessionsNum": "Sessions", "Set": "Configured", "SetDingTalk": "DingTalk OAuth", @@ -1017,8 +1027,8 @@ "ShowAssetOnlyCurrentNode": "Only Show Current Node Assets", "ShowNodeInfo": "Show Node Details", "SignChannelNum": "Channel Signature", - "SiteMessage": "Site Message", - "SiteMessageList": "Internal Mail", + "SiteMessage": "Notifications", + "SiteMessageList": "Notifications", "Skip": "Ignore Current Asset", "Skipped": "Skipped", "Slack": "Slack", @@ -1123,7 +1133,7 @@ "TicketFlow": "Work Order Flow", "TicketFlowCreate": "Create a Approval Flow", "TicketFlowUpdate": "Update the Approval Flow", - "Tickets": "Work Order List", + "Tickets": "Tickets", "Time": "Time", "TimeDelta": "Time Cost", "TimeExpression": "Time Expression", @@ -1173,8 +1183,8 @@ "Updated": "Updated", "Upload": "Upload", "UploadCsvLth10MHelpText": "Only csv/xlsx can be uploaded, and no more than 10M", - "UploadDir": "Upload Directory", - "UploadFileLthHelpText": "Only files smaller than {limit}MB can be uploaded", + "UploadDir": "Upload path", + "UploadFileLthHelpText": "Smaller than {limit}MB supported", "UploadPlaybook": "Upload Playbook", "UploadSucceed": "Upload Succeeded", "UploadZipTips": "Please upload a file in zip format", @@ -1184,9 +1194,9 @@ "UseSSL": "Use SSL/TLS", "User": "User", "UserAclLists": "Login ACLs", - "UserAssetActivity": "Account/Asset Activity", + "UserAssetActivity": "User/Asset Activity", "UserCreate": "Create a User", - "UserData": "User Data", + "UserData": "User", "UserDetail": "User Details", "UserGroupCreate": "Create a User Group", "UserGroupDetail": "User Group Details", @@ -1246,7 +1256,7 @@ "WeekOrTime": "Day/Time", "WildcardsAllowed": "Allowed Wildcards", "WindowsPushHelpText": "Windows assets temporarily do not support key push", - "WordSep": "", + "WordSep": " ", "Workbench": "Workbench", "Workspace": "Workspace", "Yes": "Yes", diff --git a/apps/i18n/lina/zh.json b/apps/i18n/lina/zh.json index 4380ac988..9c14a9058 100644 --- a/apps/i18n/lina/zh.json +++ b/apps/i18n/lina/zh.json @@ -235,6 +235,9 @@ "CommandConfirm": "命令复核", "CommandFilterACL": "命令过滤", "CommandFilterACLHelpMsg": "通过命令过滤,您可以控制命令是否可以发送到资产上。根据您设定的规则,某些命令可以被放行,而另一些命令则被禁止。", + "AssetLoginACLHelpText": "登录资产时,可以根据用户的登录 IP 和时间段进行审核,判断是否可以登录资产", + "ConnectMethodACLHelpText": "通过连接方式过滤,您可以控制用户是否可以使用某种连接方式登录到资产上。根据您设定的规则,某些连接方式可以被放行,而另一些连接方式则被禁止。", + "UserLoginACLHelpText": "登录系统时,可以根据用户的登录 IP 和时间段进行审核,判断是否可以登录", "CommandFilterAclCreate": "创建命令过滤规则", "CommandFilterAclDetail": "命令过滤规则详情", "CommandFilterAclList": "命令过滤", @@ -341,6 +344,11 @@ "Delete": "删除", "DeleteConfirmMessage": "删除后无法恢复,是否继续?", "DeleteErrorMsg": "删除失败", + "PushAccountsHelpText": "推送已有账号到资产上。推送账号时,如果账号已存在,会更新账号的密码,如果账号不存在,会创建账号", + "ChangeCredentialsHelpText": "定时修改账号密钥密码。账号随机生成密码,并同步到目标资产,如果同步成功,更新该账号的密码", + "GatherAccountsHelpText": "收集资产上的账号信息。收集后的账号信息可以导入到系统中,方便统一管理", + "BackupAccountsHelpText": "备份账号信息到外部。可以存储到外部系统或发送邮件,支持分段方式", + "CommandFilterACLHelpText": "通过命令过滤,您可以控制命令是否可以发送到资产上。根据您设定的规则,某些命令可以被放行,而另一些命令则被禁止", "DeleteNode": "删除节点", "DeleteOrgMsg": "用户列表、用户组、资产列表、网域列表、管理用户、系统用户、标签管理、资产授权规则", "DeleteOrgTitle": "请确保组织内的以下信息已删除", diff --git a/apps/perms/serializers/permission.py b/apps/perms/serializers/permission.py index d8e15b2ce..ccf0a296c 100644 --- a/apps/perms/serializers/permission.py +++ b/apps/perms/serializers/permission.py @@ -29,14 +29,14 @@ class ActionChoicesField(BitChoicesField): class AssetPermissionSerializer(ResourceLabelsMixin, BulkOrgResourceModelSerializer): - users = ObjectRelatedField(queryset=User.objects, many=True, required=False, label=_('User')) + users = ObjectRelatedField(queryset=User.objects, many=True, required=False, label=_('Users')) user_groups = ObjectRelatedField( - queryset=UserGroup.objects, many=True, required=False, label=_('User group') + queryset=UserGroup.objects, many=True, required=False, label=_('Groups') ) - assets = ObjectRelatedField(queryset=Asset.objects, many=True, required=False, label=_('Asset')) - nodes = ObjectRelatedField(queryset=Node.objects, many=True, required=False, label=_('Node')) + assets = ObjectRelatedField(queryset=Asset.objects, many=True, required=False, label=_('Assets')) + nodes = ObjectRelatedField(queryset=Node.objects, many=True, required=False, label=_('Nodes')) users_amount = serializers.IntegerField(read_only=True, label=_("Users amount")) - user_groups_amount = serializers.IntegerField(read_only=True, label=_("User groups amount")) + user_groups_amount = serializers.IntegerField(read_only=True, label=_("Groups amount")) assets_amount = serializers.IntegerField(read_only=True, label=_("Assets amount")) nodes_amount = serializers.IntegerField(read_only=True, label=_("Nodes amount")) actions = ActionChoicesField(required=False, allow_null=True, label=_("Actions")) diff --git a/apps/static/css/jumpserver.css b/apps/static/css/jumpserver.css index 22cf5ff61..62c84ebe8 100644 --- a/apps/static/css/jumpserver.css +++ b/apps/static/css/jumpserver.css @@ -131,18 +131,20 @@ table.dataTable tbody td.selected td i.text-navy { margin-right: 5px !important; } -.m-m-m{ +.m-m-m { margin-left: 50px !important; } .m-10 { margin: 10px !important; } -.f-i-l-e{ + +.f-i-l-e { /*float: left;*/ margin-left: 1000px !important; /*padding-left: 1000px !important;*/ } + .m-t-10 { margin-top: 10px !important; } @@ -304,7 +306,7 @@ table.dataTable tbody td.selected td i.text-navy { div.dataTables_wrapper div.dataTables_filter, .dataTables_length { - // float: right !important; +/ / float: right !important; } div.dataTables_wrapper div.dataTables_filter { @@ -402,7 +404,7 @@ div.dataTables_wrapper div.dataTables_filter { z-index: 1060; display: none; max-width: 276px; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; font-style: normal; font-weight: 400; @@ -447,8 +449,8 @@ div.dataTables_wrapper div.dataTables_filter { } .form-group .required .control-label:after { - content:"*"; - color:red; + content: "*"; + color: red; } #tree-refresh .fa-refresh { @@ -476,51 +478,51 @@ span.select2-selection__placeholder { } .dropdown-submenu { - position: relative; + position: relative; } -.dropdown-submenu>.dropdown-menu { - top: 0; - left: 100%; - margin-top: -6px; - margin-left: -1px; - -webkit-border-radius: 0 6px 6px 6px; - -moz-border-radius: 0 6px 6px; - border-radius: 0 6px 6px 6px; +.dropdown-submenu > .dropdown-menu { + top: 0; + left: 100%; + margin-top: -6px; + margin-left: -1px; + -webkit-border-radius: 0 6px 6px 6px; + -moz-border-radius: 0 6px 6px; + border-radius: 0 6px 6px 6px; } -.dropdown-submenu:hover>.dropdown-menu { - display: block; +.dropdown-submenu:hover > .dropdown-menu { + display: block; } -.dropdown-submenu>a:after { - display: block; - content: " "; - float: right; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; - border-width: 5px 0 5px 5px; - border-left-color: #ccc; - margin-top: 5px; - margin-right: -10px; +.dropdown-submenu > a:after { + display: block; + content: " "; + float: right; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; + border-width: 5px 0 5px 5px; + border-left-color: #ccc; + margin-top: 5px; + margin-right: -10px; } -.dropdown-submenu:hover>a:after { - border-left-color: #fff; +.dropdown-submenu:hover > a:after { + border-left-color: #fff; } .dropdown-submenu.pull-left { - float: none; + float: none; } -.dropdown-submenu.pull-left>.dropdown-menu { - left: -100px; - margin-left: 10px; - -webkit-border-radius: 6px 0 6px 6px; - -moz-border-radius: 6px 0 6px 6px; - border-radius: 6px 0 6px 6px; +.dropdown-submenu.pull-left > .dropdown-menu { + left: -100px; + margin-left: 10px; + -webkit-border-radius: 6px 0 6px 6px; + -moz-border-radius: 6px 0 6px 6px; + border-radius: 6px 0 6px 6px; }