Merge branch 'develop' of github.com:cerebrate-project/cerebrate into develop

pull/85/head
iglocska 2021-12-22 12:27:04 +01:00
commit aa23b3e293
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
4 changed files with 13 additions and 7 deletions

View File

@ -68,7 +68,11 @@ class LocalToolsController extends AppController
foreach ($connections as $connection) { foreach ($connections as $connection) {
$actionDetails = $this->LocalTools->getActionDetails($actionName); $actionDetails = $this->LocalTools->getActionDetails($actionName);
$params['connection'] = $connection; $params['connection'] = $connection;
try {
$tmpResult = $this->LocalTools->action($this->ACL->getUser()['id'], $connection->connector, $actionName, $params, $this->request); $tmpResult = $this->LocalTools->action($this->ACL->getUser()['id'], $connection->connector, $actionName, $params, $this->request);
} catch (\Exception $e) {
$tmpResult = ['success' => false, 'message' => $e->getMessage(), 'data' => []];
}
$tmpResult['connection'] = $connection; $tmpResult['connection'] = $connection;
$results[$connection->id] = $tmpResult; $results[$connection->id] = $tmpResult;
$successes += $tmpResult['success'] ? 1 : 0; $successes += $tmpResult['success'] ? 1 : 0;

View File

@ -819,7 +819,7 @@ class MispConnector extends CommonConnectorTools
[ [
'field' => 'connection_ids', 'field' => 'connection_ids',
'type' => 'hidden', 'type' => 'hidden',
'value' => $params['connection_ids'] 'value' => json_encode($params['connection_ids'])
], ],
[ [
'field' => 'method', 'field' => 'method',

View File

@ -155,7 +155,7 @@ echo $this->element('genericElements/IndexTable/index_table', [
tableData tableData
) )
const $footer = $(modalObject.ajaxApi.statusNode).parent() const $footer = $(modalObject.ajaxApi.statusNode).parent()
modalObject.ajaxApi.statusNode.remove() modalObject.ajaxApi.options.statusNode.remove()
const $cancelButton = $footer.find('button[data-dismiss="modal"]') const $cancelButton = $footer.find('button[data-dismiss="modal"]')
$cancelButton.text('<?= __('OK') ?>').removeClass('btn-secondary').addClass('btn-primary') $cancelButton.text('<?= __('OK') ?>').removeClass('btn-secondary').addClass('btn-primary')
} }

View File

@ -279,10 +279,12 @@ $(document).ready(() => {
overloadBSDropdown(); overloadBSDropdown();
addSupportOfNestedDropdown(); addSupportOfNestedDropdown();
if (window.debounce) {
const debouncedGlobalSearch = debounce(performGlobalSearch, 400) const debouncedGlobalSearch = debounce(performGlobalSearch, 400)
$('#globalSearch') $('#globalSearch')
.keydown(debouncedGlobalSearch) .keydown(debouncedGlobalSearch)
.keydown(focusSearchResults); .keydown(focusSearchResults);
}
$('.lock-sidebar a.btn-lock-sidebar').click(() => { $('.lock-sidebar a.btn-lock-sidebar').click(() => {
const $sidebar = $('.sidebar') const $sidebar = $('.sidebar')