mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 21:54:14 -08:00
Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
c3e8f64064
|
@ -191,21 +191,27 @@ class LdapSync extends Command
|
||||||
];
|
];
|
||||||
// Only update the database if is not a dry run
|
// Only update the database if is not a dry run
|
||||||
if (!$this->dryrun) {
|
if (!$this->dryrun) {
|
||||||
if ($user->save()) {
|
if ($user->isDirty()) { //if nothing on the user changed, don't bother trying to save anything nor put anything in the summary
|
||||||
$summary['note'] = ($user->wasRecentlyCreated ? 'CREATED' : 'UPDATED');
|
if ($user->save()) {
|
||||||
$summary['status'] = 'SUCCESS';
|
$summary['note'] = ($user->wasRecentlyCreated ? 'CREATED' : 'UPDATED');
|
||||||
} else {
|
$summary['status'] = 'SUCCESS';
|
||||||
$errors = '';
|
} else {
|
||||||
foreach ($user->getErrors()->getMessages() as $error) {
|
$errors = '';
|
||||||
$errors .= implode(", ",$error);
|
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;
|
} else {
|
||||||
$summary['status'] = 'ERROR';
|
$summary = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// $summary['note'] = ($user->getOriginal('username') ? 'UPDATED' : 'CREATED'); // this seems, kinda, like, superfluous, relative to the $summary['note'] thing above, yeah?
|
// $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',
|
'created_at',
|
||||||
'target_id',
|
'target_id',
|
||||||
'user_id',
|
'user_id',
|
||||||
|
'accept_signature',
|
||||||
'action_type',
|
'action_type',
|
||||||
'note'
|
'note'
|
||||||
];
|
];
|
||||||
|
|
|
@ -113,7 +113,7 @@ class ActionlogsTransformer
|
||||||
] : null,
|
] : null,
|
||||||
|
|
||||||
'note' => ($actionlog->note) ? e($actionlog->note): 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,
|
'log_meta' => ((isset($clean_meta)) && (is_array($clean_meta))) ? $clean_meta: null,
|
||||||
'action_date' => ($actionlog->action_date) ? Helper::getFormattedDateObject($actionlog->action_date, 'datetime'): null,
|
'action_date' => ($actionlog->action_date) ? Helper::getFormattedDateObject($actionlog->action_date, 'datetime'): null,
|
||||||
|
|
||||||
|
|
|
@ -144,6 +144,10 @@ a, a:link, a:visited, .btn-primary.hover {
|
||||||
#assetsListingTable>tbody>tr.selected>td {
|
#assetsListingTable>tbody>tr.selected>td {
|
||||||
background-color: var(--back-main);
|
background-color: var(--back-main);
|
||||||
}
|
}
|
||||||
|
#assetsListingTable>tbody>tr>td {
|
||||||
|
color: var(--link);
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
color: var(--text-main);
|
color: var(--text-main);
|
||||||
}
|
}
|
||||||
|
@ -201,6 +205,13 @@ body {
|
||||||
background-color: var(--back-main);
|
background-color: var(--back-main);
|
||||||
color: var(--text-main);
|
color: var(--text-main);
|
||||||
}
|
}
|
||||||
|
.dynamic-form-row{
|
||||||
|
color: @green;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
||||||
|
color: var(--header);
|
||||||
|
}
|
||||||
.form-control {
|
.form-control {
|
||||||
background-color: var(--back-main);
|
background-color: var(--back-main);
|
||||||
color: var(--text-main);
|
color: var(--text-main);
|
||||||
|
@ -219,6 +230,9 @@ input[type=text], input[type=search] {
|
||||||
background-color: var(--back-sub)!important;
|
background-color: var(--back-sub)!important;
|
||||||
color: var(--text-main);
|
color: var(--text-main);
|
||||||
}
|
}
|
||||||
|
li.select2-results__option{
|
||||||
|
color:@green;
|
||||||
|
}
|
||||||
#licensesTable>tbody>tr>td>nobr>a>i.fa {
|
#licensesTable>tbody>tr>td>nobr>a>i.fa {
|
||||||
color: var(--text-main);
|
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 {
|
#webui>div>div>div>div>div>table>tbody>tr>td>a>i.fa {
|
||||||
color: var(--text-main);
|
color: var(--text-main);
|
||||||
}
|
}
|
||||||
|
#webui>#app>.row>.col-md-12>.box>.box-body>.row>.col-md-12 {
|
||||||
|
color:@green;
|
||||||
|
}
|
||||||
a {
|
a {
|
||||||
color: var(--link);
|
color: var(--link);
|
||||||
&:link {
|
&:link {
|
||||||
|
@ -333,4 +349,3 @@ a {
|
||||||
border-top: 1px solid #dddddd;
|
border-top: 1px solid #dddddd;
|
||||||
display: table-cell;
|
display: table-cell;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue