Rework actions to be loaded dynamically
This commit is contained in:
parent
e49f89d4ee
commit
08ab7b4383
22 changed files with 934 additions and 81 deletions
|
|
@ -27,6 +27,7 @@ import (
|
|||
"github.com/FAU-CDI/wisski-distillery/internal/dis/component/server"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/dis/component/server/admin"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/dis/component/server/admin/socket"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/dis/component/server/admin/socket/actions"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/dis/component/server/assets"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/dis/component/server/cron"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/dis/component/server/home"
|
||||
|
|
@ -209,7 +210,6 @@ func (dis *Distillery) allComponents(context *lifetime.RegisterContext[component
|
|||
resolver.RefreshInterval = time.Minute
|
||||
})
|
||||
lifetime.Place[*admin.Admin](context) // TODO: Remove analytics
|
||||
lifetime.Place[*socket.Sockets](context)
|
||||
lifetime.Place[*legal.Legal](context)
|
||||
lifetime.Place[*news.News](context)
|
||||
|
||||
|
|
@ -217,6 +217,18 @@ func (dis *Distillery) allComponents(context *lifetime.RegisterContext[component
|
|||
lifetime.Place[*logo.Logo](context)
|
||||
lifetime.Place[*templating.Templating](context)
|
||||
|
||||
// Websockets
|
||||
lifetime.Place[*socket.Sockets](context)
|
||||
lifetime.Place[*actions.Backup](context)
|
||||
lifetime.Place[*actions.Provision](context)
|
||||
lifetime.Place[*actions.Snapshot](context)
|
||||
lifetime.Place[*actions.Rebuild](context)
|
||||
lifetime.Place[*actions.Update](context)
|
||||
lifetime.Place[*actions.Cron](context)
|
||||
lifetime.Place[*actions.Start](context)
|
||||
lifetime.Place[*actions.Stop](context)
|
||||
lifetime.Place[*actions.Purge](context)
|
||||
|
||||
// Cron
|
||||
lifetime.Place[*cron.Cron](context)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue