package ui import ( "git.wamblee.org/converge/pkg/models" "time" _ "time/tzdata" ) templ Sessions(agents []*models.Agent, clients []*models.Client, loc *time.Location) {

sessions

if len(agents) > 0 { @State(agents, clients, loc) } else { Loading... }
} templ State(agents []*models.Agent, clients []*models.Client, location *time.Location) {

agents

if len(agents) == 0 {

-

} else { for _, agent := range agents { }
rendez-vous id start time time username host os shell
{string(agent.PublicId)} {agent.StartTime.In(location).Format(time.DateTime)} {agent.GetExpiryTime().In(location).Format(time.DateTime)} {agent.EnvironmentInfo.Username} {agent.EnvironmentInfo.Hostname} {agent.EnvironmentInfo.OS} {agent.EnvironmentInfo.Shell}
}

clients

if len(clients) == 0 {

-

} else { for _, client := range clients { }
id start time session type rendez-vous id username host os shell
{string(client.ClientId)} {client.StartTime.In(location).Format(time.DateTime)} {string(client.SessionType)} {string(client.PublicId)} {client.EnvironmentInfo.Username} {client.EnvironmentInfo.Hostname} {client.EnvironmentInfo.OS} {client.EnvironmentInfo.Shell}
}
} templ SessionsTab(agents []*models.Agent, clients []*models.Client, loc *time.Location) { @BasePage(4) { @Sessions(agents, clients, loc) } }