diff --git a/weed/admin/view/app/plugin_jobs.templ b/weed/admin/view/app/plugin_jobs.templ new file mode 100644 index 000000000..eda01f2cb --- /dev/null +++ b/weed/admin/view/app/plugin_jobs.templ @@ -0,0 +1,154 @@ +package app + +import ( + "fmt" + "github.com/seaweedfs/seaweedfs/weed/admin/plugin" +) + +type PluginJobsPageData struct { + JobType string + Jobs []plugin.ExecutionRecord + StateFilter string +} + +templ PluginJobsMonitoring(data PluginJobsPageData) { +
+

+ Jobs - { data.JobType } +

+
+
+ + + Back + +
+
+
+ + +
+
+
Filter
+
+
+ +
+
+ + +
+
+
Recent Jobs
+
+
+ if len(data.Jobs) == 0 { +
No jobs found
+ } else { +
+ + + + + + + + + + + + + + + + for _, job := range data.Jobs { + if data.StateFilter == "" || job.State.String() == data.StateFilter { + + + + + + + + + + + + } + } + +
Job IDStatePluginCreatedStartedCompletedRetriesErrorActions
{ job.JobID } + if job.State.String() == "PENDING" { + PENDING + } else if job.State.String() == "RUNNING" { + RUNNING + } else if job.State.String() == "COMPLETED" { + COMPLETED + } else if job.State.String() == "FAILED" { + FAILED + } else if job.State.String() == "CANCELLED" { + CANCELLED + } else { + { job.State.String() } + } + { job.PluginID }{ job.CreatedAt.Format("2006-01-02 15:04:05") } + if job.StartedAt != nil { + { job.StartedAt.Format("2006-01-02 15:04:05") } + } else { + - + } + + if job.CompletedAt != nil { + { job.CompletedAt.Format("2006-01-02 15:04:05") } + } else { + - + } + { fmt.Sprintf("%d", job.RetryCount) } + if job.LastError != "" { + { job.LastError } + } else { + - + } + + if job.State.String() == "PENDING" || job.State.String() == "SCHEDULED" { + + } +
+
+ } +
+
+ + +}