Schedules list as a table with enable, run now, edit, duplicate, delete and view runs; built-ins only enable, retime and run. The runs page links each run's tasks through its capture's dispatches. The Start node gains a Schedule trigger that picks or creates a schedule and binds the schedule source to the workflow. Times show in a per-browser display zone set under Appearance; the cron time zone and run retention are edited on the Schedules page.
36 lines
1.4 KiB
Go
36 lines
1.4 KiB
Go
package archieui
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/samcharles93/archie-core/internal/domain/presence"
|
|
"github.com/samcharles93/archie-core/internal/infrastructure/gatewayrpc"
|
|
"github.com/samcharles93/archie-core/internal/infrastructure/messagingrpc"
|
|
"github.com/samcharles93/archie-core/internal/infrastructure/staterpc"
|
|
"github.com/samcharles93/archie-core/internal/logging"
|
|
"github.com/samcharles93/archie-core/internal/webui"
|
|
)
|
|
|
|
// The State Store client serves the dashboard's schedules (wireOrgSurface).
|
|
var _ webui.ScheduleStore = (*staterpc.Client)(nil)
|
|
|
|
func wireServiceLogs(opts Options, srv *webui.Server, tasks *staterpc.Client, chat *gatewayrpc.Client, feed *logging.Feed) (func(), error) {
|
|
srv.LogFeed = feed
|
|
srv.LogSources = map[string]webui.LogSource{
|
|
presence.UI: func(_ context.Context, q logging.Query) (logging.Result, error) { return feed.Read(q) },
|
|
presence.StateStore: tasks.RecentLogs,
|
|
presence.Gateway: func(ctx context.Context, q logging.Query) (logging.Result, error) {
|
|
return chat.RecentLogs(ctx, presence.Gateway, q)
|
|
},
|
|
presence.Daemon: func(ctx context.Context, q logging.Query) (logging.Result, error) {
|
|
return chat.RecentLogs(ctx, presence.Daemon, q)
|
|
},
|
|
}
|
|
messaging, closeMessaging, dialErr := messagingrpc.Dial(opts.Messaging.Target, opts.identity)
|
|
if dialErr != nil {
|
|
return nil, dialErr
|
|
}
|
|
srv.LogSources[presence.Messaging] = messaging.RecentLogs
|
|
return closeMessaging, nil
|
|
}
|