| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Some ogLive names can be large and a fixed size makes the text
overflow under other client pills.
Let the client pills grow if needed to fit its content.
|
|
|
|
| |
Increase CSS version to update CSS file in browser cache.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add visual indicator to the disclosure widget when its branch has
any clients in live mode.
Ease the search of systems in ogLive in need of being booted or
turned off.
Add id= to the HTML component containing the disclosure widget.
Set the id to the value scope_type-scope_name for type='server' and
scope_type-scope_id for the rest.
Add the CSS class 'live-report' to the HTML components with live
children. Assign the class field in the js function updateScopes.
|
|
|
|
|
|
|
|
|
|
|
| |
Prevent cases where the client pills would stay locked reporting a
specific system.
Remove pill-* classes instead of text-* classes in function
updatePillStatus().
This fixes out-of-sync state representation between sidebar and main
section.
|
|
|
|
| |
Make headings take less space and have a dashed line under them.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 functionality to the "Opengnsys" text in the top navbar.
Comform to the general design priciple of executing a redirecting
after clicking the main logo.
|
|
|
|
|
| |
Remove the Servers button from the main navbar but keep the
multiserver related code.
|
|
|
|
|
| |
Add a left padding to show the disclosure widget associated to
a server item. Prevent the positioning of out of screen components.
|
|
|
|
|
| |
Add the class "collapsed" to the html elements defined as
not shown in the local storage for the images list sidebar.
|
|
|
|
|
|
|
|
|
|
|
| |
Allow the selection of multiple client checkboxes if they belong
to the same room.
Each checkbox input in the DOM has a "data-parent-room" attribute
whose value is the value of the "name" attribute of its parent
room scope component.
To check if a checkbox is a client and a sibling of the one being
checked we check if "data-parent-room" is available for both nodes
and if they have the same value.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add cache buster to soleta.css in base.html to have control over
cache expirity.
Bump soleta.css version to ensure browser does not used older (cached)
version.
Add CSS rules to show a disclosure widget in the sidebar.
Show center checkboxes as disabled in the commands view sidebar
for visual consistency.
Add class "collapsed" to the proper HTML components to keep a
proper state on page reload.
|
|
|
|
|
|
|
|
|
|
|
| |
Maintain selections made in scope sidebar after clicking an action
(ie. client add, room delete, etc.)
Use ids instead of names as the name html property is the same for
every room and center.
Call keepSelectedClients() in macros.html for both Scope Management
and Commands instead of only in Commands.
Add a "context" value to the checkbox id to separate scope and
commands values in local storage.
|
|
|
|
|
|
|
|
|
| |
Fix the definition of javascript code to generate a correct
message window for multiple error messages.
The error is cause by a redefinition of 'let bgclass' in multiple
lines when the html template receives multiple error messages.
Each iteration to generate the code for the error messages tries
to redefine the variable bgclass and it causes the js to fail.
|
|
|
|
|
|
| |
Ignore any room, center or folder as they don't have a MAC address.
Trying to get the MAC of an scope element without one leads to a
JS exception.
|
|
|
|
| |
Remove print statement generating noise in the browser logs.
|
|
|
|
|
| |
Add check to test if a pill control has been found and don't try
to add mac data to non existent client pill controls.
|
|
|
|
|
|
|
| |
Show the partition id as a non editable label in each partition
of the Partition and Format form.
Assign sequential partition id from top to down and recalculate
every partition id when a partition is removed.
|
|
|
|
|
|
|
| |
Update all the name and id fields of the elements in the partition
form after a delete operation.
Inconsistent ids make form.validate() to always return False, this
causes all the form validation code to be skipped.
|
|
|
|
|
|
|
|
|
| |
Add version parameter to ogcp.js url. This is so that, if ogcp.js is
modified, the browser is able to see that that file has been changed and
that it has to load the new version instead of acquiring it from cache.
We have experienced stranged errors, related to browsers caching old
javascript files, leading to python flask backend backtraces
|
|
|
|
| |
Show the username of the user currently logged-in in the top navbar.
|
|
|
|
|
| |
Add scope-management menu with limited commands for non-admin users;
commands allowed are add/edit/edit/delete/import client(s)
|
|
|
|
| |
Make the sidebar wider to improve readability of its content
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The menu includes a list of the repos of each server. The user can
select a server or a repo to make changes.
As of now, the only action possible is to add a repo to selected
server.
The work contained in this commit can be structured in:
1. Add the repos menu:
- Add a 'repos' button in the menus bar (base.html).
- Add repos.html template to create the management repos menu.
- In ogcp.js, add function to store in browser's local storage which
elements of the sidebar are uncollapsed. This saves the sidebar state
after a page refresh.
- Add manage_repos() in views.py
2. Allow to add a repo:
- Add template with form to add a repo (repos_details.html)
- Create RepoForm(FlaskForm) in action_forms.py
- Add repo_add_get() and repo_add_post() in views.py
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
In Servers section/view, users can add or delete ogServers from ogCP
configuration file.
Replaces Repositories views and recycle some of its code.
|
|
|
|
|
| |
In Repositories section/view, users can manage task related to
repositories. For example: list, add, delete and edit them.
|
|
|
|
|
| |
In Users section/view, administrator accounts can manage all task
related to users. For example: add, delete and edit users.
|
| |
|
|
|
|
| |
Also, increase its duration from 5 to 10 seconds.
|
|
|
|
| |
Remove them until we add their functionality.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
{% 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds a way to add a new partition to the setup.html template.
This button opens a modal dialog with a new form and calls a new
endpoint to create the new partition (this endpoint does nothing, it's
needed to be implemented in the future).
I've followed the initial design for this template, with one form per
each partition, so every button will call a function and reload the
page.
It's possible to do all actions at once, but that will require a rework
of this, to do that we can just define an unique form in the whole html,
remove all the "Modify" buttons and add just one "Apply" button at the
end. But maybe that option is a lot complex in the backend because will
require to validate all the changes at once.
This patch also improves the setup.html form without using
flask-bootstrap and rendering the form in the template directly with the
bootstrap4 classes.
|
|
|
|
|
| |
Commit 22dcea19 introduced sidebar, which is not shown in
index view. Disable sidebar in the login view too.
|
|
|
|
|
|
|
| |
This patch adds an example chart using chartjs to the dashboard to show
the disk usage.
https://www.chartjs.org/docs/latest/getting-started/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modify the base template to add the sidebar and command bar, implemented
just in the scopes view.
This patch also modifies the "actions/mode.html" template to be shown in
the scopes page. Any other action that should be inside the scopes
should do the same, add the scopes and clients to the template context
and use the "scopes.html" as base in those actions.
The notification has been also changed to use a toast notification
instead of the usual alert to avoid changing the layout on error.
|
|
|
|
|
|
|
|
|
|
| |
This patch adds the css and js sources from the AdminLTE template to the
base template so it can be used in all templates.
There's also some flexbox bootstrap classes [1] to place the footer at
the bootom always, even when there's no content to fill the page.
[1] https://getbootstrap.com/docs/4.6/utilities/flex/
|
|
|
|
|
|
|
|
| |
* Adds label for each action page.
* Adds a colored state for opengnsys connected clients
* Fix nav active item
* Rename some actions
* Adds DISK to partition and format form
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ogcp requires a simple login page in order to avoid exposure of the
ogServer API to anyone trying to access the web page.
Because the main authorization mechanism in ogServer is the api token
the login implemented for the ogcp does not include registration process
but a single user and password specified in the ogcp.json.
"USER": "user",
"PASS": "pass"
Adds two new views: /login and /logout. They are used to login the user so
that the rest of views regarding ogServer functionality can be accessed
in a "login required" fashion. Index view (/) is an exception, it can be
accessed logged in or not so different data can be displayed.
Templates can now access a variable "current_user" to get information
about login status. This is a Flask-Login feature.
- Templates regarding login can be found in templates/auth/
- Login form is defined in forms/auth.py to separate it from
action_forms.py
- Adds Flask-Login module to requirements.txt
- Adds default user and pass in ogcp.json
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit may serve for future reference as to how some cosmetic
changes have been applied to the web.
Primarily using bootstrap classes in order to adjust margin or padding,
there are mechanisms that allow modifying the class of an
underlying html element in WTForms. Bootstrap classes are written
directly in html templates for Flask.
Also add a Soleta branded footer.
|
|
|
|
|
|
| |
These are used to store a message string that can be later accessed. We
can use Flask flash messages to alert about any error or providing info
when processing a request.
|
|
|
|
| |
This is used for multiple bootstrap components such as dropdown menus.
|
|
This adds base.html and nav.html templates as well as its dependencies
on Bootstrap and jQuery.
|