summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ogcp/translations/es/LC_MESSAGES/messages.po40
-rw-r--r--ogcp/views.py9
2 files changed, 30 insertions, 19 deletions
diff --git a/ogcp/translations/es/LC_MESSAGES/messages.po b/ogcp/translations/es/LC_MESSAGES/messages.po
index 88de07f..3994f64 100644
--- a/ogcp/translations/es/LC_MESSAGES/messages.po
+++ b/ogcp/translations/es/LC_MESSAGES/messages.po
@@ -5,9 +5,9 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: 1.0.0\n"
+"Project-Id-Version: 1.0.0\n"
"Report-Msgid-Bugs-To: opengnsys@soleta.eu\n"
-"POT-Creation-Date: 2022-01-11 16:10+0000\n"
+"POT-Creation-Date: 2022-01-14 09:01+0100\n"
"PO-Revision-Date: 2021-12-23 16:47+0100\n"
"Last-Translator: Soleta Networks <opengnsys@soleta.eu>\n"
"Language: es\n"
@@ -58,59 +58,67 @@ msgstr "Solicitud de perfil de software enviado con éxito"
msgid "Error processing software profile request: ({})"
msgstr "Error procesando la solicitud de perfil de software: ({})"
-#: views.py:640 views.py:768 views.py:783 views.py:915
+#: views.py:615
+msgid "ogServer: error adding client"
+msgstr "ogServer: error al añadir cliente"
+
+#: views.py:618
+msgid "Client added successfully"
+msgstr "Cliente añadido con éxito"
+
+#: views.py:643 views.py:771 views.py:786 views.py:918
msgid "OgServer replied with a non ok status code"
msgstr "OgServer respondió con un código de estado de error"
-#: views.py:642 views.py:917
+#: views.py:645 views.py:920
msgid "Delete client request processed successfully"
msgstr "Solicitud de eliminar cliente procesada con éxito"
-#: views.py:655
+#: views.py:658
msgid "Client set boot mode request sent successfully"
msgstr "Solicitud del cambio del modo de inicio del cliente enviado con éxito"
-#: views.py:657 views.py:687 views.py:694
+#: views.py:660 views.py:690 views.py:697
msgid "Ogserver replied with status code not ok"
msgstr "OgServer respondió con el código de estado de error"
-#: views.py:684
+#: views.py:687
msgid "Client set ogLive request sent successfully"
msgstr "Solicitud de cambio de ogLive enviada con éxito"
-#: views.py:770 views.py:785
+#: views.py:773 views.py:788
msgid "Refresh request processed successfully"
msgstr "Solicitud de actualización procesada con éxito"
-#: views.py:797
+#: views.py:800
msgid "Server replied with error code when adding the center"
msgstr "El servidor respondió con el código de error al agregar el centro."
-#: views.py:800
+#: views.py:803
msgid "Center added successfully"
msgstr "Centro añadido con éxito"
-#: views.py:813
+#: views.py:816
msgid "Server replied with error code when deleting the center"
msgstr "El servidor respondió con el código de error al eliminar el centro"
-#: views.py:816
+#: views.py:819
msgid "Center deleted successfully"
msgstr "Centro eliminado con éxito"
-#: views.py:835
+#: views.py:838
msgid "Server replied with error code when adding the room"
msgstr "El servidor respondió con el código de error al agregar la sala."
-#: views.py:837
+#: views.py:840
msgid "Room added successfully"
msgstr "Sala añadida con éxito"
-#: views.py:854
+#: views.py:857
msgid "Server replied with error code when deleting the room"
msgstr "El servidor respondió con el código de error al eliminar la sala."
-#: views.py:857
+#: views.py:860
msgid "Room deleted successfully"
msgstr "Sala eliminada con éxito"
diff --git a/ogcp/views.py b/ogcp/views.py
index 07a54ae..c309003 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -611,9 +611,12 @@ def action_client_add():
"serial_number": form.serial_number.data}
r = g.server.post('/client/add', payload)
- if r.status_code == requests.codes.ok:
- return make_response("200 OK", 200)
- return make_response("400 Bad Request", 400)
+ if r.status_code != requests.codes.ok:
+ flash(_('ogServer: error adding client'),
+ category='error')
+ else:
+ flash(_('Client added successfully'), category='info')
+ return redirect(url_for("scopes"))
else:
r = g.server.get('/mode')
available_modes = [(mode, mode) for mode in r.json()['modes']]