mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-18 22:49:52 +02:00
feat(homepage): enhance homepage functionality with new item click tracking, sort methods and category management
- Added ItemClick endpoint to increment item click counts. - Refactored Categories function to dynamically generate categories based on available items. - Introduced sorting methods for homepage items and categories. - Updated item configuration to include visibility, favorite status, and sort orders. - Improved handling of item URLs and added support for websocket connections in item retrieval.
This commit is contained in:
@@ -66,6 +66,7 @@ func FromDocker(c *container.Summary, dockerHost string) (res *types.Container)
|
||||
IsExplicit: isExplicit,
|
||||
IsHostNetworkMode: c.HostConfig.NetworkMode == "host",
|
||||
Running: c.Status == "running" || c.State == "running",
|
||||
State: c.State,
|
||||
}
|
||||
|
||||
if agent.IsDockerHostAgent(dockerHost) {
|
||||
@@ -143,9 +144,11 @@ var databaseMPs = map[string]struct{}{
|
||||
}
|
||||
|
||||
func isDatabase(c *types.Container) bool {
|
||||
for _, m := range c.Mounts.Iter {
|
||||
if _, ok := databaseMPs[m]; ok {
|
||||
return true
|
||||
if c.Mounts != nil { // only happens in test
|
||||
for _, m := range c.Mounts.Iter {
|
||||
if _, ok := databaseMPs[m]; ok {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user