Compare commits
71 Commits
v4.0-beta5
..
v4.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 3e222b674a | |||
| e316444c63 | |||
| b29d7beb3a | |||
| f0a49fefd7 | |||
| 998c4a5fe5 | |||
| 626a6408d0 | |||
| 126a5671fe | |||
| aff104fa5d | |||
| a5764351f7 | |||
| 348becbbec | |||
| 922d6937ae | |||
| c53dae4b72 | |||
| 17ad7f7800 | |||
| 6232a077b5 | |||
| e7d72beb88 | |||
| 01e3f4a4db | |||
| 1b76880b0e | |||
| ed4ea7f1f4 | |||
| 81e358a01d | |||
| 6c283de60a | |||
| 4e7a6c0ccf | |||
| fd515654ff | |||
| 5347b19910 | |||
| 29f1cf2b48 | |||
| f56862c684 | |||
| 1052be670d | |||
| 30a9704625 | |||
| 9a9b6ae228 | |||
| 7c8dc9fe2d | |||
| b81dd18576 | |||
| dac4b58892 | |||
| 71fd430f8e | |||
| 5265821bcc | |||
| cb494a74ca | |||
| c526ffbf68 | |||
| 6f5fe83a91 | |||
| 5a3816c907 | |||
| c8796cf045 | |||
| f4095c6dd0 | |||
| ee2c67a65f | |||
| 5614578710 | |||
| 08ef78356d | |||
| 47ac59abef | |||
| 265a896211 | |||
| f7e4fca70d | |||
| bb4c443cd9 | |||
| 7b1d2ee050 | |||
| b3f70a046f | |||
| 734e87f85f | |||
| f371c5fd62 | |||
| 4b3edbd2f5 | |||
| 1f3106b9da | |||
| 9fd3a9a82d | |||
| a6e6991a2d | |||
| 93ba0717d8 | |||
| a8839e0ef4 | |||
| 3e4152c966 | |||
| 1bf34d73f5 | |||
| d1e360d64d | |||
| 3b5b19848c | |||
| 93ba90e837 | |||
| fc70d79a17 | |||
| 65016a2383 | |||
| dbcb2ccb46 | |||
| 2afcfcc87c | |||
| 1afef9416a | |||
| 4049143ebf | |||
| 4df53bdf8d | |||
| d49a1ea304 | |||
| 521f4facd5 | |||
| b4653dfc15 |
@@ -728,6 +728,15 @@
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "imanghafoori1",
|
||||
"name": "Iman",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/6961695?v=4",
|
||||
"profile": "https://github.com/imanghafoori1",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[](https://travis-ci.org/snipe/snipe-it) [](http://waffle.io/snipe/snipe-it) []() [](https://crowdin.com/project/snipe-it) [](https://gitter.im/snipe/snipe-it?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [](https://hub.docker.com/r/snipe/snipe-it/) [](https://twitter.com/snipeyhead) [](https://zenhub.io) [](https://www.codacy.com/app/snipe/snipe-it?utm_source=github.com&utm_medium=referral&utm_content=snipe/snipe-it&utm_campaign=Badge_Grade)
|
||||
[](#contributors)
|
||||
[](#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") |
|
||||
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
||||
|
||||
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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[] = '';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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'),
|
||||
];
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,6 @@ class Accessory extends SnipeModel
|
||||
'purchase_date',
|
||||
'model_number',
|
||||
'manufacturer_id',
|
||||
'notes',
|
||||
'qty',
|
||||
'requestable'
|
||||
];
|
||||
|
||||
@@ -79,6 +79,7 @@ class Asset extends Depreciable
|
||||
protected $fillable = [
|
||||
'asset_tag',
|
||||
'assigned_to',
|
||||
'assigned_type',
|
||||
'company_id',
|
||||
'image',
|
||||
'model_id',
|
||||
@@ -253,8 +254,9 @@ 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();
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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);
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+4
-4
@@ -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',
|
||||
'build_version' => '1',
|
||||
'hash_version' => 'g998c4a5',
|
||||
'full_hash' => 'v4.0-1-g998c4a5',
|
||||
);
|
||||
|
||||
@@ -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()
|
||||
];
|
||||
});
|
||||
@@ -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
@@ -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",
|
||||
|
||||
Vendored
+23
-23
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ér',
|
||||
'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.'
|
||||
)
|
||||
);
|
||||
|
||||
@@ -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',
|
||||
);
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
);
|
||||
|
||||
@@ -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 ',
|
||||
);
|
||||
|
||||
@@ -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',
|
||||
);
|
||||
|
||||
@@ -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
@@ -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',
|
||||
|
||||
@@ -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 "Desktops", "Laptops", "Mobile Phones", "Tablets", 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. " Stacje robocze", "Laptopy", "Telefony", "Tablety", 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ł',
|
||||
);
|
||||
|
||||
@@ -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>.',
|
||||
|
||||
@@ -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.'
|
||||
),
|
||||
|
||||
|
||||
@@ -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,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',
|
||||
|
||||
);
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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?',
|
||||
|
||||
@@ -11,5 +11,5 @@ return array(
|
||||
'request' => 'Zamówienie',
|
||||
'submit' => 'Zatwierdź',
|
||||
'upload' => 'Wgraj',
|
||||
'select_file' => 'Select File...',
|
||||
'select_file' => 'Wybierz plik...',
|
||||
);
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<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 -->
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
@@ -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
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user