Properly add ids for workflow execution and add first visualization

This commit is contained in:
Achim Rohn
2026-04-04 11:31:18 +02:00
parent b5c410c419
commit 6312033fad
5 changed files with 227 additions and 20 deletions
+17 -2
View File
@@ -6,6 +6,7 @@ import (
. "git.gorlug.de/code/ersteller"
"git.gorlug.de/code/ersteller/authentication"
google_http "git.gorlug.de/code/ersteller/authentication/google/http"
erstellerEnt "git.gorlug.de/code/ersteller/schema/ent"
"git.gorlug.de/code/ersteller/starter/about"
"git.gorlug.de/code/ersteller/starter/contact"
"git.gorlug.de/code/ersteller/starter/ent"
@@ -15,12 +16,14 @@ import (
"git.gorlug.de/code/ersteller/starter/login"
"git.gorlug.de/code/ersteller/starter/page"
"git.gorlug.de/code/ersteller/starter/todos"
"git.gorlug.de/code/ersteller/starter/workflow_executions"
workflowPkg "git.gorlug.de/code/ersteller/workflow"
"github.com/gorilla/sessions"
. "maragu.dev/gomponents"
)
func CreateApi(environment env.Environment, db *ent.Client) http.Handler {
func CreateApi(environment env.Environment, db *ent.Client, workflowDb *erstellerEnt.Client, exampleWorkflow *workflowPkg.Workflow) http.Handler {
server := NewHtmxServer()
HtmxRouteDebugTrace = true
@@ -73,8 +76,17 @@ func CreateApi(environment env.Environment, db *ent.Client) http.Handler {
De: todos.TodosPathDe,
})
// Workflow Executions navigation item
workflowExecutionsActivePath := NewActivePath(map[Language]string{
En: "Workflows",
De: "Workflows",
}, LanguagePaths{
En: workflow_executions.WorkflowExecutionsPath,
De: workflow_executions.WorkflowExecutionsPathDe,
})
// Main navigation items
activePaths := []ActivePath{indexActivePath, aboutActivePath, contactActivePath, todosActivePath}
activePaths := []ActivePath{indexActivePath, aboutActivePath, contactActivePath, todosActivePath, workflowExecutionsActivePath}
// Footer navigation items (placeholder - can be customized)
footerPaths := []ActivePath{}
@@ -89,6 +101,9 @@ func CreateApi(environment env.Environment, db *ent.Client) http.Handler {
// Create Todos page
_ = todos.NewPage(createPageFunc, server, &todosActivePath, db)
// Create Workflow Executions page
_ = workflow_executions.NewPage(createPageFunc, server, &workflowExecutionsActivePath, workflowDb, exampleWorkflow)
// Create Login page
loginPaths := LanguagePaths{
En: login.LoginPath,