Commit graph

90 commits

Author SHA1 Message Date
snipe 348becbbec Production assets generated 2017-09-18 13:01:54 -07:00
Daniel Meltzer 922d6937ae Custom field import repair (#3968)
* There is no notes field on accessories.  Fixes Importer Test.

* Fix notification test.  We should see a checkout not allowed exception when trying to check out to a location if the asset requires acceptance.

* Fix Custom field import.

Add a test for custom field import, and fix a few issues related to
importing custom fields.  This will restore v3 functionality.

* Add UI support for mapping custom fields.

This still requires the field mappings to be created/assigned in
advance, but will fetch all custom field names and allow them to be
selected when setting up custom field mappings.

This commit also updates laravel-mix to v1.4.3 and other node
dependencies to fix some build issues.

* Fix some requestable asset page/assetloc issues.  I'd love to know why laravel expections relationships to be in lower case... but thats a question for another day.
2017-09-18 12:29:08 -07:00
snipe 42175782a5 Only pull logo if there is a value 2017-08-26 17:43:00 -07:00
snipe c7a21e0e4d Production asset build 2017-08-26 17:39:59 -07:00
Brady Wetherington 6ad5da44f3 Formalize modals (#3898)
* Refactor Modal JS into standalone file, remove duplicated JS and HTML

* Finish fixing Bulk-checkout and checkout
2017-08-26 16:06:52 -07:00
snipe e79260a0d4 Fixes #3732 - broken tooltips and weird select2 option text behavior
The solve here was a few things - first, load jquery-ui before bootstrap. They have conflicting tooltips. Second, initiate the tooltips in the wenzhixin/bootstrap-table formatter using `data-tooltip=“true”`, and thirdly, add some JS that tells BS table to inititalize tooltips within the table using that `data-tooltip=“true”` business
2017-07-08 13:21:13 -07:00
Daniel Meltzer 61c6160b98 Importer mapping - v1 (#3677)
* 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.
2017-06-21 16:37:37 -07:00
Daniel Meltzer 30487bfee7 Fix importer vue issues. (#3655)
We currently depend on a "vue-strap" module to provide the modal dialog.
The default npm vue-strap is not compatible with vue2, so we need to use
a fork.  Update package.json to reflect this.  Probably makes sense to
move away from vue-strap in all my copious amounts of free time.
2017-06-12 15:24:49 -07:00
snipe 3046d7d33c Fixes #3644 - broken datepicker 2017-06-09 18:53:19 -07:00
snipe 02edb74cdf Style updates 2017-06-09 14:58:43 -07:00
snipe 408bb6476f Removed some unneeded styles 2017-06-09 14:57:57 -07:00
snipe e9dd119b9c Fixes some vue styles 2017-06-09 02:06:10 -07:00
snipe 9caf045930 Production assets 2017-06-06 02:36:02 -07:00
snipe 03411a3ae8 Removed poop class, added comment to webpack file 2017-06-06 01:44:17 -07:00
snipe 01cc00c832 Fixing webpack. Again 2017-06-06 01:39:53 -07:00
snipe 9338b37b74 Try to fix the datepicker :(
Webpack has fucked everything. I hate everything.
2017-06-06 00:51:41 -07:00
snipe 4e5b2d1fe9 Updated font awesome 2017-06-06 00:05:47 -07:00
snipe ada2ac06f2 Minified all.css 2017-06-06 00:05:22 -07:00
snipe 9d948e8d23 Removed erroneous bower dir 2017-06-06 00:04:55 -07:00
snipe de5334e525 Updated with production assets 2017-05-31 13:27:17 -07:00
snipe 66eaff739a More npm/css/js updates 2017-05-31 12:34:05 -07:00
snipe 7b4b2d79cf Moved CSS/JS/etc assets up one level 2017-05-31 10:31:56 -07:00
snipe 312fd27d11 Removed weird temp file 2017-05-31 10:28:07 -07:00
snipe c9484fa30b Updated compiled assets 2017-05-31 05:23:26 -07:00
snipe fd0165b4b8 New compiled assets 2017-05-31 03:32:29 -07:00
snipe 119e0772c1 Dragtable libraries
(These don’t work exactly as expected - weird CSS behavior)
2017-03-11 03:09:53 -08:00
snipe 9af5600c69 Wordwrap in side nav so it doesn’t cut off 2017-03-03 18:50:05 -08:00
snipe a9950392c4 Fixed weird sidenav breakage from smaller font size 2017-03-03 18:03:20 -08:00
Daniel Meltzer ad9470b6f8 Assorted fixed (#3332)
* Better error handling of failed file uploads.  Also improve formatting of modal dialog

* Readd app.js to the js build, fixes collapsing sidebar

* Update JS

* Fix font size.  We need to explicitly set the font size for the table because everywhere else that comes from bootstrap-tables
2017-02-22 22:49:06 -08:00
snipe eb3767890e Changed font size
This seems wrong - shouldn’t need to upload 10 files for a one-line CSS change
2017-02-10 18:42:38 -08:00
snipe 86198badbb Added more company_id filtering, more transformers 2017-02-08 08:48:41 -08:00
Daniel Meltzer 79f3ca3074 Modify the jquery that fires select2 to prevent it being run twice on the importer vue select2 (which is created separately). (#3276) 2017-02-06 18:04:36 -08:00
snipe 78f2b30b31 Removed the plus icon from file uploader in vue
I cannot believe I have to check in 7 files just for this. Vue is garbage.
2017-02-03 19:35:07 -08:00
snipe cdb6349035 Updated JS 2017-02-03 01:45:41 -08:00
snipe ca490fd129 Updated javascript 2017-02-02 19:00:42 -08:00
Brady Wetherington 7dbbe862ce Tried to fix build environment/select2 (#3262) 2017-02-02 18:53:50 -08:00
Daniel Meltzer 3c8910eeab Add select2 to node for now. (#3243) 2017-02-02 17:07:26 -08:00
snipe 11810ae9ad Minor CSS changes 2017-01-26 14:56:34 -08:00
snipe 5d3568136e Added some printer-friendly stuff 2017-01-26 06:20:53 -08:00
Daniel Meltzer 5ba2ec881c Vue importer (#3235)
* Begin work on vueifying the importer

* Beginning work on migrating the importer to use a vue/components for future interactivity

Update JS

More importer work.  Move to a vue based modal, begin handling of processing.  Still need to port error messages.

More importer work.  Move to a vue based modal, begin handling of processing.  Still need to port error messages.

Update importer.  Add error display.  Fix modal, update vue-strap to vue2

More progress.  Add select2 vue bits.

* Move to querying the db to find importer matches.  It scales better on large datasets.

Fix select2 related issues.  We were trying to initialize it twice, which led to the custom data being overwritten.

* Better error handling on uploads and deletion of files.  Restore progressbar on upload.

* Add support for generic exception reporting if app.debug is enabled.

* Handle Http 500 errors better.  Display errors if debug is enabled.  Assorted cleanups.

* Fix codacy issues, remove unused methods.

* Only bind vue to the importer for now.

* Load vue for passport as well.
2017-01-25 21:29:23 -08:00
snipe 9d555f5436 Fixes #3139 and #3230 - use native font stack, removing google fonts
Especially helpful for those running Snipe-IT in a closed environment
2017-01-24 17:02:39 -08:00
snipe 3161420eb3 ¯\_(ツ)_/¯ no idea why this doesn’t seem to matter
Too sleepy to investigate it right now
2017-01-18 04:59:56 -08:00
snipe f6ccbfc9b0 Fixed stupid font error for fontawesome 2017-01-18 04:34:59 -08:00
snipe ff2c489af4 Fixed javascript conflicts, fixing select2 and icheck 2017-01-11 17:07:27 -08:00
snipe 1364494e92 Updated JS 2017-01-11 14:52:32 -08:00
snipe dbf3a074f7 Fix CSRF issue on bootstrap tables 2017-01-11 14:52:05 -08:00
snipe 86926675ce Fixed passport token generation 2017-01-11 08:44:34 -08:00
snipe 41f58efb70 Font-awesome for bower 2017-01-11 06:53:49 -08:00
snipe e2d5401f3a Stop double-loading jquery 2017-01-11 05:51:13 -08:00
snipe 19fcda5c25 Basic API management
I’m getting a 500 on personal token creation, but there’s nothing in the logs, so I have no idea what’s wrong
2017-01-11 03:55:47 -08:00