Commit Graph

1666 Commits

Author SHA1 Message Date
ed5339925e FIX: Revert partialising of asset search 2020-02-16 02:41:36 +00:00
0b2fc6d57c Added cable functionality to audit form
Also improved styling
2020-02-16 02:34:33 +00:00
1ec277978e Filter asset audit list by never-audited 2020-02-15 12:54:31 +00:00
e656b90a22 Improve audit search bar
Optimise for APM!
2020-02-15 12:54:12 +00:00
7c42ad853c WIP: Javascript shenanigans for asset audit search
It's not clean but it works..
2020-02-14 17:20:50 +00:00
e7fcaa36bb WIP: Audit modal works
Need to get the ID search working.
2020-02-14 11:47:05 +00:00
e9a9250027 WIP: Basic work on audit 2020-02-10 00:09:46 +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
dependabot[bot]
116c497590 Bump pillow from 5.1.0 to 6.2.0 (#371)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 5.1.0 to 6.2.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/master/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/5.1.0...6.2.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: Arona Jones <aj@aronajones.com>
2020-02-08 13:09:09 +00:00
f6f3149036 Merge pull request #397 from nottinghamtec/imgbot
[ImgBot] Optimize images
2020-02-08 13:00:00 +00:00
ImgBotApp
81e7bf6d46 [ImgBot] Optimize images
*Total -- 171.82kb -> 169.55kb (1.32%)

/RIGS/static/fonts/glyphicons-halflings-regular.svg -- 106.19kb -> 103.92kb (2.14%)
/RIGS/static/imgs/paperwork/corner-tr-su.jpg -- 65.63kb -> 65.63kb (0.01%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
2020-01-21 16:46:49 +00:00
79f97bb05f Merge pull request #395 from nottinghamtec/misc
Miscellaneous changes/fixes
2020-01-21 16:40:00 +00:00
6ba87b0a5a CHANGE: Restructure the asset embed a bit
Should fix the forum mangling
2020-01-21 01:45:59 +00:00
1e03b5107e FIX: Rig Creation Test breaking on CI
Squashed commit messages below:
Also...
FIX: Person selection workflow in tests now works
FIX: Properly test name requirement in rig creation
And removed the dirty workaround for wercker so that the test no longer passes when it shouldn't. Which led to this mess of attempted fixes, now squashed:

Fine. Hardball.
What about if we click the button a different way...
Disable whole chunk of the test that was previously getting skipped
Perhaps you'd like to pass now Travis
Temporarily disable the offending part of the test.

Something odd is going on...TBC.
Reorder some selenium commands to try and fix test only failing on CI.
Another attempt at a CI test fix
FIX: Should fix rig create test failing on CI
2020-01-21 01:45:59 +00:00
39dbdd7ce4 FIX: Prevent long text breaking out of desc/notes
Just for good measure
2020-01-17 17:32:16 +00:00
1a953073be Merge branch 'master' into misc 2020-01-17 15:36:24 +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
Matthew Smith
e0c6a56263 Disable password reset as temporary fix to vulnerability (#396)
Disabled password reset and left message notifying user of problem. In response to CVE-2019-19844
2020-01-17 13:13:16 +00:00
87d460c799 FIX: Prevent long text breaking out of changelog popover
Might even be nicely hypenated on some platforms...

Closes #259
2020-01-14 19:38:26 +00:00
295397b32d CHANGE: Prevent both person and org being left blank for a Rig
Of course, there's no requirement that either of those have any actual contact details...

Closes #276.
2020-01-14 18:10:37 +00:00
10add5ab33 CHANGE: New SU Branding
Odds on it becoming outdated in less time than it took us to change it...

Closes #278.
2020-01-14 14:59:48 +00:00
7e3e8f37e2 FIX: Do not display auth warnings when duplicating events
Closes #326.
2020-01-13 22:13:37 +00:00
3a25b85e95 FEAT: Add conditional formatting to whole auth panel
Matches the formatting on the button
2020-01-13 21:07:09 +00:00
16b950c3b2 FIX: Make 'authorised at' datetime formatting match all the others
Closes #385
2020-01-13 21:07:09 +00:00
f616017423 CHANGE: Remove phone number field from initial registration
Closes #354
2020-01-13 21:07:09 +00:00
1480ae17fa CHORE: Update README.md. It was about time. 2020-01-13 20:24:16 +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
David Taylor
97c0dffbd3 Order revisions by date created (#389) 2019-12-31 16:42:56 +00:00
David Taylor
3b28eafc82 Order RIGSVersions by date 2019-12-31 16:33:43 +00:00
ca8253894a FIX #321: Authorisation time shown as 'None' in emails (#378)
* FIX #321: Authorisation Success emails dated 'None'

* FIX: Additionally fix datestamp on HTML client emails (#321)
2019-12-31 12:45:38 +00:00
01a87e0e0b FEAT: Add revision history to assets and suppliers (#387)
* FEAT: Initial work on revision history for assets

The revision history for individual items mostly works, though it shows database ID where it should show asset ID. Recent changes feed isn't yet done.

* FEAT: Initial implementation of asset activity stream

* CHORE: Fix pep8

* FIX: Asset history table 'branding'

* FIX: Individual asset version history is now correctly filtered

* FEAT: Make revision history for suppliers accessible

* CHORE: *sings* And a pep8 in a broken tree...

* Refactored out duplicated code from `AssetVersionHistory

* CHORE: pep8

And another random bit of wierd whitespace I found

Co-authored-by: Matthew Smith <mattysmith22@googlemail.com>

Closes #358
2019-12-31 12:25:42 +00:00
Matthew Smith
7c876348d7 Asset fixes (#383) 2019-12-10 22:50:28 +00:00
ddc23ce4e5 FIX: Prefix field still too limited for legacy data
Fingers crossed this works I don't have the actual data locally... I know I'm making a mess but needs must.

I genuinely hate whoever decided prefixes were a good idea now.
2019-12-06 00:58:39 +00:00
602ccc15ea FIX: Fix missing import
Presumably caused by Matt's IDE being overzealous again. I know I shouldn't be pushing to master but...one line fix...
2019-12-06 00:40:56 +00:00
Matthew Smith
b77615b9b9 Fix handling of prefixed Asset IDs and sorting of the asset list (#382)
* FIX: Remove misleading admin site title

* Moved across assets_id sorting to use proper numeric values. Also mofifies SQL command to find free asset IDs so that it works on postgres.

* Changed generateSampleAssetsData.py to include prefices on some cables.

* Fixed pep8

* Fixed missed migration

* Ensured hidden asset fields are completed on every database write

* CMULTI is a thing, and therefore a max prefix length of 5 cannot be a thing
2019-12-06 00:28:54 +00:00
David Taylor
228d72b7b2 Automatically run migrations on deploy
Because running them via Heroku CLI is easy to forget
2019-12-05 17:26:02 +00:00
62541194ee CHORE: Fix pep8
mutter mutter mutter, grumble
2019-12-05 13:10:08 +00:00
0d8fd99d92 FIX: Permission errors
This fixes keyholders being unable to see financials information or create assets. (Well, the latter needs anyone to be able to create assets before it is fully fixed)
2019-12-05 13:00:47 +00:00
9d51a82f31 FIX: Fix asset sample data generation 2019-12-05 12:56:22 +00:00
c059227d5d Revert "CHANGE: Restrict viewing asset DB to keyholders."
This reverts commit 2c334196d5.
2019-12-05 12:42:05 +00:00
2c334196d5 CHANGE: Restrict viewing asset DB to keyholders.
This is in line with what it was when it was on the Shared Drive.
2019-12-04 23:59:39 +00:00
4f036af85a Create the Asset Database (#363) 2019-12-04 23:14:27 +00:00
5210afc772 Combine client authorisation information in rig detail (#373)
* Combine client authorisation information in rig detail

* Fix stuff for CI

pep8 compliance
migration
2019-11-26 17:26:32 +00:00
David Taylor
4da8040351 Only display embedded scrollbars when required 2019-10-30 13:16:14 +00:00
David Taylor
1a49bb50e5 Further version history improvements 2019-07-28 23:40:35 +01:00
David Taylor
86b349f60e Tidy up version history for risk assessments 2019-07-28 23:32:54 +01:00
David Taylor
35997aa882 Add API hook for logging risk assessment completion (#341) 2019-07-28 23:08:18 +01:00