Commit Graph

1329 Commits

Author SHA1 Message Date
RubenPX 9489a70597 Fixed currentuser.token
It needs ":" at finally of string
2022-04-07 14:24:09 +02:00
RubenPX 184d22ac81 Fix User token
Needs encode string to Base64
2022-04-07 14:12:20 +02:00
RubenPX 629a773dd2 Add reactive lots list 2022-04-07 13:28:07 +02:00
Cayo Puigdefabregas 5df183edf1 add view for inventor snapshot 2022-04-06 20:23:08 +02:00
Cayo Puigdefabregas fe21ac3cd8 new validate api with out teal 2022-04-06 19:43:35 +02:00
Cayo Puigdefabregas d1310a67bf add profile form 2022-04-06 13:50:08 +02:00
Cayo Puigdefabregas 9f84659026 clean white space 2022-04-06 13:49:15 +02:00
Cayo Puigdefabregas 3114c678a4 add user model fields #3017 2022-04-06 12:35:08 +02:00
Cayo Puigdefabregas 0150b88e6e Merge branch 'testing' into feature/server-side-render-parser-3021 2022-04-05 12:49:53 +02:00
Santiago L 277c3a84a9 Rename removelot.html -> lot_delete_modal.html 2022-04-05 11:49:47 +02:00
Santiago L 64182403a2 UI: update button colors 2022-04-05 11:47:12 +02:00
Santiago L 82cea04625 Sort lot action's buttons 2022-04-05 11:46:31 +02:00
Santiago L c9068385c3 Update icons of device buttons 2022-04-05 11:40:23 +02:00
Santiago L 8ea8fba201 Add link to help.usody.com 2022-04-05 11:32:55 +02:00
Santiago L 1e79948e57 Drop broken link of breadcrumb 2022-04-05 11:32:27 +02:00
Santiago L 683c7cff72 Hide user profile details untils is implemented 2022-04-05 11:28:07 +02:00
Santiago L b465513212 Fix flask.messages render 2022-04-05 11:27:21 +02:00
Cayo Puigdefabregas bf77934fdb fix uuid 2022-04-05 11:04:16 +02:00
Santiago L 66afb7b683 Configure index route (redirect to login) 2022-04-05 10:49:27 +02:00
Santiago L 348970946b Fix login_manager.user_loader
Also redirect unathorized requests to login view
2022-04-05 10:36:04 +02:00
Cayo Puigdefabregas b13c3347b9 add SnapshotErrors in inventory form 2022-04-05 09:22:02 +02:00
Cayo Puigdefabregas db637a99ac add migrations for snapshot errors 2022-04-04 19:37:06 +02:00
Cayo Puigdefabregas d592e2fb06 bug fix uuid 2022-04-04 19:07:26 +02:00
Cayo Puigdefabregas cb5fb14c92 add model for save errors of parse snapshots 2022-04-04 13:27:04 +02:00
Cayo Puigdefabregas 09ba81e92d fix parser for qemu datas 2022-04-01 18:25:58 +02:00
Cayo Puigdefabregas 6271c717a3 pass lshw and smart loadeds instead of raw data 2022-03-31 19:44:06 +02:00
Cayo Puigdefabregas 7e3904700f pass lshw dict instead of raw data 2022-03-31 19:42:50 +02:00
Cayo Puigdefabregas 76336ff34d change schema for lshw and smart data 2022-03-31 19:41:22 +02:00
Cayo Puigdefabregas 026a88acb8 fix comparation datas put both in utc time 2022-03-31 19:40:05 +02:00
Cayo Puigdefabregas 6fad773c91 change version of wb 2022-03-31 19:38:33 +02:00
Cayo Puigdefabregas 7a532fb02c change label for labels 2022-03-31 16:12:35 +02:00
Cayo Puigdefabregas aa5d93cf48 modularize labels instead of tags into inventory 2022-03-31 14:04:16 +02:00
Cayo Puigdefabregas 90ad7afdc8 review pr 212 mv schemas, refactor forms and clean code 2022-03-30 18:29:15 +02:00
Cayo Puigdefabregas 3be389c23f review pr 212 about refactor and schemas 2022-03-30 18:27:57 +02:00
Santiago L de23503f42 Drop numpy dependency: use math.hypot
Refactor code to adapt types: `numpy.hypot` supports pint units but
`math.hypot` expects float. It keeps behaviour because units are
not stored on database
2022-03-30 15:29:12 +02:00
Cayo Puigdefabregas ca71494e2b add wbid in the snapshots 2022-03-30 13:48:55 +02:00
Cayo Puigdefabregas 4881aac5c9 use numpy instead of math 2022-03-30 10:52:09 +02:00
Cayo Puigdefabregas 118726d207 math.hypot instead of numpy 2022-03-30 10:33:09 +02:00
Cayo Puigdefabregas d70810e88b drop pdb 2022-03-30 10:21:33 +02:00
Cayo Puigdefabregas fe8f636498 requirements pint 2022-03-30 10:12:54 +02:00
Cayo Puigdefabregas 8fa1f41006 add requirements and drop dependencies 2022-03-29 17:32:12 +02:00
Cayo Puigdefabregas 7e9a78428a flake8 fixes 2022-03-29 17:20:58 +02:00
Cayo Puigdefabregas 1c74e27fd2 fix models import not used 2022-03-29 17:09:40 +02:00
Cayo Puigdefabregas d39644716e fix bug 2022-03-29 16:59:33 +02:00
Cayo Puigdefabregas 3cd943037c add migration for new column 2022-03-29 15:44:57 +02:00
Cayo Puigdefabregas 34096b13eb clean 2022-03-29 13:36:31 +02:00
Cayo Puigdefabregas e41ee5a987 add snapshot lite to new fornt end 2022-03-29 13:36:18 +02:00
Cayo Puigdefabregas a38c940e44 return to the origin of firewire 2 2022-03-29 13:35:00 +02:00
Cayo Puigdefabregas 2c71d69a9a return to the origin of firewire 2022-03-29 13:34:01 +02:00
Cayo Puigdefabregas 90dea5492e change integer for string in firewire bios 2022-03-29 12:23:51 +02:00
Cayo Puigdefabregas f4a657052a . 2022-03-29 11:20:28 +02:00
Cayo Puigdefabregas ff4f78a44b add test_data_storage in the parse disk for get lifetime 2022-03-29 11:19:29 +02:00
Cayo Puigdefabregas 7a09127de9 add parsing from lshw and reuse code of worbench computer for parse 2022-03-28 19:14:19 +02:00
Cayo Puigdefabregas 883c01053f fix a lot of bugs and add storage and disk to the snapshot 2022-03-25 13:55:05 +01:00
Cayo Puigdefabregas 01ceeb1be1 links parsing with snapshot view 2022-03-24 13:30:53 +01:00
Cayo Puigdefabregas f7b149f926 parser module 2022-03-24 13:13:28 +01:00
Cayo Puigdefabregas 417276b88b init parse from wb 2022-03-22 13:17:41 +01:00
Santiago L 358c569eea Rewrite comment to be more clear 2022-03-22 11:37:46 +01:00
Cayo Puigdefabregas 3c27d3d421 display 2022-03-22 11:06:46 +01:00
Cayo Puigdefabregas 8052618d55 parsed for network geting of lshw 2022-03-21 19:22:47 +01:00
Cayo Puigdefabregas 649e456feb Parsing cpu and chassis of computer 2022-03-18 18:19:06 +01:00
Cayo Puigdefabregas 18883b2b8d validate fields for the new snapshot 2022-03-18 12:07:22 +01:00
Cayo Puigdefabregas 6bad17013d save snapshot 2022-03-17 18:52:58 +01:00
Cayo Puigdefabregas 3ac3802719 Filter for show only dhid tags 2022-03-17 18:09:08 +01:00
Cayo Puigdefabregas f2ab02804b new userclient from flask instead of teal 2022-03-17 13:13:15 +01:00
Cayo Puigdefabregas ec99ad22b5 . 2022-03-17 11:50:57 +01:00
Cayo Puigdefabregas f8e1776ca8 Change names tags for labels in the labels sections 2022-03-17 09:41:03 +01:00
Cayo Puigdefabregas a36fb0b0fc generate pdf with multiple devices 2022-03-16 14:27:55 +01:00
Cayo Puigdefabregas a8df3f5e5a Render a template for get a labels of multiple devices 2022-03-16 13:06:42 +01:00
Santiago L 8d3cad48bf Bump to version 2.1.0.dev 2022-03-15 15:07:02 +01:00
Santiago L 24e489b9bb Release version 2.0.0
First server side render version. Completely rewrites views of
angular JS client on flask.
2022-03-15 15:04:28 +01:00
Santiago L beb26ca232
Merge pull request #191 from eReuse/feature/server-side-render
Server side render - devicehub v2.0.0-alpha
2022-03-15 14:59:01 +01:00
Santiago L 8085700009 Hide "remember be" until it is implemented 2022-03-15 14:41:26 +01:00
Santiago L 754f75eab4 Rename base URL 'inventory.devices' => 'inventory' 2022-03-15 14:33:27 +01:00
Cayo Puigdefabregas b4b12da477 Add of DeviceHub in template 2022-03-15 11:46:32 +01:00
Santiago L 57e9a7ef9a Include version of DeviceHub (hardcoded) on footer 2022-03-15 11:12:53 +01:00
Santiago L 678dfb0ea9 Refactor filter form HTML markup
Avoid using row & col
2022-03-15 10:59:55 +01:00
Cayo Puigdefabregas d20bd63cae precommit 2022-03-15 10:02:30 +01:00
Cayo Puigdefabregas 71926f01c0 new list of device for filter 2022-03-15 09:16:01 +01:00
Cayo Puigdefabregas 40abcd6b67 pre commit 2022-03-09 10:30:28 +01:00
Santiago L aa9d3bb5a5
Drop pdb statement 2022-03-08 22:09:03 +01:00
Cayo Puigdefabregas 2f84aac7ef change the title of list when there are a select data in the filter 2022-03-08 17:59:33 +01:00
Cayo Puigdefabregas be2fda3d8c precommit 2022-03-08 17:49:56 +01:00
Cayo Puigdefabregas 0bef1dee2a adding a new device in a lot if it is created from a lot 2022-03-08 17:43:15 +01:00
Cayo Puigdefabregas b16fdd59f9 precommit 2022-03-08 11:01:10 +01:00
Cayo Puigdefabregas ea66c31a07 fix bug 2022-03-08 10:30:53 +01:00
Cayo Puigdefabregas 70f093e1a1 resolve conflict 2022-03-08 10:30:31 +01:00
Cayo Puigdefabregas a983ebd6cf add all devices as option in the select of filter 2022-03-08 10:15:53 +01:00
Cayo Puigdefabregas 62f42e9e05 fix bug 2022-03-08 10:15:21 +01:00
Santiago L c67bd93ef6 Fix flake8 unused import 2022-03-08 10:05:32 +01:00
Santiago L 46a3fc57dd Replace add supplier & add receiver pictograms
Create visual relation between:
a) Supplier and incoming lot
b) Receiver and outgoing lot
2022-03-07 18:30:32 +01:00
Santiago L bb588b10d2 Refactor HTML: use d-flex 2022-03-07 18:28:45 +01:00
Cayo Puigdefabregas bd716e2ef8 add more devices to the filter 2022-03-07 15:17:03 +01:00
Cayo Puigdefabregas 34aab019b9 fix computer option 2022-03-07 13:09:11 +01:00
Cayo Puigdefabregas 598b91e22b filter search in lists 2022-03-07 13:07:26 +01:00
Cayo Puigdefabregas e90ac224c1 use commit=True for default as django pattern, when we save or remove one model 2022-03-07 11:37:32 +01:00
Cayo Puigdefabregas 54a938071b fix bug when add or delete one device of a lot. For fix this we use the pattern of flask doing the commit in the view 2022-03-07 11:31:38 +01:00
Cayo Puigdefabregas 5df74d7742 extra message confirm when you want delete one lot with devices 2022-03-07 11:24:02 +01:00
Cayo Puigdefabregas 9d43299592 now is possible delete a temporary lot when this lot have one or more devices 2022-03-07 10:20:18 +01:00
Cayo Puigdefabregas 4fbed3c5ef drop class col in forms when is not neccesary 2022-03-04 18:50:47 +01:00
Cayo Puigdefabregas 496763473e always show the button to delete a lot and show an error message if you try to delete a lot with devices 2022-03-04 18:30:14 +01:00
Cayo Puigdefabregas 6b3ccee58f #2890
Go back to lot detail when cancel lot edit
2022-03-04 13:51:05 +01:00
Cayo Puigdefabregas d98d09cc7d propagate error of connection with the tag server to the view 2022-03-04 13:32:37 +01:00
Cayo Puigdefabregas b737aaf50a add verbose_name in device.model instead of use template system 2022-03-04 13:31:33 +01:00
Cayo Puigdefabregas 95a8b13a6b form select type of device in the list of device. Step 1 2022-03-04 13:00:51 +01:00
Cayo Puigdefabregas 075135c191 Merge branch 'feature/server-side-render' into feature/server-side-render-UX-improvements 2022-03-03 11:18:57 +01:00
Cayo Puigdefabregas d25c9faf25 fix change #2825, tags only for Computers 2022-03-03 10:43:34 +01:00
Santiago L 473a7a02de
Update ereuse_devicehub/inventory/forms.py 2022-03-02 18:51:04 +01:00
Cayo Puigdefabregas fc4ba2041e remove imported but unused 2022-03-02 13:45:52 +01:00
Cayo Puigdefabregas 7f0167f688 remove imported but unused 2022-03-02 13:39:15 +01:00
Cayo Puigdefabregas eb84884db4 remove imported but unused 2022-03-02 13:38:22 +01:00
Cayo Puigdefabregas 56b8e0886c ignoring warnings of too complex functions 2022-03-02 13:36:06 +01:00
Cayo Puigdefabregas e45a4982c6 ignoring warnings of too complex function 2022-03-02 13:31:21 +01:00
Cayo Puigdefabregas c52480231b add error msg when there are more than one device selected for add or remove one tag 2022-03-02 13:08:23 +01:00
Cayo Puigdefabregas ad09d298a0 add order by code in tags lists and select 2022-03-02 13:07:04 +01:00
Cayo Puigdefabregas 806e9ad8d0 fix bug #2840 about trade without confirm and with code 2022-03-02 10:56:31 +01:00
Cayo Puigdefabregas 15d913efea add message with result when a devices is add or remove of a lot 2022-03-02 10:36:26 +01:00
Cayo Puigdefabregas 6389956adc fix bug #2841. Show lot and devices for all users involved in a trade 2022-03-01 14:29:25 +01:00
Cayo Puigdefabregas ab89b7eff0 #2736 Move simple-datatables to base 2022-03-01 10:30:47 +01:00
Cayo Puigdefabregas 3886076f50 #2736 Move jquery to base 2022-03-01 10:07:05 +01:00
Cayo Puigdefabregas f9840e9f2b fix buttons of form of upload trade document 2022-02-28 13:33:03 +01:00
Cayo Puigdefabregas 823594dce4 add tab documents 2022-02-28 13:27:12 +01:00
Cayo Puigdefabregas b6cf1f1e3e Merge branch 'feature/server-side-render' into feature/server-side-render-UX-improvements 2022-02-28 13:06:04 +01:00
Cayo Puigdefabregas 9a95587cf3 remove lot in top 2022-02-28 13:05:36 +01:00
Cayo Puigdefabregas 560d9fae05 task #2740 add tag code in name of pdf file 2022-02-28 12:16:33 +01:00
Cayo Puigdefabregas c6538333f7 task #2739 Manufacter and Model empty instead of None 2022-02-28 12:02:56 +01:00
Cayo Puigdefabregas a45fd815a2 task #2741 fix Handle error message, provider connection when we are creating an unnamed tag 2022-02-28 11:46:31 +01:00
Cayo Puigdefabregas 692358c343 add alert when no there are any device selected 2022-02-28 11:19:22 +01:00
Cayo Puigdefabregas f655bfb895 pre-commit 2022-02-25 12:57:13 +01:00
Cayo Puigdefabregas 71d30548cc resolve conflict 2022-02-25 12:56:01 +01:00
Cayo Puigdefabregas 826584450a resolve conflict 2022-02-25 12:34:02 +01:00
Cayo Puigdefabregas b85f4f298c pre-commit 2022-02-25 12:27:14 +01:00
Cayo Puigdefabregas 26f3a64b46 there are views than doesn't have any lot on sidebar because lots are missing as template context 2022-02-25 12:25:00 +01:00
Cayo Puigdefabregas 37f50624fa change redirect to unansigned lot next to do login instead of go to profile page 2022-02-25 11:49:05 +01:00
Cayo Puigdefabregas 1772b4090c close div tag in trade template 2022-02-25 10:16:59 +01:00
Cayo Puigdefabregas e614908c73 resolve conflict 2022-02-25 10:15:23 +01:00
Cayo Puigdefabregas 04cc244f2d resolve conflict 2022-02-25 10:07:44 +01:00
Cayo Puigdefabregas c54d9a902c fix bug in trade template 2022-02-25 09:49:15 +01:00
Cayo Puigdefabregas 179feaba44 add exports in front end 2022-02-24 14:15:58 +01:00
Santiago L fbedbc8f7f Drop Additional keyword arguments
[Deprecated since version 0.9](https://docs.sqlalchemy.org/en/12/core/type_basics.html#sqlalchemy.types.Float.params.**kwargs)
2022-02-22 12:22:23 +01:00
Santiago L d4e61d992b Raise error if trying to save when validation has failed 2022-02-22 12:04:26 +01:00
Santiago L bacf14ece8 Fix method call to `get_or_create_user()` 2022-02-22 11:55:01 +01:00
Cayo Puigdefabregas bfbd7c02b7 . 2022-02-22 11:40:05 +01:00
Cayo Puigdefabregas 90eb279008 fix get_or_create_user 2022-02-22 11:31:11 +01:00
Cayo Puigdefabregas 88deb71a26 changes of review 2022-02-22 11:24:11 +01:00
Cayo Puigdefabregas eed2849af3 Merge branch 'feature/server-side-render-actions-trade' of github.com:eReuse/devicehub-teal into feature/server-side-render-actions-trade 2022-02-22 11:17:39 +01:00
Cayo Puigdefabregas 96a240b3cd drop enconded as unicode 2022-02-22 11:15:37 +01:00
Santiago L 2cff0499cb
Apply suggestions from code review 2022-02-22 11:13:00 +01:00
Santiago L 6eb3c62b83
Update ereuse_devicehub/inventory/forms.py 2022-02-22 11:12:15 +01:00
Cayo Puigdefabregas 60d9c04e2d view of export 2022-02-22 11:11:53 +01:00
Cayo Puigdefabregas 4ce359fec4 Merge branch 'feature/server-side-render' into feature/server-side-render-actions-trade 2022-02-21 13:05:38 +01:00
Cayo Puigdefabregas 83a9c66a46 show documents in list device of trade lot 2022-02-21 13:04:56 +01:00
Cayo Puigdefabregas bda39d0fc9 add trade document template 2022-02-21 13:04:13 +01:00
Cayo Puigdefabregas d056d1867b fix template trade 2022-02-21 13:03:35 +01:00
Cayo Puigdefabregas c18532f265 new view and endpoint for trade document 2022-02-21 13:03:03 +01:00
Cayo Puigdefabregas 4a2cd7adfe new form for trade documents 2022-02-21 13:02:28 +01:00
Cayo Puigdefabregas 791d2a5894 manager better the error messages in trade form 2022-02-18 13:37:45 +01:00
Cayo Puigdefabregas b72f9f37c6 add trade action iun devices when this device is insert in a lot with a trade 2022-02-18 11:29:12 +01:00
Cayo Puigdefabregas a2b074e707 problem display none for adding tag form 2022-02-18 11:18:54 +01:00
Cayo Puigdefabregas 8b27b18fc1 change supplier for user_from and receiver for user_to 2022-02-18 09:30:20 +01:00
Cayo Puigdefabregas 538e355026 add save instance correctly, create phantom accounts and change the owner for devices 2022-02-17 13:52:55 +01:00
Cayo Puigdefabregas 37779ca05c fix trade form for unassigned list 2022-02-17 13:51:59 +01:00
Cayo Puigdefabregas 403717ccf2 fix readonly and deviceslist 2022-02-17 13:51:27 +01:00
Cayo Puigdefabregas 5e46141622 fix save trade action 2022-02-16 14:03:01 +01:00
Cayo Puigdefabregas 86f3c3f483 fix validate trade form 2022-02-10 13:53:52 +01:00
Cayo Puigdefabregas adad689acd type to message from form.type.data instead of instance 2022-02-10 13:31:49 +01:00
Cayo Puigdefabregas f3ffcd89ca fixing js form for trade 2022-02-10 13:22:47 +01:00
Santiago L df4c6f7407 flake8: remove unused imports & sort them 2022-02-10 11:29:47 +01:00
Cayo Puigdefabregas cd16baaadb skeleton for trade action 2022-02-09 14:06:28 +01:00
Cayo Puigdefabregas f2d6c198cc fix css for form documents into data_wipe html 2022-02-09 11:28:57 +01:00
Cayo Puigdefabregas 1ed5d394c5 fix the new version of dispatch for NewDataWipeView 2022-02-09 11:27:08 +01:00
Cayo Puigdefabregas d102eaed9c resolve conflict 2022-02-09 10:18:56 +01:00
Cayo Puigdefabregas 764d749db0 datawipe form example as 2 forms in one 2022-02-08 13:59:50 +01:00
Santiago L b103a1a51d Rename attribute `_form` --> `form_class` 2022-02-08 11:52:30 +01:00
Santiago L e15e457481 Refactor: create method `get_next_url()` 2022-02-08 11:49:13 +01:00
Santiago L f1a78e23f6 Include action type on message 2022-02-08 11:39:27 +01:00
Santiago L aeb765dcd7 Use built-in flask.flash to implement messages 2022-02-08 11:39:08 +01:00
Santiago L 574ac41239 Render messages on base_site.html & add new action message 2022-02-07 14:52:17 +01:00
Santiago L 0d27800948 Create module to store user messages using sessions
Module ereuse_devicehub.messages inspired by django.contrib.messages
2022-02-07 14:50:19 +01:00
Cayo Puigdefabregas 2542719378 fix insert hash for force not to do a commit 2022-02-07 14:03:01 +01:00
Cayo Puigdefabregas 2a92b1f747 add form for data wipe 2022-02-07 14:02:28 +01:00
Cayo Puigdefabregas 94604dd029 view for data wipe 2022-02-07 14:01:56 +01:00
Cayo Puigdefabregas 8b467b95c3 template for data wipe 2022-02-07 14:01:38 +01:00
Cayo Puigdefabregas 579e0e35f0 Merge branch 'feature/server-side-render-actions' into feature/server-side-render-actions-documents 2022-02-04 13:23:33 +01:00
Cayo Puigdefabregas c340122d87 check the checkbox in a devices list when one form is invalid 2 2022-02-04 13:22:47 +01:00
Cayo Puigdefabregas a55944e379 check the checkbox in a devices list when one form is invalid 2022-02-04 13:16:27 +01:00
Cayo Puigdefabregas 662f75bb7b refactoring and put again the lot in form of actions 2022-02-04 12:10:27 +01:00
Cayo Puigdefabregas f011e29ce9 add description of device in actions 2022-02-04 11:30:29 +01:00
Cayo Puigdefabregas c10a5f24b4 add count to allocate action 2022-02-03 14:05:15 +01:00
Cayo Puigdefabregas 7f9a6784e9 add count of devices in action form 2022-02-03 13:58:54 +01:00
Cayo Puigdefabregas aeef04b92c change modal-fullscreen by modal-lg 2022-02-03 11:53:18 +01:00
Cayo Puigdefabregas 820078dd3f UX: inform user about the type action thas is going to be created --> show type of action 2022-02-03 11:44:51 +01:00
Cayo Puigdefabregas 4ebb312e59 first step for datawipe form 2022-02-03 11:27:16 +01:00
Cayo Puigdefabregas e8b5c1e310 deactive dataWipe action 2022-02-03 10:51:48 +01:00
Cayo Puigdefabregas f79abb05cd isort 2022-02-03 10:50:36 +01:00
Cayo Puigdefabregas 4107d67832 fix css bug for dropdown menu action 2022-02-03 10:28:15 +01:00
Cayo Puigdefabregas 87faee3444 fix the return correct page when the submit is false 2022-02-03 10:14:10 +01:00
Cayo Puigdefabregas c0918e7b57 fix error message in form 2022-02-02 14:17:42 +01:00
Cayo Puigdefabregas 71f5a8a98b fix doble query 2022-02-02 13:51:54 +01:00
Cayo Puigdefabregas 8149d0ed7c reversed actions for see the better the traceability log 2022-02-02 13:27:53 +01:00