| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Add /action/repo/set in Commands to assign a repository to
multiple clients.
The view includes the actual repo assigned in the client pills
and shows a table with the clients grouped by repo when multiple
repos are assigned among the selected clients.
|
|
|
|
|
| |
Use "Fetch image" as text for the button to access the view
where the user selects images to add to cache.
|
|
|
|
| |
Use "Restore image" instead of "Restore Image" for consistency.
|
|
|
|
| |
Add view to request the download of images into the client's cache.
|
|
|
|
|
| |
Fix <div> structure to enable proper flow layout when the web
size changes and the command buttons need to reposition.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new user permission system to control the allowed operations
accessible from each account.
Add a permission matrix editable through the user/add and user/edit
views. The permission matrix has client, center, room, folder, image
and repository as permission targets and add, update and delete as
permission types.
Restrict each view based on the user permissions, hide all actions
from not autheticated users.
permissions defined in the class UserForm.
Serialize each user permissions into ogcp.json as:
{
...
"USERS" [
{
"USER": "admin"
...
"PERMISSIONS": {
"CLIENT": {
"ADD": true,
"UPDATE": true,
"DELETE": true,
},
... <- same structure for "CENTER", "ROOM", "FOLDER", "IMAGE"
and "REPOSITORY"
}
},
...
],
...
}
Grant all the permissions to old user configuration to not disrupt their
workflow. The administrator will need to assign the permissions for each
user.
Ignore scope and permission restrictions for admin users.
Save permissions and scopes even if the user is admin to account for the
case of a temporal admin promotion without losing the previous
configuration.
Use template inheritance for add_user.html and edit_user.html to prevent
big code duplication with the new HTML code to render the permission
matrix.
Make user administration an admin only feature.
Define methods get_permission and target_is_disabled to improve readability
in template conditionals that disable features based on user permissions.
|
|
|
|
|
|
|
|
|
|
| |
Add view at /action/script/output to visualize the result of
/shell/run for multiple clients.
Use shell/output to request the execution data of the selected clients.
Each client element has execution timestamip (UTC), client ip, cmd,
return code and stdout of the executed command.
|
|
|
|
|
|
|
|
| |
Add view at /action/script/run to visualize the available scripts
and run a single script file in the selected clients.
Use shell/list to request the script list and shell/run API call
to request the execution.
|
|
|
|
|
| |
Use a better name for the form action used to boot an operating
system in the clients.
|
|
|
|
|
| |
Move "Client details" to the last option of the "Client" dropdown
in the Commands page.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement cache management through cache/list and cache/delete
API REST methods.
The view corresponds to the URL action/cache and contains three
main parts:
- Free cache available in the client's bubbles.
- Image selection form to request the deletion and view the
client with that image in cache.
- Cache details per client to see total, used and available cache.
The main usecase for the view is the removal of cache to make room
for new images in clients with slow connections. Checking clients
where available cache space is not enough to hold the new image and
then requesting removal of specific images.
The html template receives the following structures from the view:
storage_data[ip] = {'used': 223452345,
'total': 2345234523452}
client_images[ip] = [f'{image_name}.{image_checksum}', ...]
image_data[f'{image_name}.{image_checksum}'] = {
clients: ['192.168.0.1', ...],
size: 34534530850,
name: image_name,
}
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Allows updating the image file for an existing image.
This action is related to /image/create in ogServer API. If ogServer
receives an POST /image/create without the parameter "description", it
does not create a new image and only updates.
|
|
|
|
|
| |
Allow the user to choose a computer as reference to display the
partition scheme form.
|
|
|
|
| |
Add a back button to facilitate users to return to the previous page.
|
|
|
|
|
| |
Now users can select clients only in scopes and command views, in any
other view we set the scopes tree read only.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On scopes and commands views, draw clients as users selects them in the
scopes tree.
Trigger client drawing on two events:
1."change" event, occurs when the user clicks a client checkbox. This
event is standard [1].
2. "show-client" event, fires when ogcp get selected clients from
localStorage and when an user checks a parent checkbox. This event is
custom.
Dot characters (".") in clients names are replaced by underscore("_")
when used as id to avoid errors.
1. https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Group related actions in the "commands" section inside a
dropdown button.
Declutters the panel in which the buttons are displayed.
Dropdown button jinja block name is used as prefix for the block names
of inside buttons. For example, for the image dropwdown button:
<button class="...{% block nav_image %}{% endblock %}...">
{{ _('Image') }}
</button>
Actions such as restore and create will show a jinja block inside class
attr like:
<input class="... dropdown-item{% block nav_image_restore %}{% endblock %}" ...
<input class="... dropdown-item{% block nav_image_create %}{% endblock %}" ...
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds empty jinja blocks for the class attribute of all action buttons.
Child templates from command (actions) can set their nav button as
active overriding the corresponding {% block %}.
Currently, not all action templates extends the commands.html template.
This is not a problem, as the blocks are just empty.
This is a preparation for changes on each action template to extend
commands.html template.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
{% block %} defined in nav template cannot be overriden by child
templates from base. This is a limitation in jinja.
Merge nav into base template so jinja blocks so no {% include %} is used
and these blocks can be overriden by child templates (commands, images,
dashboard...)
Avoid using request.endpoint to determine active nav item, decoupling
endpoint names from navigation. Instead use child templates to override
jinja blocks.
[1] https://stackoverflow.com/q/40537752
https://stackoverflow.com/a/40562662
https://github.com/pallets/jinja/issues/243
|
|
|
|
|
| |
Compacts Commands view with a single "Logs" dropdown button. Dropdown
shows current log commands.
|
|
|
|
|
|
|
|
|
|
| |
This commit adds an extra view to ensure users do not reboot clients
accidentally.
ogcp GET /reboot returns the confirmation page and POST /reboot
builds and sends the request to ogServer.
It also includes Spanish translation of the new strings.
|
|
|
|
|
|
|
|
|
|
| |
This commit adds an extra view to ensure users do not power off clients
accidentally.
ogcp GET /poweroff returns the confirmation page and POST /poweroff
builds and sends the request to ogServer.
It also includes Spanish translation of the new strings.
|
|
|
|
|
|
| |
This action is related to /oglive in ogServer's API. Allows changing the
ogLive for a set of given clients, previously selected in the /commands
view.
|
|
|
|
|
|
|
|
| |
Clients in ogLive offer a web page with lighttpd that shows a real-time
log. This commit links this log in ogcp.
Future patches will deprecate this log functionality in favour of more
robust solutions.
|
|
|
|
|
| |
Future patches will deprecate this log functionality in favour of more
robust solutions.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Being able to collapse the scopes tree allows to fit a bigger scopes
tree.
A new macro is introduced to generate the HTML code for the scope tree
in such a way that each non-leaf level (center, room) are collapsible.
macros.scopes_tree_collapse(scopes)
As of now, the state of the scope tree is not saved when changing nav
sections.
|
|
Commands view has a scope sidebar with the content block filled with
command buttons (poweroff, wol, etc.)
This commit leaves scope create/delete/update buttons in the /scopes
view, which serves that purpose.
To avoid duplicating scope tree creation macro, an external macros.html
is created, this template can be imported. Future macros needed can be
written in there.
|