package app import "fmt" import "strings" import "github.com/seaweedfs/seaweedfs/weed/admin/dash" templ Topics(data dash.TopicsData) {

Message Queue Topics

Last updated: {data.LastUpdated.Format("2006-01-02 15:04:05")}
Total Topics

{fmt.Sprintf("%d", data.TotalTopics)}

Available Topics

{fmt.Sprintf("%d", len(data.Topics))}

Topics
if len(data.Topics) == 0 {
No Topics Found

No message queue topics are currently configured.

} else {
for _, topic := range data.Topics { }
Namespace Topic Name Partitions Retention Actions
{func() string { idx := strings.LastIndex(topic.Name, ".") if idx == -1 { return "default" } return topic.Name[:idx] }()} {func() string { idx := strings.LastIndex(topic.Name, ".") if idx == -1 { return topic.Name } return topic.Name[idx+1:] }()} {fmt.Sprintf("%d", topic.Partitions)} if topic.Retention.Enabled { {fmt.Sprintf("%d %s", topic.Retention.DisplayValue, topic.Retention.DisplayUnit)} } else { Disabled }
}
}