Compare commits

...

90 Commits

Author SHA1 Message Date
snipe b354ca817d Bumped version 2017-09-25 22:10:06 -07:00
snipe 4b9bfc178d One more try on #4001 2017-09-25 22:05:57 -07:00
snipe abc2f7e789 Bumped build number 2017-09-25 21:57:16 -07:00
snipe 29cc9a0815 Tweaks to upgrade script 2017-09-25 21:50:41 -07:00
snipe f2ee7dcabb Fixes #4001 - license checkout not working 2017-09-25 21:40:43 -07:00
snipe 26203801f6 Fixes #4009 - zip not populating on locations listing page 2017-09-25 20:45:05 -07:00
snipe fbe9539130 Proto upgrade script 2017-09-25 20:30:18 -07:00
snipe 43ec959385 Add @richardhofman6 as a contributor 2017-09-25 16:58:47 -07:00
snipe 9b6276f281 Bumped version 2017-09-25 16:04:23 -07:00
snipe 0715791229 Include oauth keys in backup 2017-09-25 15:45:33 -07:00
snipe 0a0661bf41 Additional fixes for #3995 in atypical blades 2017-09-25 15:41:02 -07:00
snipe 6ee939d29b Allegedly fixes #3995 - subdirectory issues with JS/CSS 2017-09-25 15:39:18 -07:00
snipe c3afbc0e53 Run backups before purging and importing 2017-09-25 15:00:23 -07:00
snipe 38326314ca Merge branch 'develop' 2017-09-25 11:53:33 -07:00
snipe 865950e766 Fixes #4000 - user_id blank 2017-09-25 11:53:10 -07:00
snipe d49b67d033 Fix for assigned user location
Was breaking requestable page
2017-09-25 11:26:04 -07:00
snipe 6b63808e34 Fix for asset location null on user 2017-09-25 11:25:15 -07:00
snipe 34dfcb5add Merge branch 'develop' 2017-09-22 17:23:38 -07:00
snipe 30019a144a Disable login note editing on demo 2017-09-22 17:23:22 -07:00
snipe 3e222b674a Merge branch 'develop'
# Conflicts:
#	resources/views/hardware/view.blade.php
2017-09-22 17:04:43 -07:00
snipe e316444c63 Show suppliers link - force cache break? 2017-09-22 17:03:57 -07:00
snipe b29d7beb3a Merge branch 'develop'
# Conflicts:
#	.gitignore
#	Dockerfile
#	README.md
#	app/Http/Controllers/AccessoriesController.php
#	app/Http/Controllers/AssetMaintenancesController.php
#	app/Http/Controllers/AssetsController.php
#	app/Http/Controllers/ConsumablesController.php
#	app/Http/Controllers/GroupsController.php
#	app/Http/Controllers/LicensesController.php
#	app/Http/Controllers/ReportsController.php
#	app/Http/Controllers/UsersController.php
#	app/Http/routes.php
#	app/Models/Depreciation.php
#	app/Models/Location.php
#	config/version.php
#	resources/views/account/view-assets.blade.php
#	resources/views/hardware/edit.blade.php
#	resources/views/hardware/view.blade.php
#	resources/views/partials/modals.blade.php
#	resources/views/reports/custom.blade.php
#	snipeit.sh
2017-09-22 16:12:18 -07:00
snipe f0a49fefd7 Bumped version 2017-09-22 15:50:24 -07:00
snipe 998c4a5fe5 Make model number nullable 2017-09-22 04:43:28 -07:00
snipe 626a6408d0 Additional Danish and Polish translations 2017-09-18 19:12:37 -07:00
snipe 126a5671fe Set timeout for LDAP server 2017-09-18 19:11:38 -07:00
snipe aff104fa5d Bumped version for beta 2017-09-18 18:10:43 -07:00
Daniel Meltzer a5764351f7 Migrate weird assigned_type issues, Issue #3972 (#3973)
For a while, prior to 987536930, we did not null assigned_type on
checkin.  This migration manually nulls all assigned_type fields if
assigned_to is unset.  Add a test to AssetTest for this as well...kind
of.  We need to extract an Asset::checkin() method for 4.1 that mirrors
Asset::checkOut() to really test this.

This also fixes a separate (but related) issue.  The Asset importer did
not set assigned_type when importing and creating users.  In this
instance, we assume that if assigned_to is set and assigned_type is not,
then the item was checked out to a user and update the DB accordingly.
Also add a check in ImporterTest for this issue.
2017-09-18 16:40:13 -07:00
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 c53dae4b72 Possible fix for #3919 - allow later versions of mcrypted base64 keys 2017-09-14 16:43:41 -07:00
snipe 17ad7f7800 Merge branch 'master' of github.com:snipe/snipe-it 2017-09-14 14:14:45 -07:00
snipe 6232a077b5 Fix more enum fuckery 2017-09-14 14:06:53 -07:00
snipe e7d72beb88 Also check for $snipeSettings in the first place
Since the preflight also uses this basic blade
2017-09-12 13:08:43 -07:00
snipe 01e3f4a4db Use site name if provided in the settings table for basic template 2017-09-12 13:01:51 -07:00
snipe 1b76880b0e Add @imanghafoori1 as a contributor 2017-09-12 12:30:21 -07:00
Iman ed4ea7f1f4 No new feature,No bug fix, Only refactoring (#3949)
* No change in logic !

Just exchanging the if and else code blocks and negating condition.

* remove unneeded else{} block

* Re-indented the code
2017-09-12 12:28:42 -07:00
snipe 81e358a01d Small maintenance fixes 2017-09-08 17:49:01 -07:00
snipe 6c283de60a Check for status_id key - related to #3928
TODO: Fix for model number
2017-09-08 17:24:28 -07:00
snipe 4e7a6c0ccf Fixes #3928 - adds correct key generation and passport install 2017-09-08 17:23:19 -07:00
KeenRivals fd515654ff Fix broken user's manual link (#3902)
snipe-it-manual.readme.io goes to a 404 page
2017-08-29 13:50:57 -07:00
Robin Temme 5347b19910 Update Maintained Badge (#3877)
The maintenance badge was outdated and displayed "no!". As I guess this was not it's intended purpose, I changed it to the new path, and it now displays "yes".
2017-08-23 12:05:29 -07:00
snipe 29f1cf2b48 Increase depreciation max 2017-07-19 19:41:21 -07:00
Sorvani f56862c684 change CentOS 7 to pull from git (#3734)
The package setup for CentOS 7 already installs git so use it for the install. This makes later updates easier for the end users. They can simply use git pull like the instructions say for updating.
2017-07-11 20:28:31 -07:00
snipe 1052be670d Increase size of state field 2017-06-15 21:04:10 -07:00
Daniel Nemanic 30a9704625 Update UsersController.php (#3640)
If a user is disabled in your Active Directory, it should be deactivated in the licensing too.

The standard state is now deactivated for synced accounts.
Maybe we can change this throw a Setting for a standard state.

The codes comes from this site:
http://www.netvision.com/ad_useraccountcontrol.php
2017-06-12 15:29:55 -07:00
Lee Thoong Ching 9a9b6ae228 Update snipeit.sh (#3620)
To support Oracle Linux ( equivalent to redhat which check os version and type )
2017-06-01 20:54:23 -07:00
morph027 7c8dc9fe2d docker: use ubuntu:xenial with php7.0 (#3616)
Nice, thanks! I'll patch this over to develop as well.
2017-06-01 20:50:09 -07:00
snipe b81dd18576 Fixed delete_at 2017-05-19 03:00:19 -07:00
snipe dac4b58892 Show warning on deleted items 2017-05-19 02:58:55 -07:00
snipe 71fd430f8e Fixes issue with older, deleted asset tags caching QR codes 2017-05-19 02:51:35 -07:00
snipe 5265821bcc Bumped version 2017-05-18 22:24:03 -07:00
snipe cb494a74ca Merge branch 'master' of github.com:snipe/snipe-it 2017-05-18 22:20:57 -07:00
snipe c526ffbf68 Bumped version 2017-05-18 22:20:52 -07:00
snipe 6f5fe83a91 Fixed missing language string in asset display 2017-05-18 22:20:43 -07:00
Nate Felton 5a3816c907 Fixing a regression for RHEL 6 with snipe/snipe-it#2993 (#3572) 2017-05-12 17:19:41 -07:00
snipe c8796cf045 Only prompt for checkin if there is an assigned user 2017-05-10 03:37:30 -07:00
snipe f4095c6dd0 Bumped version 2017-05-09 15:32:34 -07:00
snipe ee2c67a65f Added missing logging back in 2017-05-09 15:30:45 -07:00
snipe 5614578710 Don’t make the item clickable if it’s been deleted 2017-05-09 15:30:19 -07:00
snipe 08ef78356d Update Crowdin configuration file 2017-04-06 20:59:25 -07:00
Manasses Ferreira 47ac59abef We noted that the barcode folder was not being created. (what is done now in the entrypoint.sh) At the same time, a wrong directory was being created. (which explains the deleted line in Dockerfile) (#3456) 2017-03-31 13:48:50 -07:00
snipe 265a896211 Bumped version 2017-02-22 22:38:33 -08:00
snipe f7e4fca70d Add model_number to accessory search 2017-02-22 22:34:56 -08:00
snipe bb4c443cd9 Added notes to custom report 2017-02-03 02:20:56 -08:00
snipe 7b1d2ee050 Fixed typo 2017-01-17 11:57:24 -08:00
snipe b3f70a046f Don’t require superadmin for checkin and delete user 2017-01-17 09:19:14 -08:00
morph027 734e87f85f Installer fine tuning (#2993)
* used shellcheck to lint snipeit.sh

* do not depend on lsb-release command

* add lsb codename

* really use perms()

* more fixes

* quiet apt

* silent logging using log()

* start mysql if not running

* added curl to ubuntu

* added logfile to log function

* update apt index after adding mariadb repo

* fixed typo

* review fixes
2017-01-10 23:07:06 -08:00
snipe f371c5fd62 Merge branch 'master' of github.com:snipe/snipe-it 2017-01-10 19:02:18 -08:00
snipe 4b3edbd2f5 Fixed #3130 - model ID not being saved weith model info on modal for create asset 2017-01-10 19:02:13 -08:00
Byron Wolfman 1f3106b9da Use debian base container and clean up apt-get (#3011)
* Use debian base container and clean up apt-get

Attempt to slim down the docker image by replacing ubuntu:trusty with debian:jessie and clean up after apt-get invocation. Building against the 3.6.0 commit shows a healthy reduction of 44MB, or 9%, compared to the ubuntu-based image.

* Use debian:jessie-slim for an even smaller image

If we're using a debian base image for sizing reasons, we may as well go the full distance and use debian-slim.
2017-01-10 16:22:06 -08:00
snipe 9fd3a9a82d Removed logging 2017-01-06 03:12:49 -08:00
snipe a6e6991a2d Removed second number_format 2017-01-06 03:11:27 -08:00
snipe 93ba0717d8 Removed number_format 2017-01-06 03:02:38 -08:00
snipe a8839e0ef4 Fixes #3104, #2914 and #2918 - auto-increment incorrectly generating next ID 2017-01-06 02:52:10 -08:00
snipe 3e4152c966 Bumped version 2017-01-06 00:04:26 -08:00
snipe 1bf34d73f5 Use correct authorize rule in middleware for user delete 2017-01-06 00:02:46 -08:00
snipe d1e360d64d Fix logic to use gate instead of asking if superuser 2017-01-06 00:02:19 -08:00
snipe 3b5b19848c Added oauth keys to gitignore 2017-01-06 00:01:55 -08:00
snipe 93ba90e837 Merge remote-tracking branch 'origin/develop' 2016-12-12 19:24:00 -08:00
snipe fc70d79a17 Merge remote-tracking branch 'origin/develop' 2016-12-12 19:07:07 -08:00
snipe 65016a2383 Merge remote-tracking branch 'origin/develop' 2016-12-05 16:12:41 -08:00
snipe dbcb2ccb46 Merge remote-tracking branch 'origin/develop' 2016-12-05 15:09:49 -08:00
snipe 2afcfcc87c Set DB_SSL to false for config 2016-12-03 17:32:44 -08:00
snipe 1afef9416a Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	config/version.php
2016-12-03 17:15:02 -08:00
snipe 4049143ebf Bumped version 2016-12-01 06:11:03 -08:00
snipe 4df53bdf8d Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	config/version.php
#	resources/views/account/view-assets.blade.php
2016-12-01 06:10:50 -08:00
snipe d49a1ea304 More graceful error message if log doesn’t exist 2016-12-01 06:05:14 -08:00
snipe 521f4facd5 Bumped version 2016-12-01 05:56:24 -08:00
snipe b4653dfc15 Ignore npm log 2016-12-01 05:55:29 -08:00
82 changed files with 798 additions and 469 deletions
+18
View File
@@ -728,6 +728,24 @@
"contributions": [
"code"
]
},
{
"login": "imanghafoori1",
"name": "Iman",
"avatar_url": "https://avatars0.githubusercontent.com/u/6961695?v=4",
"profile": "https://github.com/imanghafoori1",
"contributions": [
"code"
]
},
{
"login": "richardhofman6",
"name": "Richard Hofman",
"avatar_url": "https://avatars1.githubusercontent.com/u/6551003?v=4",
"profile": "https://github.com/richardhofman6",
"contributions": [
"code"
]
}
]
}
+2 -2
View File
@@ -1,5 +1,5 @@
[![Build Status](https://travis-ci.org/snipe/snipe-it.svg?branch=develop)](https://travis-ci.org/snipe/snipe-it) [![Stories in Ready](https://badge.waffle.io/snipe/snipe-it.png?label=ready+for+dev&title=Ready+for+development)](http://waffle.io/snipe/snipe-it) [![Maintenance](https://img.shields.io/maintenance/yes/2017.svg)]() [![Crowdin](https://d322cqt584bo4o.cloudfront.net/snipe-it/localized.png)](https://crowdin.com/project/snipe-it) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/snipe/snipe-it?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Docker Pulls](https://img.shields.io/docker/pulls/snipe/snipe-it.svg)](https://hub.docker.com/r/snipe/snipe-it/) [![Twitter Follow](https://img.shields.io/twitter/follow/snipeyhead.svg?style=social)](https://twitter.com/snipeyhead) [![Zenhub](https://raw.githubusercontent.com/ZenHubIO/support/master/zenhub-badge.png)](https://zenhub.io) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/553ce52037fc43ea99149785afcfe641)](https://www.codacy.com/app/snipe/snipe-it?utm_source=github.com&utm_medium=referral&utm_content=snipe/snipe-it&utm_campaign=Badge_Grade)
[![All Contributors](https://img.shields.io/badge/all_contributors-78-orange.svg?style=flat-square)](#contributors)
[![All Contributors](https://img.shields.io/badge/all_contributors-80-orange.svg?style=flat-square)](#contributors)
## Snipe-IT - Open Source Asset Management System
@@ -67,7 +67,7 @@ Thanks goes to all of these wonderful people ([emoji key](https://github.com/ken
| [<img src="https://avatars0.githubusercontent.com/u/8341172?v=3" width="110px;"/><br /><sub>Jay Richards</sub>](http://www.cordeos.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=technogenus "Code") | [<img src="https://avatars2.githubusercontent.com/u/7295127?v=3" width="110px;"/><br /><sub>Alexander Innes</sub>](https://necurity.co.uk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=leostat "Code") | [<img src="https://avatars2.githubusercontent.com/u/334485?v=3" width="110px;"/><br /><sub>Danny Garcia</sub>](https://buzzedword.codes)<br />[💻](https://github.com/snipe/snipe-it/commits?author=buzzedword "Code") | [<img src="https://avatars2.githubusercontent.com/u/366855?v=3" width="110px;"/><br /><sub>archpoint</sub>](https://github.com/archpoint)<br />[💻](https://github.com/snipe/snipe-it/commits?author=archpoint "Code") | [<img src="https://avatars1.githubusercontent.com/u/67991?v=3" width="110px;"/><br /><sub>Jake McGraw</sub>](http://www.jakemcgraw.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jakemcgraw "Code") | [<img src="https://avatars1.githubusercontent.com/u/1714374?v=3" width="110px;"/><br /><sub>FleischKarussel</sub>](https://github.com/FleischKarussel)<br />[📖](https://github.com/snipe/snipe-it/commits?author=FleischKarussel "Documentation") | [<img src="https://avatars3.githubusercontent.com/u/319644?v=3" width="110px;"/><br /><sub>Dylan Yi</sub>](https://github.com/feeva)<br />[💻](https://github.com/snipe/snipe-it/commits?author=feeva "Code") |
| [<img src="https://avatars2.githubusercontent.com/u/857740?v=3" width="110px;"/><br /><sub>Gil Rutkowski</sub>](http://FlashingCursor.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=flashingcursor "Code") | [<img src="https://avatars3.githubusercontent.com/u/129360?v=3" width="110px;"/><br /><sub>Desmond Morris</sub>](http://www.desmondmorris.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=desmondmorris "Code") | [<img src="https://avatars2.githubusercontent.com/u/52936?v=3" width="110px;"/><br /><sub>Nick Peelman</sub>](http://peelman.us)<br />[💻](https://github.com/snipe/snipe-it/commits?author=peelman "Code") | [<img src="https://avatars0.githubusercontent.com/u/53161?v=3" width="110px;"/><br /><sub>Abraham Vegh</sub>](https://abrahamvegh.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=abrahamvegh "Code") | [<img src="https://avatars0.githubusercontent.com/u/2818680?v=3" width="110px;"/><br /><sub>Mohamed Rashid</sub>](https://github.com/rashivkp)<br />[📖](https://github.com/snipe/snipe-it/commits?author=rashivkp "Documentation") | [<img src="https://avatars3.githubusercontent.com/u/1509456?v=3" width="110px;"/><br /><sub>Kasey</sub>](http://hinchk.github.io)<br />[💻](https://github.com/snipe/snipe-it/commits?author=HinchK "Code") | [<img src="https://avatars2.githubusercontent.com/u/10522541?v=3" width="110px;"/><br /><sub>Brett</sub>](https://github.com/BrettFagerlund)<br />[⚠️](https://github.com/snipe/snipe-it/commits?author=BrettFagerlund "Tests") |
| [<img src="https://avatars2.githubusercontent.com/u/16108587?v=3" width="110px;"/><br /><sub>Jason Spriggs</sub>](http://jasonspriggs.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jasonspriggs "Code") | [<img src="https://avatars2.githubusercontent.com/u/1134568?v=3" width="110px;"/><br /><sub>Nate Felton</sub>](http://n8felton.wordpress.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=n8felton "Code") | [<img src="https://avatars2.githubusercontent.com/u/14036694?v=3" width="110px;"/><br /><sub>Manasses Ferreira</sub>](http://homepages.dcc.ufmg.br/~manassesferreira)<br />[💻](https://github.com/snipe/snipe-it/commits?author=manassesferreira "Code") | [<img src="https://avatars0.githubusercontent.com/u/15913949?v=3" width="110px;"/><br /><sub>Steve</sub>](https://github.com/steveelwood)<br />[⚠️](https://github.com/snipe/snipe-it/commits?author=steveelwood "Tests") | [<img src="https://avatars1.githubusercontent.com/u/3361683?v=3" width="110px;"/><br /><sub>matc</sub>](http://twitter.com/matc)<br />[⚠️](https://github.com/snipe/snipe-it/commits?author=matc "Tests") | [<img src="https://avatars3.githubusercontent.com/u/7405702?v=3" width="110px;"/><br /><sub>Cole R. Davis</sub>](http://www.davisracingteam.com)<br />[⚠️](https://github.com/snipe/snipe-it/commits?author=VanillaNinjaD "Tests") | [<img src="https://avatars2.githubusercontent.com/u/10167681?v=3" width="110px;"/><br /><sub>gibsonjoshua55</sub>](https://github.com/gibsonjoshua55)<br />[💻](https://github.com/snipe/snipe-it/commits?author=gibsonjoshua55 "Code") |
| [<img src="https://avatars2.githubusercontent.com/u/2809241?v=4" width="110px;"/><br /><sub>Robin Temme</sub>](https://github.com/zwerch)<br />[💻](https://github.com/snipe/snipe-it/commits?author=zwerch "Code") |
| [<img src="https://avatars2.githubusercontent.com/u/2809241?v=4" width="110px;"/><br /><sub>Robin Temme</sub>](https://github.com/zwerch)<br />[💻](https://github.com/snipe/snipe-it/commits?author=zwerch "Code") | [<img src="https://avatars0.githubusercontent.com/u/6961695?v=4" width="110px;"/><br /><sub>Iman</sub>](https://github.com/imanghafoori1)<br />[💻](https://github.com/snipe/snipe-it/commits?author=imanghafoori1 "Code") | [<img src="https://avatars1.githubusercontent.com/u/6551003?v=4" width="110px;"/><br /><sub>Richard Hofman</sub>](https://github.com/richardhofman6)<br />[💻](https://github.com/snipe/snipe-it/commits?author=richardhofman6 "Code") |
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!
+16 -3
View File
@@ -47,6 +47,7 @@ class RecryptFromMcrypt extends Command
// Check and see if they have a legacy app key listed in their .env
// If not, we can try to use the current APP_KEY if looks like it's old
$legacy_key = env('LEGACY_APP_KEY');
$key_parts = explode(':', $legacy_key);
$errors = array();
if (!$legacy_key) {
@@ -54,11 +55,23 @@ class RecryptFromMcrypt extends Command
return false;
}
// Check that the app key is 32 characters
// Do some basic legacy app key length checks
if (strlen($legacy_key) == 32) {
$this->comment('INFO: Your LEGACY_APP_KEY is 32 characters. Okay to continue.');
$legacy_length_check = true;
} elseif (array_key_exists('1', $key_parts) && (strlen($key_parts[1])==44)) {
$legacy_length_check = true;
} else {
$this->error('ERROR: Your LEGACY_APP_KEY is not the correct length (32 characters). Please locate your old APP_KEY and use that as your LEGACY_APP_KEY in your .env file to continue.');
$legacy_length_check = false;
}
// Check that the app key is 32 characters
if ($legacy_length_check === true) {
$this->comment('INFO: Your LEGACY_APP_KEY looks correct. Okay to continue.');
} else {
$this->error('ERROR: Your LEGACY_APP_KEY is not the correct length (32 characters or base64 followed by 44 characters for later versions). Please locate your old APP_KEY and use that as your LEGACY_APP_KEY in your .env file to continue.');
return false;
}
@@ -2,9 +2,11 @@
namespace App\Http\Controllers\Api;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Http\Transformers\CustomFieldsTransformer;
use App\Models\CustomField;
use App\Models\CustomFieldset;
use Illuminate\Http\Request;
class CustomFieldsController extends Controller
{
@@ -16,6 +18,15 @@ class CustomFieldsController extends Controller
* @since [v3.0]
* @return Array
*/
public function index()
{
$this->authorize('index', CustomFields::class);
$fields = CustomField::get();
$total = count($fields);
return (new CustomFieldsTransformer)->transformCustomFields($fields, $total);
}
public function postReorder(Request $request, $id)
{
$fieldset = CustomFieldset::find($id);
@@ -13,6 +13,7 @@ use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Session;
use League\Csv\Reader;
use Symfony\Component\HttpFoundation\File\Exception\FileException;
use Artisan;
class ImportController extends Controller
{
@@ -94,6 +95,8 @@ class ImportController extends Controller
public function process(ItemImportRequest $request, $import_id)
{
$this->authorize('create', Asset::class);
// Run a backup immediately before processing
Artisan::call('backup:run');
$errors = $request->import(Import::find($import_id));
$redirectTo = "hardware.index";
switch ($request->get('import-type')) {
@@ -82,7 +82,7 @@ class AssetModelsController extends Controller
$model->manufacturer_id = $request->input('manufacturer_id');
$model->category_id = $request->input('category_id');
$model->notes = $request->input('notes');
$model->user_id = Auth::guard('api')->user();
$model->user_id = Auth::id();
$model->requestable = Input::has('requestable');
if ($request->input('custom_fieldset')!='') {
+9 -2
View File
@@ -380,7 +380,7 @@ class AssetsController extends Controller
if ($asset->save()) {
// Redirect to the new asset page
\Session::flash('success', trans('admin/hardware/message.update.success'));
return response()->json(['redirect_url' => route("hardware.show", $assetId)]);
return response()->json(['redirect_url' => route("view/hardware", $assetId)]);
}
\Input::flash();
\Session::flash('errors', $asset->getErrors());
@@ -412,6 +412,13 @@ class AssetsController extends Controller
$asset->delete();
$logaction = new Actionlog();
$logaction->item_type = Asset::class;
$logaction->item_id = $asset->id;
$logaction->created_at = date("Y-m-d H:i:s");
$logaction->user_id = Auth::user()->id;
$log = $logaction->logaction('deleted');
// Redirect to the asset management page
return redirect()->route('hardware.index')->with('success', trans('admin/hardware/message.delete.success'));
}
@@ -643,7 +650,7 @@ class AssetsController extends Controller
if ($settings->qr_code == '1') {
$asset = Asset::find($assetId);
$size = Helper::barcodeDimensions($settings->barcode_type);
$qr_file = public_path().'/uploads/barcodes/qr-'.str_slug($asset->asset_tag).'.png';
$qr_file = public_path().'/uploads/barcodes/qr-'.str_slug($asset->asset_tag).'-'.str_slug($asset->id).'.png';
if (isset($asset->id,$asset->asset_tag)) {
+5 -2
View File
@@ -306,8 +306,8 @@ class LicensesController extends Controller
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.asset_does_not_exist'));
}
if (($target->assigned_to!='') && (($target->assigned_to!=$assigned_to)) && ($target!='')) {
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.owner_doesnt_match_asset'));
if (($request->has('assigned_to')) && ($request->has('asset_id'))) {
return redirect()->back()->withInput()->with('error', trans('admin/licenses/message.select_asset_or_person'));
}
}
@@ -440,7 +440,10 @@ class LicensesController extends Controller
*/
public function show($licenseId = null)
{
$license = License::find($licenseId);
$license = $license->load('assignedusers', 'licenseSeats.user', 'licenseSeats.asset');
if (isset($license->id)) {
$license = $license->load('assignedusers', 'licenseSeats.user', 'licenseSeats.asset');
$this->authorize('view', $license);
+3 -3
View File
@@ -463,7 +463,7 @@ class ReportsController extends Controller
}
if (e(Input::get('notes')) == '1') {
$header[] = 'Notes';
$header[] = trans('general.notes');
}
@@ -604,9 +604,9 @@ class ReportsController extends Controller
if (e(Input::get('notes')) == '1') {
if ($asset->notes) {
$row[] = '"' .$asset->notes. '"';
$row[] = '"' .$asset->notes . '"';
} else {
$row[] = ''; // Empty string if unassigned
$row[] = '';
}
}
+6 -1
View File
@@ -338,7 +338,10 @@ class SettingsController extends Controller
$setting->email_format = $request->input('email_format');
$setting->username_format = $request->input('username_format');
$setting->require_accept_signature = $request->input('require_accept_signature');
$setting->login_note = $request->input('login_note');
if (config('app.lock_passwords')) {
$setting->login_note = $request->input('login_note');
}
$setting->default_eula_text = $request->input('default_eula_text');
$setting->thumbnail_max_h = $request->input('thumbnail_max_h');
@@ -992,6 +995,8 @@ class SettingsController extends Controller
{
if (!config('app.lock_passwords')) {
if (Input::get('confirm_purge')=='DELETE') {
// Run a backup immediately before processing
Artisan::call('backup:run');
Artisan::call('snipeit:purge', ['--force'=>'true','--no-interaction'=>true]);
$output = Artisan::output();
return view('settings/purge')
+4 -8
View File
@@ -370,14 +370,15 @@ class UsersController extends Controller
// Authorize takes care of many of our logic checks now.
$this->authorize('delete', User::class);
if ($user->assets()->count() > 0) {
// Check if we are not trying to delete ourselves
if ($user->id === Auth::user()->id) {
// Redirect to the user management page
return redirect()->route('users.index')->with('error', 'This user still has ' . $user->assets()->count() . ' assets associated with them.');
}
if ($user->licenses()->count() > 0) {
// Redirect to the user management page
return redirect()->route('users.index')->with('error', 'This user still has ' . $user->licenses()->count() . ' licenses associated with them.');
return redirect()->route('users.index')->with('error', 'This user still has ' . $user->assets()->count() . ' assets associated with them.');
}
if ($user->accessories()->count() > 0) {
@@ -532,10 +533,7 @@ class UsersController extends Controller
if (($key = array_search(Auth::user()->id, $user_raw_array)) !== false) {
unset($user_raw_array[$key]);
}
if (!Auth::user()->isSuperUser()) {
return redirect()->route('users.index')->with('error', trans('admin/users/message.insufficient_permissions'));
}
if (!config('app.lock_passwords')) {
@@ -836,7 +834,6 @@ class UsersController extends Controller
'permissions' => '{"user":1}',
'notes' => 'Imported user'
);
//dd($newuser);
DB::table('users')->insert($newuser);
@@ -928,7 +925,6 @@ class UsersController extends Controller
$user = User::find($userId);
$destinationPath = config('app.private_uploads').'/users';
// the license is valid
if (isset($user->id)) {
$this->authorize('update', $user);
$log = Actionlog::find($fileId);
@@ -25,7 +25,7 @@ class CustomFieldsTransformer
'name' => e($field->name),
'db_column_name' => e($field->db_column_name()),
'format' => e($field->format),
'required' => $field->pivot->required,
'required' => $field->pivot ? $field->pivot->required : false,
'created_at' => Helper::getFormattedDateObject($field->created_at, 'datetime'),
'updated_at' => Helper::getFormattedDateObject($field->updated_at, 'datetime'),
];
@@ -33,8 +33,9 @@ class LicensesTransformer
'depreciation' => ($license->depreciation) ? ['id' => (int) $license->depreciation->id,'name'=> e($license->depreciation->name)] : null,
'notes' => e($license->notes),
'expiration_date' => Helper::getFormattedDateObject($license->expiration_date, 'date'),
'total_seats' => (int) $license->total_seats,
'remaining_qty' => $license->remaincount(),
'total_seats' => (int) $license->seats,
'next_seat' => ($license->freeSeat()) ? (int) $license->freeSeat()->id : null,
'remaining_qty' => (int) $license->remaincount(),
'min_qty' => $license->remaincount(),
'license_name' => e($license->license_name),
'license_email' => e($license->license_email),
@@ -36,9 +36,11 @@ class LocationsTransformer
'address' => e($location->address),
'city' => e($location->city),
'state' => e($location->state),
'country' => e($location->country),
'zip' => e($location->zip),
'assets_checkedout' => $location->assets()->count(),
'assets_default' => $location->assignedassets()->count(),
'country' => e($location->country),
'created_at' => Helper::getFormattedDateObject($location->created_at, 'datetime'),
'updated_at' => Helper::getFormattedDateObject($location->updated_at, 'datetime'),
'parent' => ($location->parent) ? [
+3 -1
View File
@@ -63,7 +63,9 @@ class AssetImporter extends ItemImporter
$this->item['image'] = $this->findCsvMatch($row, "image");
$this->item['warranty_months'] = intval($this->findCsvMatch($row, "warranty"));
$this->item['model_id'] = $this->createOrFetchAssetModel($row);
if (!$this->item['status_id'] && !$editingAsset) {
// If no status ID is found
if (!array_key_exists('status_id', $this->item) && !$editingAsset) {
$this->log("No status field found, defaulting to first status.");
$this->item['status_id'] = $this->defaultStatusLabelId;
}
+9 -3
View File
@@ -109,7 +109,15 @@ abstract class Importer
{
$headerRow = $this->csv->fetchOne();
$results = $this->normalizeInputArray($this->csv->fetchAssoc());
$this->customFields = CustomField::All(['name']);
// Stolen From https://adamwathan.me/2016/07/14/customizing-keys-when-mapping-collections/
// This 'inverts' the fields such that we have a collection of fields indexed by name.
$cFs = CustomField::All();
$this->customFields = $cFs->reduce(function ($nameLookup, $field) {
$nameLookup[$field['name']] = $field;
return $nameLookup;
});
DB::transaction(function () use (&$results) {
Model::unguard();
$resultsCount = sizeof($results);
@@ -161,8 +169,6 @@ abstract class Importer
*/
public function lookupCustomKey($key)
{
// dd($this->fieldMap);
if (array_key_exists($key, $this->fieldMap)) {
$this->log("Found a match in our custom map: {$key} is " . $this->fieldMap[$key]);
return $this->fieldMap[$key];
+2
View File
@@ -10,6 +10,7 @@ use App\Models\Location;
use App\Models\Manufacturer;
use App\Models\Statuslabel;
use App\Models\Supplier;
use App\Models\User;
class ItemImporter extends Importer
{
@@ -68,6 +69,7 @@ class ItemImporter extends Importer
if(get_class($this) !== UserImporter::class) {
if ($this->item["user"] = $this->createOrFetchUser($row)) {
$this->item['assigned_to'] = $this->item['user']->id;
$this->item['assigned_type'] = User::class;
}
}
}
-1
View File
@@ -61,7 +61,6 @@ class Accessory extends SnipeModel
'purchase_date',
'model_number',
'manufacturer_id',
'notes',
'qty',
'requestable'
];
+7 -4
View File
@@ -79,6 +79,7 @@ class Asset extends Depreciable
protected $fillable = [
'asset_tag',
'assigned_to',
'assigned_type',
'company_id',
'image',
'model_id',
@@ -253,18 +254,20 @@ class Asset extends Depreciable
public function assetLoc()
{
if (!empty($this->assignedType())) {
// dd($this->assignedType());
if ($this->assignedType() == self::ASSET) {
return $this->assignedTo->assetloc(); // Recurse until we have a final location
return $this->assignedto->assetloc(); // Recurse until we have a final location
}
if ($this->assignedType() == self::LOCATION) {
return $this->assignedTo();
}
if ($this->assignedType() == self::USER) {
if (!$this->assignedTo) {
return $this->defaultLoc();
}
return $this->assignedTo->userLoc();
}
if (!$this->assignedTo) {
return $this->defaultLoc();
}
}
return $this->defaultLoc();
}
+1 -1
View File
@@ -26,7 +26,7 @@ class AssetModel extends SnipeModel
// Declare the rules for the model validation
protected $rules = array(
'name' => 'required|min:1|max:255',
'model_number' => 'min:1|max:255',
'model_number' => 'max:255|nullable',
'category_id' => 'required|integer|exists:categories,id',
'manufacturer_id' => 'required|integer|exists:manufacturers,id',
'eol' => 'integer:min:0|max:240|nullable',
+1
View File
@@ -48,6 +48,7 @@ class Ldap extends Model
// Needed for AD
ldap_set_option($connection, LDAP_OPT_REFERRALS, 0);
ldap_set_option($connection, LDAP_OPT_PROTOCOL_VERSION, $ldap_version);
ldap_set_option($connection, LDAP_OPT_NETWORK_TIMEOUT, 20);
if ($ldap_use_tls=='1') {
ldap_start_tls($connection);
+5 -2
View File
@@ -332,14 +332,17 @@ class License extends Depreciable
return $this->belongsTo('\App\Models\Supplier', 'supplier_id');
}
/*
* Get the next available free seat - used by
* the API to populate next_seat
*/
public function freeSeat()
{
$seat = LicenseSeat::where('license_id', '=', $this->id)
return $this->licenseseats()
->whereNull('deleted_at')
->whereNull('assigned_to')
->whereNull('asset_id')
->first();
return $seat->id;
}
public static function getExpiringLicenses($days = 60)
+7 -4
View File
@@ -43,20 +43,23 @@ trait Loggable
$log->target_type = get_class($target);
$log->target_id = $target->id;
$class = get_class($target);
if ($class == Location::class) {
$target_class = get_class($target);
// Figure out what the target is
if ($target_class == Location::class) {
// We can checkout to a location
$log->location_id = $target->id;
} else if ($class== Asset::class) {
} elseif ($target_class== Asset::class) {
$log->location_id = $target->rtd_location_id;
} else {
$log->location_id = $target->location_id;
}
$log->note = $note;
$log->logaction('checkout');
$params = [
'item' => $this,
'item' => $log->item,
'target' => $target,
'admin' => $log->user,
'note' => $note,
+1 -1
View File
@@ -94,7 +94,7 @@ class CheckoutNotification extends Notification
'item_tag' => $item->asset_tag,
'note' => $this->params['note'],
'item_serial' => $item->serial,
'require_acceptance' => $item->requireAcceptance(),
'require_acceptance' => method_exists($item, 'requireAcceptance') ? $item->requireAcceptance() : '',
'log_id' => $this->params['log_id'],
];
return (new MailMessage)
+10
View File
@@ -146,6 +146,16 @@ class LicensePresenter extends Presenter
return (string)link_to_route('licenses.show', $this->name, $this->id);
}
/**
* Link to this licenses Name
* @return string
*/
public function fullName()
{
return 'poop';
}
/**
* Link to this licenses serial
* @return string
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+2
View File
@@ -22,6 +22,8 @@ return [
base_path('public/uploads'),
base_path('config'),
base_path('storage/private_uploads'),
base_path('storage/oauth-private.key'),
base_path('storage/oauth-public.key'),
],
/*
+4 -4
View File
@@ -1,7 +1,7 @@
<?php
return array (
'app_version' => 'v4',
'build_version' => 'beta5',
'hash_version' => '7',
'full_hash' => 'v4-beta5-7-gae8c9d6',
'app_version' => 'v4.0.2',
'build_version' => '7',
'hash_version' => 'g4b9bfc1',
'full_hash' => 'v4.0.2-7-g4b9bfc1',
);
@@ -0,0 +1,17 @@
<?php
$factory->define(App\Models\CustomField::class, function (Faker\Generator $faker) {
return [
'name' => $faker->catchPhrase,
'format' => 'IP',
'element' => 'text',
];
});
$factory->define(App\Models\CustomFieldset::class, function (Faker\Generator $faker) {
return [
'name' => $faker->catchPhrase,
'user_id' => Auth::id()
];
});
-8
View File
@@ -97,14 +97,6 @@ $factory->define(App\Models\Consumable::class, function (Faker\Generator $faker)
];
});
$factory->define(App\Models\CustomField::class, function (Faker\Generator $faker) {
return [
'name' => $faker->catchPhrase,
'format' => 'IP',
'element' => 'text',
];
});
$factory->define(App\Models\Department::class, function (Faker\Generator $faker) {
return [
'name' => $faker->catchPhrase,
@@ -12,10 +12,13 @@ class AddSoftDeletedToLog extends Migration {
*/
public function up()
{
Schema::table('asset_logs', function ($table) {
$table->string('asset_type',100)->nullable()->change();
});
$platform = Schema::getConnection()->getDoctrineSchemaManager()->getDatabasePlatform();
$platform->registerDoctrineTypeMapping('enum', 'string');
Schema::table('asset_logs', function ($table) {
$table->string('asset_type',100)->nullable()->change();
});
// DB::statement('ALTER TABLE ' . DB::getTablePrefix() . 'asset_logs MODIFY column asset_type varchar(100) null');
// DB::statement('ALTER TABLE ' . DB::getTablePrefix() . 'asset_logs MODIFY column added_on timestamp default "0000-00-00 00:00:00"');
@@ -0,0 +1,36 @@
<?php
use App\Models\Asset;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class FixAssignedTypeNotBeingNulled extends Migration
{
/**
* Run the migrations.
* There was a point in the v4 beta process where assigned_type was not nulled on checkin
* This manually nulls all assets where there is an assigned_type but not an assigned_to.
* @return void
*/
public function up()
{
// There was a point in the v4 beta process where assigned_type was not nulled on checkin
// This manually nulls all assets where there is an assigned_type but not an assigned_to.
Asset::whereNotNull('assigned_type')->whereNull('assigned_to')->update(['assigned_type' => null]);
// Additionally, the importer did not set assigned_type when importing.
// In the case where we have an assigned_to but not an assigned_type, set the assigned_type to User.
Asset::whereNotNull('assigned_to')->whereNull('assigned_type')->update(['assigned_type' => 'App\Models\User']);
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}
+7 -5
View File
@@ -10,14 +10,14 @@
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "
},
"devDependencies": {
"axios": "^0.15.3",
"axios": "^0.16.2",
"babel-preset-latest": "^6.24.1",
"cross-env": "^3.2.4",
"cross-env": "^5.0.5",
"jquery": "^3.1.1",
"laravel-mix": "0.12.1",
"laravel-mix": "1.4.3",
"lodash": "^4.17.4",
"vue": "2.3.3",
"vue-template-compiler": "2.3.3"
"vue": "2.4.4",
"vue-template-compiler": "2.4.4"
},
"dependencies": {
"blueimp-file-upload": "^9.18.0",
@@ -32,6 +32,8 @@
"jquery-ui": "^1.12.1",
"jquery-ui-bundle": "^1.12.1",
"jquery.iframe-transport": "^1.0.0",
"less": "^2.7.2",
"less-loader": "^4.0.5",
"papaparse": "^4.3.3",
"select2": "^4.0.3",
"tether": "^1.4.0",
+23 -23
View File
File diff suppressed because one or more lines are too long
@@ -130,12 +130,14 @@ tr {
{id: 'jobtitle', text: 'Job Title' },
{id: 'phone_number', text: 'Phone Number' },
],
customFields: [],
},
columnMappings: this.file.field_map || {},
activeColumn: null,
}
},
created() {
this.fetchCustomFields();
window.eventHub.$on('showDetails', this.toggleExtendedDisplay)
this.populateSelect2ActiveItems();
},
@@ -143,7 +145,7 @@ tr {
columns() {
switch(this.options.importType) {
case 'asset':
return this.columnOptions.general.concat(this.columnOptions.assets);
return this.columnOptions.general.concat(this.columnOptions.assets).concat(this.columnOptions.customFields);
case 'license':
return this.columnOptions.general.concat(this.columnOptions.licenses);
case 'user':
@@ -153,6 +155,18 @@ tr {
}
},
methods: {
fetchCustomFields() {
this.$http.get('/api/v1/fields')
.then( ({data}) => {
data = data.rows;
data.forEach((item) => {
this.columnOptions.customFields.push({
'id': item.db_column_name,
'text': item.name,
})
})
});
},
postSave() {
this.statusText = "Processing...";
this.$http.post('/api/v1/imports/process/'+this.file.id, {
@@ -208,4 +222,4 @@ tr {
select2: require('../select2.vue')
}
}
</script>
</script>
@@ -1,14 +1,14 @@
<?php
return [
'asset_maintenance_type' => 'Maintenance Type',
'title' => 'Title',
'start_date' => 'Started',
'completion_date' => 'Completed',
'cost' => 'Cost',
'is_warranty' => 'Warranty Improvement',
'asset_maintenance_time' => 'Days',
'notes' => 'Notes',
'update' => 'Update',
'create' => 'Create'
'asset_maintenance_type' => 'Vedligeholdelsestype',
'title' => 'Titel',
'start_date' => 'Start dato',
'completion_date' => 'Gennemført',
'cost' => 'Omkostninger',
'is_warranty' => 'Garantiforbedring',
'asset_maintenance_time' => 'Dage',
'notes' => 'Noter',
'update' => 'Opdatering',
'create' => 'Opret'
];
@@ -1,11 +1,11 @@
<?php
return [
'asset_maintenances' => 'Asset Maintenances',
'edit' => 'Edit Asset Maintenance',
'delete' => 'Delete Asset Maintenance',
'view' => 'View Asset Maintenance Details',
'repair' => 'Repair',
'maintenance' => 'Maintenance',
'upgrade' => 'Upgrade'
'asset_maintenances' => 'Aktiv vedligeholdelse',
'edit' => 'Redigere aktiv vedligeholdelse',
'delete' => 'Slette aktiv vedligeholdelse',
'view' => 'Se aktiv vedligeholdelse detaljer',
'repair' => 'Repar',
'maintenance' => 'Vedligeholdelse',
'upgrade' => 'Opgradér'
];
@@ -3,6 +3,6 @@
return [
'title' => 'Asset Maintenance',
'asset_name' => 'Asset Name',
'is_warranty' => 'Warranty',
'dl_csv' => 'Download CSV'
'is_warranty' => 'Garanti',
'dl_csv' => 'Hent CSV'
];
@@ -1,6 +1,6 @@
<?php
return [
'about_companies_title' => 'About Companies',
'about_companies_text' => 'Companies can be used as a simple identifier field, or can be used to limit visibility of assets, users, etc if full company support is enabled in your Admin settings.',
'select_company' => 'Select Company',
'about_companies_title' => 'Om virksomheder',
'about_companies_text' => 'Virksomheder kan bruges som en simpel id-felt, eller kan bruges til at begrænse synligheden af aktiver, brugere, osv. hvis fuld selskab understøttelse er aktiveret i din Admin indstillinger.',
'select_company' => 'Vælg firma',
];
@@ -1,18 +1,18 @@
<?php
return array(
'does_not_exist' => 'Company does not exist.',
'assoc_users' => 'This company is currently associated with at least one model and cannot be deleted. Please update your models to no longer reference this company and try again. ',
'does_not_exist' => 'Virksomheden eksisterer ikke.',
'assoc_users' => 'Denne virksomhed er knyttet til mindst én model og kan ikke slettes. Opdater venligst dine modeller for at ikke længere henvise til dette selskab, og prøv igen. ',
'create' => array(
'error' => 'Company was not created, please try again.',
'success' => 'Company created successfully.'
'error' => 'Virksomheden blev ikke oprettet, prøve igen.',
'success' => 'Virksomhed oprettet.'
),
'update' => array(
'error' => 'Company was not updated, please try again',
'success' => 'Company updated successfully.'
'error' => 'Virksomheden blev ikke opdateret, prøv igen',
'success' => 'Virksomheden blev opdateret.'
),
'delete' => array(
'confirm' => 'Are you sure you wish to delete this company?',
'error' => 'There was an issue deleting the company. Please try again.',
'success' => 'The Company was deleted successfully.'
'confirm' => 'Er du sikker på du vil slette denne virksomhed?',
'error' => 'Der opstod et problem under sletning af virksomheden. Prøv igen.',
'success' => 'Virksomheden blev slettet.'
)
);
+5 -5
View File
@@ -1,9 +1,9 @@
<?php
return array(
'companies' => 'Companies',
'create' => 'Create Company',
'title' => 'Company',
'update' => 'Update Company',
'name' => 'Company Name',
'companies' => 'Virksomheder',
'create' => 'Oprette virksomhed',
'title' => 'Virksomheden',
'update' => 'Opdater virksomhed',
'name' => 'Virksomhedens navn',
'id' => 'ID',
);
@@ -1,30 +1,30 @@
<?php
return array(
'custom_fields' => 'Custom Fields',
'field' => 'Field',
'about_fieldsets_title' => 'About Fieldsets',
'custom_fields' => 'Brugerdefinerede felter',
'field' => 'Felt',
'about_fieldsets_title' => 'Om Feltsæt',
'about_fieldsets_text' => 'Fieldsets allow you to create groups of custom fields that are frequently re-used used for specific asset model types.',
'custom_format' => 'Custom format...',
'encrypt_field' => 'Encrypt the value of this field in the database',
'encrypt_field_help' => 'WARNING: Encrypting a field makes it unsearchable.',
'encrypted' => 'Encrypted',
'fieldset' => 'Fieldset',
'qty_fields' => 'Qty Fields',
'fieldsets' => 'Fieldsets',
'fieldset_name' => 'Fieldset Name',
'field_name' => 'Field Name',
'field_values' => 'Field Values',
'custom_format' => 'Brugerdefineret format...',
'encrypt_field' => 'Kryptere værdien af dette felt i databasen',
'encrypt_field_help' => 'Advarsel: Kryptere et felt gør det uransagelige.',
'encrypted' => 'Krypteret',
'fieldset' => 'Feltsæt',
'qty_fields' => 'Antal felter',
'fieldsets' => 'Feltsæt',
'fieldset_name' => 'Feltsættets navn',
'field_name' => 'Feltnavn',
'field_values' => 'Feltværdier',
'field_values_help' => 'Add selectable options, one per line. Blank lines other than the first line will be ignored.',
'field_element' => 'Form Element',
'field_element' => 'Form-elementet',
'field_element_short' => 'Element',
'field_format' => 'Format',
'field_custom_format' => 'Custom Format',
'required' => 'Required',
'field_custom_format' => 'Brugerdefineret Format',
'required' => 'Påkrævet',
'req' => 'Req.',
'used_by_models' => 'Used By Models',
'order' => 'Order',
'create_fieldset' => 'New Fieldset',
'create_field' => 'New Custom Field',
'value_encrypted' => 'The value of this field is encrypted in the database. Only admin users will be able to view the decrypted value',
'used_by_models' => 'Bruges af modeller',
'order' => 'Ordre',
'create_fieldset' => 'Nyt Feltsæt',
'create_field' => 'Nyt Brugerdefinerede Felt',
'value_encrypted' => 'Værdien af dette felt er krypteret i databasen. Kun admins vil være i stand til at se den krypteret værdi',
);
@@ -3,48 +3,48 @@
return array(
'field' => array(
'invalid' => 'That field does not exist.',
'already_added' => 'Field already added',
'invalid' => 'Dette felt findes ikke.',
'already_added' => 'Feltet allerede tilføjet',
'create' => array(
'error' => 'Field was not created, please try again.',
'success' => 'Field created successfully.',
'assoc_success' => 'Field successfully added to fieldset.'
'error' => 'Feltet blev ikke oprettet, prøve igen.',
'success' => 'Feltet oprettet.',
'assoc_success' => 'Felt tilføjet til feltsættet.'
),
'update' => array(
'error' => 'Field was not updated, please try again',
'success' => 'Field updated successfully.'
'error' => 'Feltet blev ikke opdateret, prøv igen',
'success' => 'Feltet opdateret.'
),
'delete' => array(
'confirm' => 'Are you sure you wish to delete this field?',
'error' => 'There was an issue deleting the field. Please try again.',
'success' => 'The field was deleted successfully.',
'in_use' => 'Field is still in use.',
'confirm' => 'Er du sikker på du ønsker at slette feltet?',
'error' => 'Der opstod et problem under sletning af feltet. Prøv venligst igen.',
'success' => 'Feltet blev slettet.',
'in_use' => 'Feltet er stadig i brug.',
)
),
'fieldset' => array(
'does_not_exist' => 'Fieldset does not exist',
'does_not_exist' => 'Feltsættet findes ikke',
'create' => array(
'error' => 'Fieldset was not created, please try again.',
'success' => 'Fieldset created successfully.'
'error' => 'Feltsættet blev ikke opdateret, prøv igen.',
'success' => 'Feltsættet oprettet.'
),
'update' => array(
'error' => 'Fieldset was not updated, please try again',
'success' => 'Fieldset updated successfully.'
'error' => 'Feltsættet blev ikke opdateret, prøv igen',
'success' => 'Feltsættet opdateret.'
),
'delete' => array(
'confirm' => 'Are you sure you wish to delete this fieldset?',
'error' => 'There was an issue deleting the fieldset. Please try again.',
'success' => 'The fieldset was deleted successfully.',
'in_use' => 'Fieldset is still in use.',
'confirm' => 'Er du sikker på du vil slette dette feltsæt?',
'error' => 'Der opstod et problem under sletning af feltsættet. Prøv venligst igen.',
'success' => 'Feltsættet blev slettet.',
'in_use' => 'Feltsættet er stadig i brug.',
)
),
@@ -2,20 +2,20 @@
return array(
'does_not_exist' => 'Department does not exist.',
'assoc_users' => 'This department is currently associated with at least one user and cannot be deleted. Please update your users to no longer reference this department and try again. ',
'does_not_exist' => 'Afdeling findes ikke.',
'assoc_users' => 'Denne afdeling er i øjeblikket knyttet til mindst én bruger og kan ikke slettes. Opdater venligst dine brugere for at ikke længere referere til denne afdeling, og prøv igen. ',
'create' => array(
'error' => 'Department was not created, please try again.',
'success' => 'Department created successfully.'
'error' => 'Afdelingen blev ikke oprettet, prøve igen.',
'success' => 'Afdeling oprettet.'
),
'update' => array(
'error' => 'Department was not updated, please try again',
'success' => 'Department updated successfully.'
'error' => 'Afdelingen blev ikke opdateret, prøv igen',
'success' => 'Afdeling opdateret.'
),
'delete' => array(
'confirm' => 'Are you sure you wish to delete this department?',
'error' => 'There was an issue deleting the department. Please try again.',
'success' => 'The department was deleted successfully.'
'confirm' => 'Er du sikker på du vil slette denne afdeling?',
'error' => 'Der var et problem sletningen af afdelingen. Prøv venligst igen.',
'success' => 'Afdelingen blev slettet.'
)
);
@@ -3,9 +3,9 @@
return array(
'id' => 'ID',
'name' => 'Department Name',
'name' => 'Afdelingsnavn',
'manager' => 'Manager',
'location' => 'Location',
'create' => 'Create Department',
'update' => 'Update Department',
'location' => 'Placering',
'create' => 'Oprette afdeling',
'update' => 'Opdater afdeling',
);
+4 -4
View File
@@ -1,11 +1,11 @@
<?php
return array(
'about_groups_title' => 'About Groups',
'about_groups' => 'Groups are used to generalize user permissions.',
'about_groups_title' => 'Om grupper',
'about_groups' => 'Grupper bruges til at generalisere brugertilladelser.',
'group_management' => 'Gruppehåndtering',
'create' => 'Create New Group',
'update' => 'Edit Group',
'create' => 'Opret Ny Gruppe',
'update' => 'Rediger Gruppe',
'group_name' => 'Gruppenavn',
'group_admin' => 'Gruppeadministrator',
'allow' => 'Tillad',
+7 -7
View File
@@ -1,21 +1,21 @@
<?php
return array(
'about_licenses_title' => 'About Licenses',
'about_licenses_title' => 'Om licenser',
'about_licenses' => 'Licenses are used to track software. They have a specified number of seats that can be checked out to individuals',
'checkin' => 'Checkin License Seat',
'checkout_history' => 'Checkout History',
'checkout' => 'Checkout License Seat',
'edit' => 'Edit License',
'edit' => 'Redigere licens',
'filetype_info' => 'Allowed filetypes are png, gif, jpg, jpeg, doc, docx, pdf, txt, zip, and rar.',
'clone' => 'Clone License',
'clone' => 'Klon licens',
'history_for' => 'History for ',
'in_out' => 'In/Out',
'info' => 'License Info',
'info' => 'Licens Info',
'license_seats' => 'License Seats',
'seat' => 'Seat',
'seats' => 'Seats',
'software_licenses' => 'Software Licenses',
'user' => 'User',
'view' => 'View License',
'software_licenses' => 'Softwarelicenser',
'user' => 'Bruger',
'view' => 'Se licens',
);
+11 -11
View File
@@ -3,23 +3,23 @@
return array(
'assets_user' => 'Assets assigned to :name',
'assets_user' => 'Aktiver tildelt :navn',
'bulk_update_warn' => 'You are about to edit the properties of :user_count users. Please note that you cannot change your own user attributes using this form, and must make edits to your own user individually.',
'bulk_update_help' => 'This form allows you to update multiple users at once. Only fill in the fields you need to change. Any fields left blank will remain unchanged.',
'current_assets' => 'Assets currently checked out to this user',
'clone' => 'Clone User',
'contact_user' => 'Contact :name',
'edit' => 'Edit User',
'filetype_info' => 'Allowed filetypes are png, gif, jpg, jpeg, doc, docx, pdf, txt, zip, and rar.',
'clone' => 'Klon bruger',
'contact_user' => 'Kontakt :navn',
'edit' => 'Redigér bruger',
'filetype_info' => 'Tilladte filtyper er png, gif, jpg, jpeg, doc, docx, pdf, txt, zip og rar.',
'history_user' => 'History for :name',
'info' => 'Info',
'restore_user' => 'Click here to restore them.',
'last_login' => 'Last Login',
'info' => 'Information',
'restore_user' => 'Klik her for at gendanne dem.',
'last_login' => 'Sidste Login',
'ldap_config_text' => 'LDAP configuration settings can be found Admin > Settings. The (optional) selected location will be set for all imported users.',
'software_user' => 'Software Checked out to :name',
'view_user' => 'View User :name',
'usercsv' => 'CSV file',
'view_user' => 'Se bruger :navn',
'usercsv' => 'CSV-fil',
'two_factor_admin_optin_help' => 'Your current admin settings allow selective enforcement of two-factor authentication. ',
'two_factor_enrolled' => '2FA Device Enrolled ',
'two_factor_active' => '2FA Active ',
'two_factor_active' => '2FA aktiv ',
);
+26 -26
View File
@@ -2,37 +2,37 @@
return array(
'activated' => 'Aktiv',
'allow' => 'Allow',
'checkedout' => 'Assets',
'created_at' => 'Created',
'createuser' => 'Create User',
'deny' => 'Deny',
'allow' => 'Tillad',
'checkedout' => 'Aktiver',
'created_at' => 'Oprettet',
'createuser' => 'Opret bruger',
'deny' => 'Afvis',
'email' => 'Email',
'employee_num' => 'Employee No.',
'first_name' => 'First Name',
'employee_num' => 'Medarbejder nr.',
'first_name' => 'Fornavn',
'groupnotes' => 'Select a group to assign to the user, remember that a user takes on the permissions of the group they are assigned.',
'id' => 'Id',
'id' => 'ID',
'inherit' => 'Inherit',
'job' => 'Job Title',
'last_login' => 'Last Login',
'last_name' => 'Last Name',
'location' => 'Location',
'job' => 'Job Titel',
'last_login' => 'Sidste Login',
'last_name' => 'Efternavn',
'location' => 'Placering',
'lock_passwords' => 'Login details cannot be changed on this installation.',
'manager' => 'Manager',
'managed_locations' => 'Managed Locations',
'name' => 'Name',
'notes' => 'Notes',
'password_confirm' => 'Confirm Password',
'password' => 'Password',
'phone' => 'Phone',
'show_current' => 'Show Current Users',
'show_deleted' => 'Show Deleted Users',
'title' => 'Title',
'managed_locations' => 'Administrerede placeringer',
'name' => 'Navn',
'notes' => 'Noter',
'password_confirm' => 'Bekræft adgangskode',
'password' => 'Adgangskode',
'phone' => 'Telefon',
'show_current' => 'Vis nuværende brugere',
'show_deleted' => 'Vis slettede brugere',
'title' => 'Titel',
'to_restore_them' => 'to restore them.',
'updateuser' => 'Update User',
'username' => 'Username',
'user_deleted_text' => 'This user has been marked as deleted.',
'updateuser' => 'Opdatere bruger',
'username' => 'Brugernavn',
'user_deleted_text' => 'Denne bruger er blevet markeret som slettede.',
'username_note' => '(This is used for Active Directory binding only, not for login.)',
'cloneuser' => 'Clone User',
'viewusers' => 'View Users',
'cloneuser' => 'Klon bruger',
'viewusers' => 'Se brugere',
);
+6 -6
View File
@@ -1,12 +1,12 @@
<?php
return [
'send_password_link' => 'Send Password Reset Link',
'email_reset_password' => 'Email Password Reset',
'reset_password' => 'Reset Password',
'send_password_link' => 'Send Link til nulstilling af adgangskode',
'email_reset_password' => 'Nulstil adgangskode',
'reset_password' => 'Nulstil adgangskode',
'login' => 'Login',
'login_prompt' => 'Please Login',
'forgot_password' => 'I forgot my password',
'remember_me' => 'Remember Me',
'login_prompt' => 'Log venligst ind',
'forgot_password' => 'Jeg har glemt min adgangskode',
'remember_me' => 'Husk mig',
];
+13 -13
View File
@@ -54,21 +54,21 @@ return array(
'read_the_terms' => 'Please read the terms of use below.',
'read_the_terms_and_click' => 'Please read the terms of use below, and click on the link at the bottom to confirm that you read
and agree to the terms of use, and have received the asset.',
'requested' => 'Requested:',
'requested' => 'Anmodede om:',
'reset_link' => 'Your Password Reset Link',
'reset_password' => 'Click here to reset your password:',
'reset_password' => 'Klik her for at nulstille adgangskoden:',
'serial' => 'Serial:',
'supplier' => 'Supplier',
'tag' => 'Tag',
'test_email' => 'Test Email from Snipe-IT',
'test_mail_text' => 'This is a test from the Snipe-IT Asset Management System. If you got this, mail is working :)',
'supplier' => 'Leverandør',
'tag' => 'Mærkat',
'test_email' => 'Test E-mail fra Snipe-IT',
'test_mail_text' => 'Dette er en test fra Snipe-IT Asset Management System. Hvis du fik dette, virker mailen :)',
'the_following_item' => 'The following item has been checked in: ',
'There_are' => '{1} There is|[2,Inf] There are',
'to_reset' => 'To reset your :web password, complete this form:',
'There_are' => '{1} Der er| [2,Inf] Der er',
'to_reset' => 'Nulstille din :web-adgangskode, udfylde denne formular:',
'type' => 'Type',
'user' => 'User:',
'username' => 'Username:',
'welcome' => 'Welcome :name',
'welcome_to' => 'Welcome to :web!',
'your_credentials' => 'Your Snipe-IT credentials',
'user' => 'Bruger:',
'username' => 'Brugernavn:',
'welcome' => 'Velkommen :navn',
'welcome_to' => 'Velkommen til :web!',
'your_credentials' => 'Dine Snipe-IT Legitimationsoplysninger',
);
@@ -14,6 +14,7 @@ return array(
'cost' => 'Purchase Cost',
'create' => 'Create Asset',
'date' => 'Purchase Date',
'depreciation' => 'Depreciation',
'depreciates_on' => 'Depreciates On',
'default_location' => 'Default Location',
'eol_date' => 'EOL Date',
@@ -7,6 +7,7 @@ return array(
'asset_does_not_exist' => 'The asset you are trying to associate with this license does not exist.',
'owner_doesnt_match_asset' => 'The asset you are trying to associate with this license is owned by somene other than the person selected in the assigned to dropdown.',
'assoc_users' => 'This license is currently checked out to a user and cannot be deleted. Please check the license in first, and then try deleting again. ',
'select_asset_or_person' => 'You must select an asset or a user, but not both.',
'create' => array(
@@ -12,8 +12,8 @@
'success' => 'Konserwacja aktywa utworzona pomyślnie.'
],
'edit' => [
'error' => 'Asset Maintenance was not edited, please try again.',
'success' => 'Asset Maintenance edited successfully.'
'error' => 'Konserwacja aktywa nie została edytowana, spróbuj ponownie.',
'success' => 'Edycja konserwacji aktywa zakończona pomyślnie.'
],
'asset_maintenance_incomplete' => 'Nieukończone',
'warranty' => 'Gwarancja',
@@ -2,7 +2,7 @@
return array(
'about_categories_title' => 'O Kategoriach',
'about_categories' => 'Categories help you organize your items. Some example categories might be &quot;Desktops&quot;, &quot;Laptops&quot;, &quot;Mobile Phones&quot;, &quot;Tablets&quot;, and so on, but you can use categories any way that makes sense for you.',
'about_categories' => 'Kategorie pozwolą lepiej zorganizować twoje aktywa. Przykłady kategorii to np. &quot; Stacje robocze&quot;, &quot;Laptopy&quot;, &quot;Telefony&quot;, &quot;Tablety&quot;, i inne dowolnie przez Ciebie wymyślone.',
'asset_categories' => 'Kategorie aktywów',
'category_name' => 'Nazwa kategorii',
'checkin_email' => 'Wyślij email przy przypisywaniu do użytkownika.',
@@ -28,7 +28,7 @@ return array(
'fieldset' => array(
'does_not_exist' => 'Fieldset does not exist',
'does_not_exist' => 'Zestaw pól nie istnieje',
'create' => array(
'error' => 'Zestaw pól nie został utworzony, spróbuj ponownie.',
@@ -2,20 +2,20 @@
return array(
'does_not_exist' => 'Department does not exist.',
'assoc_users' => 'This department is currently associated with at least one user and cannot be deleted. Please update your users to no longer reference this department and try again. ',
'does_not_exist' => 'Wydział nie istnieje.',
'assoc_users' => 'Ten wydział obecnie jest skojarzony z co najmniej jednym użytkownikiem i nie może zostać usunięty. Uaktualnij użytkowników tak, aby nie było relacji z tym wydziałem i spróbuj ponownie. ',
'create' => array(
'error' => 'Department was not created, please try again.',
'success' => 'Department created successfully.'
'error' => 'Wydział nie został utworzony. Spróbuj ponownie.',
'success' => 'Wydział utworzony pomyślnie.'
),
'update' => array(
'error' => 'Department was not updated, please try again',
'success' => 'Department updated successfully.'
'error' => 'Wydział nie został utworzony. Spróbuj ponownie',
'success' => 'Wydział utworzony pomyślnie.'
),
'delete' => array(
'confirm' => 'Are you sure you wish to delete this department?',
'error' => 'There was an issue deleting the department. Please try again.',
'success' => 'The department was deleted successfully.'
'confirm' => 'Czy na pewno usunąć wybrany wydział?',
'error' => 'Podczas usuwania wydziału napotkano problem. Spróbuj ponownie.',
'success' => 'Wydział usunięty pomyślnie.'
)
);
@@ -3,9 +3,9 @@
return array(
'id' => 'ID',
'name' => 'Department Name',
'manager' => 'Manager',
'location' => 'Location',
'create' => 'Create Department',
'update' => 'Update Department',
'name' => 'Nazwa wydziału',
'manager' => 'Menedżer',
'location' => 'Lokalizacja',
'create' => 'Utwórz wydział',
'update' => 'Aktualizuj wydział',
);
+1 -1
View File
@@ -7,7 +7,7 @@ return array(
'asset' => 'Nabytek',
'bulk_checkout' => 'Przypisane aktywa do użytkownika',
'checkin' => 'Potwierdzanie zasobu/aktywa',
'checkout' => 'Checkout Asset',
'checkout' => 'Przypisz zasób',
'clone' => 'Klonuj zasób',
'deployable' => 'Gotowe do wdrożenia',
'deleted' => 'To aktywo zostało usunięte. <a href="/hardware/:asset_id/restore">Kliknij tutaj, aby je przywrócić</a>.',
+3 -3
View File
@@ -25,8 +25,8 @@ return array(
),
'audit' => array(
'error' => 'Asset audit was unsuccessful. Please try again.',
'success' => 'Asset audit successfully logged.'
'error' => 'Audyt aktywów nie powiódł się. Proszę spróbować ponownie.',
'success' => 'Audyt aktywów pomyślnie zarejestrowany.'
),
@@ -54,7 +54,7 @@ return array(
'delete' => array(
'confirm' => 'Czy na pewno chcesz usunąć?',
'error' => 'Nie można usunąć. Proszę spróbować ponownie.',
'nothing_updated' => 'No assets were selected, so nothing was deleted.',
'nothing_updated' => 'Aktywa nie zostały wybrane, więc nic nie zostało usunięte.',
'success' => 'Nabytek został usunięty.'
),
+1 -1
View File
@@ -23,7 +23,7 @@ return array(
'error' => 'Plik(i) nie zostały wysłane. Spróbuj ponownie.',
'success' => 'Plik(i) zostały wysłane poprawnie.',
'nofiles' => 'Nie wybrałeś żadnych plików do przesłania, albo plik, który próbujesz przekazać jest zbyt duży',
'invalidfiles' => 'One or more of your files is too large or is a filetype that is not allowed. Allowed filetypes are png, gif, jpg, jpeg, doc, docx, pdf, txt, zip, rar, rtf, xml, and lic.',
'invalidfiles' => 'Jeden lub więcej z wybranych przez ciebie plików jest za duży lub jego typ nie jest dopuszczony. Dopuszczalne typy plików: png, gif, jpg, jpeg, doc, docx, pdf, txt, zip, rar, rtf, xml, and lic.',
),
'update' => array(
+2 -2
View File
@@ -2,7 +2,7 @@
return array(
'about_locations_title' => 'O Lokalizacjach',
'about_locations' => 'Locations are used to track location information for users, assets, and other items',
'about_locations' => 'Lokalizacje są używane do śledzenia informacji o lokalizacji użytkowników, aktywów i innych elementów',
'assets_rtd' => 'Aktywa', // This has NEVER meant Assets Retired. I don't know how it keeps getting reverted.
'assets_checkedout' => 'Aktywa przypisane',
'id' => 'ID',
@@ -17,5 +17,5 @@ return array(
'locations' => 'Lokalizacje',
'parent' => 'Rodzic',
'currency' => 'Waluta lokalna',
'ldap_ou' => 'LDAP Search OU',
'ldap_ou' => 'OU wyszukiwania LDAP',
);
@@ -2,15 +2,15 @@
return array(
'about_manufacturers_title' => 'O Producentach',
'about_manufacturers_text' => 'Manufacturers are the companies that create your assets. You can store important support contact information about them here, which will be displayed on your asset detail pages.',
'about_manufacturers_text' => 'Producentami są firmy, które wytwarzają Twoje aktywa. Możesz przechowywać informacje o tych firmach, które będą wyświetlane na stronach szczegółów aktywów.',
'asset_manufacturers' => 'Producenci aktywów',
'create' => 'Stwórz Producenta',
'id' => 'ID',
'name' => 'Name',
'support_email' => 'Support Email',
'support_phone' => 'Support Phone',
'support_url' => 'Support URL',
'name' => 'Nazwa',
'support_email' => 'Email wsparcia technicznego',
'support_phone' => 'Telefon wsparcia technicznego',
'support_url' => 'Adres WWW wsparcia technicznego',
'update' => 'Zaktualizuj Producenta',
'url' => 'URL',
'url' => 'Adres WWW',
);
+1 -1
View File
@@ -2,7 +2,7 @@
return array(
'about_models_title' => 'O Modelach aktywów',
'about_models_text' => 'Asset Models are a way to group identical assets. "MBP 2013", "IPhone 6s", etc.',
'about_models_text' => 'Modele aktywów są sposobem grupowania identycznych aktywów. "MBP 2013", "IPhone 6s", itp.',
'deleted' => 'Model został usunięty. <a href="/hardware/models/:model_id/restore">Kliknij aby przywrócić</a>.',
'restore' => 'Przywróć Model',
'requestable' => 'Użytkownicy mogą zażądać tego modelu',
+1 -1
View File
@@ -10,7 +10,7 @@ return array(
'alert_interval' => 'Próg wygasających alarmów (w dniach)',
'alert_inv_threshold' => 'Inwentarz progu alarmów',
'asset_ids' => 'ID Aktywa',
'audit_interval' => 'Audit Interval',
'audit_interval' => 'Interwał audytu',
'audit_interval_help' => 'If you are required to regularly physically audit your assets, enter the interval in months.',
'audit_warning_days' => 'Audit Warning Threshold',
'audit_warning_days_help' => 'How many days in advance should we warn you when assets are due for auditing?',
+1 -1
View File
@@ -11,5 +11,5 @@ return array(
'request' => 'Zamówienie',
'submit' => 'Zatwierdź',
'upload' => 'Wgraj',
'select_file' => 'Select File...',
'select_file' => 'Wybierz plik...',
);
+15 -15
View File
@@ -18,8 +18,8 @@
'asset_report' => 'Raporty Aktywów',
'asset_tag' => 'Krótka nazwa',
'assets_available' => 'Aktywa dostępne',
'audit' => 'Audit',
'audit_report' => 'Audit Log',
'audit' => 'Audyt',
'audit_report' => 'Dziennik zdarzeń',
'assets' => 'Aktywa',
'avatar_delete' => 'Skasuj Avatara',
'avatar_upload' => 'Wgraj Avatara',
@@ -38,12 +38,12 @@
'checkin_from' => 'Formularz odebrania',
'checkout' => 'Przypisz',
'city' => 'Miasto',
'click_here' => 'Click here',
'click_here' => 'Kliknij tutaj',
'companies' => 'Firmy',
'company' => 'Firma',
'component' => 'Składnik',
'components' => 'Składniki',
'complete' => 'Complete',
'complete' => 'Ukończone',
'consumable' => 'Materiał eksploatacyjny',
'consumables' => 'Materiały eksploatacyjne',
'country' => 'Kraj',
@@ -51,21 +51,21 @@
'created' => 'Item Created',
'created_asset' => 'Utworzone aktywa',
'created_at' => 'Utworzone',
'updated_at' => 'Updated at',
'updated_at' => 'Zaktualizowano',
'currency' => 'PLN', // this is deprecated
'current' => 'Lista urzytkowników',
'custom_report' => 'Raport niestandardowy składnik aktywów',
'dashboard' => 'Panel główny',
'days' => 'days',
'days' => 'dni',
'days_to_next_audit' => 'Days to Next Audit',
'date' => 'Data',
'debug_warning' => 'Ostrzeżenie!',
'debug_warning_text' => 'This application is running in production mode with debugging enabled. This can expose sensitive data if your application is accessible to the outside world. Disable debug mode by setting the <code>APP_DEBUG</code> value in your <code>.env</code> file to <code>false</code>.',
'debug_warning_text' => 'Ta aplikacja jest uruchomiona w trybie produkcyjnym z włączonym debugowaniem. Jeśli aplikacja jest dostępna na zewnątrz, może to zagrażać ujawnieniem wrażliwych danych. Wyłącz tryb debugowania przez ustawienie wartości <code>APP_DEBUG</code> w pliku <code>.env</code> na <code>false</code>.',
'delete' => 'Kasuj',
'deleted' => 'Usunięte',
'delete_seats' => 'Usunięte miejsca',
'departments' => 'Departments',
'department' => 'Department',
'departments' => 'Lokalizacje',
'department' => 'Lokalizacja',
'deployed' => 'Rozmieszczone',
'depreciation_report' => 'Raport Amortyzacji',
'download' => 'Pobieranie',
@@ -99,7 +99,7 @@
'insufficient_permissions' => 'Brak uprawnień!',
'language' => 'Język',
'last' => 'Ostatni',
'last_login' => 'Last Login',
'last_login' => 'Ostatnie logowanie',
'last_name' => 'Nazwisko',
'license' => 'Licencja',
'license_report' => 'Raport Licencji',
@@ -108,7 +108,7 @@
'list_all' => 'Pokaż Wszystkie',
'loading' => 'Wczytywanie',
'lock_passwords' => 'Tego pola nie można edytować dla tej instalacji.',
'feature_disabled' => 'This feature has been disabled for the demo installation.',
'feature_disabled' => 'Ta funkcja została wyłączona dla instalacji demo.',
'location' => 'Lokalizacja',
'locations' => 'Lokalizacje',
'logout' => 'Wyloguj się',
@@ -160,7 +160,7 @@
'select_model' => 'Wybierz Model',
'select_supplier' => 'Wybierz dostawcę',
'select_user' => 'Wybierz użytkownika',
'select_date' => 'Select Date (YYYY-MM-DD)',
'select_date' => 'Wybierz Datę (RRRR MM-DD)',
'select_statuslabel' => 'Wybierz status',
'select_company' => 'Wybierz firmę',
'select_asset' => 'Wybierz aktywa',
@@ -174,10 +174,10 @@
'status' => 'Status',
'supplier' => 'Dostawca',
'suppliers' => 'Dostawcy',
'sure_to_delete' => 'Are you sure you wish to delete',
'sure_to_delete' => 'Czy na pewno chcesz usunąć',
'submit' => 'Zatwierdź',
'target' => 'Target',
'time_and_date_display' => 'Time and Date Display',
'target' => 'Cel',
'time_and_date_display' => 'Wyświetlanie daty i czasu',
'total_assets' => 'Ogółem aktywów',
'total_licenses' => 'Ogółem licencji',
'total_accessories' => 'Ogółem akcesorii',
@@ -11,9 +11,9 @@ return array(
'alert_inv_threshold' => 'Limite de Alerta de Inventário',
'asset_ids' => 'ID do ativo',
'audit_interval' => 'Audit Interval',
'audit_interval_help' => 'If you are required to regularly physically audit your assets, enter the interval in months.',
'audit_interval_help' => 'Se você precisa verificar fisicamente seus ativos com frequência, insira um intervalo em meses.',
'audit_warning_days' => 'Audit Warning Threshold',
'audit_warning_days_help' => 'How many days in advance should we warn you when assets are due for auditing?',
'audit_warning_days_help' => 'Com quantos dias de antecedência deseja ser avisado sobre a verificação de seus ativos?',
'auto_increment_assets' => 'Gerar ID de ativo crescente',
'auto_increment_prefix' => 'Prefixo (opcional)',
'auto_incrementing_help' => 'Permitir auto insercao dessa ID de ativo antes de configurar isso',
@@ -80,7 +80,7 @@ return array(
'pwd_secure_complexity' => 'Password Complexity',
'pwd_secure_complexity_help' => 'Select whichever password complexity rules you wish to enforce.',
'pwd_secure_min' => 'Password minimum characters',
'pwd_secure_min_help' => 'Minimum permitted value is 5',
'pwd_secure_min_help' => 'Valor mínimo permitido é 5',
'pwd_secure_uncommon' => 'Prevent common passwords',
'pwd_secure_uncommon_help' => 'This will disallow users from using common passwords from the top 10,000 passwords reported in breaches.',
'qr_help' => 'Habilite os Códigos QR primeiro para definir isto',
@@ -51,16 +51,16 @@
<tr>
<form action="{{route('account/request-item', ['itemType' => 'asset', 'itemId' => $asset->id])}}" method="POST" accept-charset="utf-8">
{{ csrf_field() }}
<td>{{ $asset->model->name }}</td>
<td>{!! $asset->model->present()->nameUrl() !!}</td>
@if ($snipeSettings->display_asset_name)
<td>{{ $asset->name }}</td>
@endif
<td>{{ $asset->serial }}</td>
<td><a href="{{ $asset->present()->viewUrl() }}">{{ $asset->serial }}</a></td>
<td>
{{ $asset->assetloc->name }}
{!! $asset->assetLoc->present()->nameUrl() !!}
</td>
@if ($asset->assigned_to != '' && $asset->assigned_to > 0)
<td>Checked out</td>
+3 -3
View File
@@ -394,8 +394,8 @@
<img src="{{ url('/') }}/uploads/models/{{{ $asset->model->image }}}" class="assetimg img-responsive">
@endif
@if (($snipeSettings->qr_code=='1') && ($asset->deleted_at==''))
<img src="{{ url('/') }}/hardware/{{ $asset->id }}/qr_code" class="img-thumbnail pull-right" style="height: 100px; width: 100px; margin-right: 10px;">
@if ($snipeSettings->qr_code=='1')
<img src="{{ config('app.url') }}/hardware/{{ $asset->id }}/qr_code" class="img-thumbnail pull-right" style="height: 100px; width: 100px; margin-right: 10px;">
@endif
@if (($asset->assignedTo) && ($asset->deleted_at==''))
@@ -544,7 +544,7 @@
@foreach ($asset->assetmaintenances as $assetMaintenance)
@if (is_null($assetMaintenance->deleted_at))
<tr>
<td><a href="{{ route('suppliers.show', $assetMaintenance->supplier_id) }}">{{ $assetMaintenance->supplier->name }}</a></td>
<td><a href="{{ route('suppliers.show', $assetMaintenance->supplier_id) }}">{{ $assetMaintenance->supplier->name }}</a></td>
<td>{{ $assetMaintenance->title }}</td>
<td>{{ $assetMaintenance->asset_maintenance_type }}</td>
<td>{{ $assetMaintenance->start_date }}</td>
+3 -3
View File
@@ -6,13 +6,13 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Snipe-IT</title>
<title>{{ ($snipeSettings) && ($snipeSettings->site_name) ? $snipeSettings->site_name : 'Snipe-IT' }}</title>
<!-- Select2 -->
<link rel="stylesheet" href="{{ asset('js/plugins/select2/select2.min.css') }}">
<link rel="stylesheet" href="{{ url(asset('js/plugins/select2/select2.min.css')) }}">
<link rel="stylesheet" href="{{ mix('css/dist/all.css') }}">
<link rel="stylesheet" href="{{ url(mix('css/dist/all.css')) }}">
<link rel="shortcut icon" type="image/ico" href="{{ asset('favicon.ico') }}">
+8 -8
View File
@@ -13,17 +13,17 @@
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Select2 -->
<link rel="stylesheet" href="{{ asset('js/plugins/select2/select2.min.css') }}">
<link rel="stylesheet" href="{{ url(asset('js/plugins/select2/select2.min.css')) }}">
<!-- iCheck for checkboxes and radio inputs -->
<link rel="stylesheet" href="{{ asset('js/plugins/iCheck/all.css') }}">
<link rel="stylesheet" href="{{ url(asset('js/plugins/iCheck/all.css')) }}">
<!-- bootstrap tables CSS -->
<link rel="stylesheet" href="{{ asset('css/bootstrap-table.css') }}">
<link rel="stylesheet" href="{{ url(asset('css/bootstrap-table.css')) }}">
<link rel="stylesheet" href="{{ mix('css/dist/all.css') }}">
<link rel="stylesheet" href="{{ url(mix('css/dist/all.css')) }}">
<link rel="shortcut icon" type="image/ico" href="{{ asset('favicon.ico') }}">
<link rel="shortcut icon" type="image/ico" href="{{ url(asset('favicon.ico')) }}">
<meta name="csrf-token" content="{{ csrf_token() }}">
@@ -88,8 +88,8 @@
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
@else
<script src="{{ asset('js/html5shiv.js') }}"></script>
<script src="{{ asset('js/respond.js') }}"></script>
<script src="{{ url(asset('js/html5shiv.js')) }}"></script>
<script src="{{ url(asset('js/respond.js')) }}"></script>
@endif
<![endif]-->
</head>
@@ -662,7 +662,7 @@
<script src="{{ mix('js/dist/all.js') }}"></script>
<script src="{{ url(mix('js/dist/all.js')) }}"></script>
<script>
$(function () {
var datepicker = $.fn.datepicker.noConflict(); // return $.fn.datepicker to previously assigned value
+2 -2
View File
@@ -7,7 +7,7 @@
@show
</title>
<link rel="stylesheet" href="{{ mix('css/dist/all.css') }}">
<link rel="stylesheet" href="{{ url(mix('css/dist/all.css')) }}">
@@ -118,7 +118,7 @@
</div>
</div>
</div>
<script src="{{ asset(mix('js/dist/all.js')) }}"></script>
<script src="{{ url(mix('js/dist/all.js')) }}"></script>
<script>
$(function () {
@@ -215,7 +215,13 @@ $('.snipe-table').bootstrapTable({
// The user is allowed to check items out, AND the item is deployable
if ((row.available_actions.checkout == true) && (row.user_can_checkout == true) && (!row.assigned_to)) {
return '<a href="{{ url('/') }}/' + destination + '/' + row.id + '/checkout" class="btn btn-sm btn-primary" data-tooltip="true" title="Check this item out to a user">{{ trans('general.checkout') }}</a>';
// case for licenses
if (row.next_seat) {
return '<a href="{{ url('/') }}/' + destination + '/' + row.next_seat + '/checkout" class="btn btn-sm btn-primary" data-tooltip="true" title="Check this item out to a user">{{ trans('general.checkout') }}</a>';
} else {
return '<a href="{{ url('/') }}/' + destination + '/' + row.id + '/checkout" class="btn btn-sm btn-primary" data-tooltip="true" title="Check this item out to a user">{{ trans('general.checkout') }}</a>';
}
// The user is allowed to check items out, but the item is not deployable
} else if (((row.user_can_checkout == false)) && (row.available_actions.checkout == true) && (!row.assigned_to)) {
+2 -2
View File
@@ -165,9 +165,9 @@
{{ Form::label('login_note', trans('admin/settings/general.login_note')) }}
</div>
<div class="col-md-9">
@if (config('app.lock_passwords')===true)
@if (config('app.lock_passwords'))
<textarea class="form-control" name="login_note" placeholder="If you do not have a login or have found a device belonging to this company, please call technical support at 888-555-1212. Thank you." rows="2">{{ Input::old('login_note', $setting->login_note) }}</textarea>
<textarea class="form-control disabled" name="login_note" placeholder="If you do not have a login or have found a device belonging to this company, please call technical support at 888-555-1212. Thank you." rows="2" readonly>{{ Input::old('login_note', $setting->login_note) }}</textarea>
{!! $errors->first('login_note', '<span class="alert-msg">:message</span>') !!}
<p class="help-block">{{ trans('general.lock_passwords') }}</p>
@else
+7
View File
@@ -175,6 +175,13 @@ Route::group(['prefix' => 'v1','namespace' => 'Api'], function () {
'uses' => 'CustomFieldsController@postReorder'
]
);
Route::get('/',
[
'as' => 'api.customfields.index',
'uses' => 'CustomFieldsController@index'
]
);
}); // Fields group
+138 -127
View File
@@ -22,7 +22,6 @@ fi
clear
name="snipeit"
si="Snipe-IT"
hostname="$(hostname)"
fqdn="$(hostname --fqdn)"
ans=default
@@ -36,16 +35,16 @@ spin[1]="\\"
spin[2]="|"
spin[3]="/"
rm -rf $tmp/
rm -rf ${tmp:?}
mkdir $tmp
# Debian/Ubuntu friendly f(x)s
progress () {
while kill -0 $pid > /dev/null 2>&1
while kill -0 "$pid" > /dev/null 2>&1
do
for i in "${spin[@]}"
do
if [ -e /proc/$pid ]; then
if [ -e /proc/"$pid" ]; then
echo -ne "\b$i"
sleep .1
else
@@ -56,24 +55,26 @@ progress () {
}
vhenvfile () {
sudo ls -al /etc/apache2/mods-enabled/rewrite.load >> /var/log/snipeit-install.log 2>&1
find /etc/apache2/mods-enabled -maxdepth 1 -name 'rewrite.load' >/dev/null 2>&1
apachefile=/etc/apache2/sites-available/$name.conf
echo "* Create Virtual host for apache."
echo >> $apachefile "<VirtualHost *:80>"
echo >> $apachefile "ServerAdmin webmaster@localhost"
echo >> $apachefile " <Directory $webdir/$name/public>"
echo >> $apachefile " Require all granted"
echo >> $apachefile " AllowOverride All"
echo >> $apachefile " </Directory>"
echo >> $apachefile " DocumentRoot $webdir/$name/public"
echo >> $apachefile " ServerName $fqdn"
echo >> $apachefile " ErrorLog /var/log/apache2/snipeIT.error.log"
echo >> $apachefile " CustomLog /var/log/apache2/access.log combined"
echo >> $apachefile "</VirtualHost>"
{
echo "<VirtualHost *:80>"
echo "ServerAdmin webmaster@localhost"
echo "<Directory $webdir/$name/public>"
echo " Require all granted"
echo " AllowOverride All"
echo " </Directory>"
echo " DocumentRoot $webdir/$name/public"
echo " ServerName $fqdn"
echo " ErrorLog /var/log/apache2/snipeIT.error.log"
echo " CustomLog /var/log/apache2/access.log combined"
echo "</VirtualHost>"
} >> $apachefile
echo >> $hosts "127.0.0.1 $hostname $fqdn"
a2ensite $name.conf >> /var/log/snipeit-install.log 2>&1
log "a2ensite $name.conf"
cat > $webdir/$name/.env <<-EOF
cat > "$webdir/$name/.env" <<-EOF
#Created By Snipe-it Installer
APP_TIMEZONE=$(cat /etc/timezone)
DB_HOST=localhost
@@ -86,28 +87,27 @@ vhenvfile () {
}
perms () {
if [ $distro == "debian" ]; then
#Change permissions on directories
chmod -R 755 $webdir/$name/storage
chmod -R 755 $webdir/$name/storage/private_uploads
chmod -R 755 $webdir/$name/public/uploads
chown -R www-data:www-data /var/www/$name
# echo "* Finished permission changes."
else
sudo chmod -R 755 $webdir/$name/storage
sudo chmod -R 755 $webdir/$name/storage/private_uploads
sudo chmod -R 755 $webdir/$name/public/uploads
sudo chown -R www-data:www-data /var/www/$name
fi
chmod_dirs=( "$webdir/$name/storage" )
chmod_dirs+=( "$webdir/$name/storage/private_uploads" )
chmod_dirs+=( "$webdir/$name/public/uploads" )
#Change permissions on directories
for chmod_dir in "${chmod_dirs[@]}"
do
chmod -R 755 "$chmod_dir"
done
}
log () {
eval "$@" |& tee -a /var/log/snipeit-install.log >/dev/null 2>&1
}
#CentOS Friendly f(x)s
function isinstalled {
if yum list installed "$@" >/dev/null 2>&1; then
true
else
false
fi
if yum list installed "$@" >/dev/null 2>&1; then
true
else
false
fi
}
if [ -f /etc/lsb-release ]; then
@@ -115,16 +115,16 @@ if [ -f /etc/lsb-release ]; then
version="$(lsb_release -s -r)"
codename="$(lsb_release -c -s)"
elif [ -f /etc/os-release ]; then
distro="$(. /etc/os-release && echo $ID)"
version="$(. /etc/os-release && echo $VERSION_ID)"
#Order is important here. If /etc/os-release and /etc/centos-release exist, we're on centos 7.
#If only /etc/centos-release exist, we're on centos6(or earlier). Centos-release is less parsable,
#so lets assume that it's version 6 (Plus, who would be doing a new install of anything on centos5 at this point..)
distro="$(. /etc/os-release && echo $ID)"
version="$(. /etc/os-release && echo $VERSION_ID)"
#Order is important here. If /etc/os-release and /etc/centos-release exist, we're on centos 7.
#If only /etc/centos-release exist, we're on centos6(or earlier). Centos-release is less parsable,
#so lets assume that it's version 6 (Plus, who would be doing a new install of anything on centos5 at this point..)
elif [ -f /etc/centos-release ]; then
distro="Centos"
version="6"
else
distro="unsupported"
distro="unsupported"
fi
@@ -193,7 +193,6 @@ esac
done
#Snipe says we need a new 32bit key, so let's create one randomly and inject it into the file
random32="$(echo `< /dev/urandom tr -dc _A-Za-z-0-9 | head -c32`)"
#db_setup.sql will be injected to the database during install.
#Again, this file should be removed, which will be a prompt at the end of the script.
@@ -246,6 +245,8 @@ case $distro in
php composer.phar install --no-dev --prefer-source
perms
service apache2 restart
php artisan key:generate
php artisan passport:install
;;
ubuntu)
##################################### Install for Ubuntu ##############################################
@@ -254,33 +255,37 @@ case $distro in
#composer install, set permissions, restart apache.
webdir=/var/www
echo -ne "\n* Adding MariaDB repo in the background... ${spin[0]}"
(echo "deb [arch=amd64,i386] http://ftp.hosteurope.de/mirror/mariadb.org/repo/10.1/ubuntu $codename main" | tee /etc/apt/sources.list.d/mariadb.list >/dev/null 2>&1)
log "apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8"
echo -ne "\n* Updating with apt-get update in the background... ${spin[0]}"
sudo apt-get update >> /var/log/snipeit-install.log & pid=$! 2>&1
rm /var/lib/dpkg/lock
log "apt-get update" & pid=$!
[ -f /var/lib/dpkg/lock ] && rm -f /var/lib/dpkg/lock
progress
echo -ne "\n* Upgrading packages with apt-get upgrade in the background... ${spin[0]}"
sudo apt-get -y upgrade >> /var/log/snipeit-install.log & pid=$! 2>&1
log "apt-get -y upgrade" & pid=$!
progress
echo -ne "\n* Setting up LAMP in the background... ${spin[0]}\n"
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y lamp-server^ >> /var/log/snipeit-install.log & pid=$! 2>&1
log "DEBIAN_FRONTEND=noninteractive apt-get install -y mariadb-server mariadb-client apache2 libapache2-mod-php curl" & pid=$!
progress
if [ "$version" == "16.04" ]; then
sudo apt-get install -y git unzip php php-mcrypt php-curl php-mysql php-gd php-ldap php-zip php-mbstring php-xml >> /var/log/snipeit-install.log & pid=$! 2>&1
log "apt-get install -y git unzip php php-mcrypt php-curl php-mysql php-gd php-ldap php-zip php-mbstring php-xml" & pid=$!
progress
sudo phpenmod mcrypt >> /var/log/snipeit-install.log 2>&1
sudo phpenmod mbstring >> /var/log/snipeit-install 2>&1
sudo a2enmod rewrite >> /var/log/snipeit-install.log 2>&1
log "phpenmod mcrypt"
log "phpenmod mbstring"
log "a2enmod rewrite"
else
sudo apt-get install -y git unzip php5 php5-mcrypt php5-curl php5-mysql php5-gd php5-ldap >> /var/log/snipeit-install.log & pid=$! 2>&1
log "apt-get install -y git unzip php5 php5-mcrypt php5-curl php5-mysql php5-gd php5-ldap" & pid=$!
progress
sudo php5enmod mcrypt >> /var/log/snipeit-install.log 2>&1
sudo a2enmod rewrite >> /var/log/snipeit-install.log 2>&1
log "php5enmod mcrypt"
log "a2enmod rewrite"
fi
echo -ne "\n* Cloning Snipeit, extracting to $webdir/$name... ${spin[0]}"
git clone https://github.com/snipe/snipe-it $webdir/$name >> /var/log/snipeit-install.log & pid=$! 2>&1
log "git clone https://github.com/snipe/snipe-it $webdir/$name" & pid=$!
progress
vhenvfile
echo -e "* MySQL Phase next.\n"
service mysql status >/dev/null || service mysql start
/usr/bin/mysql_secure_installation
echo -e "* Creating MySQL Database and user.\n* Please Input your MySQL/MariaDB root password created in the previous step.: "
mysql -u root -p < $dbsetup
@@ -289,7 +294,10 @@ case $distro in
curl -sS https://getcomposer.org/installer | php
php composer.phar install --no-dev --prefer-source
perms
chown -R www-data:www-data "/var/www/$name"
service apache2 restart
php artisan key:generate
php artisan passport:install
;;
centos )
if [[ "$version" =~ ^6 ]]; then
@@ -300,35 +308,37 @@ case $distro in
echo ""
echo "## Adding IUS, epel-release and mariaDB repos.";
mariadbRepo=/etc/yum.repos.d/MariaDB.repo
touch $mariadbRepo
echo >> $mariadbRepo "[mariadb]"
echo >> $mariadbRepo "name = MariaDB"
echo >> $mariadbRepo "baseurl = http://yum.mariadb.org/10.0/centos6-amd64"
echo >> $mariadbRepo "gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB"
echo >> $mariadbRepo "gpgcheck=1"
echo >> $mariadbRepo "enable=1"
touch "$mariadbRepo"
{
echo "[mariadb]"
echo "name = MariaDB"
echo "baseurl = http://yum.mariadb.org/10.0/centos6-amd64"
echo "gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB"
echo "gpgcheck=1"
echo "enable=1"
} >> "$mariadbRepo"
yum -y install wget epel-release >> /var/log/snipeit-install.log 2>&1
wget -P $tmp/ https://centos6.iuscommunity.org/ius-release.rpm >> /var/log/snipeit-install.log 2>&1
rpm -Uvh $tmp/ius-release*.rpm >> /var/log/snipeit-install.log 2>&1
log "yum -y install wget epel-release"
log "wget -P "$tmp/" https://centos6.iuscommunity.org/ius-release.rpm"
log "rpm -Uvh "$tmp/ius-release*.rpm""
#Install PHP and other needed stuff.
echo "## Installing PHP and other needed stuff";
PACKAGES="httpd MariaDB-server git unzip php56u php56u-mysqlnd php56u-bcmath php56u-cli php56u-common php56u-embedded php56u-gd php56u-mbstring php56u-mcrypt php56u-ldap"
for p in $PACKAGES;do
if isinstalled $p;then
echo " ##" $p "Installed"
if isinstalled "$p"; then
echo " ## $p already installed"
else
echo -n " ##" $p "Installing... "
yum -y install $p >> /var/log/snipeit-install.log 2>&1
echo -n " ## installing $p ... "
log "yum -y install $p"
echo "";
fi
done;
echo -e "\n## Downloading Snipe-IT from github and putting it in the web directory.";
wget -P $tmp/ https://github.com/snipe/snipe-it/archive/$file >> /var/log/snipeit-install.log 2>&1
log "wget -P $tmp/ https://github.com/snipe/snipe-it/archive/$file"
unzip -qo $tmp/$file -d $tmp/
cp -R $tmp/$fileName $webdir/$name
@@ -348,21 +358,23 @@ case $distro in
echo "## Creating the new virtual host in Apache.";
apachefile=/etc/httpd/conf.d/$name.conf
echo >> $apachefile ""
echo >> $apachefile ""
echo >> $apachefile ""
echo >> $apachefile "<VirtualHost *:80>"
echo >> $apachefile "ServerAdmin webmaster@localhost"
echo >> $apachefile " <Directory $webdir/$name/public>"
echo >> $apachefile " Allow From All"
echo >> $apachefile " AllowOverride All"
echo >> $apachefile " Options +Indexes"
echo >> $apachefile " </Directory>"
echo >> $apachefile " DocumentRoot $webdir/$name/public"
echo >> $apachefile " ServerName $fqdn"
echo >> $apachefile " ErrorLog /var/log/httpd/snipeIT.error.log"
echo >> $apachefile " CustomLog /var/log/access.log combined"
echo >> $apachefile "</VirtualHost>"
{
echo ""
echo ""
echo ""
echo "<VirtualHost *:80>"
echo "ServerAdmin webmaster@localhost"
echo " <Directory $webdir/$name/public>"
echo " Allow From All"
echo " AllowOverride All"
echo " Options +Indexes"
echo " </Directory>"
echo " DocumentRoot $webdir/$name/public"
echo " ServerName $fqdn"
echo " ErrorLog /var/log/httpd/snipeIT.error.log"
echo " CustomLog /var/log/access.log combined"
echo "</VirtualHost>"
} >> "$apachefile"
echo "## Setting up hosts file.";
echo >> $hosts "127.0.0.1 $hostname $fqdn"
@@ -392,10 +404,8 @@ case $distro in
curl -sS https://getcomposer.org/installer | php
php composer.phar install --no-dev --prefer-source
# Change permissions on directories
sudo chmod -R 755 $webdir/$name/storage
sudo chmod -R 755 $webdir/$name/public/uploads
sudo chown -R apache:apache $webdir/$name
perms
chown -R apache:apache $webdir/$name
/sbin/service iptables status >/dev/null 2>&1
if [ $? = 0 ]; then
@@ -406,8 +416,9 @@ case $distro in
service iptables save
fi
service httpd restart
php artisan key:generate
php artisan passport:install
elif [[ "$version" =~ ^7 ]]; then
##################################### Install for Centos/Redhat 7 ##############################################
@@ -416,29 +427,27 @@ case $distro in
#Allow us to get the mysql engine
echo -e "\n## Add IUS, epel-release and mariaDB repos.";
yum -y install wget epel-release >> /var/log/snipeit-install.log 2>&1
wget -P $tmp/ https://centos7.iuscommunity.org/ius-release.rpm >> /var/log/snipeit-install.log 2>&1
rpm -Uvh $tmp/ius-release*.rpm >> /var/log/snipeit-install.log 2>&1
log "yum -y install wget epel-release"
log "wget -P $tmp/ https://centos7.iuscommunity.org/ius-release.rpm"
log "rpm -Uvh $tmp/ius-release*.rpm"
#Install PHP and other needed stuff.
echo "## Installing PHP and other needed stuff";
PACKAGES="httpd mariadb-server git unzip php56u php56u-mysqlnd php56u-bcmath php56u-cli php56u-common php56u-embedded php56u-gd php56u-mbstring php56u-mcrypt php56u-ldap"
for p in $PACKAGES;do
if isinstalled $p;then
echo " ##" $p "Installed"
if isinstalled "$p"; then
echo " ## $p already installed"
else
echo -n " ##" $p "Installing... "
yum -y install $p >> /var/log/snipeit-install.log 2>&1
echo -n " ## installing $p ... "
log "yum -y install $p"
echo "";
fi
done;
echo -e "\n## Downloading Snipe-IT from github and put it in the web directory.";
wget -P $tmp/ https://github.com/snipe/snipe-it/archive/$file >> /var/log/snipeit-install.log 2>&1
unzip -qo $tmp/$file -d $tmp/
cp -R $tmp/$fileName $webdir/$name
log "git clone https://github.com/snipe/snipe-it $webdir/$name"
# Make mariaDB start on boot and restart the daemon
echo "## Starting the mariaDB server.";
@@ -452,30 +461,32 @@ case $distro in
echo "## Creating MySQL Database/User."
echo "## Please Input your MySQL/MariaDB root password "
mysql -u root -p < $dbsetup
mysql -u root -p < "$dbsetup"
##TODO make sure the apachefile doesnt exist isnt already in there
#Create the new virtual host in Apache and enable rewrite
apachefile=/etc/httpd/conf.d/$name.conf
apachefile="/etc/httpd/conf.d/$name.conf"
echo "## Creating the new virtual host in Apache.";
echo >> $apachefile ""
echo >> $apachefile ""
echo >> $apachefile "LoadModule rewrite_module modules/mod_rewrite.so"
echo >> $apachefile ""
echo >> $apachefile "<VirtualHost *:80>"
echo >> $apachefile "ServerAdmin webmaster@localhost"
echo >> $apachefile " <Directory $webdir/$name/public>"
echo >> $apachefile " Allow From All"
echo >> $apachefile " AllowOverride All"
echo >> $apachefile " Options +Indexes"
echo >> $apachefile " </Directory>"
echo >> $apachefile " DocumentRoot $webdir/$name/public"
echo >> $apachefile " ServerName $fqdn"
echo >> $apachefile " ErrorLog /var/log/httpd/snipeIT.error.log"
echo >> $apachefile " CustomLog /var/log/access.log combined"
echo >> $apachefile "</VirtualHost>"
{
echo "## Creating the new virtual host in Apache.";
echo ""
echo ""
echo "LoadModule rewrite_module modules/mod_rewrite.so"
echo ""
echo "<VirtualHost *:80>"
echo "ServerAdmin webmaster@localhost"
echo " <Directory $webdir/$name/public>"
echo " Allow From All"
echo " AllowOverride All"
echo " Options +Indexes"
echo " </Directory>"
echo " DocumentRoot $webdir/$name/public"
echo " ServerName $fqdn"
echo " ErrorLog /var/log/httpd/snipeIT.error.log"
echo " CustomLog /var/log/access.log combined"
echo "</VirtualHost>"
} >> "$apachefile"
##TODO make sure this isnt already in there
echo "## Setting up hosts file.";
@@ -510,23 +521,23 @@ case $distro in
curl -sS https://getcomposer.org/installer | php
php composer.phar install --no-dev --prefer-source
sudo chmod -R 755 $webdir/$name/storage
sudo chmod -R 755 $webdir/$name/storage/private_uploads
sudo chmod -R 755 $webdir/$name/public/uploads
sudo chown -R apache:apache $webdir/$name
perms
chown -R apache:apache $webdir/$name
# Make SeLinux happy
sudo chcon -R -h -t httpd_sys_script_rw_t $webdir/$name/
chcon -R -h -t httpd_sys_script_rw_t $webdir/$name/
#Check if SELinux is enforcing
if [ $(getenforce) == "Enforcing" ]; then
if [ "$(getenforce)" == "Enforcing" ]; then
#Add SELinux and firewall exception/rules.
#Required for ldap integration
setsebool -P httpd_can_connect_ldap on
#Sets SELinux context type so that scripts running in the web server process are allowed read/write access
sudo chcon -R -h -t httpd_sys_script_rw_t $webdir/$name/
chcon -R -h -t httpd_sys_script_rw_t $webdir/$name/
fi
systemctl restart httpd.service
php artisan key:generate
php artisan passport:install
else
echo "Unable to Handle Centos Version #. Version Found: " $version
@@ -543,6 +554,6 @@ echo ""
echo "* Cleaning up..."
rm -f snipeit.sh
rm -f install.sh
rm -rf $tmp/
rm -rf ${tmp:?}
echo "* Finished!"
sleep 1
+15 -1
View File
@@ -4,6 +4,7 @@ use App\Models\Asset;
use App\Models\AssetModel;
use App\Models\Company;
use App\Models\Location;
use App\Models\User;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Support\Facades\Hash;
@@ -60,7 +61,7 @@ class AssetTest extends BaseTest
['asset_tag' => 'U8T7597h77']
])
);
\Log::debug(print_r($next));
$this->assertEquals($expected, $next);
}
@@ -194,6 +195,7 @@ class AssetTest extends BaseTest
$asset->expected_checkin = null;
$asset->last_checkout = null;
$asset->assigned_to = null;
$asset->assigned_type = null;
$asset->assignedTo()->disassociate($asset);
$asset->accepted = null;
$asset->save();
@@ -220,6 +222,13 @@ class AssetTest extends BaseTest
'target_type' => get_class($target),
'target_id' => $target->id
]);
$this->tester->seeRecord('assets', [
'id' => $asset->id,
'assigned_to' => $target->id,
'assigned_type' => User::class
]);
$this->checkin($asset, $target);
$this->assertNull($asset->fresh()->assignedTo);
@@ -229,6 +238,11 @@ class AssetTest extends BaseTest
'target_id' => $target->id
]);
$this->tester->seeRecord('assets', [
'id' => $asset->id,
'assigned_to' => null,
'assigned_type' => null
]);
// An Asset Can be checked out to a asset, and this should be logged.
$target = factory(App\Models\Asset::class)->create();
+43 -18
View File
@@ -1,11 +1,14 @@
<?php
use App\Importer\AccessoryImporter;
use App\Importer\AssetImporter;
use App\Importer\LicenseImporter;
use App\Importer\ConsumableImporter;
use App\Importer\LicenseImporter;
use App\Models\Accessory;
use App\Models\Asset;
use App\Models\AssetModel;
use App\Models\Category;
use App\Models\CustomField;
use App\Models\User;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Illuminate\Foundation\Testing\WithoutMiddleware;
@@ -18,14 +21,15 @@ class ImporterTest extends BaseTest
*/
protected $tester;
public function testDefaultImportAsset()
public function testDefaultImportAssetWithCustomFields()
{
$csv = <<<'EOT'
Name,Email,Username,item Name,Category,Model name,Manufacturer,Model Number,Serial number,Asset Tag,Location,Notes,Purchase Date,Purchase Cost,Company,Status,Warranty,Supplier
Bonnie Nelson,bnelson0@cdbaby.com,bnelson0,eget nunc donec quis,quam,massa id,Linkbridge,6377018600094472,27aa8378-b0f4-4289-84a4-405da95c6147,970882174-8,Daping,"Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est.",2016-04-05,133289.59,Alpha,Undeployable,14,Blogspan
Name,Email,Username,item Name,Category,Model name,Manufacturer,Model Number,Serial number,Asset Tag,Location,Notes,Purchase Date,Purchase Cost,Company,Status,Warranty,Supplier,Weight
Bonnie Nelson,bnelson0@cdbaby.com,bnelson0,eget nunc donec quis,quam,massa id,Linkbridge,6377018600094472,27aa8378-b0f4-4289-84a4-405da95c6147,970882174-8,Daping,"Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est.",2016-04-05,133289.59,Alpha,Undeployable,14,Blogspan,35
EOT;
$this->initializeCustomFields();
$this->import(new AssetImporter($csv));
// Did we create a user?
$this->tester->seeRecord('users', [
'first_name' => 'Bonnie',
@@ -67,16 +71,19 @@ EOT;
'notes' => "Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est.",
'purchase_date' => '2016-04-05 00:00:01',
'purchase_cost' => 133289.59,
'warranty_months' => 14
'warranty_months' => 14,
'_snipeit_weight_2' => 35
]);
}
public function testUpdateAsset()
public function testUpdateAssetIncludingCustomFields()
{
$csv = <<<'EOT'
Name,Email,Username,item Name,Category,Model name,Manufacturer,Model Number,Serial number,Asset Tag,Location,Notes,Purchase Date,Purchase Cost,Company,Status,Warranty,Supplier
Bonnie Nelson,bnelson0@cdbaby.com,bnelson0,eget nunc donec quis,quam,massa id,Linkbridge,6377018600094472,27aa8378-b0f4-4289-84a4-405da95c6147,970882174-8,Daping,"Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est.",2016-04-05,133289.59,Alpha,Undeployable,14,Blogspan
Name,Email,Username,item Name,Category,Model name,Manufacturer,Model Number,Serial number,Asset Tag,Location,Notes,Purchase Date,Purchase Cost,Company,Status,Warranty,Supplier,weight
Bonnie Nelson,bnelson0@cdbaby.com,bnelson0,eget nunc donec quis,quam,massa id,Linkbridge,6377018600094472,27aa8378-b0f4-4289-84a4-405da95c6147,970882174-8,Daping,"Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est.",2016-04-05,133289.59,Alpha,Undeployable,14,Blogspan,95
EOT;
$this->initializeCustomFields();
$this->import(new AssetImporter($csv));
$updatedCSV = <<<'EOT'
item Name,Category,Model name,Manufacturer,Model Number,Serial number,Asset Tag,Location,Notes,Purchase Date,Purchase Cost,Company,Status,Warranty,Supplier
@@ -124,7 +131,22 @@ EOT;
'notes' => "I have no notes",
'purchase_date' => '2018-04-05 00:00:01',
'purchase_cost' => 25.59,
'warranty_months' => 18
'warranty_months' => 18,
'_snipeit_weight_2' => 95
]);
}
public function initializeCustomFields()
{
$customField = factory(App\Models\CustomField::class)->create(['name' => 'Weight']);
$customFieldSet = factory(App\Models\CustomFieldset::class)->create(['name' => 'Default']);
$customFieldSet->fields()->attach($customField, [
'required' => false,
'order' => 'asc']);
$am = factory(App\Models\AssetModel::class)->create([
'name' => 'massa id',
'fieldset_id' => $customFieldSet->id
]);
}
@@ -154,6 +176,12 @@ EOT;
'last_name' => 'Nelson',
'email' => 'bnelson0@cdbaby.com',
]);
// Grab the user record for use in asserting assigned_to
$createdUser = $this->tester->grabRecord('users', [
'first_name' => 'Bonnie',
'last_name' => 'Nelson',
'email' => 'bnelson0@cdbaby.com',
]);
$this->tester->seeRecord('categories', [
'name' => 'quam'
@@ -183,6 +211,7 @@ EOT;
$this->tester->seeRecord('suppliers', [
'name' => 'Blogspan'
]);
$this->tester->seeRecord('assets', [
'name' => 'eget nunc donec quis',
'serial' => '27aa8378-b0f4-4289-84a4-405da95c6147',
@@ -190,8 +219,10 @@ EOT;
'notes' => "Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est.",
'purchase_date' => '2016-04-05 00:00:01',
'purchase_cost' => 133289.59,
'warranty_months' => 14
]);
'warranty_months' => 14,
'assigned_to' => $createdUser['id'],
'assigned_type' => User::class
]);
}
public function testDefaultAccessoryImport()
@@ -220,7 +251,6 @@ EOT;
$this->tester->seeRecord('categories', [
'name' => 'Customers'
]);
}
public function testDefaultAccessoryUpdate()
@@ -292,7 +322,6 @@ EOT;
$this->tester->seeRecord('categories', [
'name' => 'Customers'
]);
}
public function testDefaultConsumableImport()
@@ -323,7 +352,6 @@ EOT;
$this->tester->seeRecord('categories', [
'name' => 'Triamterene/Hydrochlorothiazide'
]);
}
public function testDefaultConsumableUpdate()
@@ -396,7 +424,6 @@ EOT;
$this->tester->seeRecord('categories', [
'name' => 'Triamterene/Hydrochlorothiazide'
]);
}
public function testDefaultLicenseImport()
@@ -437,7 +464,6 @@ EOT;
]);
$this->tester->seeNumRecords(80, 'license_seats');
}
public function testDefaultLicenseUpdate()
@@ -538,7 +564,6 @@ EOT;
]);
$this->tester->seeNumRecords(80, 'license_seats');
}
private function import($importer, $mappings = null)
+2
View File
@@ -1,4 +1,5 @@
<?php
use App\Exceptions\CheckoutNotAllowed;
use App\Models\Asset;
use App\Models\AssetModel;
use App\Models\Category;
@@ -38,6 +39,7 @@ class NotificationTest extends BaseTest
$this->signIn();
$asset = factory(Asset::class)->states('requires-acceptance')->create();
$this->expectException(CheckoutNotAllowed::class);
$location = factory(Location::class)->create();
Notification::fake();
$asset->checkOut($location, 1);
+108
View File
@@ -0,0 +1,108 @@
<?php
(PHP_SAPI !== 'cli' || isset($_SERVER['HTTP_USER_AGENT'])) && die('Access denied.');
echo "Welcome to the Snipe-IT upgrader.\n\n";
echo "If you have any encrypted custom fields, BE SURE TO run the recrypter. See the Snipe-IT documentation for help.\n\n";
echo "--------------------------------------------------------\n";
echo "STEP 1: Backing up database: \n";
echo "--------------------------------------------------------\n\n";
$backup = shell_exec('php artisan snipeit:backup');
echo '- '.$backup."\n\n";
echo "--------------------------------------------------------\n";
echo "STEP 2: Putting application into maintenance mode: \n";
echo "--------------------------------------------------------\n\n";
$down = shell_exec('php artisan down');
echo '- '.$down."\n\n";
echo "--------------------------------------------------------\n";
echo "Step 3: Cleaning up old cached files:\n";
echo "--------------------------------------------------------\n\n";
if (file_exists('bootstrap/cache/compiled.php')) {
echo "-- Deleting bootstrap/cache/compiled.php. It it no longer used.\n";
@unlink('bootstrap/cache/compiled.php');
} else {
echo "-- No bootstrap/cache/compiled.php, so nothing to delete.\n";
}
if (file_exists('bootstrap/cache/services.php')) {
echo "-- Deleting bootstrap/cache/services.php. It it no longer used.\n";
@unlink('bootstrap/cache/services.php');
} else {
echo "-- No bootstrap/cache/services.php, so nothing to delete.\n";
}
if (file_exists('bootstrap/cache/config.php')) {
echo "-- Deleting bootstrap/cache/config.php. It it no longer used.\n";
@unlink('bootstrap/cache/config.php');
} else {
echo "-- No bootstrap/cache/config.php, so nothing to delete.\n";
}
$config_clear = shell_exec('php artisan config:clear');
$cache_clear = shell_exec('php artisan cache:clear');
echo '- '.$config_clear;
echo '- '.$cache_clear;
echo "\n";
echo "--------------------------------------------------------\n";
echo "Step 4: Updating composer dependencies:\n";
echo "(This may take an moment.)\n";
echo "--------------------------------------------------------\n\n";
// Composer install
if (file_exists('composer.phar')) {
echo "- Local composer.phar detected, so we'll use that.\n\n";
$composer = shell_exec('php composer.phar install --prefer-source');
} else {
echo "- We couldn't find a local composer.phar - trying globally.\n\n";
$composer = shell_exec('composer install --prefer-source');
}
echo $composer."\n\n";
echo "--------------------------------------------------------\n";
echo "Step 5: Migrating database:\n";
echo "--------------------------------------------------------\n\n";
$migrations = shell_exec('php artisan migrate --force');
echo '- '.$migrations."\n\n";
echo "--------------------------------------------------------\n";
echo "Step 6: Checking for OAuth keys:\n";
echo "--------------------------------------------------------\n\n";
if ((!file_exists('storage/oauth-public.key')) || (!file_exists('storage/oauth-private.key'))) {
echo "- No OAuth keys detected. Running passport install now.\n\n";
$passport = shell_exec('php artisan passport:install');
echo $passport;
} else {
echo "- OAuth keys detected. Skipping passport install.\n\n";
}
echo "--------------------------------------------------------\n";
echo "Step 7: Taking application out of maintenance mode:\n";
echo "--------------------------------------------------------\n\n";
$up = shell_exec('php artisan up');
echo '- '.$up."\n\n";
echo "--------------------------------------------------------\n";
echo "FINISHED! Clear your browser cookies and re-login to use :\n";
echo "your upgraded Snipe-IT.\n";
echo "--------------------------------------------------------\n\n";