| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This function stores checksum status if is checked to browser local
storage. Otherwise, it removes checksum from the storage.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Otherwise, users have to click clients checkboxes every time they
switch view.
This commit adds one hook to capture when clients checkboxes changes.
When they are checked, ogcp (front-end) stores them in browser's local
storage. When they are unchecked, ogcp removes them from local storage.
Every time users load a page with the scopes tree, ogcp checks local
storage to restore selected clients.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Otherwise, users have to expand the scopes tree every time they switch
view.
This commit adds two hooks to capture when an element of the tree is
shown or is hidden[1]. When they are shown, ogcp (front-end) stores them
in browser's local storage[2]. When they are hidden, ogcp removes them
from local storage.
Every time users load a page with the scopes tree, ogcp checks local
storage to restore the scopes tree state.
Store and remove functions use stopPropagation() to prevent ancestors of
clicked elements to also be stored or removed from local storage.[3]
1. https://getbootstrap.com/docs/4.1/components/collapse/#events
2. https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API
3. https://javascript.info/bubbling-and-capturing
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes the javascript that adds/removes rows from the setup
form.
The AddPartition function now replaces the id `partitions-N-FIELDNAME`
using a regular expression. The hidden csrf input is also ignored to get
incremental numbers.
On deletion, all the ids are reassign from zero, in order, to get always
an ordered list with all numbers between the first and the last.
|
|
|
|
|
|
|
|
|
|
| |
The initial "Partition & Format" (aka setup) form only allows to modify
one partition at a time. This commit updates it to allow to modify the
whole disk partition schema in one go, without pop-ups and transitions.
This is a remake of the previous form using FieldList de WTForms and
javascript to duplicate / remove FieldList adapted to the attributes
available in WTForms.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds new states: OPG for clients in ogLive, BSY for busy
clients, VDI for clients in OpenGnsys VDI and WOL_SENT for booting
clients.
It also removes state ON because do not exists.
ogCP currently uses the following colors:
* OPG -> Solid yellow
* BSY -> Solid red
* VDI -> Solid green
* WOL_SENT -> Solid brown
* OFF -> Hollow grey
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds a javascript function to update the scope tree (on/off)
state.
This javacript function is called every second, does a call to the
new backend endpoint `/scopes/status` and updates the tree classes
depending on the current data.
The new `/scopes/status` endpoint just returns the scopes tree as json.
This patch also adds an icon in the tree leafs, a filled green circle
when the state is `on`, and a empty red circle when the state is `off`.
There's also a new javascript function to unfold all collapses in the
scope tree.
|
|
|
|
| |
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.
|