MCPcopy Create free account
hub / github.com/diillson/chatcli / cmdWatcherStatus

Method cmdWatcherStatus

server/handler_session.go:365–388  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

363}
364
365func (h *Handler) cmdWatcherStatus() string {
366 if h.watcherContextFunc == nil {
367 return i18n.T("server.session.cmd_watcher_inactive")
368 }
369
370 var b strings.Builder
371 b.WriteString(i18n.T("server.session.cmd_watcher_header"))
372 b.WriteString(i18n.T("server.session.cmd_watcher_status_active"))
373 if h.watcherDeployment != "" {
374 b.WriteString(i18n.T("server.session.cmd_watcher_deployment", h.watcherDeployment))
375 b.WriteString(i18n.T("server.session.cmd_watcher_namespace", h.watcherNamespace))
376 }
377 if h.watcherStatusFunc != nil {
378 b.WriteString(i18n.T("server.session.cmd_watcher_summary", h.watcherStatusFunc()))
379 }
380 if h.watcherStatsFunc != nil {
381 alertCount, snapshotCount, podCount := h.watcherStatsFunc()
382 b.WriteString(i18n.T("server.session.cmd_watcher_alerts", alertCount))
383 b.WriteString(i18n.T("server.session.cmd_watcher_snapshots", snapshotCount))
384 b.WriteString(i18n.T("server.session.cmd_watcher_pods", podCount))
385 }
386
387 return b.String()
388}
389
390func (h *Handler) cmdPluginsList() string {
391 if h.pluginManager == nil {

Callers 1

executeRemoteCommandMethod · 0.95

Calls 2

TFunction · 0.92
StringMethod · 0.45

Tested by

no test coverage detected