MCPcopy
hub / github.com/docker/compose / navigationMenu

Method navigationMenu

cmd/formatter/shortcut.go:169–191  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

167}
168
169func (lk *LogKeyboard) navigationMenu() string {
170 var items []string
171 if lk.IsDockerDesktopActive {
172 items = append(items, shortcutKeyColor("v")+navColor(" View in Docker Desktop"))
173 }
174
175 if lk.IsDockerDesktopActive {
176 items = append(items, shortcutKeyColor("o")+navColor(" View Config"))
177 }
178
179 if lk.IsLogsViewEnabled {
180 items = append(items, shortcutKeyColor("l")+navColor(" View Logs"))
181 }
182
183 isEnabled := " Enable"
184 if lk.Watch != nil && lk.Watch.Watching {
185 isEnabled = " Disable"
186 }
187 items = append(items, shortcutKeyColor("w")+navColor(isEnabled+" Watch"))
188 items = append(items, shortcutKeyColor("d")+navColor(" Detach"))
189
190 return strings.Join(items, " ")
191}
192
193func (lk *LogKeyboard) clearNavigationMenu() {
194 height := goterm.Height()

Callers 2

createBufferMethod · 0.95
printNavigationMenuMethod · 0.95

Calls 2

shortcutKeyColorFunction · 0.85
navColorFunction · 0.85

Tested by

no test coverage detected