Commit Graph

344 Commits

Author SHA1 Message Date
Andreas Zweili
eab27f71ba rename recipiant to the correct recipient 2020-01-01 21:57:17 +01:00
Andreas Zweili
454dc4ec7f change the indentation for the target device table 2020-01-01 21:56:38 +01:00
Andreas Zweili
fc1523673e remove the table headers in the backup_detail_view 2020-01-01 21:55:52 +01:00
Andreas Zweili
b38b48f3a0 remove unused code 2020-01-01 21:55:32 +01:00
Andreas Zweili
7fc865f6ae add NotificationFromBackup to the admin page 2020-01-01 21:54:25 +01:00
Andreas Zweili
1f29810ef4 refactor imports 2020-01-01 21:24:49 +01:00
Andreas Zweili
8063d2ab9a use the alias object directly
The alias object returns its email address when it's called as a string.
Therefor it's better to call the object directly.
2020-01-01 20:23:07 +01:00
Andreas Zweili
f06a92f0c1 correct line length 2020-01-01 20:00:27 +01:00
Andreas Zweili
eefe2f9601 remove an unused variable 2020-01-01 20:00:19 +01:00
Andreas Zweili
4d881fc093 add a link to user_detail_view to the computer_detail_view template 2020-01-01 19:59:05 +01:00
Andreas Zweili
df2bb33091 add links to user_detail_view to various tables 2020-01-01 19:58:53 +01:00
Andreas Zweili
a7232f06ac add url for user_detail_view 2020-01-01 19:58:40 +01:00
Andreas Zweili
1d93b3f449 add user_detail_view 2020-01-01 19:58:31 +01:00
Andreas Zweili
ca2c59285e add template for user_detail_view 2020-01-01 19:58:07 +01:00
Andreas Zweili
2290f635d9 add tests for user_detail_view 2020-01-01 19:57:53 +01:00
Andreas Zweili
8cb41d30e9 add user_view_permission decorator 2020-01-01 19:57:19 +01:00
Andreas Zweili
b3af7881b2 add get_absolute_url method to User model 2020-01-01 19:54:37 +01:00
Andreas Zweili
1e406621ca remove order link from customer table 2020-01-01 19:53:49 +01:00
Andreas Zweili
6b8db3654f capitalise the Net column 2020-01-01 19:25:36 +01:00
Andreas Zweili
871d27e2ca adjust imports 2019-12-31 16:16:41 +01:00
Andreas Zweili
b7c7b1173d fix test_customer_user_table_multiple_users 2019-12-31 01:26:12 +01:00
Andreas Zweili
5313474460 correct test_customer_user_table_no_user 2019-12-31 01:25:08 +01:00
Andreas Zweili
3e5a973287 extend test_customer_user_table to check more attributes 2019-12-31 01:23:41 +01:00
Andreas Zweili
f778beca0a show the first and last name for a user 2019-12-30 13:39:12 +01:00
Andreas Zweili
b7a91c4935 display the related computers and users in the license table 2019-12-30 13:38:56 +01:00
Andreas Zweili
dac5e2744a add customer_users_table_view 2019-12-30 11:17:24 +01:00
Andreas Zweili
1b48ded52d correct line length 2019-12-30 11:13:33 +01:00
Andreas Zweili
22ab084173 reorder imports 2019-12-30 11:09:47 +01:00
Andreas Zweili
73ed48797c reorder imports 2019-12-30 11:09:31 +01:00
Andreas Zweili
cfb452e55e add a link to users to the customer_table_view 2019-12-30 11:00:15 +01:00
Andreas Zweili
fd4b0564d4 check for cell contents in test_customer_list_view 2019-12-30 10:56:32 +01:00
Andreas Zweili
b0aaa25765 make licenses unique to avoid UniqueConstraint 2019-12-30 01:45:26 +01:00
Andreas Zweili
0a8e0c7760 remove currently unused tests 2019-12-30 01:29:58 +01:00
Andreas Zweili
b6b259cf0d add tests for licenses 2019-12-30 01:25:30 +01:00
Andreas Zweili
acd264430e remove the clean methods
This logic should be implemented in the respective forms
2019-12-30 01:22:56 +01:00
Andreas Zweili
41c418371e fix the clean check for LicenseWithUser 2019-12-30 00:55:56 +01:00
Andreas Zweili
16fdddd26f make sure that there are always enough licenses 2019-12-30 00:41:07 +01:00
Andreas Zweili
b3f52d1a76 allow users and computers only to use one license 2019-12-30 00:19:50 +01:00
Andreas Zweili
cf3d5546d6 hide all id columns 2019-12-30 00:19:35 +01:00
Andreas Zweili
010b8d407a capitalize all column names 2019-12-30 00:19:24 +01:00
Andreas Zweili
ba61934b6b add license models 2019-12-29 23:54:27 +01:00
Andreas Zweili
c885ab4ac7 delete device when customer gets deleted 2019-12-29 19:04:21 +01:00
Andreas Zweili
e1d1d693d5 correct the on_delete parameter for a device owner 2019-12-29 19:04:03 +01:00
Andreas Zweili
d980030c22 link the backup target_devices to the matching computer 2019-12-29 16:20:49 +01:00
Andreas Zweili
045c8e61de extend backup_detail_view to show the target device 2019-12-29 15:17:29 +01:00
Andreas Zweili
1b9f461895 add backup_view_permission decorator 2019-12-29 14:03:31 +01:00
Andreas Zweili
117fbaf084 test for 404 error for non existent backup 2019-12-29 14:03:09 +01:00
Andreas Zweili
fd2121ddeb add view_permission decorator to backup_detail_view 2019-12-29 14:02:25 +01:00
Andreas Zweili
bc9afcd0c6 remove the BackupDetailTable 2019-12-29 13:50:51 +01:00
Andreas Zweili
14865608ee remove the customer object from decorators
The customer object can be used directly from the other object
2019-12-29 13:32:35 +01:00
Andreas Zweili
1563c2eaac switch the device_details template to Semantic UI 2019-12-29 13:07:36 +01:00
Andreas Zweili
789d41989e correct fixtures for BackupMethods 2019-12-29 12:26:20 +01:00
Andreas Zweili
a8eeab0a1e add test_customer_list_view_multip_customers 2019-12-28 15:38:17 +01:00
Andreas Zweili
faa358fd1b add test_customer_device_table_multiple_devices 2019-12-28 15:38:00 +01:00
Andreas Zweili
f4604ba788 add test_customer_computer_table_multiple_computers 2019-12-28 15:37:27 +01:00
Andreas Zweili
6e84d26e0f move the string conversion to the helper function 2019-12-28 15:37:09 +01:00
Andreas Zweili
d6be5cea55 display the serial number monospaced 2019-12-28 15:22:12 +01:00
Andreas Zweili
5b1e43499a correct test_device_detail_view 2019-12-28 15:18:59 +01:00
Andreas Zweili
ced9b8918e add the device_view_permission decorator 2019-12-28 15:08:30 +01:00
Andreas Zweili
f1b98dc03f add all attributes to the device_details template 2019-12-28 15:08:11 +01:00
Andreas Zweili
cc17502806 extend the test_device_detail_view 2019-12-28 15:07:59 +01:00
Andreas Zweili
12b510e437 remove the name reference from test_computer_detail_view
This should make the test more flexible and actually tests for the string
representation of the object rather if the name exists.
In the template is use actually that and not the name.
2019-12-28 15:06:35 +01:00
Andreas Zweili
9e79b40519 add more tests to test_customer_device_table 2019-12-28 13:40:35 +01:00
Andreas Zweili
08baff93ad remove an unnused variable 2019-12-28 13:15:11 +01:00
Andreas Zweili
d9672a2b8e extend fictures with more defaults 2019-12-28 13:12:47 +01:00
Andreas Zweili
e158cc7b36 change the RAID model so that it uses django-nested-admin 2019-12-27 18:28:30 +01:00
Andreas Zweili
4b1d1dace8 add permissions decorators to two views 2019-12-27 00:47:25 +01:00
Andreas Zweili
2e00a5716f remove a currently unused property from the Backup model 2019-12-11 18:09:58 +01:00
Andreas Zweili
3d52e62274 add tests vor net_table_view and net_detail_view 2019-12-11 18:06:31 +01:00
Andreas Zweili
d72ed63ec0 add @customer_view_permission decorator to nets_table_view 2019-12-11 18:06:11 +01:00
Andreas Zweili
4321eb433a change test name 2019-12-11 18:04:37 +01:00
Andreas Zweili
0571f6863a implement the net detail view 2019-12-11 17:57:48 +01:00
Andreas Zweili
a6984fd258 wrap a line to be shorter than 80 characters 2019-12-11 17:55:02 +01:00
Andreas Zweili
12b69a4286 PEP8 2019-12-11 17:52:50 +01:00
Andreas Zweili
a7715d2b7a use the correct column type as per the documentation of tables2
https://django-tables2.readthedocs.io/en/latest/pages/api-reference.html#column
2019-12-10 22:29:26 +01:00
Andreas Zweili
64c37d5b64 add get_absolute_url methods 2019-12-10 22:20:34 +01:00
Andreas Zweili
148d388bd9 add test for multiple backups in backup table 2019-12-10 19:21:51 +01:00
Andreas Zweili
bf8da723ea correct computer links in Nets- and BackupTables 2019-12-10 19:21:15 +01:00
Andreas Zweili
f7a046046d replace pk with customer.id
When using the pk attribute django-tables2 takes the primary key of the data of
the current row. In this case this means that it takes the primary key of the
net itself and not of the related customer
2019-12-03 22:30:27 +01:00
Andreas Zweili
be35588d9d replace the pk with customer.id
When using the pk attribute django-tables2 takes the primary key of the data of
the current row. In this case this means that it takes the primary key of the
backup itself and not the related computer
2019-12-03 22:28:35 +01:00
Andreas Zweili
e7bee10750 change test_computer_detail_view_no_permission to 403
The view should actually block unauthorized access. Which this test confirms
and now works properly.
2019-12-03 22:18:14 +01:00
Andreas Zweili
ddcaf27a50 remove an unused import 2019-12-03 22:14:50 +01:00
Andreas Zweili
463e25010b add a customer property to the Warranty and Backup model 2019-12-01 22:51:54 +01:00
Andreas Zweili
9b8af679ed fix a typo 2019-12-01 22:42:20 +01:00
Andreas Zweili
70ccf4d607 add test for computer_detail_view without permission 2019-12-01 22:28:25 +01:00
Andreas Zweili
cb753b3ed2 add test for computer_detail_view with CPU relation 2019-12-01 22:27:25 +01:00
Andreas Zweili
f1b20e3c28 add test for computer_detail_view with RAID relation 2019-12-01 22:26:52 +01:00
Andreas Zweili
5d005499da add test for computer_detail_view with a RAM relation 2019-12-01 22:17:54 +01:00
Andreas Zweili
9827a04c56 add test for the computer_detail_view 2019-12-01 22:17:29 +01:00
Andreas Zweili
5064a3bff5 fix a typo 2019-11-30 16:51:22 +01:00
Andreas Zweili
8f8ff2328e correct the line length 2019-11-30 16:47:49 +01:00
Andreas Zweili
2de2e5ada1 remove unused import 2019-11-30 16:44:03 +01:00
Andreas Zweili
1caf974a0f remove unused import 2019-11-30 16:43:52 +01:00
Andreas Zweili
f93010f97b PEP8 2019-11-30 16:37:20 +01:00
Andreas Zweili
2185332d49 let mixer choose the customer 2019-11-30 16:37:07 +01:00
Andreas Zweili
6e17f41d83 rewrite the test to actually test the computer view
For some reason this test was testing the customer detail view but this is now
fixed.
2019-11-30 16:36:13 +01:00
Andreas Zweili
e8bf02ae86 remove unused imports 2019-11-30 16:09:18 +01:00
Andreas Zweili
5d2445f5d6 remove unused variables 2019-11-30 16:09:07 +01:00
Andreas Zweili
cbae8c9711 PEP8 2019-11-30 16:08:53 +01:00
Andreas Zweili
04eac793d6 import helper directly
this way I don't have to clean unused helper imports
2019-11-30 16:07:55 +01:00