Commit Graph

61 Commits

Author SHA1 Message Date
e45324f5b4 Refactor activity feed template logic
Yay for removing arbitrary if/else chains!
2020-05-30 14:07:50 +01:00
4cfd83eeb3 Different approach to RA linking 2020-05-28 21:46:39 +01:00
14d211326e FIX: CI Locale Issues 2020-05-27 18:38:58 -04:00
4081918598 Fix some asset template things 2020-05-27 17:06:50 +02:00
06d7ef0b79 Merge remote-tracking branch 'origin/bs4' into bs4 2020-05-27 04:26:15 +02:00
06f67f4f32 Very initial work at togglable darktheme.
Dammit @alexdaniel654 just when I had my scope creep kinda under control. It'll be v. nice to have though...!
2020-05-27 04:24:58 +02:00
Matthew Smith
170c2f6d8c Fixed Pep8 - I promise I'll make a pre-commit hook sometime! 2020-05-27 01:59:18 +01:00
Matthew Smith
6d47be72fe Added screenshot recording of test failures 2020-05-27 01:47:10 +01:00
3f78b9f05f That was even less clever of me 2020-05-26 14:39:12 +01:00
c4c4291050 Fix asset creation test + actually verify its results 2020-05-26 00:22:06 +01:00
fd6aee83cf Fix the remaining tests 2020-05-25 22:49:07 +01:00
177c37ffbc Dedupe generic search logic 2020-05-25 22:47:25 +01:00
18fde7c16a FIX: Don't show asset buttons/history for basic users 2020-05-25 13:36:42 +01:00
544b6df35c Fix some tests
And some things that were actually borked
2020-05-24 22:16:50 +01:00
c9ea1bb75d pep8 2020-05-24 19:24:51 +01:00
Matthew Smith
8ffb5ab23e Updated bootstrap-select for BS4 2020-05-22 00:38:04 +01:00
e3c1da9d13 Start on new tests 2020-05-11 23:04:13 +01:00
3f48c51aeb Fix migrations
TODO - need to ensure moved models are *moved* rather than deleted and recreated!
2020-04-15 19:42:42 +01:00
abb8dc25ec Test Refactor Part 1 - Shuffle things around 2020-04-15 19:40:49 +01:00
70995a0d0b Merge branch 'master' into bs4
# Conflicts:
#	assets/models.py
#	assets/templates/asset_update.html
#	assets/templates/partials/asset_buttons.html
#	assets/templates/partials/asset_list_table_body.html
#	assets/views.py
#	templates/base_assets.html
2020-04-15 16:28:44 +01:00
3be06a7b25 Create initial asset audit framework (#403)
* WIP: Basic work on audit

* WIP: Audit modal works

Need to get the ID search working.

* WIP: Javascript shenanigans for asset audit search

It's not clean but it works..

* Improve audit search bar

Optimise for APM!

* Filter asset audit list by never-audited

* Added cable functionality to audit form

Also improved styling

* FIX: Revert partialising of asset search

* Various UX Improvements

Also rearranged asset detail/edit to be more space efficient

* FIX: Remove assets from to-be-audited table when audited

Previously required a page reload

* Improve sample data generator

Does reversion properly and sets colours for asset statuses

* FIX: Gracefully handle 404s in audit search

* FEAT: Add buttons for some common defaults on audit form

TODO: Partialise those fragments and add them to the edit/create forms too.

* FIX: Fix asset sample data command when run alone

* FEAT: More handy buttons

* FIX: Stop quickbuttons being tab-selected

If someone's tabbing through, they won't be needing the buttons...

* FIX: Hide asset detail buttons for basic users

* FIX: Migrations

* Start tests for audit

* Some deduplication for testing code

* Improve asset audit testing

* Remember to test the tests Arona

* Potentially make modal tests more consistent

* FIX?: Up WebDriverWait timeout for modal tests

* FIX?: What about this way...

* Remake migrations

* Fix README badges to point to right branch

While I'm here eh :P

* Use aware time in audit

* Fix migrations again

* Fix for my fix...

* Modify audit exclusions to properly prevent data loss

* pep eiiiiiight
2020-04-14 21:11:09 +01:00
0fe7d55eab Fix for existing invalid cable types
Also hotfix against more in the future. Proper rework needed...This is why I should have waited for review...! Lesson learnt?
2020-04-13 16:33:57 +01:00
be4a7baf8e Remove obsolete 'next_scheduled_maint' from asset model
Should fix production data...
2020-04-13 16:14:06 +01:00
a0491891e9 Add 'CableTypes' (#406)
* Move relevant fields and create migration to autogen cable types

* CRUD and ordering

* FIX: Prevent creating duplicate cable types

* FIX: pep8/remove debug print

* FIX: Meta migrations... :>

* FIX: Update tests to match new UX

* Move cabletype menu links into 'Assets' dropdown

* Fix migration

* Specify version of reportlab

Should fix CI - looks like I went a bit too ham-handed in my requirements.txt purge last time...
2020-04-13 15:54:43 +01:00
2bf643cd7a Use the right autocompleter.js... 2020-04-12 18:47:09 +01:00
c8d0c0d5d0 Asset form fixes 2020-04-06 15:17:14 +01:00
176324ed79 Tweak versioning templates to allow ID overrides
Asset specific templates begone. Still need to bring back the ID formatting for the Rigboard.
2020-04-06 14:59:10 +01:00
d216dd4c74 Versioning template improvements
//TODO Rather than have seperate asset templates, convert 'id' into a template variable
2020-04-06 03:15:43 +01:00
55e37d8c69 Tweak asset list to be more in line with other lists 2020-04-06 02:50:36 +01:00
7aa19cc7ab Asset list table improvements 2020-04-06 02:43:20 +01:00
ee7ba3ea19 Improvements to generic lists 2020-03-22 12:47:32 +00:00
41b0387e49 Reduced overall font size a touch 2020-03-22 12:15:55 +00:00
0144bd37fc Start to seperate versioning into its own app 2020-03-18 17:36:09 +00:00
264b306b2f Add a skip link for keyboard users
Someone might use it...
2020-03-18 15:07:29 +00:00
f4f8c6b417 Delete obsolete code 2020-03-18 00:30:23 +00:00
36556dea33 Add the usual set of fields to supplier and update form accordingly 2020-03-17 20:07:14 +00:00
7de778a57e Work on event creation form 2020-03-16 22:35:59 +00:00
88b34740f6 Asset list/CRUD template updates 2020-03-16 21:45:04 +00:00
4a71dd0d95 AssetList template update 2020-03-15 21:33:05 +00:00
2bfecb9c0f Improvements to generic list + use for supplier 2020-03-15 18:38:51 +00:00
3814f5abfc Generic list template 2020-03-15 18:25:05 +00:00
6c72f070f2 Begin moving to NPM/Gulp based build system
There are too many options.
2020-03-07 23:00:45 +00:00
8568c591a9 Update Python Dependencies (#404)
* [requires.io] dependency update

* Server starts...

Various things are broken, but it runs!

* [requires.io] dependency update

* [requires.io] dependency update

* [requires.io] dependency update

* FIX: Broken migrations

* FIX: Update auth framework

* FIX: Correct static use in templates

* FIX: Fix supplier sort

* FIX: Remaining tests

* Revert "Disable password reset as temporary fix to vulnerability (#396)"

This reverts commit e0c6a56263.

# Conflicts:
#	RIGS/urls.py

* FIX: Fix broken newlining in PDFs

Introduced by a change in Django 2.1 'HTML rendered by form widgets no longer includes a closing slash on void elements, e.g. <br>. This is incompatible within XHTML, although some widgets already used aspects of HTML5 such as boolean attributes.'

* FIX: Fix some Django4 deprecation warnings

Why not...

* Refactor dependency file

Should now only include dependencies we actually use, not dependencies of dependencies and unused things

* Add newlines to the paperwork print test event

This will catch the error encountered in 79ec9214f9

* Swap to pycodestyle rather than pep8 in Travis

And eliminate W605 errors

* Bit too heavy handed with the dep purge there...

* Whoops, helps if one installs pycodestyle...

* FIX: Re-add overridden login view

* Better fix for previous commit

* FIX: Bloody smartquotes

Co-authored-by: requires.io <support@requires.io>
2020-03-07 16:21:48 +00:00
ae151ed45e Add assets test suite (#400)
* Started POM and assets test

* FEAT: Adapt unit tests from RIGS to assets

* CHORE: pep8...

* Added Asset Create and Edit forms

* Add non-cable asset creation test

* CHORE: Frickin pep8...

* Add cable asset creation test

* Basic asset create validation testing

* Asset edit tests are here

A bit dodgy in places but par for the course for me :P

* Add access level tests

* Delete unused code

Much less effort way to increase coverage stats :D

* Add delete sample data test for completeness

Chasing that sweet 100% coverage...

* Add supplier list page + tests

Also fix the supplier page not being ordered alphabetically

* Helps if I add the migration...

* Add supplier create/edit tests

* Asset duplicate tests

Also fixed some random bugs

* Asset search tests

* 404 tests and test that everything requires authentication

* Test visibility of form errors

And fix supplier form not displaying errors correctly!

* Fix broken search test


Co-authored-by: Matthew Smith <mattysmith22@googlemail.com>
2020-02-08 13:52:07 +00:00
6ba87b0a5a CHANGE: Restructure the asset embed a bit
Should fix the forum mangling
2020-01-21 01:45:59 +00:00
630011aff7 FEAT: Add oembed for assets (#393)
* FEAT: Add oembed for assets

Don't see the worth in doing supplier currently...we don't OEmbed Org/Venue etc after all...

* FIX Copy paste error ;D

* Fix embeds not actually working for unauthenticated users

This is why I should have written tests...
2020-01-17 15:28:29 +00:00
4ad12ab40a FIX: Prevent basic users seeing individual asset version history
I prevented them from seeing the change stream, didn't prevent them seeing individual histories. This has to be done as otherwise it leaks financial information. If I can be arsed I'll come back to this and allow basic users to see a filtered version.
2020-01-11 21:13:50 +00:00
13205770f1 FIX: Correct template for AssetVersionHistory 2020-01-11 21:13:50 +00:00
6bb0c88c72 FIX: Migrations 2020-01-03 22:21:50 +00:00
82a30ca77d Miscellaneous changes to the Asset DB (#390)
* FIX #388: Prevent assets losing supplier data on edit

* FEAT: Add associated assets to supplier detail view

* FIX: Tweak supplier list to make detail view accessible

* Potential fix for #380

No idea if it works because I can't reproduce locally. S/O Reckons it should... :P

* FEAT #386: Asset search searches serial number.

Pending addition of advanced search.

* FIX: Order asset categories/statuses alphabetically

Instead of by pk because that's silly.

* FEAT: Statuses can have a CSS class defined in the admin panel

This replaces the hardcoding of colours in the asset list.

* FIX: Squash migrations

* Fixed supplier not working on all the create asset template

* Refactored away "assets" property on "Supplier" by using "related_name" instead

Co-authored-by: Matthew Smith <mattysmith22@googlemail.com>
2020-01-03 21:46:39 +00:00