package templates import ( "git.wamblee.org/converge/pkg/models" "time" _ "time/tzdata" ) templ Sessions(state *models.State, loc *time.Location) {

sessions

if state != nil { @State(state, loc) } else { Loading... }
} templ State(state *models.State, location *time.Location) {

agents

if state.Agents.Len() == 0 {

-

} else { for agent := range state.Agents.RangeValues() { }
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 state.Clients.Len() == 0 {

-

} else { for client := range state.Clients.RangeValues() { }
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(state *models.State, loc *time.Location) { @BasePage(4) { @Sessions(state, loc) } }