MCPcopy
hub / github.com/hardentools/hardentools / showEventsTextArea

Function showEventsTextArea

gui.go:313–345  ·  view source on GitHub ↗

showEventsTextArea updates the UI to show the harden/restore progress and the final status of the hardened settings.

()

Source from the content-addressed store, hash-verified

311// showEventsTextArea updates the UI to show the harden/restore progress and
312// the final status of the hardened settings.
313func showEventsTextArea() {
314 // init map that remembers stateIcons.
315 stateLabels = make(map[string]*widget.Label, len(hardenSubjectsForPrivilegedUsers))
316
317 firstColumn = container.NewVBox(widget.NewLabelWithStyle("Harden Item Name",
318 fyne.TextAlignLeading, fyne.TextStyle{Bold: true}))
319 secondColumn = container.NewVBox(widget.NewLabelWithStyle("Operation Result",
320 fyne.TextAlignLeading, fyne.TextStyle{Bold: true}))
321 thirdColumn = container.NewVBox(widget.NewLabelWithStyle("Verification Result",
322 fyne.TextAlignLeading, fyne.TextStyle{Bold: true}))
323
324 resultBox := container.NewHBox(
325 firstColumn,
326 secondColumn,
327 thirdColumn)
328
329 resultBoxContainer := container.NewVScroll(resultBox)
330 resultBoxContainer.SetMinSize(fyne.NewSize(500, 600))
331 resultBoxGroup := widget.NewCard("", "", resultBoxContainer)
332
333 messageBox = container.NewVBox()
334 inProgressLabel = widget.NewLabelWithStyle("Operation in progress...",
335 fyne.TextAlignCenter, fyne.TextStyle{})
336 messageBox.Add(inProgressLabel)
337 eventsTextAreaProgressBar = widget.NewProgressBarInfinite()
338 messageBox.Add(eventsTextAreaProgressBar)
339
340 eventsArea := container.NewVBox(messageBox, resultBoxGroup)
341 fyne.Do(func() {
342 mainWindow.SetContent(eventsArea)
343 mainWindow.CenterOnScreen()
344 })
345}
346
347// ShowSuccess sets GUI status of name field to success
348func ShowSuccess(name string) {

Callers 3

hardenAllFunction · 0.85
restoreAllFunction · 0.85
hardenDefaultsAgainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected