- Dec 21, 2017
-
-
Benjamin Bertrand authored
+ fix tests
-
Benjamin Bertrand authored
-
Benjamin Bertrand authored
This allows to easily register items via the API without giving an ICS id.
-
Benjamin Bertrand authored
Split API in different blueprints like for the web UI: - users (login) - inventory - network Use version in API url (api/v1) to make future changes easier without breaking backward compatibility
-
Benjamin Bertrand authored
- This will help tracking who and what was created / changed - Move fetch_current_user_id to utils.py - Make ItemComment inherit from CreatedMixin
-
- Dec 20, 2017
-
-
Benjamin Bertrand authored
- Only admin should be able to create networks - Deleting an interface should require at least create group (should that be restricted to admin?)
-
Benjamin Bertrand authored
-
Benjamin Bertrand authored
Add delete and delete-orphan options to the cascade behavior: - delete: delete from database associated cnames when deleting an interface - delete-orphan: delete cname when removing it from the list of interface.cnames
-
- Dec 19, 2017
-
-
Benjamin Bertrand authored
Allow to create/delete cnames when creating/deleting interfaces
-
Benjamin Bertrand authored
Move regex to validators.py
-
Benjamin Bertrand authored
Used to validate a list of strings against a regular expresssion.
-
Benjamin Bertrand authored
Create macro to add delete button with modal dialog to cancel or confirm deletion.
-
Benjamin Bertrand authored
-
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
-