()
| 228 | } |
| 229 | |
| 230 | func (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 | |
| 263 | func (m model) logoView() string { |
| 264 | return "\n" + common.TitleStyle.Render(" Microsoft Azure Export for Terraform ") + "\n\n" |
nothing calls this directly
no test coverage detected