(msg SettingsSectionSubmitMsg)
| 240 | } |
| 241 | |
| 242 | func (m Settings) handleFormSubmit(msg SettingsSectionSubmitMsg) (Component, tea.Cmd) { |
| 243 | if msg.Settings.Equal(m.app.Settings) { |
| 244 | return m, m.navigateToDashboard() |
| 245 | } |
| 246 | if m.namespace.HostInUseByAnother(msg.Settings.Host, m.app.Settings.Name) { |
| 247 | m.err = docker.ErrHostnameInUse |
| 248 | return m, nil |
| 249 | } |
| 250 | m.state = settingsStateDeploying |
| 251 | m.app.Settings = msg.Settings |
| 252 | m.progress = NewProgress(m.width, Colors.Border) |
| 253 | return m, tea.Batch(m.progress.Init(), m.runDeploy()) |
| 254 | } |
| 255 | |
| 256 | func (m Settings) handleActionResult(msg settingsActionFinishedMsg) (Component, tea.Cmd) { |
| 257 | if msg.err != nil { |
no test coverage detected