* Added AWS url to example env
* Upgrader - added check for new storage path and attempt to move
* Ignore symlink
* Updated paths for models
* Moved copy methods
* Added AWS_URL support
For some reasin, Flysystem was generating the wrong AWS url (with a region included)
* Switch to Flysystem for image uploads
* Nicer display of image preview
* Updated image preview on edit blades to use Flysystem
* Twiddled some more paths
* Working filesystems config
* Updated Asset Models and Departments to use Flysystem
* Janky workaround for differing S3/local urls/paths
* Try to smartly use S3 as public disk if S3 is configured
* Use public disk Storage options for public files
* Additional transformer edits for Flysystem
* Removed debugging
* Added missing use Storage directive
* Updated seeders to use Flysystem
* Default logo
* Set a default width
We can potentially override this in settings later
* Use Flysystem for logo upload
* Update downloadFile to use Flysystem
* Updated AssetFilesController to use Flysystem
* Updated acceptance signatures to use Flysystem
* Updated signature view to use Flysystem
This isn’t working 100% yet
* Use Flysystem facade for displaying asset image
* Set assets path
Should clean all these up when we’re done here
* Added Rackspace support for Flysystem
* Added Flysystem migrator console command
* Added use Storage directive for categories
* Added user avatars to Flysystem
* Added profile avatar to Flysystem
* Added the option to delete local files with the migrator
* Added a check to prevent people from trying to move from local to local
* Fixed the selectlists for Flysystem
* Fixed the getImageUrl method to reflect Flysystem
* Fixed AWS copy process
* Fixed models path
* More selectlist updates for Flysystem
* Updated example .envs with updated env variable names
* *sigh*
* Updated non-asset getImageUrl() methods to use Flysystem
* Removed S3 hardcoding
* Use Flysystem in email headers
* Fixed typo
* Removed camera support from asset file upload
We’ll find a way to add this in later (and add that support to all of the other image uploads as well)
* Fixed path for categories
* WIP - Switched to standard handleImages for asset upload.
This is currently broken as I refact the handleImages method. Because the assets store/create methods use their own Form Request, the handleImages method doesn’t exist in that Form Request so it wil error now.
* Fixed css URL error
* Updated Debugbar to latest version (#6265)
v3.2 adds support for Laravel 5.7
* Fixed: Missing CSS file in basic.blade.php (#6264)
* Fixed missing CSS file in basic.blade.php
* Added
* Changed stylesheet import for authorize.blade.php
* Updated composer lock
* Added AWS_BUCKET_ROOT as env variable
* Use nicer image preview for logo upload
* Removed AssetRequest form request
* Removed asset form request, moved custom field validation into model
* Added additional help text for logo upload
* Increased the size of the image resize - should make this a setting tho
* Few more formatting tweaks to logo section of branding blade preview
* Use Flysystem for asset/license file uploads
* Use Flysystem for removing images from models that have been deleted
* Enable backups to use Flysystem
This only handles part of the problem. This just makes it so we can ship files to S3 if we want, but does not account for how we backup files that are hosted on S3
* Use Flysystem to download license files
* Updated audits to use Flysystem
* Added de-norm counter migration for assets
* Renaming counter columns, since Eloquent has a magical *_count helper
* Added artisan command to sync counters (one-off)
* Update API to use de-normed fields
* Increment counters for checkin;/checkout
* Derp.
* Added request increment/decrementer
* Move increment for checkout to the Asset::checkout method
* Added “could take a while” message
This will return the error from the ldap_search ran in Models/Ldap.php instead of throwing an exception. Users seem to commonly be getting an Exception because of invalid search filters. This will better inform them of that issue without requiring them to enable DEBUG.
* Fix some n+1 problems
* Use route in notification dropdown to make sure we link to correct page
* Work on better UI support for checkout to non-user. Fix links on index bootstrap table, work towards eliminating assignedUser
* Remove Asset::assigneduser() relationship. Instead add a checkedOutToUser() method and/or port to using assignedTo()
* Adjust string to fit new reality
* Fix#3780. Move the consumables getDataView method to the ApiController. Not entirely RESTful, but it's a weird method that probably doesn't need its own controller and the functionality would be strange to stack on the userscontroller...
* Fix file uploads to assets and restore the delete route.
* Add asset maintence edit action to index.
* Suppliers asset list should link to the related asset, not to the supplier with same ID.
* Asset models page should use polymorphic formatter on assigned to to better handle assorted item types.
* Comment out more assigneduser fallacy until we figure out the query builder approach to searching for location text.
* Fix Bug in User::generateFormattedNameFromFullName
In a name "John Doe", this method would split it into "John" and " Doe",
Leaving a space in the last name when importing to the database. Strip
this space.
* Cleanup/fix some item mapping.
Also make some changes to the importer schema to allow for unit testing.
Generate a default item mapping, and then merge that with any custom
mappings.
* Beginning work on importer unit tests.
* Strip out testrun branches from importer. It added a lot of complexity and was not terribly useful with web importer as it stood, might reconsider down the road however.
* Normalize the mapped keys when using custom field mappings.
* Add test for custom asset import mapping.
* Make all unit tests inherit from a new custom base.
This baseclass currently calls Artisan::migrate() and seeds a Settings
instance. This fixes unit tests after the autoincrement bits.
* Store requestable as a boolean. Fixes some import oddities
* Work on tests for accessory importer.
* Test for custom mapping of accessory import, also adjust the internal field for purchase date.
* Update default locale fallback for currency detection
* Fix Reassignable in consumable as well.
* More importer tests and fixes.
* Move importer to an inline-template, allows for translations and easier passing of data from laravel to vue.
* Pull the modal out into a dedicated partial, move importer to views/importer.
* Add document of CSV->importer mappings. Reorganize some code.
Progress.
* Add header_row and first_row to imports table, and process upon uploading a file
* Use an expandable table row instead of a modal for import processing. This should allow for field mapping interaction easier.
* Fix import processing after moving method.
* Frontend importer mapping improvements.
Invert display so we show found columns and allow users to select an
importer field to map to. Also implement sample data based on first row
of csv.
* Update select2. Maintain selected items properly.
* Backend support for importing. Only works on the web importer currently. Definitely needs testing and polish.
* We no longer use vue-modal plugin.
* Add a column to track field mappings to the imports table.
* Cleanup/rename methods+refactor
* Save field mappings and import type when attempting an import, and repopulate these values when returning to the page.
* Update debugbar to fix a bug in the debugbar code.
* Fix asset tag detection.
Also rename findMatch to be a bit clearer as to what it does.
Remove logging to file of imports for http imports because
it eats an incredible amouint of memory.
This commit also moves imports out of the hardware namespace and into
their own webcontroller and route prefix, remove dead code from
AssetController as a result.
* Dynamically limit options for select2 based on import type selected, and group them by item type.
* Add user importer.
Still need to implement emailing of passwords to new users, and probably
test a bit more.
This also bumps the memory limit for web imports up as well, I need to
profile memory usage here before too long.
* Query the db to find user matches rather than search the array. Performance is much much better.
* Speed/memory improvements in importers.
Move to querying the db rather than maintaining an array for all
importers. Also only store the id of items when we import, rather than
the full model. It saves a decent amount of memory.
* Remove grouping of items in select2
With the values being set dynamically, the grouping is redundant. It
also caused a regression with automatically guessing/matching field
names. This is starting to get close.
* Remove debug line on every create.
* Switch migration to be text field instead of json field for compatibility with older mysql/mariadb
* Fix asset import regression matching email address.
* Rearrange travis order in attempt to fix null settings.
* Use auth::id instead of fetching it off the user. Fixes a null object reference during seeding.
* Pave the imports table
* Format error response if file is the wrong type.
* If a custom field doesn't exist, don't insert a blank string into the custom fields table
* CustomField::db_column_name can return the stored name in the db. It's slugified when that value is set initially. This fixes a weird issue where _1 was replaced with _xx
* updating with changes made to master
apply PR # 3456 to develop as well
* updating develop with changes made to master
apply PR # 3456 to develop as well
* updating paveit with passport-created oauth tables
* Major code simplification of the importers.
Move towards using Model::fill and Model::update rather than reinventing
the wheel. This makes the updating/creating logic a lot clearer, and
allows for the deletion of a lot of code. Also allows for supporting of
more fields in the future really easily.
* Cleanup constructors and use setters instead.
* Set the LC_MONETARY locale, and use it to strip currency symbols in Helper::parseFloat()
* Move licenseseat creation/deletion logic into an event handler on the model rather than the controller.
* Move the logging of parsed values to array_smart_fetch rather than writing it out everywhere
* Move to storing dates as carbon rather than strings. Allows for the parsing of more arbitrary strings from the importer
* Add a license importer with support for checking out to users or assets.
* Make a directory for sample/mock import csvs and populate it
* Adjust how we store/retrieve dates to fix some issues the tests found.
* Importer fix: we were trimming the wrong part of the classname when creating a category. This led to categories not being recognized.
* Add a component importer. Uses same fields as consumable importer. Only trick: If an asset_tag is present, we checkout a component to that asset on import
Enable component importer. Also calculate the importer classname in a cleaner fashion.
* Fix comparisons. find can return an index of 0, which is falsy.
Some licenses, such as windows licenses, are machine specific. This
commit allows an extra field to be added to the license importer to
allow these licenses to be imported and attached directly to an asset
* Step 1 of refactoring importer to use separate classes.
* Port web importer. Fix an issue with validation where index 0 would be treated as false and cause weird results.
* Farewall, AssetImport. You've served us well.
* Add presenters for models. Move bootstrap table JSON generation to these presenters, which cleans up controllers a lot. Move view specific modifications from the models to the presenters as well.
* Fix some issues found by travis and codacy
* Fix a few more issues found while testing.
* Attempt another acceptance test fix
* Try something else
* Maybe..
* Make delete routes work. We put a little form in the modal that spoofs the delete field.
* Fix route on creating a user.
* Fix redundant id parameter.
* Port acceptance tests to new urls.
* Initial work on migrating to model based policies instead of global gates. Will allow for much more detailed permissions bits in the future.
* This needs to stay for the dashboard checks.
* Add user states for permissions to build tests.
* Build up unit tests for gates/permissions. Move accessories/consumables/assets to policies instead of in authserviceprovider
* Migrate various locations to new syntax. Update test to be more specific
* Fix functional tests.
Add an artisan command for installing a settings setup on travis-ci
* Try a different id... Need to come up with a better way of passing the id for tests that need an existing one.
* Try to fix travis
* Update urls to use routes and not hardcode old paths. Also fix some migration errors found along the way.:
* Add a environment for travis functional tests.
* Adjust config file to make travis use it.
* Use redirect()->route instead of redirect()-to
* Dump all failures in the output directory if travis fails.
* Cleanups and minor fixes.
* Adjust the supplier modelfactory to comply with new validation restrictions.
* Some test fixes.
* Locales can be longer than 5 characters according to faker... fex gez_ET. Increase lenght in mysql and add a validation
* Update test database dump to latest migrations.
* Consolidate edit form elements into reusable partials.
This is a large code change that doesn't do much immediately. It
refactors all of the various edit.blade.php files to reference
standardized partials, so that they all reference the same base html
layout. This has the side effect of moving everything to the new fancy
"required" indicators, and making things look consistent.
In addition, I've gone ahead and renamed a few database fields. We had
Assetmodel::modelno and Consumable::model_no, I've renamed both to
model_number. We had items using ::note and ::notes, I've standardized
on ::notes. Component used total_qty where consumables and accessories
used qty, so I've moved everything to qty (And fixed a few bugs in the
helper file in the process.
TODO includes looking at how/where to place the modal javascripts to
allow for on the fly creation from all places, rather than just the
asset page.
Rename assetmodel::modelno to model_number for clarity and consistency
Rename consumable::model_no to model_number for clarity and consistency
Rename assetmodel::note to notes for clarity and consistency
Port asset and assetmodel to new partials layout. Adapt all code to the renamed model_number and notes database changes. Fix some stying.
* Share a settings variable with all views.
* Allow editing the per_page setting. We showed the value, but we never showed it on the edit page..
* use snipeSettings in all views instead of the long ugly path.
* War on partials. Centralize all bootstrap table javascript
* Use model_number instead of modelno in importer
* Codacy fix.
* More unification/deduplication. Create an edit form template layout that we use as the base for all edit forms. This gives the same interface for editing everything and makes the edit.blade.* files much easier to read.
* Use a ViewComposer instead of sharing the variable directly. Fixes artisan optimize trying to hit the db--which ruins new installs
* Fix DB seeder.
* Base sql dump and csv's to import data from for tests.
* Start some functional tests for creating items.
* Add functional tests for all create methods. Still need to do tests for edits, deletes, and lots of other things
* Improvements to functional tests.
Use the built in DB seeding mechanism instead of doing it ourselves.
Break the tests into multiple units, rather than testing everything in
each function.
* Some improvements to acceptance tests.
Make sure we're only looking at the "trs" within the bootstrap table.
Creation of assets is now tested at the functional level (and is faster)
so ignore it here.
I'm testing acceptance tests with the
IMPORT_{ASSETS,ACCESSORIES,CONSUMABLES}.csv in the tests/_data folder
imported.
* A few things to make acceptance tests work. Add a name to the companies table, and make the locations table have the correct name
* Use a .env.tests file for testing functional and unit to allow a separate database.
* Add functional tests for compoents, groups, and licenses.
* Now that the config is in the functional.yml, this just confuses things.
* Start some functional tests for creating items.
* Add functional tests for all create methods. Still need to do tests for edits, deletes, and lots of other things
* Improvements to functional tests.
Use the built in DB seeding mechanism instead of doing it ourselves.
Break the tests into multiple units, rather than testing everything in
each function.
* Some improvements to acceptance tests.
Make sure we're only looking at the "trs" within the bootstrap table.
Creation of assets is now tested at the functional level (and is faster)
so ignore it here.
I'm testing acceptance tests with the
IMPORT_{ASSETS,ACCESSORIES,CONSUMABLES}.csv in the tests/_data folder
imported.
* update db dump
* Update tests to new reality
* env for the test setup
* only load the database at beginning of tests, not between each Functional test.
* Fix a miss from renaming note to notes.
* Set Termination date when creating an asset. It was only set on edit.
* Rename serial_number to serial in components for consistency.
* Update validation rules to match limits in database. Currently we just accepted the values and they were truncated when adding to DB.
* Much more detailed functional testing of creating items. This checks to make sure all values on form have been successfully persisted to database.
* Better checking for empty values when updating. There's a lot of conditionals in here that we may want to look at cleaning up over time
* Fix typo. No manfacturers here.
* Fix model update/import. Also hardcode the status id of unset assets to the first existing one instead of an id that may not exist... Still not ideal, but better.
* Let requests to .env through the middleware. We check to see if this is readable during setup as a warning, and as it stands it triggers an infinite loop trying to hit the file.
* commit temporal
* final translation commit -- added email translations
* final translation commit -- removed file for spanish translations
* final translation commit -- removed file for spanish translations
* added missing translations
* method overrided and config files back to default
* config files back to default
* config files back to default
* Save progress
* Create a new action_log table to replace asset_log. Use Polymorphism to generalize class and targets. Port everything I can find to use it. Add a migration to port the asset_logs table to action_logs.
* Allow accepted_id to be nullable.
* Comment out the thread_id migration, because it b0rks on a new database with the move. I'm unsure if the thread_id does anything...It doesn't seem to be used
* Clean up all old methods from Actionlog model. Port everything to use new cleaner interface.
* Port the actionlog factory to fix travis.
* Adjust code to work on php5. Also fix lurking adminlog call.
* Remove weird code
* Port the pave command. Also fix dangling adminlog
* Add support for updating assets to the importer.
If an asset with a matching asset tag is found, and the --update flag is
passed to the importer, we edit the matching asset with any
asset-specific values, and persist to the database. Any missing/blank
values are skipped.
TODO: Add to web interface, add support in consumables/accessories
* Allow deleting of files on the import page.
* Extend web interface to allow updating of imported items.
This adds a modal dialog to the import process. Currently the dialog
allows the choice of update vs ignore, and choosing the item type to
import (Accessory, Asset, Consumable).
Also use Helper::ParseFloat() for purchase_cost processing. It exists,
and fixes issues on my end at least.
* Implement editing of consumables and accessories.
* Rename getProcessImportFile to postProcessImportFile to reflect how it's now used
* Fix copy-pasta error.
* Quote item names when displaying in error table.
* Remove the danger class as well as the warning class when uploading a file. Fixes a display error if a file is successful after a file fails upload.