Remove the RepoISO integration; keep generic support for shares of other services
build / build (push) Successful in 1m5s

RepoISO now manages the NAS itself, so nasmon no longer polls it (settings field, dashboard card,
menu link and repoiso:* alerts are gone). Drop-in SMB includes, read-only listing and keeping
smbd/nfs-server running for other software's shares stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-03 19:05:16 +03:00
co-authored by Claude Opus 5.5
parent 30dbb00dd1
commit 42cfb43e2e
17 changed files with 47 additions and 348 deletions
-54
View File
@@ -1,54 +0,0 @@
package collect
import (
"encoding/json"
"fmt"
"net/http"
"strings"
"time"
)
// RepoISO is the health summary of a RepoISO portal running on the same host
// (GET <url>/api/integration/status). Reachable=false means the API did not answer.
type RepoISO struct {
URL string `json:"url"`
Reachable bool `json:"reachable"`
Error string `json:"error,omitempty"`
CheckedAt time.Time `json:"checked_at"`
Version string `json:"version"`
WorkerAlive bool `json:"worker_alive"`
WorkerHeartbeat string `json:"worker_heartbeat"`
Images int `json:"images"`
ImagesBytes uint64 `json:"images_bytes"`
ImagesPending int `json:"images_pending"`
ImagesError int `json:"images_error"`
Publications int `json:"publications"`
PublicationsError int `json:"publications_error"`
JobsActive int `json:"jobs_active"`
JobsFailed24h int `json:"jobs_failed_24h"`
Exports int `json:"exports"`
}
var repoisoClient = &http.Client{Timeout: 5 * time.Second}
// FetchRepoISO queries the RepoISO status endpoint; errors are reported in the result.
func FetchRepoISO(base string) RepoISO {
base = strings.TrimRight(base, "/")
r := RepoISO{URL: base, CheckedAt: time.Now()}
resp, err := repoisoClient.Get(base + "/api/integration/status")
if err != nil {
r.Error = err.Error()
return r
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
r.Error = fmt.Sprintf("HTTP %d", resp.StatusCode)
return r
}
if err := json.NewDecoder(resp.Body).Decode(&r); err != nil {
r.Error = "bad response: " + err.Error()
return r
}
r.URL, r.Reachable, r.Error = base, true, ""
return r
}
-29
View File
@@ -1,29 +0,0 @@
package collect
import (
"net/http"
"net/http/httptest"
"testing"
)
func TestFetchRepoISO(t *testing.T) {
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.URL.Path != "/api/integration/status" {
http.NotFound(w, r)
return
}
_, _ = w.Write([]byte(`{"version":"0.1.3","worker_alive":true,"images":5,"images_bytes":1024,"jobs_failed_24h":1}`))
}))
defer srv.Close()
r := FetchRepoISO(srv.URL + "/")
if !r.Reachable || r.Version != "0.1.3" || !r.WorkerAlive || r.Images != 5 || r.JobsFailed24h != 1 || r.URL != srv.URL {
t.Fatalf("unexpected %+v", r)
}
if r := FetchRepoISO(srv.URL + "/missing"); r.Reachable || r.Error != "HTTP 404" {
t.Fatalf("404 not reported: %+v", r)
}
srv.Close()
if r := FetchRepoISO(srv.URL); r.Reachable || r.Error == "" {
t.Fatalf("closed server reported reachable: %+v", r)
}
}