diff --git a/weed/admin/view/app/plugins.templ b/weed/admin/view/app/plugins.templ new file mode 100644 index 000000000..7627ebc1e --- /dev/null +++ b/weed/admin/view/app/plugins.templ @@ -0,0 +1,207 @@ +package app + +import ( + "fmt" + "github.com/seaweedfs/seaweedfs/weed/admin/plugin" +) + +type PluginsPageData struct { + Plugins []plugin.ConnectedPlugin + JobTypes map[string]interface{} +} + +templ PluginsOverview(data PluginsPageData) { +
| Plugin | +Status | +Active | +Completed | +Failed | +Capabilities | +Connected | +Actions | +
|---|---|---|---|---|---|---|---|
|
+ { p.Name } + { p.Version } + |
+ + if p.Status == "healthy" { + Healthy + } else if p.Status == "degraded" { + Degraded + } else { + { p.Status } + } + | +{ fmt.Sprintf("%d", p.ActiveJobs) } | +{ fmt.Sprintf("%d", p.CompletedJobs) } | +{ fmt.Sprintf("%d", p.FailedJobs) } | +
+ for i, cap := range p.Capabilities {
+ if i > 0 {
+ ,
+ }
+ { cap }
+ }
+ |
+ { p.ConnectedAt.Format("2006-01-02 15:04:05") } | ++ + Config + + | +