showEventsTextArea updates the UI to show the harden/restore progress and the final status of the hardened settings.
()
| 311 | // showEventsTextArea updates the UI to show the harden/restore progress and |
| 312 | // the final status of the hardened settings. |
| 313 | func 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 |
| 348 | func ShowSuccess(name string) { |
no outgoing calls
no test coverage detected