15014: Hide busy/idle nodes panel when crunch1 is not active.
[arvados.git] / lib / controller / router / router.go
index f37c7ea9073ac51c0553ecf03c91ff4a9b1b2e92..5d5602df523b672d6e8f6d84346ed5255a20ae76 100644 (file)
@@ -10,7 +10,6 @@ import (
        "net/http"
        "strings"
 
-       "git.curoverse.com/arvados.git/lib/controller/federation"
        "git.curoverse.com/arvados.git/sdk/go/arvados"
        "git.curoverse.com/arvados.git/sdk/go/auth"
        "git.curoverse.com/arvados.git/sdk/go/ctxlog"
@@ -24,10 +23,10 @@ type router struct {
        fed arvados.API
 }
 
-func New(cluster *arvados.Cluster) *router {
+func New(fed arvados.API) *router {
        rtr := &router{
                mux: httprouter.New(),
-               fed: federation.New(cluster),
+               fed: fed,
        }
        rtr.addRoutes()
        return rtr
@@ -41,6 +40,13 @@ func (rtr *router) addRoutes() {
                defaultOpts func() interface{}
                exec        routableFunc
        }{
+               {
+                       arvados.EndpointConfigGet,
+                       func() interface{} { return &struct{}{} },
+                       func(ctx context.Context, opts interface{}) (interface{}, error) {
+                               return rtr.fed.ConfigGet(ctx)
+                       },
+               },
                {
                        arvados.EndpointCollectionCreate,
                        func() interface{} { return &arvados.CreateOptions{} },