- Dec 13, 2017
-
-
Benjamin Bertrand authored
- Rename Host to Interface - Create new Host table to group interfaces
-
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
-
- Dec 06, 2017
-
-
Benjamin Bertrand authored
-
Benjamin Bertrand authored
hosttags table required for the many-to-many relationship See http://flask-sqlalchemy.pocoo.org/2.3/models/#many-to-many-relationships
-
Benjamin Bertrand authored
- Several IPs (hosts) can be associated to one MAC address - Host name shall be non nullable
-
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 17, 2017
-
-
Benjamin Bertrand authored
-
- Nov 15, 2017
-
-
Benjamin Bertrand authored
Don't ovveride SQLAlchemy __init__ method on db.Model classes. See http://flask-sqlalchemy.pocoo.org/2.3/quickstart/: SQLAlchemy adds an implicit constructor to all model classes which accepts keyword arguments for all its columns and relationships. If you decide to override the constructor for any reason, make sure to keep accepting **kwargs and call the super constructor with those **kwargs to preserve this behavior
-
Benjamin Bertrand authored
-
- Nov 14, 2017
-
-
Benjamin Bertrand authored
-
Benjamin Bertrand authored
ValidationError is catched by default by flask-admin. It's easy to catch in the api/main.py to raise a CSEntryError. We actually don't need to catch ValidationError as it's based on ValueError that we already catch.
-
Benjamin Bertrand authored
The database constraints will catch the same error (and raise an IntegrityError). Having some validation at the model level allows to display nicer error messages. We use CSEntryError exception and not ValidationError so that it can be used both by the API and views.
-
- Nov 13, 2017
-
-
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
Text is as efficient in Postgres and is recommended over varchar. It avoids having to put an arbitrary max length to strings.
-
- Nov 07, 2017
-
-
Benjamin Bertrand authored
-
- Nov 03, 2017
-
-
Benjamin Bertrand authored
CSE makes it clearer that it's linked to CSEntry
-
Benjamin Bertrand authored
-
- Sep 25, 2017
-
-
Benjamin Bertrand authored
-
- Sep 21, 2017
-
-
Benjamin Bertrand authored
ics_id, serial_number, manufacturer_id and model_id should not change. Repeating them in the history table takes space for nothing. We are only interested in tracking the status, location and parent.
-
Benjamin Bertrand authored
-
- Sep 17, 2017
-
-
Benjamin Bertrand authored
Pass ?qrcode=true as query string
-
- Sep 09, 2017
-
-
Benjamin Bertrand authored
-
- Sep 06, 2017
-
-
Benjamin Bertrand authored
- add more tests - patching an item update children location and status - setting the parent on an item updates the location and status with the parent ones
-
Benjamin Bertrand authored
-
Benjamin Bertrand authored
The serial number might not be unique and can't be used as the string to hash. There are for example SD cards that all have the same SN. Using an ICS id allows to pre-print labels that can be assigned to hardware when scanning serial numbers. This id shall be easy to remember (unlike UUID).
-
Benjamin Bertrand authored
Most items won't have a name. hostname could be added in a separate table if required.
-
- Aug 21, 2017
-
-
Benjamin Bertrand authored
-
- 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
Use the tablename instead instead of an abbreviation. The scanner client can thus directly get the name of the fields to use.
-
Benjamin Bertrand authored
-
Benjamin Bertrand authored
-
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
-