diff --git a/assets/css/opencast.scss b/assets/css/opencast.scss index b433b250d..8f2b9703e 100644 --- a/assets/css/opencast.scss +++ b/assets/css/opencast.scss @@ -717,6 +717,11 @@ h2.oc--loadingbar, .oc--loadingbar-title { text-align: right; margin-right: 10px; } + + .oc--admin--server-icons { + float: left; + margin-top: 8px; + } } .oc--admin--server-data { diff --git a/lib/Models/Config.php b/lib/Models/Config.php index 2426442fe..10c7fefca 100644 --- a/lib/Models/Config.php +++ b/lib/Models/Config.php @@ -189,13 +189,24 @@ public function updateEndpoints($container) $comp = $services_client->getRESTComponents(); } catch(\Exception $e) { - return [ - 'type' => 'error', - 'text' => sprintf( - _('%s'), - $e->getMessage() - ) - ]; + if (str_starts_with($e->getMessage(), 'cURL error 6')) { + return [ + 'type' => 'error', + 'text' => sprintf( + _('Die angegebene URL %s konnte nicht gefunden werden. Überprüfen Sie bitte ihre Eingabe und versuchen Sie es erneut.'), + $service_host + ) + ]; + } + else { + return [ + 'type' => 'error', + 'text' => sprintf( + _('%s'), + $e->getMessage() + ) + ]; + } } } catch (AccessDeniedException $e) { Endpoints::removeEndpoint($this->id, 'services'); @@ -203,7 +214,7 @@ public function updateEndpoints($container) $message = [ 'type' => 'error', 'text' => sprintf( - _('Fehlerhafte Zugangsdaten für die Opencast Installation mit der URL "%s". Überprüfen Sie bitte die eingebenen Daten.'), + _('Fehlerhafte Zugangsdaten für die Opencast Installation mit der URL "%s". Überprüfen Sie bitte die eingegebenen Daten.'), $service_host ) ]; @@ -252,8 +263,6 @@ public function updateEndpoints($container) 'type' => 'success', 'text' => implode('
', $success_message) ]; - - $config_checked = true; } } else { $message = [ diff --git a/lib/Routes/Config/ConfigAdd.php b/lib/Routes/Config/ConfigAdd.php index dfcf39f26..51a52450d 100644 --- a/lib/Routes/Config/ConfigAdd.php +++ b/lib/Routes/Config/ConfigAdd.php @@ -25,7 +25,6 @@ public function __invoke(Request $request, Response $response, $args) $json = $this->getRequestData($request); - $config_checked = false; $duplicate_url = false; // check, if a config with the same data already exists: @@ -68,7 +67,7 @@ public function __invoke(Request $request, Response $response, $args) $ret_config = array_merge($ret_config, $ret_config['settings']); unset($ret_config['settings']); - if ($config_checked) { + if ($message['type'] == 'success') { $lti = LtiHelper::getLaunchData($config->id); return $this->createResponse([ diff --git a/lib/Routes/Config/ConfigEdit.php b/lib/Routes/Config/ConfigEdit.php index b994a1ae9..705b1c545 100644 --- a/lib/Routes/Config/ConfigEdit.php +++ b/lib/Routes/Config/ConfigEdit.php @@ -24,7 +24,6 @@ public function __invoke(Request $request, Response $response, $args) $json = $this->getRequestData($request); - $config_checked = false; $duplicate_url = false; $config = Config::find($args['id']); @@ -49,7 +48,7 @@ public function __invoke(Request $request, Response $response, $args) $ret_config = array_merge($ret_config, $ret_config['settings']); unset($ret_config['settings']); - if ($config_checked) { + if ($message['type'] == 'success') { $lti = LtiHelper::getLaunchData($config->id); return $this->createResponse([ diff --git a/vueapp/components/Config/EditServer.vue b/vueapp/components/Config/EditServer.vue index 778ff99f0..a0554cc4b 100644 --- a/vueapp/components/Config/EditServer.vue +++ b/vueapp/components/Config/EditServer.vue @@ -26,7 +26,7 @@ @updateValue="updateValue" /> - + @@ -34,7 +34,7 @@