MCPcopy
hub / github.com/Azure/aztfexport / View

Method View

internal/ui/ui.go:230–261  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

228}
229
230func (m model) View() string {
231 s := m.logoView()
232
233 switch m.status {
234 case statusInit:
235 s += m.spinner.View() + " Initializing..."
236 case statusListingResource:
237 s += m.spinner.View() + " Listing Azure Resources..."
238 case statusBuildingImportList:
239 s += m.importlist.View()
240 case statusImportErrorMsg:
241 s += importErrorView(m)
242 case statusImporting:
243 s += m.spinner.View() + m.progress.View()
244 case statusPushState:
245 s += m.spinner.View() + " Pushing Terraform Status..."
246 case statusExportResourceMapping:
247 s += m.spinner.View() + " Exporting Resource Mapping..."
248 case statusExportSkippedResources:
249 s += m.spinner.View() + " Exporting Skipped Resources..."
250 case statusGeneratingCfg:
251 s += m.spinner.View() + " Generating Terraform Configurations..."
252 case statusCleaningUpWorkspaceCfg:
253 s += m.spinner.View() + " Cleaning up the output directory..."
254 case statusSummary:
255 s += summaryView(m)
256 case statusError:
257 s += errorView(m)
258 }
259
260 return indent.String(s, indentLevel)
261}
262
263func (m model) logoView() string {
264 return "\n" + common.TitleStyle.Render(" Microsoft Azure Export for Terraform ") + "\n\n"

Callers

nothing calls this directly

Calls 5

logoViewMethod · 0.95
importErrorViewFunction · 0.85
summaryViewFunction · 0.85
errorViewFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected