Modified endpoints to match new naming convention

This commit is contained in:
Charles
2021-09-01 09:02:20 -04:00
parent 1900a2cc1e
commit ac0398d8f3
40 changed files with 205 additions and 117 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "ucentral-client",
"version": "2.1.0",
"version": "2.1.1",
"dependencies": {
"@coreui/coreui": "^3.4.0",
"@coreui/icons": "^2.0.1",
@@ -26,7 +26,7 @@
"react-tooltip": "^4.2.21",
"react-widgets": "^5.1.1",
"sass": "^1.35.1",
"ucentral-libs": "^0.8.82",
"ucentral-libs": "^0.8.93",
"uuid": "^8.3.2"
},
"main": "index.js",

View File

@@ -81,6 +81,7 @@
"endpoint": "Endpunkt",
"endpoints": "Endpunkte",
"error": "Fehler",
"error_adding_note": "Fehler beim Hinzufügen einer Notiz",
"execute_now": "Möchten Sie diesen Befehl jetzt ausführen?",
"executed": "Ausgeführt",
"exit": "Ausgang",
@@ -136,6 +137,7 @@
"serial_number": "Seriennummer",
"show_all": "Zeige alles",
"start": "Start",
"stop_editing": "Stoppen Sie die Bearbeitung",
"submit": "Absenden",
"submitted": "Eingereicht",
"success": "Erfolg",
@@ -196,14 +198,20 @@
"add_failure": "Fehler, der Server hat zurückgegeben: {{error}}",
"add_root": "Root-Entität hinzufügen",
"add_success": "Entität erfolgreich erstellt!",
"assigned_inventory": "Zugewiesenes Inventar",
"cannot_delete": "Entitäten mit untergeordneten Elementen können nicht gelöscht werden. Löschen Sie die untergeordneten Elemente dieser Entität, um sie löschen zu können.",
"delete_success": "Entität erfolgreich gelöscht",
"delete_warning": "Achtung: Dieser Vorgang kann nicht rückgängig gemacht werden",
"edit_failure": "Aktualisierung fehlgeschlagen : {{error}}",
"entities": "Entitäten",
"entity": "Entität",
"error_fetch_entity": "Fehler beim Abrufen von Entitätsinformationen",
"error_fetching": "Fehler beim Abrufen von Entitäten",
"error_saving": "Fehler beim Speichern der Entität",
"not_assigned": "Nicht zugeordnet",
"only_unassigned": "Nur nicht zugewiesen",
"valid_serial": "Muss eine gültige Seriennummer sein (12 HEX-Zeichen)"
"valid_serial": "Muss eine gültige Seriennummer sein (12 HEX-Zeichen)",
"venues": "Veranstaltungsorte"
},
"factory_reset": {
"redirector": "Gatewaykonfiguration beibehalten:",
@@ -251,17 +259,32 @@
"title": "Gesundheitzustand"
},
"inventory": {
"add_child": "Untergeordneten Veranstaltungsort hinzufügen",
"add_child_venue": "Untergeordneten Veranstaltungsort zu {{entityName}}hinzufügen",
"add_tag": "Tag hinzufügen",
"add_tag": "Tag erstellen",
"add_tag_to": "Inventar-Tag zu {{name}}hinzufügen",
"add_venue": "Veranstaltungsort hinzufügen",
"assign_entity_instructions": "Sie können die Entität, der dieses Tag zugewiesen werden soll, entweder über das Menü unten finden oder die UUID der Entität manuell in das Feld oben einfügen.",
"assign_error": "Fehler beim Versuch, Tag zuzuweisen",
"assign_to_entity": "Zu Entität zuweisen",
"close_entity_menu": "Menü \"Entität bearbeiten\" schließen",
"delete_tag": "Tag endgültig löschen",
"deletion_failure": "Löschfehler",
"error_create_venue": "Fehler beim Erstellen des Veranstaltungsortes",
"error_delete_tag": "Fehler beim Löschen des Inventar-Tags",
"error_get_venue": "Fehler beim Abrufen von Veranstaltungsorten",
"error_retrieving": "Beim Abrufen von Inventar-Tags ist ein Fehler aufgetreten",
"error_unassign": "Fehler beim Aufheben der Zuweisung",
"error_update_venue": "Fehler beim Aktualisieren des Veranstaltungsorts",
"error_venue_delete": "Fehler beim Löschen des Veranstaltungsortes",
"subscriber": "Teilnehmer",
"successful_assign": "Tag erfolgreich zugewiesen",
"successful_tag_delete": "Inventar-Tag erfolgreich gelöscht",
"successful_tag_update": "Tag erfolgreich aktualisiert",
"successful_unassign": "Vorgang zum Aufheben der Zuweisung war erfolgreich",
"successful_venue_create": "Erfolgreich erstellter Veranstaltungsort",
"successful_venue_delete": "Veranstaltungsort erfolgreich gelöscht",
"successful_venue_update": "Erfolgreich aktualisierter Veranstaltungsort",
"tag_created": "Inventar-Tag erfolgreich erstellt",
"tag_creation_error": "Fehler beim Versuch, Inventar-Tag zu erstellen",
"tag_update_error": "Fehler beim Aktualisieren des Tags",

View File

@@ -81,6 +81,7 @@
"endpoint": "Endpoint",
"endpoints": "Endpoints",
"error": "Error",
"error_adding_note": "Error while adding note",
"execute_now": "Would you like to execute this command now?",
"executed": "Executed",
"exit": "Exit",
@@ -136,6 +137,7 @@
"serial_number": "Serial Number",
"show_all": "Show All",
"start": "Start",
"stop_editing": "Stop Editing",
"submit": "Submit",
"submitted": "Submitted",
"success": "Success",
@@ -196,14 +198,20 @@
"add_failure": "Error, the server returned : {{error}}",
"add_root": "Add Root Entity",
"add_success": "Entity Successfully Created!",
"assigned_inventory": "Assigned Inventory",
"cannot_delete": "You cannot delete entities which have children. Delete this entity's children to be able to delete it.",
"delete_success": "Entity Successfully Deleted",
"delete_warning": "Warning: this operation cannot be reverted",
"edit_failure": "Update unsuccessful : {{error}}",
"entities": "Entities",
"entity": "Entity",
"error_fetch_entity": "Error while fetching entity information",
"error_fetching": "Error while fetching entities",
"error_saving": "Error while saving entity",
"not_assigned": "Not Assigned",
"only_unassigned": "Only Unassigned",
"valid_serial": "Needs to be a valid serial number (12 HEX characters)"
"valid_serial": "Needs to be a valid serial number (12 HEX characters)",
"venues": "Venues"
},
"factory_reset": {
"redirector": "Keep redirector: ",
@@ -251,17 +259,32 @@
"title": "Health"
},
"inventory": {
"add_child": "Add Child Venue",
"add_child_venue": "Add Child Venue to {{entityName}}",
"add_tag": "Add Tag",
"add_tag": "Create Tag",
"add_tag_to": "Add Inventory Tag to {{name}}",
"add_venue": "Add Venue",
"assign_entity_instructions": "You can either find the entity you want this tag to be assigned to by using the menu below, or you can manually paste the entity's UUID in the field above.",
"assign_error": "Error while trying to assign tag",
"assign_to_entity": "Assign to Entity",
"close_entity_menu": "Close Edit Entity Menu",
"delete_tag": "Permanently Delete Tag",
"deletion_failure": "Deletion error",
"error_create_venue": "Error while creating venue",
"error_delete_tag": "Error while deleting inventory tag",
"error_get_venue": "Error while retrieving venues",
"error_retrieving": "Error occurred while retrieving inventory tags",
"error_unassign": "Error during unassign operation",
"error_update_venue": "Error while updating venue",
"error_venue_delete": "Error while deleting venue",
"subscriber": "Subscriber",
"successful_assign": "Tag successfully assigned",
"successful_tag_delete": "Inventory Tag Successfully Deleted",
"successful_tag_update": "Successfully updated tag",
"successful_unassign": "Unassign operation was successful",
"successful_venue_create": "Successfully Created Venue",
"successful_venue_delete": "Venue successfully deleted",
"successful_venue_update": "Successfully Updated Venue",
"tag_created": "Inventory tag successfully created",
"tag_creation_error": "Error while trying to create inventory tag",
"tag_update_error": "Error while updating tag",

View File

@@ -81,6 +81,7 @@
"endpoint": "punto final",
"endpoints": "Puntos finales",
"error": "Error",
"error_adding_note": "Error al agregar una nota",
"execute_now": "¿Le gustaría ejecutar este comando ahora?",
"executed": "ejecutado",
"exit": "salida",
@@ -136,6 +137,7 @@
"serial_number": "Número de serie",
"show_all": "Mostrar todo",
"start": "comienzo",
"stop_editing": "Dejar de editar",
"submit": "Enviar",
"submitted": "Presentado",
"success": "Éxito",
@@ -196,14 +198,20 @@
"add_failure": "Error, el servidor devolvió: {{error}}",
"add_root": "Agregar entidad raíz",
"add_success": "¡Entidad creada con éxito!",
"assigned_inventory": "Inventario asignado",
"cannot_delete": "No puede eliminar entidades que tienen hijos. Elimina los hijos de esta entidad para poder eliminarla.",
"delete_success": "Entidad eliminada correctamente",
"delete_warning": "Advertencia: esta operación no se puede revertir",
"edit_failure": "Actualización fallida: {{error}}",
"entities": "entidades",
"entity": "Entidad",
"error_fetch_entity": "Error al obtener la información de la entidad",
"error_fetching": "Error al recuperar entidades",
"error_saving": "Error al guardar la entidad",
"not_assigned": "No asignado",
"only_unassigned": "Solo sin asignar",
"valid_serial": "Debe ser un número de serie válido (12 caracteres HEX)"
"valid_serial": "Debe ser un número de serie válido (12 caracteres HEX)",
"venues": "Sedes"
},
"factory_reset": {
"redirector": "Mantener el redirector:",
@@ -251,17 +259,32 @@
"title": "Salud"
},
"inventory": {
"add_child": "Agregar lugar secundario",
"add_child_venue": "Agregar lugar infantil a {{entityName}}",
"add_tag": "Añadir etiqueta",
"add_tag": "Crear etiqueta",
"add_tag_to": "Agregar etiqueta de inventario a {{name}}",
"add_venue": "Agregar lugar",
"assign_entity_instructions": "Puede encontrar la entidad a la que desea que se asigne esta etiqueta utilizando el menú a continuación, o puede pegar manualmente el UUID de la entidad en el campo de arriba.",
"assign_error": "Error al intentar asignar la etiqueta",
"assign_to_entity": "Asignar a entidad",
"close_entity_menu": "Cerrar el menú Editar entidad",
"delete_tag": "Eliminar etiqueta permanentemente",
"deletion_failure": "Error de borrado",
"error_create_venue": "Error al crear el lugar",
"error_delete_tag": "Error al eliminar la etiqueta de inventario",
"error_get_venue": "Error al recuperar lugares",
"error_retrieving": "Se produjo un error al recuperar las etiquetas de inventario",
"error_unassign": "Error durante la operación de anulación de asignación",
"error_update_venue": "Error al actualizar el lugar",
"error_venue_delete": "Error al eliminar el lugar",
"subscriber": "Abonado",
"successful_assign": "Etiqueta asignada correctamente",
"successful_tag_delete": "Etiqueta de inventario eliminada correctamente",
"successful_tag_update": "Etiqueta actualizada correctamente",
"successful_unassign": "La operación de anulación de asignación se realizó correctamente",
"successful_venue_create": "Lugar creado con éxito",
"successful_venue_delete": "Lugar eliminado correctamente",
"successful_venue_update": "Lugar actualizado con éxito",
"tag_created": "Etiqueta de inventario creada correctamente",
"tag_creation_error": "Error al intentar crear una etiqueta de inventario",
"tag_update_error": "Error al actualizar la etiqueta",

View File

@@ -81,6 +81,7 @@
"endpoint": "Point final",
"endpoints": "Points de terminaison",
"error": "Erreur",
"error_adding_note": "Erreur lors de l'ajout de la note",
"execute_now": "Souhaitez-vous exécuter cette commande maintenant ?",
"executed": "réalisé",
"exit": "Sortie",
@@ -136,6 +137,7 @@
"serial_number": "Numéro de série",
"show_all": "Montre tout",
"start": "Début",
"stop_editing": "Arrêter la modification",
"submit": "Soumettre",
"submitted": "Soumis",
"success": "Succès",
@@ -196,14 +198,20 @@
"add_failure": "Erreur, le serveur a renvoyé : {{error}}",
"add_root": "Ajouter une entité racine",
"add_success": "Entité créée avec succès !",
"assigned_inventory": "Inventaire assigné",
"cannot_delete": "Vous ne pouvez pas supprimer des entités qui ont des enfants. Supprimez les enfants de cette entité pour pouvoir la supprimer.",
"delete_success": "Entité supprimée avec succès",
"delete_warning": "Attention : cette opération ne peut pas être annulée",
"edit_failure": "Échec de la mise à jour : {{error}}",
"entities": "Entités",
"entity": "Entité",
"error_fetch_entity": "Erreur lors de la récupération des informations sur l'entité",
"error_fetching": "Erreur lors de la récupération des entités",
"error_saving": "Erreur lors de l'enregistrement de l'entité",
"not_assigned": "Non attribué",
"only_unassigned": "Uniquement non attribué",
"valid_serial": "Doit être un numéro de série valide (12 caractères HEX)"
"valid_serial": "Doit être un numéro de série valide (12 caractères HEX)",
"venues": "Les lieux"
},
"factory_reset": {
"redirector": "Conserver le redirecteur :",
@@ -251,17 +259,32 @@
"title": "Santé"
},
"inventory": {
"add_child": "Ajouter un lieu enfant",
"add_child_venue": "Ajouter un lieu enfant à {{entityName}}",
"add_tag": "Ajouter une étiquette",
"add_tag": "Créer un tag",
"add_tag_to": "Ajouter une balise d'inventaire à {{name}}",
"add_venue": "Ajouter un lieu",
"assign_entity_instructions": "Vous pouvez soit trouver l'entité à laquelle vous souhaitez que cette balise soit attribuée en utilisant le menu ci-dessous, soit coller manuellement l'UUID de l'entité dans le champ ci-dessus.",
"assign_error": "Erreur lors de la tentative d'attribution de balise",
"assign_to_entity": "Affecter à l'entité",
"close_entity_menu": "Fermer le menu Modifier l'entité",
"delete_tag": "Supprimer définitivement la balise",
"deletion_failure": "Erreur de suppression",
"error_create_venue": "Erreur lors de la création du lieu",
"error_delete_tag": "Erreur lors de la suppression de la balise d'inventaire",
"error_get_venue": "Erreur lors de la récupération des lieux",
"error_retrieving": "Une erreur s'est produite lors de la récupération des balises d'inventaire",
"error_unassign": "Erreur lors de l'opération de désaffectation",
"error_update_venue": "Erreur lors de la mise à jour du lieu",
"error_venue_delete": "Erreur lors de la suppression du lieu",
"subscriber": "Abonné",
"successful_assign": "Tag attribué avec succès",
"successful_tag_delete": "Balise d'inventaire supprimée avec succès",
"successful_tag_update": "Balise mise à jour avec succès",
"successful_unassign": "L'opération de désaffectation a réussi",
"successful_venue_create": "Lieu créé avec succès",
"successful_venue_delete": "Lieu supprimé avec succès",
"successful_venue_update": "Lieu mis à jour avec succès",
"tag_created": "Tag d'inventaire créé avec succès",
"tag_creation_error": "Erreur lors de la tentative de création d'une balise d'inventaire",
"tag_update_error": "Erreur lors de la mise à jour de la balise",

View File

@@ -81,6 +81,7 @@
"endpoint": "Ponto final",
"endpoints": "Pontos finais",
"error": "Erro",
"error_adding_note": "Erro ao adicionar nota",
"execute_now": "Você gostaria de executar este comando agora?",
"executed": "Executado",
"exit": "Saída",
@@ -136,6 +137,7 @@
"serial_number": "Número de série",
"show_all": "mostre tudo",
"start": "Começar",
"stop_editing": "Pare de editar",
"submit": "Enviar",
"submitted": "Submetido",
"success": "Sucesso",
@@ -196,14 +198,20 @@
"add_failure": "Erro, o servidor retornou: {{error}}",
"add_root": "Adicionar Entidade Raiz",
"add_success": "Entidade criada com sucesso!",
"assigned_inventory": "Estoque Atribuído",
"cannot_delete": "Você não pode excluir entidades que têm filhos. Exclua os filhos desta entidade para poder excluí-la.",
"delete_success": "Entidade excluída com sucesso",
"delete_warning": "Aviso: esta operação não pode ser revertida",
"edit_failure": "Atualização malsucedida: {{error}}",
"entities": "Entidades",
"entity": "Entidade",
"error_fetch_entity": "Erro ao buscar informações da entidade",
"error_fetching": "Erro ao buscar entidades",
"error_saving": "Erro ao salvar entidade",
"not_assigned": "Não atribuído",
"only_unassigned": "Apenas não atribuídos",
"valid_serial": "Precisa ser um número de série válido (12 caracteres HEX)"
"valid_serial": "Precisa ser um número de série válido (12 caracteres HEX)",
"venues": "Locais"
},
"factory_reset": {
"redirector": "Manter redirecionador:",
@@ -251,17 +259,32 @@
"title": "Saúde"
},
"inventory": {
"add_child": "Adicionar local infantil",
"add_child_venue": "Adicionar Local Infantil a {{entityName}}",
"add_tag": "Adicionar etiqueta",
"add_tag": "Criar tag",
"add_tag_to": "Adicionar tag de estoque a {{name}}",
"add_venue": "Adicionar Local",
"assign_entity_instructions": "Você pode encontrar a entidade à qual deseja que esta tag seja atribuída usando o menu abaixo ou pode colar manualmente o UUID da entidade no campo acima.",
"assign_error": "Erro ao tentar atribuir tag",
"assign_to_entity": "Atribuir à Entidade",
"close_entity_menu": "Fechar Menu Editar Entidade",
"delete_tag": "Excluir tag permanentemente",
"deletion_failure": "Erro de exclusão",
"error_create_venue": "Erro ao criar local",
"error_delete_tag": "Erro ao excluir tag de inventário",
"error_get_venue": "Erro ao recuperar locais",
"error_retrieving": "Ocorreu um erro ao recuperar as tags de inventário",
"error_unassign": "Erro durante operação de cancelamento de atribuição",
"error_update_venue": "Erro ao atualizar o local",
"error_venue_delete": "Erro ao excluir local",
"subscriber": "Assinante",
"successful_assign": "Tag atribuída com sucesso",
"successful_tag_delete": "Tag de inventário excluída com sucesso",
"successful_tag_update": "Tag atualizada com sucesso",
"successful_unassign": "A operação de cancelamento da atribuição foi bem-sucedida",
"successful_venue_create": "Local criado com sucesso",
"successful_venue_delete": "Local excluído com sucesso",
"successful_venue_update": "Local atualizado com sucesso",
"tag_created": "Tag de inventário criada com sucesso",
"tag_creation_error": "Erro ao tentar criar etiqueta de inventário",
"tag_update_error": "Erro ao atualizar tag",

View File

@@ -70,7 +70,7 @@ const BlinkModal = ({ show, toggleModal }) => {
axiosInstance
.post(
`${endpoints.ucentralgw}/api/v1/device/${encodeURIComponent(deviceSerialNumber)}/leds`,
`${endpoints.owgw}/api/v1/device/${encodeURIComponent(deviceSerialNumber)}/leds`,
parameters,
{ headers },
)

View File

@@ -113,7 +113,7 @@ const DeviceCommands = () => {
axiosInstance
.get(
`${endpoints.ucentralgw}/api/v1/commands?serialNumber=${encodeURIComponent(
`${endpoints.owgw}/api/v1/commands?serialNumber=${encodeURIComponent(
deviceSerialNumber,
)}${extraParams}`,
options,
@@ -138,10 +138,7 @@ const DeviceCommands = () => {
};
axiosInstance
.get(
`${endpoints.ucentralgw}/api/v1/file/${uuid}?serialNumber=${deviceSerialNumber}`,
options,
)
.get(`${endpoints.owgw}/api/v1/file/${uuid}?serialNumber=${deviceSerialNumber}`, options)
.then((response) => {
const blob = new Blob([response.data], { type: 'application/octet-stream' });
const link = document.createElement('a');
@@ -162,7 +159,7 @@ const DeviceCommands = () => {
},
};
return axiosInstance
.delete(`${endpoints.ucentralgw}/api/v1/command/${uuidDelete}`, options)
.delete(`${endpoints.owgw}/api/v1/command/${uuidDelete}`, options)
.then(() => {
deleteCommandFromList(uuidDelete);
setUuidDelete('');

View File

@@ -83,7 +83,7 @@ const ConfigureModal = ({ show, toggleModal }) => {
axiosInstance
.post(
`${endpoints.ucentralgw}/api/v1/device/${encodeURIComponent(deviceSerialNumber)}/configure`,
`${endpoints.owgw}/api/v1/device/${encodeURIComponent(deviceSerialNumber)}/configure`,
parameters,
{ headers },
)

View File

@@ -91,7 +91,7 @@ const CreateUserModal = ({ show, toggle, getUsers }) => {
};
axiosInstance
.post(`${endpoints.ucentralsec}/api/v1/user/0`, parameters, {
.post(`${endpoints.owsec}/api/v1/user/0`, parameters, {
headers,
})
.then(() => {
@@ -123,11 +123,11 @@ const CreateUserModal = ({ show, toggle, getUsers }) => {
const getPasswordPolicy = () => {
axiosInstance
.post(`${endpoints.ucentralsec}/api/v1/oauth2?requirements=true`, {})
.post(`${endpoints.owsec}/api/v1/oauth2?requirements=true`, {})
.then((response) => {
const newPolicies = response.data;
newPolicies.accessPolicy = `${endpoints.ucentralsec}${newPolicies.accessPolicy}`;
newPolicies.passwordPolicy = `${endpoints.ucentralsec}${newPolicies.passwordPolicy}`;
newPolicies.accessPolicy = `${endpoints.owsec}${newPolicies.accessPolicy}`;
newPolicies.passwordPolicy = `${endpoints.owsec}${newPolicies.passwordPolicy}`;
setPolicies(response.data);
})
.catch(() => {});

View File

@@ -34,7 +34,7 @@ const DeleteLogModal = ({ show, toggle, object }) => {
},
};
return axiosInstance
.delete(`${endpoints.ucentralgw}/api/v1/device/${deviceSerialNumber}/${object}`, options)
.delete(`${endpoints.owgw}/api/v1/device/${deviceSerialNumber}/${object}`, options)
.then(() => {})
.catch(() => {})
.finally(() => {

View File

@@ -74,7 +74,7 @@ const DeviceActions = () => {
axiosInstance
.get(
`${endpoints.ucentralgw}/api/v1/device/${encodeURIComponent(deviceSerialNumber)}/rtty`,
`${endpoints.owgw}/api/v1/device/${encodeURIComponent(deviceSerialNumber)}/rtty`,
options,
)
.then((response) => {
@@ -97,7 +97,7 @@ const DeviceActions = () => {
};
axiosInstance
.get(`${endpoints.ucentralgw}/api/v1/device/${deviceSerialNumber}`, options)
.get(`${endpoints.owgw}/api/v1/device/${deviceSerialNumber}`, options)
.then((response) => {
setDevice(response.data);
})

View File

@@ -57,10 +57,7 @@ const DeviceConfiguration = () => {
};
axiosInstance
.get(
`${endpoints.ucentralgw}/api/v1/device/${encodeURIComponent(deviceSerialNumber)}`,
options,
)
.get(`${endpoints.owgw}/api/v1/device/${encodeURIComponent(deviceSerialNumber)}`, options)
.then((response) => {
setDevice(response.data);
})
@@ -82,7 +79,7 @@ const DeviceConfiguration = () => {
axiosInstance
.put(
`${endpoints.ucentralgw}/api/v1/device/${encodeURIComponent(deviceSerialNumber)}`,
`${endpoints.owgw}/api/v1/device/${encodeURIComponent(deviceSerialNumber)}`,
parameters,
{ headers },
)

View File

@@ -25,7 +25,7 @@ const DeviceFirmwareModal = ({
};
axiosInstance
.get(`${endpoints.ucentralfms}/api/v1/firmwares?deviceType=${device.compatible}`, {
.get(`${endpoints.owfms}/api/v1/firmwares?deviceType=${device.compatible}`, {
headers,
})
.then((response) => {
@@ -60,7 +60,7 @@ const DeviceFirmwareModal = ({
};
axiosInstance
.post(`${endpoints.ucentralgw}/api/v1/device/${device.serialNumber}/upgrade`, parameters, {
.post(`${endpoints.owgw}/api/v1/device/${device.serialNumber}/upgrade`, parameters, {
headers,
})
.then((response) => {

View File

@@ -85,7 +85,7 @@ const DeviceHealth = () => {
axiosInstance
.get(
`${endpoints.ucentralgw}/api/v1/device/${encodeURIComponent(
`${endpoints.owgw}/api/v1/device/${encodeURIComponent(
deviceSerialNumber,
)}/healthchecks${extraParams}`,
options,

View File

@@ -68,9 +68,7 @@ const DeviceList = () => {
axiosInstance
.get(
`${
endpoints.ucentralgw
}/api/v1/devices?deviceWithStatus=true&limit=${devicePerPage}&offset=${
`${endpoints.owgw}/api/v1/devices?deviceWithStatus=true&limit=${devicePerPage}&offset=${
devicePerPage * selectedPage + 1
}`,
options,
@@ -80,7 +78,7 @@ const DeviceList = () => {
const serialsToGet = fullDevices.map((device) => device.serialNumber);
return axiosInstance.get(
`${endpoints.ucentralfms}/api/v1/firmwareAge?select=${serialsToGet}`,
`${endpoints.owfms}/api/v1/firmwareAge?select=${serialsToGet}`,
options,
);
})
@@ -115,7 +113,7 @@ const DeviceList = () => {
};
axiosInstance
.get(`${endpoints.ucentralgw}/api/v1/devices?countOnly=true`, {
.get(`${endpoints.owgw}/api/v1/devices?countOnly=true`, {
headers,
})
.then((response) => {
@@ -149,7 +147,7 @@ const DeviceList = () => {
axiosInstance
.get(
`${endpoints.ucentralgw}/api/v1/devices?deviceWithStatus=true&select=${encodeURIComponent(
`${endpoints.owgw}/api/v1/devices?deviceWithStatus=true&select=${encodeURIComponent(
serialNumber,
)}`,
options,
@@ -203,7 +201,7 @@ const DeviceList = () => {
axiosInstance
.get(
`${endpoints.ucentralfms}/api/v1/firmwares?deviceType=${device.compatible}&latestOnly=true`,
`${endpoints.owfms}/api/v1/firmwares?deviceType=${device.compatible}&latestOnly=true`,
options,
)
.then((response) => {
@@ -214,7 +212,7 @@ const DeviceList = () => {
uri: response.data.uri,
};
return axiosInstance.post(
`${endpoints.ucentralgw}/api/v1/device/${device.serialNumber}/upgrade`,
`${endpoints.owgw}/api/v1/device/${device.serialNumber}/upgrade`,
parameters,
options,
);
@@ -259,10 +257,7 @@ const DeviceList = () => {
};
axiosInstance
.get(
`${endpoints.ucentralgw}/api/v1/device/${encodeURIComponent(serialNumber)}/rtty`,
options,
)
.get(`${endpoints.owgw}/api/v1/device/${encodeURIComponent(serialNumber)}/rtty`, options)
.then((response) => {
const url = `https://${response.data.server}:${response.data.viewport}/connect/${response.data.connectionId}`;
const newWindow = window.open(url, '_blank', 'noopener,noreferrer');
@@ -291,7 +286,7 @@ const DeviceList = () => {
};
axiosInstance
.delete(`${endpoints.ucentralgw}/api/v1/device/${encodeURIComponent(serialNumber)}`, options)
.delete(`${endpoints.owgw}/api/v1/device/${encodeURIComponent(serialNumber)}`, options)
.then(() => {
addToast({
title: t('common.success'),

View File

@@ -82,7 +82,7 @@ const DeviceLogs = () => {
axiosInstance
.get(
`${endpoints.ucentralgw}/api/v1/device/${encodeURIComponent(
`${endpoints.owgw}/api/v1/device/${encodeURIComponent(
deviceSerialNumber,
)}/logs${extraParams}`,
options,

View File

@@ -24,7 +24,7 @@ const DeviceSearchBar = () => {
}
} else if (socket.readyState !== WebSocket.CONNECTING) {
setWaitingSearch(value);
setSocket(new WebSocket(`${endpoints.ucentralgw.replace('https', 'wss')}/api/v1/ws`));
setSocket(new WebSocket(`${endpoints.owgw.replace('https', 'wss')}/api/v1/ws`));
} else {
setWaitingSearch(value);
}
@@ -61,7 +61,7 @@ const DeviceSearchBar = () => {
useEffect(() => {
if (socket === null) {
setSocket(new WebSocket(`${endpoints.ucentralgw.replace('https', 'wss')}/api/v1/ws`));
setSocket(new WebSocket(`${endpoints.owgw.replace('https', 'wss')}/api/v1/ws`));
}
}, []);

View File

@@ -22,13 +22,13 @@ const DeviceStatusCard = () => {
};
const lastStatsRequest = axiosInstance.get(
`${endpoints.ucentralgw}/api/v1/device/${encodeURIComponent(
`${endpoints.owgw}/api/v1/device/${encodeURIComponent(
deviceSerialNumber,
)}/statistics?lastOnly=true`,
options,
);
const statusRequest = axiosInstance.get(
`${endpoints.ucentralgw}/api/v1/device/${encodeURIComponent(deviceSerialNumber)}/status`,
`${endpoints.owgw}/api/v1/device/${encodeURIComponent(deviceSerialNumber)}/status`,
options,
);

View File

@@ -61,11 +61,11 @@ const EditUserModal = ({ show, toggle, userId, getUsers }) => {
const getPasswordPolicy = () => {
axiosInstance
.post(`${endpoints.ucentralsec}/api/v1/oauth2?requirements=true`, {})
.post(`${endpoints.owsec}/api/v1/oauth2?requirements=true`, {})
.then((response) => {
const newPolicies = response.data;
newPolicies.accessPolicy = `${endpoints.ucentralsec}${newPolicies.accessPolicy}`;
newPolicies.passwordPolicy = `${endpoints.ucentralsec}${newPolicies.passwordPolicy}`;
newPolicies.accessPolicy = `${endpoints.owsec}${newPolicies.accessPolicy}`;
newPolicies.passwordPolicy = `${endpoints.owsec}${newPolicies.passwordPolicy}`;
setPolicies(response.data);
})
.catch(() => {});
@@ -80,7 +80,7 @@ const EditUserModal = ({ show, toggle, userId, getUsers }) => {
};
axiosInstance
.get(`${endpoints.ucentralsec}/api/v1/user/${userId}`, options)
.get(`${endpoints.owsec}/api/v1/user/${userId}`, options)
.then((response) => {
const newUser = {};
@@ -134,7 +134,7 @@ const EditUserModal = ({ show, toggle, userId, getUsers }) => {
};
axiosInstance
.put(`${endpoints.ucentralsec}/api/v1/user/${userId}`, parameters, options)
.put(`${endpoints.owsec}/api/v1/user/${userId}`, parameters, options)
.then(() => {
addToast({
title: t('user.update_success_title'),
@@ -186,7 +186,7 @@ const EditUserModal = ({ show, toggle, userId, getUsers }) => {
};
axiosInstance
.put(`${endpoints.ucentralsec}/api/v1/user/${userId}`, parameters, options)
.put(`${endpoints.owsec}/api/v1/user/${userId}`, parameters, options)
.then(() => {
getUser();
})

View File

@@ -28,11 +28,7 @@ const EventQueueModal = ({ show, toggle }) => {
};
axiosInstance
.post(
`${endpoints.ucentralgw}/api/v1/device/${deviceSerialNumber}/eventqueue`,
parameters,
options,
)
.post(`${endpoints.owgw}/api/v1/device/${deviceSerialNumber}/eventqueue`, parameters, options)
.then((response) => {
setResult(response.data);
})

View File

@@ -64,7 +64,7 @@ const ConfigureModal = ({ show, toggleModal }) => {
axiosInstance
.post(
`${endpoints.ucentralgw}/api/v1/device/${encodeURIComponent(deviceSerialNumber)}/factory`,
`${endpoints.owgw}/api/v1/device/${encodeURIComponent(deviceSerialNumber)}/factory`,
parameters,
{ headers },
)

View File

@@ -29,7 +29,7 @@ const FirmwareHistoryModal = ({ serialNumber, show, toggle }) => {
};
axiosInstance
.get(`${endpoints.ucentralfms}/api/v1/revisionHistory/${serialNumber}`, options)
.get(`${endpoints.owfms}/api/v1/revisionHistory/${serialNumber}`, options)
.then((response) => setData(response.data.history ?? []))
.catch(() => {})
.finally(() => setLoading(false));

View File

@@ -22,10 +22,7 @@ const UpgradeWaitingBody = ({ serialNumber }) => {
};
axiosInstance
.get(
`${endpoints.ucentralgw}/api/v1/device/${encodeURIComponent(serialNumber)}/status`,
options,
)
.get(`${endpoints.owgw}/api/v1/device/${encodeURIComponent(serialNumber)}/status`, options)
.then((response) => response.data.connected)
.catch(() => {});
};
@@ -39,7 +36,7 @@ const UpgradeWaitingBody = ({ serialNumber }) => {
};
axiosInstance
.get(`${endpoints.ucentralgw}/api/v1/device/${encodeURIComponent(serialNumber)}`, options)
.get(`${endpoints.owgw}/api/v1/device/${encodeURIComponent(serialNumber)}`, options)
.then((response) => response.data.firmware)
.catch(() => {});
};

View File

@@ -84,7 +84,7 @@ const FirmwareUpgradeModal = ({ show, toggleModal }) => {
const isConnected = await getDeviceConnection(
deviceSerialNumber,
currentToken,
endpoints.ucentralgw,
endpoints.owgw,
);
setDisableWaiting(!isConnected);
setDeviceConnected(isConnected);
@@ -110,7 +110,7 @@ const FirmwareUpgradeModal = ({ show, toggleModal }) => {
};
axiosInstance
.post(
`${endpoints.ucentralgw}/api/v1/device/${encodeURIComponent(deviceSerialNumber)}/upgrade`,
`${endpoints.owgw}/api/v1/device/${encodeURIComponent(deviceSerialNumber)}/upgrade`,
parameters,
{ headers },
)
@@ -160,7 +160,7 @@ const FirmwareUpgradeModal = ({ show, toggleModal }) => {
<CCol md="8">
<CInput
disabled={blockFields}
className={('form-control', { 'is-invalid': !validFirmware })}
className={`form-control ${!validFirmware ? 'is-invalid' : ''}`}
type="text"
id="uri"
name="uri-input"
@@ -194,7 +194,7 @@ const FirmwareUpgradeModal = ({ show, toggleModal }) => {
<DatePicker
selected={new Date(date)}
value={new Date(date)}
className={('form-control', { 'is-invalid': !validDate })}
className={`form-control ${!validDate ? 'is-invalid' : ''}`}
includeTime
disabled={blockFields}
onChange={(newDate) => setDate(newDate.toString())}

View File

@@ -28,7 +28,7 @@ const LatestStatisticsModal = ({ show, toggle }) => {
axiosInstance
.get(
`${endpoints.ucentralgw}/api/v1/device/${deviceSerialNumber}/statistics?lastOnly=true`,
`${endpoints.owgw}/api/v1/device/${deviceSerialNumber}/statistics?lastOnly=true`,
options,
)
.then((response) => {

View File

@@ -128,7 +128,7 @@ const StatisticsChartList = () => {
axiosInstance
.get(
`${endpoints.ucentralgw}/api/v1/device/${deviceSerialNumber}/statistics?newest=true&limit=50`,
`${endpoints.owgw}/api/v1/device/${deviceSerialNumber}/statistics?newest=true&limit=50`,
options,
)
.then((response) => {

View File

@@ -23,7 +23,7 @@ const LifetimeStatsModal = ({ show, toggle }) => {
axiosInstance
.get(
`${endpoints.ucentralgw}/api/v1/device/${deviceSerialNumber}/statistics?lifetime=true`,
`${endpoints.owgw}/api/v1/device/${deviceSerialNumber}/statistics?lifetime=true`,
options,
)
.then((response) => {

View File

@@ -64,7 +64,7 @@ const ActionModal = ({ show, toggleModal }) => {
axiosInstance
.post(
`${endpoints.ucentralgw}/api/v1/device/${encodeURIComponent(deviceSerialNumber)}/reboot`,
`${endpoints.owgw}/api/v1/device/${encodeURIComponent(deviceSerialNumber)}/reboot`,
parameters,
{ headers },
)

View File

@@ -21,7 +21,7 @@ const WaitingForTraceBody = ({ serialNumber, commandUuid, toggle }) => {
};
axiosInstance
.get(`${endpoints.ucentralgw}/api/v1/command/${encodeURIComponent(commandUuid)}`, options)
.get(`${endpoints.owgw}/api/v1/command/${encodeURIComponent(commandUuid)}`, options)
.then((response) => {
if (response.data.waitingForFile === 0) {
setWaitingForFile(false);
@@ -44,10 +44,7 @@ const WaitingForTraceBody = ({ serialNumber, commandUuid, toggle }) => {
};
axiosInstance
.get(
`${endpoints.ucentralgw}/api/v1/file/${commandUuid}?serialNumber=${serialNumber}`,
options,
)
.get(`${endpoints.owgw}/api/v1/file/${commandUuid}?serialNumber=${serialNumber}`, options)
.then((response) => {
const blob = new Blob([response.data], { type: 'application/octet-stream' });
const link = document.createElement('a');

View File

@@ -80,7 +80,7 @@ const TraceModal = ({ show, toggleModal }) => {
axiosInstance
.post(
`${endpoints.ucentralgw}/api/v1/device/${encodeURIComponent(deviceSerialNumber)}/trace`,
`${endpoints.owgw}/api/v1/device/${encodeURIComponent(deviceSerialNumber)}/trace`,
parameters,
{ headers },
)
@@ -108,7 +108,7 @@ const TraceModal = ({ show, toggleModal }) => {
const isConnected = await getDeviceConnection(
deviceSerialNumber,
currentToken,
endpoints.ucentralgw,
endpoints.owgw,
);
setIsDeviceConnected(isConnected);
};

View File

@@ -98,7 +98,7 @@ const WifiScanModal = ({ show, toggleModal }) => {
axiosInstance
.post(
`${endpoints.ucentralgw}/api/v1/device/${encodeURIComponent(deviceSerialNumber)}/wifiscan`,
`${endpoints.owgw}/api/v1/device/${encodeURIComponent(deviceSerialNumber)}/wifiscan`,
parameters,
{ headers },
)

View File

@@ -89,7 +89,7 @@ const TheLayout = () => {
<PageContainer t={t} routes={routes} redirectTo="/devices" />
</ToastProvider>
</div>
<Footer t={t} version="2.1.0" />
<Footer t={t} version="2.1.1" />
</div>
</div>
);

View File

@@ -338,7 +338,7 @@ const DeviceDashboard = () => {
Authorization: `Bearer ${currentToken}`,
};
axiosInstance
.get(`${endpoints.ucentralgw}/api/v1/deviceDashboard`, {
.get(`${endpoints.owgw}/api/v1/deviceDashboard`, {
headers,
})
.then((response) => {

View File

@@ -43,7 +43,7 @@ const FirmwareDashboard = () => {
};
return axiosInstance
.get(`${endpoints.ucentralgw}/api/v1/ouis?macList=${oui.join(',')}`, {
.get(`${endpoints.owgw}/api/v1/ouis?macList=${oui.join(',')}`, {
headers,
})
.then((response) => {
@@ -298,7 +298,7 @@ const FirmwareDashboard = () => {
Authorization: `Bearer ${currentToken}`,
};
axiosInstance
.get(`${endpoints.ucentralfms}/api/v1/deviceReport`, {
.get(`${endpoints.owfms}/api/v1/deviceReport`, {
headers,
})
.then((response) => {

View File

@@ -57,12 +57,9 @@ const FirmwareListPage = () => {
};
axiosInstance
.get(
`${endpoints.ucentralfms}/api/v1/firmwares?deviceType=${deviceType ?? selectedDeviceType}`,
{
headers,
},
)
.get(`${endpoints.owfms}/api/v1/firmwares?deviceType=${deviceType ?? selectedDeviceType}`, {
headers,
})
.then((response) => {
const sortedFirmware = response.data.firmwares.sort((a, b) => {
const firstDate = a.imageDate;
@@ -93,7 +90,7 @@ const FirmwareListPage = () => {
};
axiosInstance
.get(`${endpoints.ucentralfms}/api/v1/firmwares?deviceSet=true`, {
.get(`${endpoints.owfms}/api/v1/firmwares?deviceSet=true`, {
headers,
})
.then((response) => {
@@ -148,7 +145,7 @@ const FirmwareListPage = () => {
};
axiosInstance
.put(`${endpoints.ucentralfms}/api/v1/firmware/${id}`, parameters, options)
.put(`${endpoints.owfms}/api/v1/firmware/${id}`, parameters, options)
.then(() => {
getFirmware();
setAddNoteLoading(false);
@@ -180,7 +177,7 @@ const FirmwareListPage = () => {
};
axiosInstance
.put(`${endpoints.ucentralfms}/api/v1/firmware/${id}`, parameters, options)
.put(`${endpoints.owfms}/api/v1/firmware/${id}`, parameters, options)
.then(() => {
getFirmware();
setUpdateDescriptionLoading(false);

View File

@@ -206,7 +206,7 @@ const Login = () => {
.then((response) => {
if (response) {
const endpoints = {
ucentralsec: fields.ucentralsecurl.value,
owsec: fields.ucentralsecurl.value,
};
for (const endpoint of response.data.endpoints) {
endpoints[endpoint.type] = endpoint.uri;

View File

@@ -60,11 +60,11 @@ const ProfilePage = () => {
const getPasswordPolicy = () => {
axiosInstance
.post(`${endpoints.ucentralsec}/api/v1/oauth2?requirements=true`, {})
.post(`${endpoints.owsec}/api/v1/oauth2?requirements=true`, {})
.then((response) => {
const newPolicies = response.data;
newPolicies.accessPolicy = `${endpoints.ucentralsec}${newPolicies.accessPolicy}`;
newPolicies.passwordPolicy = `${endpoints.ucentralsec}${newPolicies.passwordPolicy}`;
newPolicies.accessPolicy = `${endpoints.owsec}${newPolicies.accessPolicy}`;
newPolicies.passwordPolicy = `${endpoints.owsec}${newPolicies.passwordPolicy}`;
setPolicies(response.data);
})
.catch(() => {});
@@ -79,7 +79,7 @@ const ProfilePage = () => {
};
axiosInstance
.get(`${endpoints.ucentralsec}/api/v1/user/${user.Id}`, options)
.get(`${endpoints.owsec}/api/v1/user/${user.Id}`, options)
.then((response) => {
const newUser = {};
@@ -109,7 +109,7 @@ const ProfilePage = () => {
data.append('file', newAvatarFile);
axiosInstance
.post(`${endpoints.ucentralsec}/api/v1/avatar/${user.Id}`, data, options)
.post(`${endpoints.owsec}/api/v1/avatar/${user.Id}`, data, options)
.then(() => {
addToast({
title: t('user.update_success_title'),
@@ -171,7 +171,7 @@ const ProfilePage = () => {
};
axiosInstance
.put(`${endpoints.ucentralsec}/api/v1/user/${user.Id}`, parameters, options)
.put(`${endpoints.owsec}/api/v1/user/${user.Id}`, parameters, options)
.then(() => {
addToast({
title: t('user.update_success_title'),
@@ -213,7 +213,7 @@ const ProfilePage = () => {
};
axiosInstance
.put(`${endpoints.ucentralsec}/api/v1/user/${user.Id}`, parameters, options)
.put(`${endpoints.owsec}/api/v1/user/${user.Id}`, parameters, options)
.then(() => {
getUser();
})
@@ -238,7 +238,7 @@ const ProfilePage = () => {
},
};
return axiosInstance
.delete(`${endpoints.ucentralsec}/api/v1/avatar/${user.Id}`, options)
.delete(`${endpoints.owsec}/api/v1/avatar/${user.Id}`, options)
.then(() => {
getAvatar();
})

View File

@@ -39,7 +39,7 @@ const UserListPage = () => {
};
axiosInstance
.get(`${endpoints.ucentralsec}/api/v1/users?idOnly=true`, {
.get(`${endpoints.owsec}/api/v1/users?idOnly=true`, {
headers,
})
.then((response) => {
@@ -61,7 +61,7 @@ const UserListPage = () => {
const promises = userIds.map(async (id) =>
axiosInstance.get(
`${endpoints.ucentralsec}/api/v1/avatar/${id}?timestamp=${new Date().toString()}`,
`${endpoints.owsec}/api/v1/avatar/${id}?timestamp=${new Date().toString()}`,
options,
),
);
@@ -99,7 +99,7 @@ const UserListPage = () => {
);
axiosInstance
.get(`${endpoints.ucentralsec}/api/v1/users?select=${idsToGet}`, {
.get(`${endpoints.owsec}/api/v1/users?select=${idsToGet}`, {
headers,
})
.then((response) => {
@@ -127,7 +127,7 @@ const UserListPage = () => {
};
axiosInstance
.delete(`${endpoints.ucentralsec}/api/v1/user/${userId}`, {
.delete(`${endpoints.owsec}/api/v1/user/${userId}`, {
headers,
})
.then(() => {

View File

@@ -168,10 +168,7 @@ const WifiAnalysisPage = () => {
};
axiosInstance
.get(
`${endpoints.ucentralgw}/api/v1/device/${deviceId}/statistics?newest=true&limit=20`,
options,
)
.get(`${endpoints.owgw}/api/v1/device/${deviceId}/statistics?newest=true&limit=20`, options)
.then((response) => {
parseAssociationStats(response.data);
})