Skip to content

Commit 27e105a

Browse files
committed
fix: 生成https 证书失败,#265
fix: 弹出层后文字标题没有隐藏 fix: windows 运行提示生成 rsa 证书路径错误
1 parent 3bc1571 commit 27e105a

20 files changed

+99
-8366
lines changed

app/application/http/controller/container-upgrade.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ import (
2929

3030
func (self Container) Upgrade(http *gin.Context) {
3131
type ParamsValidate struct {
32-
Md5 string `json:"md5" binding:"required"`
33-
ImageTag string `json:"imageTag"`
34-
EnableBak bool `json:"enableBak"`
32+
Md5 string `json:"md5" binding:"required"`
33+
ImageTag string `json:"imageTag"`
34+
EnableBak bool `json:"enableBak"`
35+
EnableResetEnv bool `json:"enableResetEnv"` // 重置环境变量
36+
EnableResetLabel bool `json:"enableResetLabel"` // 重置 label 数据
3537
}
3638
params := ParamsValidate{}
3739
if !self.Validate(http, &params) {

app/common/http/controller/registry.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,11 @@ func (self Registry) Create(http *gin.Context) {
4848
if params.Id <= 0 {
4949
registryRow, _ = dao.Registry.Where(dao.Registry.ServerAddress.Eq(params.ServerAddress)).First()
5050
if registryRow != nil {
51-
self.JsonResponseWithError(http, function.ErrorMessage(define.ErrorMessageCommonIdAlreadyExists, "name", params.ServerAddress), 500)
52-
return
51+
// 类似腾讯云这样的仓库地址一样,如果用户名不一样也按两个仓库来对待
52+
if params.Username != "" && params.Password != "" && params.Username == registryRow.Setting.Username {
53+
self.JsonResponseWithError(http, function.ErrorMessage(define.ErrorMessageCommonIdAlreadyExists, "name", params.ServerAddress), 500)
54+
return
55+
}
5356
}
5457
} else {
5558
registryRow, _ = dao.Registry.Where(dao.Registry.ID.Eq(params.Id)).First()

app/pro

Submodule pro updated from 3a36cfb to f9c735f

asset/static/i18n/en-US.json

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,9 @@
7777
"components.appCron.cronDayOfWeekOption.5": "Every Friday",
7878
"components.appCron.cronDayOfWeekOption.6": "Every Saturday",
7979
"components.appCron.cronFormContainerName": "Execution Container",
80-
"components.appCron.cronFormContainerNameEmpty": "Executes in the DPanel container by default, supporting Docker commands. Ensure the selected container contains all commands required by your script.",
81-
"components.appCron.cronFormEnableRunBlock": "Wait for the current task execution to complete before initiating the next task.",
80+
"components.appCron.cronFormContainerNameEmpty": "Executes in DPanel container or current environment by default",
81+
"components.appCron.cronFormContainerNameTip": "DPanel container supports Docker commands. Ensure the target container includes all dependencies required by your script.",
82+
"components.appCron.cronFormEnableRunBlock": "Wait for the current task to complete before starting the next one",
8283
"components.appCron.cronFormEnv": "Environment",
8384
"components.appCron.cronFormEventType": "Event Type",
8485
"components.appCron.cronFormEventTypeOption.container/create": "container/create",
@@ -156,14 +157,14 @@
156157
"components.appDetail.copyConfirmTip": "By default, copied container has identical configuration and may not start. Enable [Bind Random Ports] for normal operation.",
157158
"components.appDetail.copyCopyName": "Copied Container Name",
158159
"components.appDetail.copyEnableRandomPort": "Bind Random Ports",
159-
"components.appDetail.deleteButton": "Delete",
160160
"components.appDetail.deleteConfirmDeleteImage": "Delete image?",
161161
"components.appDetail.deleteConfirmDeleteVolume": "Delete anonymous volumes?",
162162
"components.appDetail.deleteConfirmTip": "Volumes not mounted from directories declared in image, automatically created by Docker",
163163
"components.appDetail.drawerTitle": "Container Details - {name}",
164164
"components.appDetail.exportButton": "Export Container",
165165
"components.appDetail.exportConfirm": "Export container filesystem (excluding mounted directory data). Confirm?",
166166
"components.appDetail.exportEnableExportToPath": "Export to /dpanel/storage/export/container in panel container?",
167+
"components.appDetail.rebuildConfirmTip": "The container will be deleted and rebuilt using its current configuration. All data except for mounted volumes will be reset to the original state. Confirm?",
167168
"components.appDetail.rollbackEmptyTip": "No rollback data available",
168169
"components.appDetail.rollbackTip": "Rollback only restores container configuration. Use container snapshot for full configuration and data recovery. Select rollback date:",
169170
"components.appDetail.runTimeValue": "Created: {create} / Updated: {upgrade}",
@@ -580,6 +581,7 @@
580581
"components.dockerEnvCreate.formAddressType": "Docker API address",
581582
"components.dockerEnvCreate.formAddressTypeTip": "Enable API access when connecting to remote Docker",
582583
"components.dockerEnvCreate.formComposePath": "Compose dedicated directory",
584+
"components.dockerEnvCreate.formDockerType": "Container Type",
583585
"components.dockerEnvCreate.formEnableComposePath": "Enable independent Compose directory",
584586
"components.dockerEnvCreate.formEnableComposePathTip": "When enabled, switching remote Docker clients will only read compose tasks from this environment's dedicated directory",
585587
"components.dockerEnvCreate.formEnableSSH": "Enable host SSH connection",
@@ -630,16 +632,16 @@
630632
"components.explorer.listStatus": "Status",
631633
"components.explorer.listStatusColorOption.0": "blue",
632634
"components.explorer.listStatusColorOption.1": "green",
633-
"components.explorer.listStatusColorOption.100": "cyan",
634635
"components.explorer.listStatusColorOption.2": "error",
636+
"components.explorer.listStatusColorOption.100": "cyan",
635637
"components.explorer.listStatusOption.0": "MODIFIED",
636638
"components.explorer.listStatusOption.1": "ADD",
637-
"components.explorer.listStatusOption.100": "VOLUME",
638639
"components.explorer.listStatusOption.2": "DELETED",
640+
"components.explorer.listStatusOption.100": "VOLUME",
639641
"components.explorer.listStatusTipOption.0": "Modified during container runtime",
640642
"components.explorer.listStatusTipOption.1": "File added during container runtime",
641-
"components.explorer.listStatusTipOption.100": "Mounted persistent directory",
642643
"components.explorer.listStatusTipOption.2": "File deleted during container runtime",
644+
"components.explorer.listStatusTipOption.100": "Mounted persistent directory",
643645
"components.explorer.listUser": "User",
644646
"components.explorer.toolbarDeleteButton": "Delete",
645647
"components.explorer.toolbarDownloadButton": "Download to local",
@@ -675,7 +677,6 @@
675677
"components.image.quickTitle": "Image details",
676678
"components.image.registryCreateFormEnableAuth": "Configure repository permissions?",
677679
"components.image.registryCreateFormEnableHttp": "Use HTTP protocol?",
678-
"components.image.registryCreateFormEnableHttpTip": "Enable if configuring local image registry. Configure insecure-registries in daemon.json for HTTP connection.",
679680
"components.image.registryCreateFormPassword": "Password",
680681
"components.image.registryCreateFormPasswordEmpty": "Configure repository password, use old password if empty",
681682
"components.image.registryCreateFormProxy": "Acceleration URL",
@@ -760,10 +761,10 @@
760761
"components.systemBasic.loginBasicTitle": "Basic",
761762
"components.systemBasic.loginFailedLockTime": "Lock time",
762763
"components.systemBasic.loginFailedLockTimeOption.-1": "Permanent (until panel container restart)",
763-
"components.systemBasic.loginFailedLockTimeOption.18000": "5 hours",
764764
"components.systemBasic.loginFailedLockTimeOption.300": "5 minutes",
765-
"components.systemBasic.loginFailedLockTimeOption.3600": "1 hour",
766765
"components.systemBasic.loginFailedLockTimeOption.900": "15 minutes",
766+
"components.systemBasic.loginFailedLockTimeOption.3600": "1 hour",
767+
"components.systemBasic.loginFailedLockTimeOption.18000": "5 hours",
767768
"components.systemBasic.loginFailedTitle": "Login failure lock",
768769
"components.systemBasic.loginFailedTotal": "Failure count",
769770
"components.systemBasic.loginNoPasswordTitle": "Password-free login",
@@ -805,11 +806,11 @@
805806
"components.systemBasic.themeConfigSideMenuOption.collapse": "Collapsed by default",
806807
"components.systemBasic.themeConfigSideMenuOption.default": "Expanded by default",
807808
"components.systemBasic.themeConfigTablePageSize": "Table page size",
809+
"components.systemBasic.themeConfigTablePageSizeOption.5": "5 per page",
808810
"components.systemBasic.themeConfigTablePageSizeOption.10": "10 per page",
809-
"components.systemBasic.themeConfigTablePageSizeOption.100": "100 per page",
810811
"components.systemBasic.themeConfigTablePageSizeOption.20": "20 per page",
811-
"components.systemBasic.themeConfigTablePageSizeOption.5": "5 per page",
812812
"components.systemBasic.themeConfigTablePageSizeOption.50": "50 per page",
813+
"components.systemBasic.themeConfigTablePageSizeOption.100": "100 per page",
813814
"components.systemBasic.themeConfigTablePageSizeOption.all": "Show all",
814815
"components.systemBasic.themeConfigTip": "Configure theme style, menu layout, font size, table default page size",
815816
"components.systemBasic.themeConfigTitle": "Theme style",
@@ -897,10 +898,10 @@
897898
"components.userInvite.formEmail": "Email",
898899
"components.userInvite.formRemark": "Remark",
899900
"components.userInvite.formSecurityPassword": "Strong password",
901+
"components.userInvite.formUsername": "Username",
900902
"components.userInvite.formUserRole": "Role",
901903
"components.userInvite.formUserRoleTip": "Admins have all permissions except [System] by default. Operators have no permissions by default",
902904
"components.userInvite.formUserStatus": "Status",
903-
"components.userInvite.formUsername": "Username",
904905
"components.userPermission.canSeeCompose": "Compose",
905906
"components.userPermission.canSeeComposeList": "View tasks",
906907
"components.userPermission.canSeeComposeListManage": "Manage tasks",
@@ -1184,7 +1185,7 @@
11841185
"notification.imagePull": "Pulling {name} image",
11851186
"notification.imagePullInvalidAuth": "Pull failed, no repository permission",
11861187
"notification.imagePullRegistryBad": "Remote image registry inaccessible",
1187-
"notification.imagePullServerHttp": "Pull failed, configure HTTPS or add insecure-registries in daemon.json",
1188+
"notification.imagePullServerHttp": "Please enable the Registry HTTP option and add \"insecure-registries\": [\"{name}\"] to your daemon.json configuration.",
11881189
"notification.imagePullTagNotFound": "Image {tag} not found or no permission",
11891190
"notification.imagePullUseProxy": "Using {name} mirror to pull image",
11901191
"notification.imageRemoteTagNoPermission": "Failed to get remote tags, repository missing or no access",
@@ -1214,8 +1215,8 @@
12141215
"notification.listFilePath": "File Path",
12151216
"notification.listHas": "Contains",
12161217
"notification.listHasNot": "Does not contain",
1217-
"notification.listHostPath": "Mount",
12181218
"notification.listHostnameTip": "Provides internal container access",
1219+
"notification.listHostPath": "Mount",
12191220
"notification.listImageName": "Image",
12201221
"notification.listInUse": "In Use",
12211222
"notification.listIpAddress": "IP Address",
@@ -1264,8 +1265,8 @@
12641265
"notification.listManageStop": "Stop",
12651266
"notification.listManageSwitch": "Switch",
12661267
"notification.listManageSync": "Sync",
1267-
"notification.listManageUnSelected": "Deselect",
12681268
"notification.listManageUnpause": "Resume",
1269+
"notification.listManageUnSelected": "Deselect",
12691270
"notification.listManageUpgrade": "Upgrade",
12701271
"notification.listManageUpgradeBatch": "Batch Upgrade",
12711272
"notification.listManageUse": "Use",
@@ -1303,9 +1304,9 @@
13031304
"notification.listType": "Type",
13041305
"notification.listUpdatedAt": "Updated At",
13051306
"notification.listUsage": "Usage",
1307+
"notification.listUsername": "Username",
13061308
"notification.listUseTime": "Time Used",
13071309
"notification.listUseUser": "Custom",
1308-
"notification.listUsername": "Username",
13091310
"notification.listVersion": "Version",
13101311
"notification.login": "Please login first",
13111312
"notification.proLicenseFileIsCorrect": "Pro license file error, upload correct file or contact developer",
@@ -1351,12 +1352,12 @@
13511352
"notification.userFailedLock": "Too many failed attempts, retry after {time} or restart panel",
13521353
"notification.userFailedLockForever": "Too many failed attempts, restart panel container",
13531354
"notification.userFounderExists": "Admin already configured, modify in system settings",
1355+
"notification.usernameOrPasswordError": "Username or password incorrect",
13541356
"notification.userNoPermission": "No operation permission",
13551357
"notification.userPasswordConfirmFailed": "Passwords do not match",
13561358
"notification.userResetTokenExpire": "Reset link expired",
13571359
"notification.userTwoFaEmpty": "Please enter 2FA code",
13581360
"notification.userTwoFaNotCorrect": "Verification code incorrect",
1359-
"notification.usernameOrPasswordError": "Username or password incorrect",
13601361
"notification.volumeMountSomeVolume": "Mounting/unmounting volumes, please wait...",
13611362
"notification.volumePrune": "Cleaned {count} volumes, freed {size} space",
13621363
"notification.wsOustedDesc": "The backend service has stopped or restarted. Real-time updates are suspended. Please refresh the page to restore synchronization.",
@@ -1386,8 +1387,8 @@
13861387
"swarm.nodeDetailDeleteButtonOption.leave": "Leave cluster",
13871388
"swarm.nodeDetailJoinTip": "Current Docker not Swarm node, initialize as cluster or join existing",
13881389
"swarm.nodeDetailManageManager": "Change to manager",
1389-
"swarm.nodeDetailManageWorker": "Change to worker",
13901390
"swarm.nodeDetailManager": "Manager node",
1391+
"swarm.nodeDetailManageWorker": "Change to worker",
13911392
"swarm.nodeDetailServiceList": "Service List",
13921393
"swarm.nodeDetailSwarm": "Cluster Info",
13931394
"swarm.nodeDetailSwarmManager": "Manager",
@@ -1443,8 +1444,6 @@
14431444
"swarm.serviceManageScalingTip": "Scale service replicas, check redeploy to destroy and recreate",
14441445
"system.env.createButton": "Add server",
14451446
"system.env.switch": "Switch server",
1446-
"system.home.overview.basicDPanelTitleUpgradeInfo": "Upgrade log",
1447-
"system.home.overview.basicDPanelTitleVersion": "DPanel",
14481447
"system.home.overview.basicDockerTitleFileDriver": "Volume driver",
14491448
"system.home.overview.basicDockerTitleLogDriver": "Log driver",
14501449
"system.home.overview.basicDockerTitlePluginsNetwork": "Network plugins",
@@ -1453,6 +1452,8 @@
14531452
"system.home.overview.basicDockerTitleSystemTime": "System time",
14541453
"system.home.overview.basicDockerTitleSystemVersion": "OS",
14551454
"system.home.overview.basicDockerTitleVersion": "Docker version",
1455+
"system.home.overview.basicDPanelTitleUpgradeInfo": "Upgrade log",
1456+
"system.home.overview.basicDPanelTitleVersion": "DPanel",
14561457
"system.home.overview.basicEnvSettingDefaultEnv": "Configure default Docker server",
14571458
"system.home.overview.basicInfo": "",
14581459
"system.home.overview.basicInfoTitle": "Basic information",
@@ -1503,12 +1504,12 @@
15031504
"system.user.listStatusOption.2": "Normal",
15041505
"system.user.listStatusOption.disable": "Disabled",
15051506
"system.user.listStatusOption.enable": "Normal",
1507+
"system.user.listUsername": "Username",
15061508
"system.user.listUserRole": "Role",
15071509
"system.user.listUserRoleColorOption.manager": "blue",
15081510
"system.user.listUserRoleColorOption.member": "gold",
15091511
"system.user.listUserRoleOption.manager": "Administrator",
15101512
"system.user.listUserRoleOption.member": "Operator",
1511-
"system.user.listUsername": "Username",
15121513
"user.agree": "Login indicates agreement to",
15131514
"user.documentTitle": "DPanel - Lightweight Docker Management Panel",
15141515
"user.formAutoLogin": "Keep logged in",
@@ -1519,9 +1520,9 @@
15191520
"user.formPasswordRule1": "Password must be at least 8 characters!",
15201521
"user.formPasswordRule2": "Password must contain uppercase, lowercase letters and numbers!",
15211522
"user.formTwofaEmpty": "Please enter 2FA code",
1523+
"user.formUsernameEmpty": "Please enter username",
15221524
"user.formUserReset": "Forgot password?",
15231525
"user.formUserResetTip": "Execute following command on host",
1524-
"user.formUsernameEmpty": "Please enter username",
15251526
"user.jwtMessageIncorrectFormat": "Token format incorrect",
15261527
"user.jwtMessageInvalid": "Token parse error:",
15271528
"user.oauthRedirectContent": "Logging in...",

0 commit comments

Comments
 (0)