Compare commits
34 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f182ce1c89 | |||
| c6dde67e86 | |||
| c3e8f64064 | |||
| 68cfbaab2e | |||
| 2abfd8da74 | |||
| ec7d70cea0 | |||
| 6c285b0273 | |||
| e65269e9c7 | |||
| 5d112be49a | |||
| d3f5fde84a | |||
| 496b176d4e | |||
| fd66f7aeb4 | |||
| c71086d2f3 | |||
| 153f849ef7 | |||
| fcdb945f5f | |||
| 377c92a290 | |||
| 5824ac3b28 | |||
| fad0ed6d5b | |||
| ec9c69323a | |||
| 338106734a | |||
| 81fcb4c7b3 | |||
| 5ae65d5329 | |||
| d04b0e4d4b | |||
| a6d0209e93 | |||
| 810f6a3970 | |||
| 1379821876 | |||
| 33236f16ac | |||
| 90dddee923 | |||
| 7869ffcc79 | |||
| 1687e4b850 | |||
| 4a3d8f2cc0 | |||
| c19f1b77b0 | |||
| 132f296f03 | |||
| 870b097f03 |
@@ -191,21 +191,27 @@ class LdapSync extends Command
|
||||
];
|
||||
// Only update the database if is not a dry run
|
||||
if (!$this->dryrun) {
|
||||
if ($user->save()) {
|
||||
$summary['note'] = ($user->wasRecentlyCreated ? 'CREATED' : 'UPDATED');
|
||||
$summary['status'] = 'SUCCESS';
|
||||
} else {
|
||||
$errors = '';
|
||||
foreach ($user->getErrors()->getMessages() as $error) {
|
||||
$errors .= implode(", ",$error);
|
||||
if ($user->isDirty()) { //if nothing on the user changed, don't bother trying to save anything nor put anything in the summary
|
||||
if ($user->save()) {
|
||||
$summary['note'] = ($user->wasRecentlyCreated ? 'CREATED' : 'UPDATED');
|
||||
$summary['status'] = 'SUCCESS';
|
||||
} else {
|
||||
$errors = '';
|
||||
foreach ($user->getErrors()->getMessages() as $error) {
|
||||
$errors .= implode(", ",$error);
|
||||
}
|
||||
$summary['note'] = $snipeUser->getDN().' was not imported. REASON: '.$errors;
|
||||
$summary['status'] = 'ERROR';
|
||||
}
|
||||
$summary['note'] = $snipeUser->getDN().' was not imported. REASON: '.$errors;
|
||||
$summary['status'] = 'ERROR';
|
||||
} else {
|
||||
$summary = null;
|
||||
}
|
||||
}
|
||||
|
||||
// $summary['note'] = ($user->getOriginal('username') ? 'UPDATED' : 'CREATED'); // this seems, kinda, like, superfluous, relative to the $summary['note'] thing above, yeah?
|
||||
$this->summary->push($summary);
|
||||
if($summary) { //if the $user wasn't dirty, $summary was set to null so that we will skip the following push()
|
||||
$this->summary->push($summary);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -49,6 +49,7 @@ class ReportsController extends Controller
|
||||
'created_at',
|
||||
'target_id',
|
||||
'user_id',
|
||||
'accept_signature',
|
||||
'action_type',
|
||||
'note'
|
||||
];
|
||||
|
||||
@@ -143,11 +143,10 @@ class LicenseFilesController extends Controller
|
||||
// We have to override the URL stuff here, since local defaults in Laravel's Flysystem
|
||||
// won't work, as they're not accessible via the web
|
||||
if (config('filesystems.default') == 'local') {
|
||||
\Log::debug('The private filesystem is local');
|
||||
return Response::make(Storage::get($file));
|
||||
|
||||
return Storage::download($file);
|
||||
} else {
|
||||
if ($download != 'true') {
|
||||
\Log::debug('display the file');
|
||||
if ($contents = file_get_contents(Storage::url($file))) {
|
||||
return Response::make(Storage::url($file)->header('Content-Type', mime_content_type($file)));
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ class ManufacturersController extends Controller
|
||||
$manufacturer->support_url = $request->input('support_url');
|
||||
$manufacturer->support_phone = $request->input('support_phone');
|
||||
$manufacturer->support_email = $request->input('support_email');
|
||||
$manufacturer = $request->handleImages($manufacturer,600, public_path().'/uploads/manufacturers');
|
||||
$manufacturer = $request->handleImages($manufacturer);
|
||||
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ class ManufacturersController extends Controller
|
||||
$manufacturer->image = null;
|
||||
}
|
||||
|
||||
$manufacturer = $request->handleImages($manufacturer,600, public_path().'/uploads/manufacturers');
|
||||
$manufacturer = $request->handleImages($manufacturer);
|
||||
|
||||
|
||||
if ($manufacturer->save()) {
|
||||
|
||||
@@ -682,7 +682,7 @@ class ReportsController extends Controller
|
||||
$diff = ($asset->purchase_cost - $depreciation);
|
||||
$row[] = Helper::formatCurrencyOutput($depreciation);
|
||||
$row[] = Helper::formatCurrencyOutput($diff);
|
||||
$row[] = ($asset->depreciated_date()!='') ? $asset->depreciated_date()->format('Y-m-d') : '';
|
||||
$row[] = ($asset->depreciation) ? $asset->depreciated_date()->format('Y-m-d') : '';
|
||||
}
|
||||
|
||||
if ($request->filled('checkout_date')) {
|
||||
|
||||
@@ -113,7 +113,7 @@ class ActionlogsTransformer
|
||||
] : null,
|
||||
|
||||
'note' => ($actionlog->note) ? e($actionlog->note): null,
|
||||
'signature_file' => ($actionlog->signature_filename) ? route('log.signature.view', ['filename' => $actionlog->signature_filename ]) : null,
|
||||
'signature_file' => ($actionlog->accept_signature) ? route('log.signature.view', ['filename' => $actionlog->accept_signature ]) : null,
|
||||
'log_meta' => ((isset($clean_meta)) && (is_array($clean_meta))) ? $clean_meta: null,
|
||||
'action_date' => ($actionlog->action_date) ? Helper::getFormattedDateObject($actionlog->action_date, 'datetime'): null,
|
||||
|
||||
|
||||
@@ -33,7 +33,8 @@ return [
|
||||
* how many proxies that client's request has
|
||||
* subsequently passed through.
|
||||
*/
|
||||
'proxies' => null, // [<ip addresses>,], '*'
|
||||
'proxies' => env('APP_TRUSTED_PROXIES') !== null ?
|
||||
explode(',', env('APP_TRUSTED_PROXIES')) : '*',
|
||||
|
||||
/*
|
||||
* To trust one or more specific proxies that connect
|
||||
|
||||
+6
-6
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
return array (
|
||||
'app_version' => 'v5.0.0',
|
||||
'full_app_version' => 'v5.0.0 - build 4484-g33cf4896d',
|
||||
'build_version' => '4484',
|
||||
'app_version' => 'v5.0.2',
|
||||
'full_app_version' => 'v5.0.2 - build 5414-gc3e8f6406',
|
||||
'build_version' => '5414',
|
||||
'prerelease_version' => '',
|
||||
'hash_version' => 'g33cf4896d',
|
||||
'full_hash' => 'v5.0.0-1-g33cf4896d',
|
||||
'branch' => 'develop',
|
||||
'hash_version' => 'gc3e8f6406',
|
||||
'full_hash' => 'v5.0.1-19-gc3e8f6406',
|
||||
'branch' => 'master',
|
||||
);
|
||||
@@ -144,6 +144,10 @@ a, a:link, a:visited, .btn-primary.hover {
|
||||
#assetsListingTable>tbody>tr.selected>td {
|
||||
background-color: var(--back-main);
|
||||
}
|
||||
#assetsListingTable>tbody>tr>td {
|
||||
color: var(--link);
|
||||
}
|
||||
|
||||
body {
|
||||
color: var(--text-main);
|
||||
}
|
||||
@@ -201,6 +205,13 @@ body {
|
||||
background-color: var(--back-main);
|
||||
color: var(--text-main);
|
||||
}
|
||||
.dynamic-form-row{
|
||||
color: @green;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
||||
color: var(--header);
|
||||
}
|
||||
.form-control {
|
||||
background-color: var(--back-main);
|
||||
color: var(--text-main);
|
||||
@@ -219,6 +230,9 @@ input[type=text], input[type=search] {
|
||||
background-color: var(--back-sub)!important;
|
||||
color: var(--text-main);
|
||||
}
|
||||
li.select2-results__option{
|
||||
color:@green;
|
||||
}
|
||||
#licensesTable>tbody>tr>td>nobr>a>i.fa {
|
||||
color: var(--text-main);
|
||||
}
|
||||
@@ -293,7 +307,9 @@ input[type=text], input[type=search] {
|
||||
#webui>div>div>div>div>div>table>tbody>tr>td>a>i.fa {
|
||||
color: var(--text-main);
|
||||
}
|
||||
|
||||
#webui>#app>.row>.col-md-12>.box>.box-body>.row>.col-md-12 {
|
||||
color:@green;
|
||||
}
|
||||
a {
|
||||
color: var(--link);
|
||||
&:link {
|
||||
@@ -333,4 +349,3 @@ a {
|
||||
border-top: 1px solid #dddddd;
|
||||
display: table-cell;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ return array(
|
||||
'ad_domain_help' => 'This is sometimes the same as your email domain, but not always.',
|
||||
'ad_append_domain_label' => 'Append domain name',
|
||||
'ad_append_domain' => 'Append domain name to username field',
|
||||
'ad_append_domain_help' => 'User doesn\'t require to write "username@domain.local", they can just type "username".' ,
|
||||
'ad_append_domain_help' => 'User isn\'t required to write "username@domain.local", they can just type "username".' ,
|
||||
'admin_cc_email' => 'CC Email',
|
||||
'admin_cc_email_help' => 'If you would like to send a copy of checkin/checkout emails that are sent to users to an additional email account, enter it here. Otherwise leave this field blank.',
|
||||
'is_ad' => 'This is an Active Directory server',
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
@section('content')
|
||||
|
||||
|
||||
<link rel="stylesheet" href="{{ mix('css/signature-pad.min.css') }}">
|
||||
<link rel="stylesheet" href="{{ url('css/signature-pad.min.css') }}">
|
||||
|
||||
<style>
|
||||
.form-horizontal .control-label, .form-horizontal .radio, .form-horizontal .checkbox, .form-horizontal .radio-inline, .form-horizontal .checkbox-inline {
|
||||
@@ -25,6 +25,12 @@
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
.m-signature-pad--body {
|
||||
border-style: solid;
|
||||
border-color: grey;
|
||||
border-width: thin;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
@include ('partials.forms.edit.model-select', ['translated_name' => trans('admin/hardware/form.model'), 'fieldname' => 'model_id', 'required' => 'true'])
|
||||
@include ('partials.forms.edit.model-select', ['translated_name' => trans('admin/hardware/form.model'), 'fieldname' => 'model_id', 'field_req' => true])
|
||||
|
||||
|
||||
<div id='custom_fields_content'>
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
data-pagination="true"
|
||||
data-id-table="requestedAssets"
|
||||
data-cookie-id-table="requestedAssets"
|
||||
data-url="{{ route('api.consumables.index') }}"
|
||||
data-export-options='{
|
||||
"fileName": "export-assetrequests-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="col-md-7{{ ((isset($required) && ($required =='true'))) ? ' required' : '' }}">
|
||||
<select class="js-data-ajax" data-endpoint="models" data-placeholder="{{ trans('general.select_model') }}" name="{{ $fieldname }}" style="width: 100%" id="model_select_id" aria-label="{{ $fieldname }}" data-validation="required" required>
|
||||
<select class="js-data-ajax" data-endpoint="models" data-placeholder="{{ trans('general.select_model') }}" name="{{ $fieldname }}" style="width: 100%" id="model_select_id" aria-label="{{ $fieldname }}" {{ (isset($field_req) ? 'data-validation="required" required' : '') }}>
|
||||
@if ($model_id = old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
|
||||
<option value="{{ $model_id }}" selected="selected">
|
||||
{{ (\App\Models\AssetModel::find($model_id)) ? \App\Models\AssetModel::find($model_id)->name : '' }}
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
<div id="purgebarcodesstatus-error" class="text-danger"></div>
|
||||
</div>
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<p class="help-block">This will attempt to delete cached barcodes. This would typically only be used if your barcode dettings have changed, or if your Snipe-IT URL has changed. Barcodes will be re-generated when accessed next.</p>
|
||||
<p class="help-block">This will attempt to delete cached barcodes. This would typically only be used if your barcode settings have changed, or if your Snipe-IT URL has changed. Barcodes will be re-generated when accessed next.</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -353,6 +353,8 @@
|
||||
<form action="{{ route('users/bulkedit') }}" method="POST">
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
<input type="hidden" name="bulk_actions" value="delete" />
|
||||
|
||||
<input type="hidden" name="ids[{{ $user->id }}]" value="{{ $user->id }}" />
|
||||
<button style="width: 100%;" class="btn btn-sm btn-danger hidden-print">{{ trans('button.checkin_and_delete') }}</button>
|
||||
</form>
|
||||
|
||||
-54
@@ -187,29 +187,6 @@ $up = shell_exec('php artisan up');
|
||||
echo '-- '.$up."\n\n";
|
||||
|
||||
|
||||
echo "--------------------------------------------------------\n";
|
||||
echo "Step 11: Checking for v5 public storage directories: \n";
|
||||
echo "--------------------------------------------------------\n\n";
|
||||
|
||||
|
||||
if ((!file_exists('storage/app/public')) && (!is_dir('storage/app/public'))) {
|
||||
echo "- No public directory found in storage/app - creating one.\n\n";
|
||||
if (!mkdir('storage/app/public', 0777, true)) {
|
||||
echo "ERROR: Failed to create directory at storage/app/public. You should do this manually.\n\n";
|
||||
}
|
||||
$storage_simlink = shell_exec('php artisan storage:link');
|
||||
echo $storage_simlink;
|
||||
|
||||
} else {
|
||||
echo "- Public storage directory already exists. Skipping...\n\n";
|
||||
}
|
||||
|
||||
echo "- Copying files into storage/app/public.\n\n";
|
||||
if (rmove('public/uploads','storage/app/public')) {
|
||||
echo "- Copy successful.\n\n";
|
||||
} else {
|
||||
echo "- Copy failed - you should do this manually by copying the files from public/uploads into the storage/app/public directory.\n\n";
|
||||
}
|
||||
|
||||
echo "--------------------------------------------------------\n";
|
||||
echo "FINISHED! Clear your browser cookies and re-login to use :\n";
|
||||
@@ -217,34 +194,3 @@ echo "your upgraded Snipe-IT.\n";
|
||||
echo "--------------------------------------------------------\n\n";
|
||||
|
||||
|
||||
/**
|
||||
* Recursively move files from one directory to another
|
||||
*
|
||||
* @param String $src - Source of files being moved
|
||||
* @param String $dest - Destination of files being moved
|
||||
*/
|
||||
function rmove($src, $dest){
|
||||
|
||||
// If source is not a directory stop processing
|
||||
if(!is_dir($src)) return false;
|
||||
|
||||
// If the destination directory does not exist create it
|
||||
if(!is_dir($dest)) {
|
||||
if(!mkdir($dest)) {
|
||||
// If the destination directory could not be created stop processing
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Open the source directory to read in files
|
||||
$i = new DirectoryIterator($src);
|
||||
foreach($i as $f) {
|
||||
if($f->isFile()) {
|
||||
rename($f->getRealPath(), "$dest/" . $f->getFilename());
|
||||
} else if(!$f->isDot() && $f->isDir()) {
|
||||
rmove($f->getRealPath(), "$dest/$f");
|
||||
unlink($f->getRealPath());
|
||||
}
|
||||
}
|
||||
unlink($src);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user