Documentation
¶
Overview ¶
Package ui2 pkg/visor/ui2/apps.go c3-vis-core
templ: version: v0.3.1070
templ: version: v0.3.1070
Package ui2 pkg/visor/ui2/contacts.go c3-vis-core
templ: version: v0.3.1070
Package ui2 pkg/visor/ui2/dmsg.go c3-vis-core
templ: version: v0.3.1070
Package ui2 pkg/visor/ui2/i18n.go c3-vis-core
Package ui2 pkg/visor/ui2/info.go c3-vis-core
templ: version: v0.3.1070
templ: version: v0.3.1070
templ: version: v0.3.1070
Package ui2 pkg/visor/ui2/logs.go c3-vis-core
templ: version: v0.3.1070
Package ui2 pkg/visor/ui2/mail.go c3-vis-core
templ: version: v0.3.1070
Package ui2 pkg/visor/ui2/nodes.go c3-vis-core
templ: version: v0.3.1070
Package ui2 pkg/visor/ui2/paging.go c3-vis-core
templ: version: v0.3.1070
Package ui2 pkg/visor/ui2/rewards.go c3-vis-core
templ: version: v0.3.1070
Package ui2 pkg/visor/ui2/routing.go c3-vis-core
templ: version: v0.3.1070
Package ui2 pkg/visor/ui2/settings.go c3-vis-core
templ: version: v0.3.1070
Package ui2 pkg/visor/ui2/tabs.go c3-vis-core
templ: version: v0.3.1070
Package ui2 pkg/visor/ui2/transports.go c3-vis-core
templ: version: v0.3.1070
Package ui2 pkg/visor/ui2/ui2.go c3-vis-core
Package ui2 is a server rendered hypervisor UI built with templ and htmx. It only renders. The hypervisor handlers fetch the data from the visor API and hand it here, so the package carries no visor dependency.
Never use html/template or text/template here: they panic under TinyGo.
Package ui2 pkg/visor/ui2/uptime.go c3-vis-core
templ: version: v0.3.1070
templ: version: v0.3.1070
Index ¶
- Constants
- Variables
- func Addrs(s string) []string
- func AppHelp(text, errMsg string) templ.Component
- func AppLogs(pk, name string, lines []string, errMsg string) templ.Component
- func AppSettings(pk string, x App, errMsg string) templ.Component
- func AppsPage(a Apps) templ.Component
- func AppsRows(a Apps) templ.Component
- func AppsRowsOOB(a Apps) templ.Component
- func ArgsString(args []string) string
- func Asset(name string) string
- func AssetVersion(name string) string
- func BaseFor(path string) string
- func Bytes(n uint64) string
- func ChatPage(pk string) templ.Component
- func ClassicURL(pk, seg string) string
- func ConfigEdit(pk, raw, errMsg string) templ.Component
- func ConfigView(pk, raw, msg string) templ.Component
- func ContactsPage(l List) templ.Component
- func Count(n int, oob bool) templ.Component
- func DmsgClients(d Dmsg) templ.Component
- func DmsgOf(s *visorapi.DmsgClientSessions) ([]*visorapi.DmsgClientSessionInfo, int)
- func DmsgPage(d Dmsg) templ.Component
- func DmsgResult(d Dmsg) templ.Component
- func EnvLines(s string) []string
- func ErrorBox(msg string) templ.Component
- func Folder(s string) string
- func FormView(f Form) templ.Component
- func GroupsView(groups []Group, errMsg string) templ.Component
- func HealthClass(s string) string
- func InfoLive(i Info) templ.Component
- func InfoPage(i Info) templ.Component
- func Latency(d time.Duration) string
- func LatencyClass(d time.Duration) string
- func Layout(title, classic string) templ.Component
- func ListSearch(url, target, scope, placeholder string, q ListQuery) templ.Component
- func ListState(p Pager) templ.Component
- func ListText(pks []cipher.PubKey, def bool) string
- func ListView(l List) templ.Component
- func LogBody(l Logs) templ.Component
- func LogMore(l Logs) templ.Component
- func LoginPage(create bool, errMsg string) templ.Component
- func LogsPage(l Logs) templ.Component
- func MailAPI(pk, folder, id, rest string) string
- func MailBody(m Mail) templ.Component
- func MailPage(m Mail) templ.Component
- func MailURL(pk, rest string, kv ...string) string
- func Millis(d time.Duration) string
- func MinHops(pk, minHops string, edit bool, errMsg string) templ.Component
- func NodeRows(ns []Node, errMsg string, oob bool) templ.Component
- func NodesPage(ns []Node, errMsg string) templ.Component
- func NotPorted(pk, seg string) templ.Component
- func PKLines(pks []cipher.PubKey) string
- func PagerNav(p Pager, url, target string) templ.Component
- func ParsePKList(s string) ([]cipher.PubKey, error)
- func PathView(q PathQuery) templ.Component
- func Pct(p float64) string
- func PctClass(p float64) string
- func PickLang(cookie, accept string) string
- func PoliciesView(p Policies, errMsg string) templ.Component
- func Protocol(c *visorapi.DmsgClientSessionInfo, pk string) string
- func RewardAddress(rw Rewards) templ.Component
- func RewardHistoryView(h RewardHistory) templ.Component
- func RewardRules(text string) templ.Component
- func RewardsPage(rw Rewards) templ.Component
- func RoleKey(role string) string
- func RouterForm(pk string, s *visorapi.RouterSettings, errMsg string) templ.Component
- func RoutingPage(pk string, minHops string, view string) templ.Component
- func Rows(l List) templ.Component
- func RulesList(r Rules) templ.Component
- func RulesView(r Rules) templ.Component
- func SameRelease(version, configVersion string) bool
- func ServiceUptimes(rows []ServiceUptime) templ.Component
- func SettingsPage(s Settings) templ.Component
- func SettingsPanel(s Settings) templ.Component
- func ShortTx(id string) string
- func Size(n int64) string
- func SortNodes(ns []Node)
- func SortTh(label, key string, p Pager, url, target string, num bool) templ.Component
- func Static() fs.FS
- func T(ctx context.Context, key string, args ...string) string
- func TerminalPage(pk string) templ.Component
- func TimeOnline(ctx context.Context, secs float64) string
- func Toast(msg string, isErr bool) templ.Component
- func TransportsBody(t Transports) templ.Component
- func TransportsPage(t Transports) templ.Component
- func TransportsSummary(t Transports, oob bool) templ.Component
- func UptimeBars(u Uptime) templ.Component
- func UptimeOf(resp *visorapi.LocalUptimeResponse, now time.Time) ([]UpDay, []TierPct)
- func UptimePage(u Uptime) templ.Component
- func VisorError(pk, seg, msg string) templ.Component
- func VisorLayout(pk, seg string) templ.Component
- func VisorURL(pk, seg string) string
- func WalletPage(pk string) templ.Component
- func When(t time.Time) string
- func With(ctx context.Context, p Page, c *Catalog) context.Context
- type Alert
- type App
- type Apps
- type Catalog
- type Dmsg
- type Draft
- type Field
- type Form
- type Group
- type Hypervisor
- type Info
- func (i Info) Alerts(ctx context.Context) []Alert
- func (i Info) AppCounts() (running, autostart, failed int)
- func (i Info) Directions() (in, out int)
- func (i Info) Hypervisors(local string) []Hypervisor
- func (i Info) MeshName() string
- func (i Info) TransportTypes() []TypeCount
- func (i Info) Version() string
- type KV
- type Lang
- type List
- type ListQuery
- type LogEntry
- type LogFilter
- type LogLevel
- type Logs
- type Mail
- type Node
- type Page
- type Pager
- type Path
- type PathQuery
- type Policies
- type RewardDay
- type RewardHistory
- type Rewards
- type Rule
- type Rules
- type Run
- type ServiceUptime
- type Settings
- type Tab
- type TierPct
- type Transport
- type Transports
- type TypeCount
- type UpDay
- type UpTier
- type Uptime
Constants ¶
const ( FolderInbox = "INBOX" FolderSent = "Sent" FolderOutbox = "Outbox" )
Mail folders, as the visor names them.
const HTMXVersion = "2.0.11"
HTMXVersion is the vendored static/htmx.min.js, checked against the npm tarball integrity of htmx.org@2.0.11.
const LangCookie = "ui2-lang"
LangCookie holds the chosen language. ui2.js keeps it in step with the Angular UI's "lang" localStorage entry.
const ListPageSize = 100
ListPageSize is how many rows a long list renders at once.
const LogMax = 1000
LogMax is how many entries the tab keeps, as the Angular one does.
Variables ¶
var Langs = []Lang{
{"en", "English"},
{"es", "Español"},
{"de", "Deutsch"},
{"pt", "Português (Brazil)"},
{"zh", "中文"},
}
Langs follows the languages list of the Angular UI (static/skywire-manager-src/src/app/app.config.ts).
var LogLevels = []struct { Level LogLevel Label string }{ {LevelUnknown, "All"}, {LevelDebug, "Debug+"}, {LevelInfo, "Info+"}, {LevelWarn, "Warn+"}, {LevelError, "Error+"}, {LevelFatal, "Fatal+"}, {LevelPanic, "Panic"}, }
LogLevels are the filter buttons, as the Angular tab labels them.
var RoutingViews = []string{"rules", "groups", "find", "calc", "policies"}
RoutingViews are the routing tab's sub views, after routing.component.html. The mux tree is the route visualizer page.
var UptimeTiers = []string{"process", "dmsg", "skynet"}
UptimeTiers is the order the Angular tab draws the tiers in.
var VisorTabs = []Tab{
{"info", "node.tabs.info", "info"},
{"routing", "node.tabs.routing", "shuffle"},
{"transports", "node.tabs.transports", "swap_horiz"},
{"bandwidth", "node.tabs.bandwidth", "equalizer"},
{"uptime", "node.tabs.uptime", "schedule"},
{"apps", "node.tabs.apps", "apps"},
{"chat", "node.tabs.chat", "forum"},
{"mail", "node.tabs.mail", "mail"},
{"contacts", "node.tabs.contacts", "contacts"},
{"rewards", "node.tabs.rewards", "monetization_on"},
{"dmsg", "node.tabs.dmsg", "device_hub"},
{"skynet", "node.tabs.skynet", "public"},
{"web-proxy", "node.tabs.web-proxy", "language"},
{"vpn", "node.tabs.vpn", "vpn_lock"},
{"resources", "node.tabs.resources", "memory"},
{"terminal", "node.tabs.terminal", "code"},
{"wallet", "node.tabs.wallet", "account_balance_wallet"},
{"logs", "node.tabs.logs", "description"},
{"settings", "node.tabs.settings", "tune"},
}
VisorTabs follows the Angular UI's node tabs (static/skywire-manager-src/src/app/utils/node-tabs.ts), with the DMSG tab that Angular reaches by route. A tab without its own ui2 route renders a link to the classic one.
Functions ¶
func AppSettings ¶
AppSettings is the settings form of one app: its args, environment, launcher mode and autostart, as the Angular settings panel edits them.
func AppsRowsOOB ¶
AppsRowsOOB is AppsRows as an out of band swap.
func ArgsString ¶
ArgsString joins args into one shell-like line, quoting the ones with spaces or quotes, as app-settings.component.ts does.
func Asset ¶
Asset is the URL of a static file, relative to the page's <base>, carrying its content hash so it can be cached for good.
func AssetVersion ¶
AssetVersion is the content hash of a static file, or "" if there is none.
func BaseFor ¶
BaseFor is the relative path from the request path back to the root. Every URL in a page is relative to it, so pages keep working under the /vnet/<port>/ prefix the in-tab visor's service worker adds.
func ChatPage ¶
ChatPage hosts the Angular UI's chat tab in its chrome-less embed mode, as the wasm desktop's chat window does. Chat and voice are not reimplemented. The skychat page behind the proxy cannot be hosted: it asks for /sse at the root.
func ClassicURL ¶
ClassicURL is the Angular UI's route for the same visor tab.
func ConfigEdit ¶
ConfigEdit is the runtime config in a text area.
func ConfigView ¶
ConfigView shows the runtime config, read only.
func ContactsPage ¶
ContactsPage is the contacts tab. Fragments below replace parts of it.
func DmsgClients ¶
DmsgClients lists each client's sessions, refreshed every 5 seconds as the Angular tab does.
func DmsgOf ¶
func DmsgOf(s *visorapi.DmsgClientSessions) ([]*visorapi.DmsgClientSessionInfo, int)
DmsgOf lists the clients a visor runs, main first.
func DmsgResult ¶
DmsgResult is the outcome of connect-all or of a new sessions_count.
func ErrorBox ¶
ErrorBox shows an error the page could not avoid, such as a visor that did not answer.
func GroupsView ¶
GroupsView is the active route groups table.
func HealthClass ¶
HealthClass names a health value: ok, bad, or still waiting.
func InfoPage ¶
InfoPage is the info tab: the live overview, then the visor's ports, router settings and runtime config, and the restart and turn off actions.
func LatencyClass ¶
LatencyClass marks slow servers the way the Angular tab does.
func Layout ¶
Layout is the whole document around a page. classic is the same page's route in the Angular UI.
func ListSearch ¶
ListSearch is the filter box of a paged list. scope holds the box and the list, so a redraw keeps the sort and the page asks for page one.
func ListText ¶
ListText is a helper or relay list for its textarea: empty for the default, "none" for an empty list.
func LoginPage ¶
LoginPage logs in, or with create set makes the first account. It posts as a plain form, so it works before any script has loaded.
func MailBody ¶
MailBody is the whole tab below the tab bar. Every action swaps it, so the counts in the folder bar stay current.
func NodeRows ¶
NodeRows is the table, which polls itself every 10 seconds as the Angular list does by default. ui2.js applies the Angular UI's labels and the filter after every swap.
func ParsePKList ¶
ParsePKList reads one key per line or comma separated.
func PathView ¶
PathView is the route find or the route calculation form, with the paths it returned.
func PickLang ¶
PickLang is the language named by the cookie, else the first supported one in an Accept-Language header, else English.
func PoliciesView ¶
PoliciesView is the routing policies view.
func Protocol ¶
func Protocol(c *visorapi.DmsgClientSessionInfo, pk string) string
Protocol is how the client reached server pk, or "".
func RewardAddress ¶
RewardAddress shows the address, and with Editing set the form for it.
func RewardHistoryView ¶
func RewardHistoryView(h RewardHistory) templ.Component
RewardHistoryView is what the reward system paid the visor.
func RewardRules ¶
RewardRules is the binary's own copy of the reward rules.
func RewardsPage ¶
RewardsPage is the rewards tab: the reward address, the rules, and the reward system's history of the visor, loaded after the page.
func RouterForm ¶
RouterForm edits the visor-wide dial settings.
func RoutingPage ¶
RoutingPage is the routing tab: the min hops setting, then one sub view.
func SameRelease ¶
SameRelease reports whether a visor version and the version that wrote its config are one release: a build adds its commit to the version the config records, which is not a mismatch.
func ServiceUptimes ¶
func ServiceUptimes(rows []ServiceUptime) templ.Component
ServiceUptimes is the per-service table, loaded after the page.
func SettingsPanel ¶
SettingsPanel is the form, or the review of it.
func SortNodes ¶
func SortNodes(ns []Node)
SortNodes puts the hypervisor first, then online visors, then by name.
func T ¶
T translates key into the page language. args are name, value pairs that fill {{ name }} placeholders, as ngx-translate does.
func TerminalPage ¶
TerminalPage hosts the hypervisor's dmsgpty terminal page.
func TimeOnline ¶
TimeOnline is the visor's uptime in the largest whole unit, as the Angular tab words it.
func TransportsBody ¶
func TransportsBody(t Transports) templ.Component
TransportsBody is the part that polls: one page of the filtered list, and the summary out of band.
func TransportsPage ¶
func TransportsPage(t Transports) templ.Component
TransportsPage is the transports tab: the summary and toggles, the add form and the list.
func TransportsSummary ¶
func TransportsSummary(t Transports, oob bool) templ.Component
TransportsSummary is the count per type and the two switches. The list redraws it out of band, so one poll keeps both current.
func UptimeBars ¶
UptimeBars is the window picker and the day bars. It refreshes every minute: the visor samples every five.
func UptimeOf ¶
UptimeOf lays out the visor's tier bitmaps. A '.' slot was up; a slot of today at or after now has not happened yet.
func UptimePage ¶
UptimePage is the uptime tab: the visor's own tier bitmaps, then what the deployment services recorded of it.
func VisorError ¶
VisorError is a visor tab whose visor could not be reached.
func VisorLayout ¶
VisorLayout is a visor page: its key, the tab bar and the tab's card.
func WalletPage ¶
WalletPage opens the dashboard's wallet and hosts its node settings page, as the Angular wallet tab does.
Types ¶
type App ¶
type App struct {
Name string
Status int
Detail string
Port string
AutoStart bool
OTP string
Args string
Env string
LauncherMode string
}
App is one row of the apps tab.
type Apps ¶
type Apps struct {
PK string
Official []App
Other []App
Err string
// Open is the app whose settings panel is shown.
Open string
}
Apps is the apps tab: the official apps and the rest, as the Angular tab splits them.
type Catalog ¶
type Catalog struct {
// contains filtered or unexported fields
}
Catalog is the Angular UI's translation files, flattened to dotted keys.
func NewCatalog ¶
NewCatalog reads assets/i18n/<lang>.json from fsys as each language is first asked for. A nil fsys gives the keys themselves.
type Dmsg ¶
type Dmsg struct {
PK string
Clients []*visorapi.DmsgClientSessionInfo
Count int // the main client's sessions, the form's starting value
Err string
Fetched string
// Result and Action are the last connect-all or sessions_count outcome.
Result *visorapi.DmsgConnectAllResult
Action string
}
Dmsg is the dmsg tab: the visor's dmsg clients and their server sessions.
type Draft ¶
type Draft struct {
To, Cc, Subject, Body, InReplyTo string
}
Draft is the compose form.
type Field ¶
type Field struct {
skyenvform.Row
Draft string
Problem string
}
Field is one row of the form with what the user typed.
func FieldsOf ¶
FieldsOf pairs the rows with the drafts, the file's values where the form gave none, and the problem each draft has.
func (Field) DefaultLabel ¶
DefaultLabel is the bool select's default option.
func (Field) FilterText ¶
FilterText is what the filter box matches a field against.
func (Field) Placeholder ¶
Placeholder is a text field's hint while it is empty.
type Form ¶
type Form struct {
PK string
UID string
Name string
Keys string
Mail string
Payments string
Groups string
Notes string
Err string
}
Form is the edit form, with list fields as one entry per line.
type Group ¶
type Group struct {
Initiator bool
Remote string
Ports string
FwdRID string
ConsumeRID string
Hops int
NextTP string
}
Group is one active route group row.
func GroupsOf ¶
func GroupsOf(gs []visorapi.RouteGroupInfo) []Group
GroupsOf turns the visor's route groups into rows.
type Hypervisor ¶
type Hypervisor struct {
PK string
Local bool // the hypervisor serving this page
State string // connected, disconnected or runtime
}
Hypervisor is one hypervisor key the visor knows, and how.
type Info ¶
type Info struct {
PK string
Sum visorapi.Summary
Err string
Ports []KV
Router *visorapi.RouterSettings
RouterErr string
}
Info is the info tab: the visor's summary and the settings shown under it.
func (Info) Directions ¶
Directions counts incoming and outgoing transports.
func (Info) Hypervisors ¶
func (i Info) Hypervisors(local string) []Hypervisor
Hypervisors merges the configured and the connected hypervisors.
func (Info) TransportTypes ¶
TransportTypes counts the transports by type, most first.
type ListQuery ¶
ListQuery is the filter text, sort column and page a long list was asked for. The pages send it back with every request that redraws the list.
func ParseListQuery ¶
ParseListQuery reads q, sort, desc and page through get, which is usually a request's FormValue.
type LogEntry ¶
LogEntry is one runtime log line.
func FilterLogs ¶
FilterLogs parses raw lines and keeps those f matches, the last LogMax.
func ParseLogEntry ¶
ParseLogEntry decodes one JSON log line. ok is false for a malformed one.
func (LogEntry) LevelClass ¶
LevelClass is the CSS class for the level chip.
type LogFilter ¶
type LogFilter struct {
MinLevel LogLevel
Module string
Text string
Paused bool
// contains filtered or unexported fields
}
LogFilter is the level, module and text filter of the tab.
func ParseLogFilter ¶
ParseLogFilter reads the filter from a query. A bad module regex is returned as the error and filters nothing.
type Logs ¶
type Logs struct {
PK string
Filter LogFilter
Entries []LogEntry
Cursor int64
Dropped int64
Total int64
More bool // older entries were cut to LogMax
Err string
}
Logs is a batch of entries for the tab.
type Mail ¶
type Mail struct {
PK string
Status *visorapi.MailStatus
StatusErr string
Folder string
View string
List []skymail.Summary
Msg *skymail.Rendered
MsgID string
Queue *skymail.Queued
Draft Draft
Report []skymail.RcptResult
Err string
}
Mail is what the mail tab shows. View is "list", "message", "compose" or "settings".
type Node ¶
type Node struct {
PK string
Hostname string
Version string
Online bool
IsHV bool
PublicIP string
LocalIP string
Location string
Transports int
Apps int
AppsRunning int
Routes int
DmsgServer string
DmsgPing string
Reward string
LastSeen string
// ViaSub is a visor only a sub-hypervisor manages, so its pages do not
// open here. Children are the visors of a sub-hypervisor, and SubErr
// why they could not be listed.
ViaSub bool
Children []Node
SubErr string
}
Node is one row of the visor list.
func (Node) SearchText ¶
SearchText is what the list's search box matches, in lower case.
func (Node) ShortVersion ¶
ShortVersion is the release part of a version such as v1.3.104-76-gc08475bdb, which fits the list on one line.
type Page ¶
type Page struct {
Base string
Lang string
Auth bool
HVPK string
Remote bool
TPViz bool
// contains filtered or unexported fields
}
Page is what every page and fragment needs to render: where the root is, the language, and whether there is a session to log out of.
type Pager ¶
Pager is one page of a filtered list.
func Paginate ¶
Paginate keeps the rows of the page q asks for, moving an out of range page to the nearest one.
type Path ¶
Path is one route a route find or calculation returned: the visors it passes, ending at the destination.
type PathQuery ¶
type PathQuery struct {
PK string
Calc bool
Dst string
MinHops string
MaxHops string
Count string
Paths []Path
Ran bool
Err string
}
PathQuery is a route find or calculation form and its answer.
type Policies ¶
type Policies struct {
Default *visorapi.RoutingPolicyInfo
Apps []string
PerApp map[string]*visorapi.RoutingPolicyInfo
}
Policies is the routing policies view.
func PoliciesOf ¶
func PoliciesOf(s *visorapi.RoutingPoliciesSummary) Policies
PoliciesOf sorts the per-app policies by app name.
type RewardDay ¶
type RewardDay struct {
Date string `json:"date"`
Amount float64 `json:"amount"`
Sent bool `json:"sent"`
TxID string `json:"txid,omitempty"`
}
RewardDay is one day of the reward system's history for a visor.
func ParseRewardHistory ¶
ParseRewardHistory reads the reward system's visor history answer.
type RewardHistory ¶
RewardHistory is the history part of the rewards tab.
type Rewards ¶
type Rewards struct {
PK string
Address string
IsXpub bool
// Addresses are the first the xpub derives, where its rewards go.
Addresses []string
XpubErr string
// Spent: the address has sent coins, so its public key is on chain.
Spent bool
Balance string
Err string
Editing bool
Draft string
}
Rewards is the reward address part of the rewards tab.
type Rule ¶
type Rule struct {
Key string
Type string
LocalPort string
RemotePK string
RemotePort string
NextRID string
NextTP string
KeepAlive string
}
Rule is one routing rule row.
type ServiceUptime ¶
type ServiceUptime struct {
Service string
Days []TierPct // Name is the date; newest first
Err string
}
ServiceUptime is one deployment service's daily uptime of the visor.
type Settings ¶
type Settings struct {
PK string
Path string
Exists bool
Writable bool
Fields []Field
Err string
Reviewing bool
Changes []skyenvform.Change
Command string
Saved bool
}
Settings is the settings tab: the visor's skywire.conf as a form, and the review of what a filled-in form changes.
type Transport ¶
type Transport struct {
ID string
Remote string
Type string
Label string
Latency string
Throughput string
Sent string
Recv string
Persistent bool
Offline bool
// contains filtered or unexported fields
}
Transport is one row of the transports tab. A persistent transport that is not up has no ID and Offline set, as the Angular list shows it.
type Transports ¶
type Transports struct {
PK string
List []Transport
Rows []Transport
Pager Pager
ByType []TypeCount
Types []string
Autoconnect bool
IsPublic bool
Err string
}
Transports is the transports tab.
func TransportsOf ¶
func TransportsOf(pk string, tps []*visorapi.TransportSummary, persistent []transport.PersistentTransports) Transports
TransportsOf builds the tab from the visor's transports and its persistent list.
func (Transports) Online ¶
func (t Transports) Online() int
Online is the number of transports that are up.
func (*Transports) Select ¶
func (t *Transports) Select(q ListQuery)
Select filters, sorts and pages the list for q into Rows and Pager.
func (Transports) TypeSummary ¶
func (t Transports) TypeSummary() string
TypeSummary is the count per type, as "dmsg: 3, stcpr: 1".
Source Files
¶
- apps.go
- apps_templ.go
- chat_templ.go
- contacts.go
- contacts_templ.go
- dmsg.go
- dmsg_templ.go
- i18n.go
- info.go
- info_templ.go
- layout_templ.go
- login_templ.go
- logs.go
- logs_templ.go
- mail.go
- mail_templ.go
- nodes.go
- nodes_templ.go
- paging.go
- paging_templ.go
- rewards.go
- rewards_templ.go
- routing.go
- routing_templ.go
- settings.go
- settings_templ.go
- tabs.go
- terminal_templ.go
- transports.go
- transports_templ.go
- ui2.go
- uptime.go
- uptime_templ.go
- wallet_templ.go