All Http settings page errors are now being handled

This commit is contained in:
Kasra Bigdeli
2019-01-02 19:17:00 -08:00
parent bc3e62bdd0
commit 3944de2e79
3 changed files with 27 additions and 5 deletions
@@ -132,7 +132,11 @@ export default class AppDetails extends ApiComponent<
.then(function() {
self.goBackToApps();
})
.catch(Toaster.createCatcher());
.catch(
Toaster.createCatcher(function() {
self.setState({ isLoading: false });
})
);
},
onCancel() {
// do nothing
@@ -47,7 +47,11 @@ export default class HttpSettings extends Component<
.then(function() {
self.reFetchData();
})
.catch(Toaster.createCatcher());
.catch(
Toaster.createCatcher(function() {
self.props.setLoading(false);
})
);
}
onConnectNewDomainClicked(newDomain: string) {
@@ -67,7 +71,11 @@ export default class HttpSettings extends Component<
.then(function() {
self.reFetchData();
})
.catch(Toaster.createCatcher());
.catch(
Toaster.createCatcher(function() {
self.props.setLoading(false);
})
);
}
onEnableCustomDomainSslClicked(customDomain: string) {
@@ -87,7 +95,11 @@ export default class HttpSettings extends Component<
.then(function() {
self.reFetchData();
})
.catch(Toaster.createCatcher());
.catch(
Toaster.createCatcher(function() {
self.props.setLoading(false);
})
);
}
onRemoveCustomDomainClicked(customDomain: string) {
@@ -107,7 +119,11 @@ export default class HttpSettings extends Component<
.then(function() {
self.reFetchData();
})
.catch(Toaster.createCatcher());
.catch(
Toaster.createCatcher(function() {
self.props.setLoading(false);
})
);
}
createCustomDomainRows() {
@@ -73,6 +73,8 @@ export default class Deployment extends ApiComponent<
self.props.apiData.appDefinition.appName!,
{
schemaVersion: 2,
// We should use imageName, but since imageName does not report build failure (since there is no build!)
// If we use that, and the image is not available, the service will not work.
dockerfileLines: ["FROM " + version.deployedImageName]
},
version.gitHash || "",