mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
webui: rename Go module to infix/webui
The webui Go code now lives in the infix source tree rather than being imported as an external module. Switch the module path to match that reality so the imports read coherently with the rest of the codebase. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
WEBUI_VERSION = 1.0
|
||||
WEBUI_SITE_METHOD = local
|
||||
WEBUI_SITE = $(BR2_EXTERNAL_INFIX_PATH)/src/webui
|
||||
WEBUI_GOMOD = github.com/kernelkit/webui
|
||||
WEBUI_GOMOD = infix/webui
|
||||
WEBUI_LICENSE = MIT
|
||||
WEBUI_LICENSE_FILES = LICENSE
|
||||
WEBUI_REDISTRIBUTE = NO
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
module github.com/kernelkit/webui
|
||||
module infix/webui
|
||||
|
||||
go 1.22.0
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"github.com/kernelkit/webui/internal/handlers"
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"github.com/kernelkit/webui/internal/security"
|
||||
"infix/webui/internal/handlers"
|
||||
"infix/webui/internal/restconf"
|
||||
"infix/webui/internal/security"
|
||||
)
|
||||
|
||||
const cookieName = "session"
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/kernelkit/webui/internal/security"
|
||||
"infix/webui/internal/security"
|
||||
)
|
||||
|
||||
const sessionTimeout = 1 * time.Hour
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"context"
|
||||
"log"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"infix/webui/internal/restconf"
|
||||
)
|
||||
|
||||
type feature struct {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/kernelkit/webui/internal/testutil"
|
||||
"infix/webui/internal/testutil"
|
||||
)
|
||||
|
||||
func yangLibraryResponse(modules ...map[string]interface{}) map[string]interface{} {
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"github.com/kernelkit/webui/internal/security"
|
||||
"infix/webui/internal/restconf"
|
||||
"infix/webui/internal/security"
|
||||
)
|
||||
|
||||
// PageData is the base template data passed to every page.
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"infix/webui/internal/restconf"
|
||||
)
|
||||
|
||||
const cfgUnsavedCookie = "cfg-unsaved"
|
||||
|
||||
@@ -12,8 +12,8 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"github.com/kernelkit/webui/internal/schema"
|
||||
"infix/webui/internal/restconf"
|
||||
"infix/webui/internal/schema"
|
||||
)
|
||||
|
||||
const fwConfigPath = candidatePath + "/infix-firewall:firewall"
|
||||
|
||||
@@ -14,8 +14,8 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"github.com/kernelkit/webui/internal/schema"
|
||||
"infix/webui/internal/restconf"
|
||||
"infix/webui/internal/schema"
|
||||
)
|
||||
|
||||
// Configure > Hardware: curated management of components in ietf-hardware /
|
||||
|
||||
@@ -20,8 +20,8 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"github.com/kernelkit/webui/internal/schema"
|
||||
"infix/webui/internal/restconf"
|
||||
"infix/webui/internal/schema"
|
||||
)
|
||||
|
||||
const ifaceCandPath = candidatePath + "/ietf-interfaces:interfaces"
|
||||
|
||||
@@ -15,8 +15,8 @@ import (
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"github.com/kernelkit/webui/internal/schema"
|
||||
"infix/webui/internal/restconf"
|
||||
"infix/webui/internal/schema"
|
||||
)
|
||||
|
||||
const keystorePath = candidatePath + "/ietf-keystore:keystore"
|
||||
|
||||
@@ -10,8 +10,8 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"github.com/kernelkit/webui/internal/schema"
|
||||
"infix/webui/internal/restconf"
|
||||
"infix/webui/internal/schema"
|
||||
)
|
||||
|
||||
// ─── RESTCONF paths ──────────────────────────────────────────────────────────
|
||||
|
||||
@@ -10,8 +10,8 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"github.com/kernelkit/webui/internal/schema"
|
||||
"infix/webui/internal/restconf"
|
||||
"infix/webui/internal/schema"
|
||||
)
|
||||
|
||||
// ─── RESTCONF JSON types (candidate datastore) ────────────────────────────────
|
||||
|
||||
@@ -12,8 +12,8 @@ import (
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"github.com/kernelkit/webui/internal/schema"
|
||||
"infix/webui/internal/restconf"
|
||||
"infix/webui/internal/schema"
|
||||
)
|
||||
|
||||
// ─── RESTCONF JSON types ──────────────────────────────────────────────────────
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"net/url"
|
||||
"sync"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"infix/webui/internal/restconf"
|
||||
)
|
||||
|
||||
// containerJSON matches the RESTCONF JSON for a single container entry.
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"github.com/kernelkit/webui/internal/security"
|
||||
"infix/webui/internal/restconf"
|
||||
"infix/webui/internal/security"
|
||||
)
|
||||
|
||||
var minimalContainersTmpl = template.Must(template.New("containers.html").Parse(
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"infix/webui/internal/restconf"
|
||||
)
|
||||
|
||||
// yangInt64 unmarshals a YANG numeric value that RESTCONF encodes as a
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"github.com/kernelkit/webui/internal/security"
|
||||
"infix/webui/internal/restconf"
|
||||
"infix/webui/internal/security"
|
||||
)
|
||||
|
||||
var minimalDashTmpl = template.Must(template.New("dashboard.html").Parse(
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"infix/webui/internal/restconf"
|
||||
)
|
||||
|
||||
// ─── DHCP types ──────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"infix/webui/internal/restconf"
|
||||
)
|
||||
|
||||
// RESTCONF JSON structures for infix-firewall:firewall.
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"net/http"
|
||||
"sort"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"infix/webui/internal/restconf"
|
||||
)
|
||||
|
||||
// Hardware page data — populated from /ietf-hardware:hardware.
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"infix/webui/internal/restconf"
|
||||
)
|
||||
|
||||
// RESTCONF JSON structures for ietf-interfaces:interfaces.
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"infix/webui/internal/restconf"
|
||||
)
|
||||
|
||||
// ─── LLDP types ──────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"infix/webui/internal/restconf"
|
||||
)
|
||||
|
||||
// ─── RESTCONF JSON types ──────────────────────────────────────────────────────
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"infix/webui/internal/restconf"
|
||||
)
|
||||
|
||||
// ─── RESTCONF JSON types ──────────────────────────────────────────────────────
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"infix/webui/internal/restconf"
|
||||
)
|
||||
|
||||
// ─── NTP types ───────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"infix/webui/internal/restconf"
|
||||
)
|
||||
|
||||
type RouteEntry struct {
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"github.com/kernelkit/webui/internal/security"
|
||||
"infix/webui/internal/restconf"
|
||||
"infix/webui/internal/security"
|
||||
)
|
||||
|
||||
var minimalRoutingTmpl = template.Must(template.New("routing.html").Parse(
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"sort"
|
||||
"strconv"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"infix/webui/internal/restconf"
|
||||
)
|
||||
|
||||
// ─── RESTCONF JSON types ──────────────────────────────────────────────────────
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"github.com/kernelkit/webui/internal/security"
|
||||
"infix/webui/internal/restconf"
|
||||
"infix/webui/internal/security"
|
||||
)
|
||||
|
||||
var minimalDHCPTmpl = template.Must(template.New("dhcp.html").Parse(
|
||||
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"infix/webui/internal/restconf"
|
||||
)
|
||||
|
||||
// raucInstallationStatus reads RAUC's Operation/Progress/LastError D-Bus
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"infix/webui/internal/restconf"
|
||||
)
|
||||
|
||||
// wgConfigJSON is a local extension for fetching WireGuard configuration
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"github.com/kernelkit/webui/internal/security"
|
||||
"infix/webui/internal/restconf"
|
||||
"infix/webui/internal/security"
|
||||
)
|
||||
|
||||
var minimalVPNTmpl = template.Must(template.New("vpn.html").Parse(
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"net/http"
|
||||
"sync"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"infix/webui/internal/restconf"
|
||||
)
|
||||
|
||||
// wifiRadioHWJSON extends the hardware component wifi-radio container with
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"github.com/kernelkit/webui/internal/security"
|
||||
"infix/webui/internal/restconf"
|
||||
"infix/webui/internal/security"
|
||||
)
|
||||
|
||||
var minimalWiFiTmpl = template.Must(template.New("wifi.html").Parse(
|
||||
|
||||
@@ -10,8 +10,8 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"github.com/kernelkit/webui/internal/schema"
|
||||
"infix/webui/internal/restconf"
|
||||
"infix/webui/internal/schema"
|
||||
)
|
||||
|
||||
const candidateDS = "/ds/ietf-datastores:candidate"
|
||||
|
||||
@@ -16,8 +16,8 @@ import (
|
||||
"unicode"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"github.com/kernelkit/webui/internal/schema"
|
||||
"infix/webui/internal/restconf"
|
||||
"infix/webui/internal/schema"
|
||||
)
|
||||
|
||||
// SchemaHandler serves YANG schema queries as JSON (used by the tree UI and
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"infix/webui/internal/restconf"
|
||||
)
|
||||
|
||||
// ModuleInfo identifies a YANG module by name and revision.
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"os"
|
||||
"sync"
|
||||
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"infix/webui/internal/restconf"
|
||||
)
|
||||
|
||||
// Cache holds a lazily-loaded schema Manager and refreshes it at startup.
|
||||
|
||||
@@ -7,10 +7,10 @@ import (
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/kernelkit/webui/internal/auth"
|
||||
"github.com/kernelkit/webui/internal/handlers"
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"github.com/kernelkit/webui/internal/security"
|
||||
"infix/webui/internal/auth"
|
||||
"infix/webui/internal/handlers"
|
||||
"infix/webui/internal/restconf"
|
||||
"infix/webui/internal/security"
|
||||
)
|
||||
|
||||
const cookieName = "session"
|
||||
|
||||
@@ -9,10 +9,10 @@ import (
|
||||
"io/fs"
|
||||
"net/http"
|
||||
|
||||
"github.com/kernelkit/webui/internal/auth"
|
||||
"github.com/kernelkit/webui/internal/handlers"
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"github.com/kernelkit/webui/internal/schema"
|
||||
"infix/webui/internal/auth"
|
||||
"infix/webui/internal/handlers"
|
||||
"infix/webui/internal/restconf"
|
||||
"infix/webui/internal/schema"
|
||||
)
|
||||
|
||||
// New creates a fully wired http.Handler with all routes and middleware.
|
||||
|
||||
+4
-4
@@ -12,10 +12,10 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/kernelkit/webui/internal/auth"
|
||||
"github.com/kernelkit/webui/internal/restconf"
|
||||
"github.com/kernelkit/webui/internal/schema"
|
||||
"github.com/kernelkit/webui/internal/server"
|
||||
"infix/webui/internal/auth"
|
||||
"infix/webui/internal/restconf"
|
||||
"infix/webui/internal/schema"
|
||||
"infix/webui/internal/server"
|
||||
)
|
||||
|
||||
//go:embed templates/*
|
||||
|
||||
Reference in New Issue
Block a user