Commit Graph

318 Commits

Author SHA1 Message Date
Andreas Zweili
8269dd7656 remove unnecessary object creations 2019-08-30 22:38:31 +02:00
Andreas Zweili
acc1472bd9 add LoginRequiredMixin to view 2019-08-30 22:37:49 +02:00
Andreas Zweili
fde7d492d4 fix the all computers list 2019-08-30 21:04:23 +02:00
Andreas Zweili
e012e1d576 add a computer to test 2019-08-30 21:04:00 +02:00
Andreas Zweili
f4f8fb95fe add login and logout button to base.html 2019-08-30 06:21:27 +02:00
Andreas Zweili
f86e1f0c6d ad rediret URLs 2019-08-30 06:21:23 +02:00
Andreas Zweili
528cd30c33 improve the regiration template 2019-08-29 23:11:11 +02:00
Andreas Zweili
961160babc rename the computer list to match the Django scheme 2019-08-28 23:09:34 +02:00
Andreas Zweili
605ad94acc remove unused code 2019-08-28 23:09:18 +02:00
Andreas Zweili
410a271328 create the fixture customer with mixer 2019-08-28 23:09:06 +02:00
Andreas Zweili
0e0870f2a7 remove fixture from test
This test should just return 200 even if there aren't any customers.
2019-08-28 22:29:56 +02:00
Andreas Zweili
c0bdfed79c move some settings to environment variables 2019-08-28 21:39:29 +02:00
Andreas Zweili
9d859f4ffc add login functionality 2019-08-25 22:35:03 +02:00
Andreas Zweili
5cdbf760e0 improve all tests which check for 302 2019-08-15 18:40:29 +02:00
Andreas Zweili
3e840b0aff fix the customer view permissions 2019-08-13 18:53:39 +02:00
Andreas Zweili
a43fc71521 fix the emacs config 2019-08-12 22:57:04 +02:00
Andreas Zweili
0409aef33c finalize test_computer_list_view 2019-08-11 22:54:33 +02:00
Andreas Zweili
1a92ce4e9a finalize test_computer_list_view_no_computers 2019-08-11 22:53:54 +02:00
Andreas Zweili
c87c762ab1 finalize test_backup_detail_view_not_found 2019-08-11 22:52:37 +02:00
Andreas Zweili
1dceb67d53 finalize test_backup_detail_view 2019-08-11 22:52:19 +02:00
Andreas Zweili
e6be2f3504 finalize test_net_detail_view_not_found 2019-08-11 22:49:29 +02:00
Andreas Zweili
9550e9b509 finalize test for test_net_detail_view 2019-08-11 21:44:13 +02:00
Andreas Zweili
bfb29e9de8 replace object creations with mixer 2019-08-11 21:36:29 +02:00
Andreas Zweili
210f583851 implement helper function 2019-08-11 21:35:49 +02:00
Andreas Zweili
efd33d49a6 finalize test for cpu relation 2019-08-11 20:57:37 +02:00
Andreas Zweili
e188b7ded4 finalize test for raid relation 2019-08-11 20:57:17 +02:00
Andreas Zweili
2aac3f53ed add test for ram relation 2019-08-11 20:56:39 +02:00
Andreas Zweili
e1edc3d238 use mixer in test_computer_detail_view 2019-08-11 20:55:01 +02:00
Andreas Zweili
2864649766 finalize test_customer_computer_table_no_computer 2019-08-11 20:54:39 +02:00
Andreas Zweili
1a71d65c12 finalize test_customer_computer_table 2019-08-11 20:54:18 +02:00
Andreas Zweili
37e9f58be4 finalize test_customer_detail_view_no_permissions 2019-08-11 20:42:13 +02:00
Andreas Zweili
c3be6198ed finalize test_customer_list_view 2019-08-11 20:41:43 +02:00
Andreas Zweili
64cf7e91f5 add mixer to the tests 2019-08-11 20:41:17 +02:00
Andreas Zweili
14ff7913de enable database access for the whole test_view.py file 2019-08-11 20:40:33 +02:00
Andreas Zweili
6aac688e8f remove the unnecessary raid type 2019-08-11 20:38:53 +02:00
Andreas Zweili
714449d038 move the coverage config 2019-08-11 20:38:37 +02:00
Andreas Zweili
a38f17141a update the docker settings 2019-08-11 18:37:56 +02:00
Andreas Zweili
521aaef946 run django with gunicorn 2019-08-11 18:37:37 +02:00
Andreas Zweili
9778d60f51 Revert "remove the production settings"
This reverts commit d8b09fd735.
2019-08-11 18:14:18 +02:00
Andreas Zweili
b9efd4ed60 move some settings to environment variables 2019-08-10 16:50:35 +02:00
Andreas Zweili
d8b09fd735 remove the production settings
they are the same as the docker settings
2019-08-10 15:28:52 +02:00
Andreas Zweili
27906f6923 remove the pytest config 2019-08-10 15:27:35 +02:00
Andreas Zweili
e5396aea5f add config for coverage 2019-08-10 13:56:19 +02:00
Andreas Zweili
c1631fe76e use a in memory database for local testing 2019-08-10 13:55:15 +02:00
Andreas Zweili
3833e02e60 add environment variable to emacs config 2019-08-10 13:54:55 +02:00
Andreas Zweili
3daf05a5c3 add check for status codes
When there is a 404 then there wouldn't be a "Novartis" string present so the
test would still pass.
2019-08-07 22:48:38 +02:00
Andreas Zweili
00725cec8a finalise test_customer_list_view_no_customer 2019-08-07 22:41:06 +02:00
Andreas Zweili
976321a39e PEP8 2019-08-07 22:38:30 +02:00
Andreas Zweili
1b8a8fc00f make sure only users with permissions can view customers 2019-08-07 22:37:59 +02:00
Andreas Zweili
a6ea6c545f add customer view permission test 2019-08-07 22:37:35 +02:00
Andreas Zweili
871562d2c8 remove an unused print statement 2019-08-07 18:19:49 +02:00
Andreas Zweili
d8e3459778 remove unused print 2019-08-06 22:34:29 +02:00
Andreas Zweili
bbb626e1b7 remove unnused code 2019-08-06 22:23:53 +02:00
Andreas Zweili
0e0e653b4f mark various tests as WIP 2019-08-06 22:23:39 +02:00
Andreas Zweili
373d4aa5f6 add test for empty customer list 2019-08-06 22:22:24 +02:00
Andreas Zweili
448fa67364 add tests for computer/hardware relations 2019-08-06 22:22:06 +02:00
Andreas Zweili
710224992f add tests for computer_list_view 2019-08-06 22:13:15 +02:00
Andreas Zweili
8ad61288ba remove unused code 2019-08-06 22:12:44 +02:00
Andreas Zweili
6d3f177b71 add tests for Net and Backup views 2019-08-06 22:03:46 +02:00
Andreas Zweili
d2a54d265a add tests for device views 2019-08-06 21:48:29 +02:00
Andreas Zweili
0fccb6f886 use get_object_or_404 with ConnectedDevice 2019-08-06 21:46:53 +02:00
Andreas Zweili
81b35d9772 use get_object_or_404 with device 2019-08-06 21:46:32 +02:00
Andreas Zweili
4fe8f4be6e test computer not found case 2019-08-06 21:41:55 +02:00
Andreas Zweili
e8c28e41d5 use get_object_or_404 in computer_view_permission 2019-08-06 21:41:31 +02:00
Andreas Zweili
4910a40336 remove unnused variables 2019-08-06 21:03:58 +02:00
Andreas Zweili
ac63104157 use objects.create whereever possible 2019-08-06 20:52:05 +02:00
Andreas Zweili
d920a9ba53 extend tests 2019-08-04 22:17:02 +02:00
Andreas Zweili
82f25255d4 only allow logged in users to acces pages 2019-08-04 22:15:30 +02:00
Andreas Zweili
671c7c1d8e add trailing slash to url 2019-08-04 22:14:20 +02:00
Andreas Zweili
3933e04e9c refactor the tests 2019-08-04 20:50:10 +02:00
Andreas Zweili
b022b1747d refacture the fixtures
the fixtures where overcomplicated and should be easier.
2019-08-04 20:46:02 +02:00
Andreas Zweili
5317f42349 extend the views with login required 2019-08-04 20:44:37 +02:00
Andreas Zweili
74677e6c2d rearrange the urls 2019-08-04 20:44:19 +02:00
Andreas Zweili
be7cfb7da9 add AllComputersView 2019-08-02 16:54:32 +02:00
Andreas Zweili
15eea784ac use the minimal css from semantic 2019-08-02 16:54:02 +02:00
Andreas Zweili
268337cc5b implement a basic backup view 2019-08-02 14:31:55 +02:00
Andreas Zweili
bb650d6d04 hide hardware card if none is present 2019-08-02 14:19:08 +02:00
Andreas Zweili
660a183e34 remove a div 2019-08-02 13:40:06 +02:00
Andreas Zweili
672949f4b2 implement cards ui for computers 2019-08-02 13:39:14 +02:00
Andreas Zweili
35d399eac5 implement django-tables2 2019-08-02 13:05:42 +02:00
Andreas Zweili
3c28f6fd70 add verbose names to the Computer and Net model 2019-08-02 13:04:25 +02:00
Andreas Zweili
e3a789b125 add djang-tables2 to the apps 2019-08-02 12:21:40 +02:00
Andreas Zweili
cf7f1ee6d2 implement the semantic css theme 2019-08-02 12:21:05 +02:00
Andreas Zweili
4353b7e1dd extend the ComputerDetailView with various properties 2019-07-30 23:17:56 +02:00
Andreas Zweili
0c2f76bcf1 make the tables a bit smaller in order to fit more information 2019-07-30 23:16:59 +02:00
Andreas Zweili
7fd85a1040 add IPs to the computer view 2019-07-29 21:16:14 +02:00
Andreas Zweili
27fb338a7f add views for nets 2019-07-28 22:02:07 +02:00
Andreas Zweili
503ccb4d5a allow the customer description to be empty 2019-07-28 21:41:17 +02:00
Andreas Zweili
113afb4f6c add first_name field 2019-07-28 21:10:30 +02:00
Andreas Zweili
438b2bdc43 add hyper_threading field 2019-07-28 21:10:11 +02:00
Andreas Zweili
2284e6eaa0 move the DeviceManufacturer class to companies.py 2019-07-28 21:09:51 +02:00
Andreas Zweili
d1ebb7b94d add a NotificationFromBackup class 2019-07-28 21:07:27 +02:00
Andreas Zweili
7213b59f98 change url of the devices list 2019-07-25 20:42:09 +02:00
Andreas Zweili
462d0169eb small reformating of the customer table 2019-07-25 20:41:52 +02:00
Andreas Zweili
1d6c631af3 remove the list_of_lists 2019-07-25 20:37:03 +02:00
Andreas Zweili
91672e8128 rename the views for better clarity 2019-07-25 20:35:22 +02:00
Andreas Zweili
33ef653602 extend the home index page 2019-07-25 20:35:05 +02:00
Andreas Zweili
368eb670e2 add a customers details page 2019-07-25 20:34:52 +02:00
Andreas Zweili
9fec74496a change to relativ imports 2019-07-25 20:13:04 +02:00
Andreas Zweili
f8531e6014 add list of lists
this lists show all the lists related to the currently selected customer.
2019-07-24 22:56:08 +02:00
Andreas Zweili
abba395440 add a make command to remove the sqlite db restart the server 2019-07-24 22:52:12 +02:00
Andreas Zweili
e162ec4177 PEP8, line length 2019-07-24 22:38:19 +02:00
Andreas Zweili
c84047362b switch from url to path patterns 2019-07-24 22:27:14 +02:00
Andreas Zweili
5aedea6075 remove the default test s file 2019-07-19 17:10:35 +02:00
Andreas Zweili
e0a6bf76bc move the Customer class to companies 2019-07-19 16:40:49 +02:00
Andreas Zweili
6bc7f7d560 remove a trailing empty line 2019-07-19 16:33:27 +02:00
Andreas Zweili
27728da0d5 fix various formating errors 2019-07-19 16:32:24 +02:00
Andreas Zweili
567761f68f add decorators for Device and ConnectedDevice 2019-07-19 16:10:33 +02:00
Andreas Zweili
6c40c0ccde remove trailing whitespaces 2019-07-19 16:08:21 +02:00
Andreas Zweili
242b3fa089 move the static files into the application 2019-07-14 19:23:13 +02:00
Andreas Zweili
d6f7bfa937 make the permission test more robust 2019-07-14 13:04:22 +02:00
Andreas Zweili
4c761e551a move the data creation into fixtures 2019-07-14 12:58:10 +02:00
Andreas Zweili
66706c854e finish the test for the customer list 2019-07-13 16:15:01 +02:00
Andreas Zweili
68e3bbeb4b add more meaningful test object names 2019-07-13 15:48:17 +02:00
Andreas Zweili
99747257b0 split the requirements and settings 2019-07-13 12:37:58 +02:00
Andreas Zweili
44c4576029 fix indentation 2019-06-19 21:28:54 +02:00
Andreas Zweili
8b7c4262ad allow empty relations for RAM and CPUs 2019-06-16 22:54:25 +02:00
Andreas Zweili
ff75b95427 update indentation 2019-06-16 22:54:01 +02:00
Andreas Zweili
010b50c946 replace pc IP with pc owner 2019-06-16 22:53:41 +02:00
Andreas Zweili
e7d8f86751 change staticfiles to static 2019-06-16 22:11:53 +02:00
Andreas Zweili
b3844cafbc WIP add view test 2019-06-16 22:10:08 +02:00
Andreas Zweili
088483e5b9 add fixture to populate the test db 2019-06-16 22:09:51 +02:00
Andreas Zweili
21fa33d00f add an additional line to the customer model 2019-06-16 15:05:51 +02:00
Andreas Zweili
4ab32be82c extend the computer details with permissions 2019-06-16 15:02:47 +02:00
Andreas Zweili
cd6fd5ae2a add a decorator to check for PC permissions 2019-06-16 15:00:21 +02:00
Andreas Zweili
09159652a1 add a customer admin 2019-06-16 14:58:53 +02:00
Andreas Zweili
6fbeae0e66 remove an old view 2019-06-10 22:25:27 +02:00
Andreas Zweili
9647da27f8 remove the STATIC_ROOT option
django throws a lot of errors with it.
2019-06-10 22:24:48 +02:00
Andreas Zweili
79e8ebe769 use explicit imports 2019-06-10 22:24:19 +02:00
Andreas Zweili
76e1799fb3 remove an old file 2019-06-10 22:23:42 +02:00
Andreas Zweili
a8aaa1aad8 merge the work from the other project 2019-06-10 21:56:21 +02:00
Andreas Zweili
0b7d0f690e extend the fixtures 2019-06-10 21:52:40 +02:00
Andreas Zweili
9ab28b10c3 add minimal working example of django-guardian 2019-06-10 21:46:29 +02:00
Andreas Zweili
ad90e2f4d0 remove internal URL from the allowed hosts 2019-06-10 21:00:48 +02:00
Andreas Zweili
adf4bdbc11 change setup to docker 2019-06-10 20:59:46 +02:00
Andreas Zweili
cd9253f80d remove unused imports 2018-05-21 16:09:44 +02:00
Andreas Zweili
50614938a7 add a directory configuration 2018-05-20 14:04:26 +02:00
Andreas Zweili
93dcacfd4c refactor according to PEP8 2018-05-17 18:18:49 +02:00
Andreas Zweili
489933e003 make the footer smaller 2018-01-14 14:19:20 +01:00
Andreas Zweili
70cf7c28fb Merge branch 'master' of git.2li.ch:Nebucatnetzer/network_inventory 2018-01-14 13:36:17 +01:00
Andreas Zweili
f16aad35f2 change the computer ip from CharField to GenericIPAddressField 2018-01-14 13:35:39 +01:00
Andreas Zweili
01631f0ca9 order computers by their IP address 2018-01-06 09:55:34 +01:00
Andreas Zweili
11b5d3c3f2 add the sakura theme 2018-01-06 09:47:50 +01:00
Andreas Zweili
26869813e0 correct the page titles 2017-12-29 12:35:50 +01:00
Andreas Zweili
5a30aa8814 split the various lists into seperate pages 2017-12-29 12:33:05 +01:00
Andreas Zweili
03adc4b76f remove the static root line 2017-12-29 11:48:47 +01:00
Andreas Zweili
0ef15afd6e add a bit whitespace to improve visibility 2017-12-29 11:45:56 +01:00
Andreas Zweili
f9f20c0932 add a counter for the CPU 2017-12-29 11:45:43 +01:00
Andreas Zweili
ed504889d7 add a javascript file to make tables sortable 2017-12-29 11:42:39 +01:00
Andreas Zweili
f0e9ea2d85 add a setting for static directories 2017-12-29 11:41:56 +01:00
Andreas Zweili
3d7ac52229 fix the host url for good 2017-12-28 01:20:05 +01:00
Andreas Zweili
aadd0deb71 add localhost to the allowed hosts 2017-12-28 01:12:44 +01:00
Andreas Zweili
fa6480eac3 add a link to the host computer 2017-12-28 01:09:27 +01:00
Andreas Zweili
aaef16d428 sort disktypes by name and disk sizes by size 2017-12-28 01:08:54 +01:00
Andreas Zweili
6884d4a212 remove fixed tables from the admin interface 2017-12-28 00:12:53 +01:00
Andreas Zweili
54a1ae2836 collect static files for the admin page 2017-12-28 00:02:01 +01:00
Andreas Zweili
84a6aa7f98 correct the css url 2017-12-27 23:56:55 +01:00
Andreas Zweili
dee94fcc90 add an allowed host 2017-12-27 23:55:06 +01:00
Andreas Zweili
81daf6a056 add a static root to the settings 2017-12-27 23:51:42 +01:00
Andreas Zweili
2fbcf1e5f7 remove the mysql settings 2017-12-27 23:51:15 +01:00
Andreas Zweili
8d0454556f move the css file 2017-12-27 23:51:03 +01:00
Andreas Zweili
8ea0a1cd61 add settings for mariadb 2017-12-27 20:17:12 +01:00
Andreas Zweili
0067fa3af2 restructure the code 2017-12-27 19:51:58 +01:00
Andreas Zweili
9fc5279193 change time formats to an international 24h format 2017-12-25 13:36:20 +01:00
Andreas Zweili
3f6a9974ff add urlpatterns for the inventory app 2017-12-25 13:25:57 +01:00
Andreas Zweili
03bbfbc612 create an app for the inventory 2017-12-22 17:02:24 +01:00
Andreas Zweili
c1dad8a61d add models to the docs.org file 2017-12-22 14:13:51 +01:00
Andreas Zweili
e8276c789a start the django project 2017-12-21 23:33:47 +01:00