Javier Sánchez Parra
328ead9168
Create servers list if do not exists
...
Otherwise, if the configuration file do not have 'SERVERS' array, ogCP
crashes trying to append a new server.
2022-09-29 13:01:28 +02:00
Javier Sánchez Parra
178f253092
Always try to load servers list from config file
...
Otherwise, servers list is not loaded if the configuration file also
have an ogServer declared in the deprecated way.
2022-09-29 13:01:28 +02:00
Javier Sánchez Parra
30d27c8951
Adapt aux function to work with several ogServers
...
Otherwise, get_repositories() and get_repository() functions only get
the repositories of the first ogServer of the list.
2022-09-29 13:01:28 +02:00
Javier Sánchez Parra
6142a171fd
Fix repositories retrieving
...
Commit X wrongly changed the URI to retrieve the repositories of an
ogServer.
Fixes: cf02e0c
("Add Servers section")
2022-09-27 09:48:36 +02:00
Javier Sánchez Parra
a010f11224
Set server variable on GET /action/image/restore
...
Otherwise, ogCP crashes on image restore.
Fixes: 8726ade
("Adapt commands to work with several ogServers")
2022-09-27 09:48:36 +02:00
Javier Sánchez Parra
9961c4bc8d
Improve scopes tree from Commands
...
Commit 648a1a315e1d35f67c5301833bddd3753cc51793 changes do not work well
with large scopes trees. It takes several minutes to check a scope.
Improve javascript code to speed up scope selection.
2022-09-27 09:48:36 +02:00
Javier Sánchez Parra
58f295fb1c
Fix client room retrieving
...
Otherwise, retrieving do not work on clients inside folders.
2022-09-27 09:48:36 +02:00
Javier Sánchez Parra
49db9dc779
Replace parentheses in pills ids
...
From MDN:
Technically, the value for an id attribute may contain any character,
except whitespace characters. However, to avoid inadvertent errors, only
ASCII letters, digits, '_', and '-' should be used and the value for an
id attribute should start with a letter.
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id
2022-09-27 09:48:36 +02:00
Javier Sánchez Parra
5af589a94d
Collapse servers images
...
Users can collapse images list by clicking on the server.
2022-09-27 09:48:36 +02:00
Daniel García Moreno
0c66443db8
Add multiple servers to the dashboard view
2022-09-27 09:48:36 +02:00
Daniel García Moreno
ea18207998
Implement single room selection for commands view
2022-09-27 09:48:36 +02:00
Daniel García Moreno
efe9731753
Add different selection mode for the tree view
2022-09-27 09:48:36 +02:00
Javier Sánchez Parra
1db12230f9
Adapt Delete clients to work with several ogServers
...
This commit makes Delete clients view to use "get_server_from_clients()"
function to send the deletion request to the correct ogServer.
2022-09-27 09:48:36 +02:00
Javier Sánchez Parra
d74ad9336e
Ignore unreachable ogServers
...
Otherwise, ogCP crashes trying to connect to unreachable ogServers.
2022-09-27 09:48:36 +02:00
Javier Sánchez Parra
3459de36f3
Add Servers section
...
In Servers section/view, users can add or delete ogServers from ogCP
configuration file.
Replaces Repositories views and recycle some of its code.
2022-09-27 09:48:36 +02:00
Javier Sánchez Parra
07c5cb25d2
Store configuration file path on a global variable
...
Otherwise, users may change the file path on one place of the code and
forget to change the other places.
2022-09-27 09:48:36 +02:00
Javier Sánchez Parra
083cb7af7f
Adapt MAC retrieving to support several ogServers
...
Clients pills show MACs regardless of the ogServer they belong to. Flask
GET /client/mac API uses "get_server_from_clients()" function to send
the command to the correct ogServer.
2022-09-27 09:48:36 +02:00
Javier Sánchez Parra
083caf00c6
Adapt Delete image to work with several ogServers
...
This commit makes Delete image view to use ogServer field from
imagesForm to send the deletion request to the correct ogServer.
2022-09-27 09:48:36 +02:00
Javier Sánchez Parra
70eb7389bb
Add ogServer parameter to imagesForm
...
When users select an image, its ogServer is sent too. Then, the back-end
(flask) processes the form to obtain this ogServer and send it the
pertinent requests.
It also makes "Image details" view use this new parameter, and adds
javascript code to ensure that users can only work with several images
at the same time if they belong to the same ogServer.
2022-09-27 09:48:36 +02:00
Javier Sánchez Parra
c543ba25a6
Adapt images tree to work with several ogServers
...
Images view fetch images from all ogServers configured and show them in
the left tree as a nested list. ogServers are represented as the parents
of their images.
2022-09-27 09:48:36 +02:00
Javier Sánchez Parra
873bee30aa
Adapt Delete center to work with several ogServers
...
This commit makes Delete center view to use ogServer field from
scopesForm to send the command to the correct ogServer.
2022-09-27 09:48:35 +02:00
Javier Sánchez Parra
43d2df0e7d
Delete center using the scopes tree
...
With this commit users can select a center from the scopes tree, and
then delete it.
2022-09-27 09:48:35 +02:00
Javier Sánchez Parra
9ca010a981
Adapt Add center to work with several ogServers
...
This commit adds a new select input with all available ogServers to "Add
center" view. The ogCP creates the center in the ogServer selected by
the user.
2022-09-27 09:48:35 +02:00
Javier Sánchez Parra
3d42c2c66c
Adapt Delete room to work with several ogServers
...
This commit makes Delete room view to use ogServer field from scopesForm
to send the command to the correct ogServer.
2022-09-27 09:48:35 +02:00
Javier Sánchez Parra
f009a188b1
Delete room using the scopes tree
...
With this commit users can select a room from the scopes tree, and then
delete it.
2022-09-27 09:48:35 +02:00
Javier Sánchez Parra
bf4192a5d4
Adapt Add room to work with several ogServers
...
This commit makes Add room view to use ogServer field from
scopesForm to send the command to the correct ogServer.
2022-09-27 09:48:35 +02:00
Javier Sánchez Parra
0cc65a057d
Add a room to a center using the scopes tree
...
With this commit users can select a center from the scopes tree, and then
add a room to that center.
2022-09-27 09:48:35 +02:00
Javier Sánchez Parra
0db56d5eee
Adapt Import Clients to work with several ogServers
...
This commit makes Import Clients view to use ogServer field from
scopesForm to send the command to the correct ogServer.
2022-09-27 09:48:35 +02:00
Javier Sánchez Parra
f16b1a0347
Import clients to a room using the scopes tree
...
With this commit users can select a room from the scopes tree, and then
import clients to that room.
2022-09-27 09:48:35 +02:00
Javier Sánchez Parra
028f810a47
Fix selection of scopes with empty IPs list
...
This commit prevents ogcp from always mark as selected/checked scopes
that have an empty IP list.
2022-09-27 09:48:35 +02:00
Javier Sánchez Parra
229ad311be
Add current ogServer to scopesForm
...
With this commit when users select a scope, the ogServer to
which it belongs is also sent. Then when processing the form we obtain
this ogServer and we can send it the pertinent requests.
This commit also makes action "Add client" to use the ogServer sent in
the form.
2022-09-27 09:48:35 +02:00
Javier Sánchez Parra
2614c9304e
Add a client to a room using the scopes tree
...
With this commit users can select a room from the scopes tree, and then
add a client to that room.
2022-09-27 09:48:35 +02:00
Javier Sánchez Parra
75dc842284
Adapt commands to work with several ogServers
...
This commit makes commands views to use "get_server_from_clients()"
function to send the command to the correct ogServer.
2022-09-27 09:48:35 +02:00
Javier Sánchez Parra
b4c0bd5c5e
Fix ogServer names on the scopes tree
...
This commit adapt how "get_scopes()" accesses the name of the ogServer
because commit eae64dd changes how "multi_request()" returns it.
Fixes: eae64dd ("Initial support of ogServer requests routing")
2022-09-27 09:48:35 +02:00
Javier Sánchez Parra
74e9ff9907
Initial support of ogServer requests "routing"
...
This commit adds a helper function ("get_server_from_clients()") to get
the adequate ogServer according to the targeted clients.
It also makes "Client details" command use this function.
2022-09-27 09:48:35 +02:00
Javier Sánchez Parra
ddea404c5b
Add status of all clients to the scopes tree
...
Fetch clients status using 'get_clients()'.
2022-09-27 09:48:35 +02:00
Javier Sánchez Parra
279184df5f
Fetch clients from all ogServers in the dashboard
...
With this commit, ogcp fetch all clients lists an join them.
2022-09-27 09:48:35 +02:00
Javier Sánchez Parra
af0a3255b4
Add helper function to send requests to all ogServers
...
'multi_request()' function make requests to ogServers defined in the
configuration and aggregates it responses.
This commit also makes 'get_scopes()' use it.
2022-09-27 09:48:35 +02:00
Javier Sánchez Parra
2cbe6b774c
Retreive scopes from several ogServers
...
Update the configuration file format to support several ogServers and
retrieve scopes from those ogServers.
The old config file format is still supported.
2022-09-27 09:48:35 +02:00
Javier Sánchez Parra
c4aa1f2f54
Update Catalan translations
2022-07-06 10:24:27 +02:00
Javier Sánchez Parra
7896f21303
Update Spanish translations
2022-07-06 10:24:27 +02:00
Javier Sánchez Parra
9e386e5454
Add "Delete Repository"
...
In "Repositories" view, users select a repository from the list on the
left and press "Delete repository".
2022-07-04 15:34:03 +02:00
Javier Sánchez Parra
c068bd2144
Create "Add Repository" form and view
...
Creates "Add repository" form with the required inputs: name and IP.
2022-07-04 15:34:02 +02:00
Javier Sánchez Parra
9a6981d289
Add Repositories section
...
In Repositories section/view, users can manage task related to
repositories. For example: list, add, delete and edit them.
2022-07-04 15:34:02 +02:00
Javier Sánchez Parra
eb61229b29
Use repository id on image creation
...
On image creation use the id to identify repositories instead of the IP.
ogServer related commit:
* 52a38d3 ("#915 Use the repository id on image creation")
2022-06-30 10:24:02 +02:00
Javier Sánchez Parra
61bd6bc4ba
Move password hashing to the backend
...
This patch moves login password hashing from the frontend/javascript to
the backend/flask.
This patch moves password hashing of login and user management forms.
Related commits:
* c7b0024
("Add password hashing")
* 661254b
("Add 'Add user' to Users section")
2022-06-30 09:26:18 +02:00
Javier Sánchez Parra
06bcbe40a3
Increase textarea size from "Import clients"
...
Improve usability increasing the textarea used to copy the DHCPd
configuration.
2022-06-07 17:12:24 +02:00
Javier Sánchez Parra
6b07e83f03
Rename field "OS" from "Create image"
...
Rename "OS" to "Partition" to improve clarity.
This field represent which partition is used to create the image.
2022-06-07 16:16:13 +02:00
Javier Sánchez Parra
1d133dd53f
Show link speed in Gb/s
...
If link speed is greater than 1000 Mb/s, show it in Gb/s to improve
readability.
2022-05-27 12:02:28 +02:00
Javier Sánchez Parra
85be1258e1
Use assigned repository on images transfers
...
Otherwise, update/restore fails on images not saved in the same machine
which runs ogServer.
2022-05-24 09:28:51 +02:00