Toby Chui 4 дней назад
Родитель
Сommit
b6b3f805cd
2 измененных файлов с 17 добавлено и 4 удалено
  1. 15 2
      src/setting.go
  2. 2 2
      src/web/SystemAO/docker/index.html

+ 15 - 2
src/setting.go

@@ -129,12 +129,25 @@ func system_setting_getSettingGroups() []settingGroup {
 	//(dockerManager is non-nil). Showing it otherwise would render an empty
 	//group whose listing returns no modules and breaks the settings UI.
 	if dockerManager != nil {
-		groups = append(groups, settingGroup{
+		containerGroup := settingGroup{
 			Name:     "Containers",
 			Group:    "Container",
 			IconPath: "SystemAO/system_setting/img/docker.svg",
 			Desc:     "Manage Docker Engine and container runtime",
-		})
+		}
+		//Insert just before the "About" group so it sits after AI Integration
+		//rather than at the very bottom of the settings list.
+		inserted := false
+		for i, g := range groups {
+			if g.Group == "About" {
+				groups = append(groups[:i], append([]settingGroup{containerGroup}, groups[i:]...)...)
+				inserted = true
+				break
+			}
+		}
+		if !inserted {
+			groups = append(groups, containerGroup)
+		}
 	}
 
 	return groups

+ 2 - 2
src/web/SystemAO/docker/index.html

@@ -263,8 +263,8 @@ body.dark #dk-root {
             data: { "volumes": withVolumes ? "true" : "false" },
             title: "<i class='yellow exclamation triangle icon'></i> DOCKER SYSTEM PRUNE <i class='yellow exclamation triangle icon'></i>",
             desc: withVolumes
-                ? "This deletes stopped containers, unused networks, dangling images AND unused volumes. Volume data cannot be recovered."
-                : "This deletes stopped containers, unused networks and dangling images.",
+                ? "Delete all unused docker data, including volumes? Volume data cannot be recovered."
+                : "Delete all unused docker data (stopped containers, networks, dangling images)?",
             thisuser: true,
             method: "POST",
             success: undefined