outposts: handle docker connection error on init

This commit is contained in:
Jens Langhammer 2020-10-22 12:49:48 +02:00
parent 8eca76e464
commit 7b5a0964b2
2 changed files with 5 additions and 1 deletions

View File

@ -24,7 +24,10 @@ class DockerController(BaseController):
def __init__(self, outpost: Outpost) -> None: def __init__(self, outpost: Outpost) -> None:
super().__init__(outpost) super().__init__(outpost)
try:
self.client = from_env() self.client = from_env()
except DockerException as exc:
raise ControllerException from exc
def _get_labels(self) -> Dict[str, str]: def _get_labels(self) -> Dict[str, str]:
return {} return {}

View File

@ -24,6 +24,7 @@
<label class="pf-c-form__label" for="help-text-simple-form-name"> <label class="pf-c-form__label" for="help-text-simple-form-name">
<span class="pf-c-form__label-text">PASSBOOK_TOKEN</span> <span class="pf-c-form__label-text">PASSBOOK_TOKEN</span>
</label> </label>
{# TODO: Only load key on modal open #}
<input class="pf-c-form-control" data-pb-fetch-key="key" data-pb-fetch-fill="{% url 'passbook_api:token-view-key' identifier=outpost.token_identifier %}" readonly type="text" value="" /> <input class="pf-c-form-control" data-pb-fetch-key="key" data-pb-fetch-fill="{% url 'passbook_api:token-view-key' identifier=outpost.token_identifier %}" readonly type="text" value="" />
</div> </div>
<h3>{% trans 'If your passbook Instance is using a self-signed certificate, set this value.' %}</h3> <h3>{% trans 'If your passbook Instance is using a self-signed certificate, set this value.' %}</h3>