- Dec 19, 2017
-
-
Benjamin Bertrand authored
To check if the unique object is the one being edited, we need to store the object used to create the form in the form (_obj). This is inspired from flask-admin.
-
Benjamin Bertrand authored
Use inheritance to avoid duplication
-
Benjamin Bertrand authored
cellspacing="0" : to avoid double lines in the header width="100%" : to have extra fields (search, paging...) aligned properly with the table
-
Benjamin Bertrand authored
When registering a new host, only admin users shall be able to select networks marked as "admin_only"
-
Benjamin Bertrand authored
A gateway should be an interface like any other IP. Use tag to identify it.
-
Benjamin Bertrand authored
-
- Dec 18, 2017
-
-
Benjamin Bertrand authored
It shouldn't be possible to change the ICS id of an item. But when registering a bunch of existing items via the API, we need to allocate an ics_id otherwise not much can be done in the interface. The id is required for the view and edit page. The solution is to define some "temporary" ids that don't correspond to any pre-printed labels. Items with a temporary id can be assigned a real ics_id when assigning a label. Reserved ids start with 'ZZ' (from ZZA000 to ZZZ999) ICS id can now be non nullable.
-
Benjamin Bertrand authored
-
Benjamin Bertrand authored
Allow to customize the default selected values: - the default network prefix can be defined in the configuration (default to 24) - the default first and last IP chosen can probably be improved it defaults to hosts[9] and hosts[-5] if the list has more than 15 elements or the first and last otherwise Note that when using a small prefix (< 19), the number of possilbe IPs is quite large and updating the first and last IP select field takes some time...
-
Benjamin Bertrand authored
Scroll up to ensure the from input is not hidden below the navbar. See https://github.com/twbs/bootstrap/issues/1768
-
Benjamin Bertrand authored
Rendering done client side using Showdown: http://showdownjs.com Live preview is shown below the form. Only raw text is saved in the database (no HTML). Note that no XSS filtering is done! See https://github.com/showdownjs/showdown/wiki/Markdown's-XSS-Vulnerability-(and-how-to-mitigate-it)
-
Benjamin Bertrand authored
Markdown to HTML converter in Javascript
-
- Dec 15, 2017
-
-
Benjamin Bertrand authored
-
Benjamin Bertrand authored
-
Benjamin Bertrand authored
Use endpoint argument to avoid collision with flask-admin Network
-
Benjamin Bertrand authored
-
Benjamin Bertrand authored
If a selectfield is disabled, None is returned (not a string). To pass wtforms validation, that value shall be part of the choices. We use None as the value for SelectField that are optional (instead of ''). We were previously converting '' to None when creating a model. We now use the coerce function to let the form convert 'None' to None.
-
Benjamin Bertrand authored
- disable item field for virtual hosts - pre-fill interface name with hostname
-
Benjamin Bertrand authored
-
Benjamin Bertrand authored
Description shall be filled at the host level
-
Benjamin Bertrand authored
TODO: we should be able to render HTML in the comments Look at https://github.com/miguelgrinberg/Flask-PageDown
-
Benjamin Bertrand authored
-
- Dec 14, 2017
-
-
Benjamin Bertrand authored
-
Benjamin Bertrand authored
- Main blueprint used to declare custom views for all blueprints. (keep inventory blueprint cleaner) - Add url_prefix to each blueprint
-
-
Benjamin Bertrand authored
-
Benjamin Bertrand authored
Those tokens are supposed to be used in scripts or applications to access the API and should not expire. Updated to flask-jwt-extended 3.4.0 to be able to disable expiration See https://github.com/vimalloc/flask-jwt-extended/issues/105
-
Benjamin Bertrand authored
-
Benjamin Bertrand authored
Store some settings to the session to make it easy to register several identical items.
-
- Dec 13, 2017
-
-
Benjamin Bertrand authored
In Flask, session data are stored in a cookie by default. Using a server side session, there is no risk of putting too much data in the session and transmissting a big cookie on every request (only an id is sent in the cookie). Redis is used as backend (without persistent storage).
-
Benjamin Bertrand authored
-
Benjamin Bertrand authored
main blueprint splitted in: - inventory - networks
-
Benjamin Bertrand authored
- Rename Host to Interface - Create new Host table to group interfaces
-
Benjamin Bertrand authored
Use the session instead of URL parameters to store the last network chosen.
-
Benjamin Bertrand authored
There is no point displaying the LDAP groups in the profile
-
Benjamin Bertrand authored
- All created tokens are stored in the database. To revoke a token, we just delete it from the database. Tokens not found in the database are thus considered unvalid / revoked. - Add button to copy generated token to the clipboard - Redesign profile page
-
Benjamin Bertrand authored
See https://clipboardjs.com
-
- Dec 12, 2017
-
-
Benjamin Bertrand authored
Open source icon set with ready-to-use fonts for bootstrap See https://useiconic.com/open/
-
- Dec 06, 2017
-
-
Benjamin Bertrand authored
-