- Apr 10, 2018
-
-
Benjamin Bertrand authored
JIRA INFRA-281
-
- Apr 06, 2018
-
-
Benjamin Bertrand authored
JIRA INFRA-281
-
- Feb 12, 2018
-
-
Benjamin Bertrand authored
This reverts commit 4ddde36f. This broke the loading of fonts. Fonts directory should be excluded.
-
Benjamin Bertrand authored
The browser caches the static files (js, css...). Flask-CacheBust adds a hash to the URL of each static file to force clients to redownload the files when changed.
-
- Feb 09, 2018
-
-
Benjamin Bertrand authored
- add domain_id on NetworkScope table to define a default domain - add domain_id on Network (default to the Network Scope one) Fixes INFRA-194
-
- Jan 16, 2018
-
-
Benjamin Bertrand authored
Command shall be run every night to keep the users in the database in sync with the LDAP server. If a user is not found: - set its groups to [] - revoke all its tokens
-
- Jan 12, 2018
-
-
Benjamin Bertrand authored
The user_id is stored in the flask session. On every page load, we query the database to get: - the user objet (user_account table) - the user's groups (group table) to know what the user can access If we try to cache the user_load function, the following error is raised when retrieving the groups: sqlalchemy.orm.exc.DetachedInstanceError: Parent instance <User at 0x7f51e050a940> is not bound to a Session; lazy load operation of attribute 'grp' cannot proceed The groups from AD are only stored to map them with CSENTRY_LDAP_GROUPS. We don't do any query on them (get all users from one group). As we always query them with one user, it's more efficient to store them in the user_account table as an array than in a separate table. This allows to easily cache the load_user function. Note that we have to remember to add the current_user to the sqlalchemy session if we want to modify it or access a relationship (like tokens)! The load_user function is now cached for 30 minutes. This decreases a lot the number of database queries. Fix INFRA-156
-
- Jan 05, 2018
-
-
Benjamin Bertrand authored
-
- Jan 02, 2018
-
-
Benjamin Bertrand authored
-
- Dec 21, 2017
-
-
Benjamin Bertrand authored
Required to create users when importing items from JIRA. Renamed blueprint from "users" to "user" to be consistent with other blueprints (inventory and network).
-
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
-
- Dec 15, 2017
-
-
Benjamin Bertrand authored
-
Benjamin Bertrand authored
Use endpoint argument to avoid collision with flask-admin Network
-
Benjamin Bertrand authored
TODO: we should be able to render HTML in the comments Look at https://github.com/miguelgrinberg/Flask-PageDown
-
- Dec 14, 2017
-
-
Benjamin Bertrand authored
- Main blueprint used to declare custom views for all blueprints. (keep inventory blueprint cleaner) - Add url_prefix to each blueprint
-
- 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
main blueprint splitted in: - inventory - networks
-
Benjamin Bertrand authored
- Rename Host to Interface - Create new Host table to group interfaces
-
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
-
- Dec 06, 2017
-
-
Benjamin Bertrand authored
- refactor Network class
-
- Nov 20, 2017
-
-
Benjamin Bertrand authored
- network name should be unique and not nullable - force all name fields to StringField
-
- Nov 14, 2017
-
-
Benjamin Bertrand authored
- replace TextAreaField by StringField for several Text columns - add filter to replace empty string by None on optional Text and INET fields
-
- Nov 13, 2017
-
-
Benjamin Bertrand authored
Don't override the Admin view __init__ method for consistency. Avoid having to import models in admin/views.py
-
Benjamin Bertrand authored
CIText is displayed as a TextAreaField by flask-admin. Override it to use StringField.
-
Benjamin Bertrand authored
- A network defines an available range of IP addresses - A host defines an IP address and name - A host is always linked to a network - A mac address is always linked to an item (physical equipment) - A mac address can be linked to one host (IP) - An item can have several mac addresses
-
- Nov 10, 2017
-
-
Benjamin Bertrand authored
-
- Nov 03, 2017
-
-
Benjamin Bertrand authored
-
- Sep 08, 2017
-
-
Benjamin Bertrand authored
-
- Aug 22, 2017
-
-
Benjamin Bertrand authored
-
Benjamin Bertrand authored
User and Group shall not be created locally. They all come from the LDAP/AD server.
-
- Aug 21, 2017
-
-
Benjamin Bertrand authored
Allow to easily pass config for testing
-
- Aug 18, 2017
-
-
Benjamin Bertrand authored
-
- Aug 09, 2017
-
-
Benjamin Bertrand authored
The citext module provides a case-insensitive character string type. Use CIText for QRCodeMixin name column. name should be case-insensitive to avoid duplicate names.
-
- Jul 20, 2017
-
-
Benjamin Bertrand authored
-
Benjamin Bertrand authored
-
- Jul 19, 2017
-
-
Benjamin Bertrand authored
The hash is supposed to be computed in the __init__ method of Item. But flask-admin never passes any parameter when creating the model class. The attributes are changed after creation. When creating an item in the admin view, we use the on_model_change method to update the hash. There might be a better way to avoid this code duplication. This works for now.
-
Benjamin Bertrand authored
- restrict admin view to admin users only - the models shall only take optional parameters for flask-admin to work - the models shall implement the __str__ method to be displayed properly in the admin view
-
Benjamin Bertrand authored
-
Benjamin Bertrand authored
-