diff --git a/CommonLogic/AbstractAction.php b/CommonLogic/AbstractAction.php index e24508f39..d1281c825 100644 --- a/CommonLogic/AbstractAction.php +++ b/CommonLogic/AbstractAction.php @@ -491,7 +491,7 @@ protected abstract function perform(TaskInterface $task, DataTransactionInterfac /** * A convenience-method, that contains all the things to be performed immediately after the - * result was otained from the action. + * result was obtained from the action. * * Do not override this method unless you really need to. If you do, make sure to perform * the things below or provide suitable replacements. diff --git a/Contexts/ActionContext.php b/Contexts/ActionContext.php index 52a0f64bb..206a654a7 100644 --- a/Contexts/ActionContext.php +++ b/Contexts/ActionContext.php @@ -27,7 +27,8 @@ class ActionContext extends AbstractContext */ public function getCurrentAction() { - return $this->getActions()[count($this->getActions()) - 1]; + $index = count($this->getActions()) - 1; + return $index > -1 ? $this->getActions()[$index] : null; } /** diff --git a/Model/99_PAGE/exface.core.apps.json b/Model/99_PAGE/exface.core.apps.json index a9f5d9a78..a87eadd30 100644 --- a/Model/99_PAGE/exface.core.apps.json +++ b/Model/99_PAGE/exface.core.apps.json @@ -10,8 +10,8 @@ "replaces_page_selector": null, "created_by_user_selector": "0x31000000000000000000000000000000", "created_on": "2020-03-12 14:04:30", - "modified_by_user_selector": "0x31000000000000000000000000000000", - "modified_on": "2025-06-24 14:11:08", + "modified_by_user_selector": "0x11e8fe1c902c8ebea23ee4b318306b9a", + "modified_on": "2026-02-19 15:03:24", "contents": { "object_alias": "exface.Core.APP", "widget_type": "DataTable", @@ -122,7 +122,7 @@ }, { "widget_type": "MenuButton", - "caption": "Puplish", + "caption": "Publish", "icon": "share-square-o", "buttons": [ { @@ -150,6 +150,92 @@ }, { "action_alias": "axenox.PackageManager.ComposerCleanupPreviousActions" + }, + { + "caption": "Logs", + "icon": "info-circle", + "action": { + "alias": "exface.core.ShowDialog", + "dialog": { + "widgets": [ + { + "object_alias": "axenox.PackageManager.APP_INSTALL_LOG", + "widget_type": "DataTable", + "sorters": [ + { + "attribute_alias": "CREATED_ON", + "direction": "desc" + }, + { + "attribute_alias": "CREATED_BY_USER", + "direction": "asc" + } + ], + "filters": [ + { + "attribute_alias": "CREATED_BY_USER", + "caption": "User" + }, + { + "attribute_alias": "CREATED_ON", + "caption": "Date" + }, + { + "attribute_alias": "APP_OID", + "caption": "App" + }, + { + "attribute_alias": "ERROR_LOG_ID" + }, + { + "attribute_alias": "MESSAGE_TYPE" + } + ], + "columns": [ + { + "attribute_alias": "MESSAGE_TYPE" + }, + { + "attribute_alias": "CREATED_BY_USER__LABEL", + "caption": "User" + }, + { + "attribute_alias": "CREATED_ON", + "caption": "Date" + }, + { + "attribute_alias": "APP_OID__ALIAS", + "caption": "App" + }, + { + "attribute_alias": "ERROR_LOG_ID" + }, + { + "attribute_alias": "ERROR_MESSAGE" + }, + { + "attribute_alias": "ERROR_DEBUG_WIDGET", + "hidden": true + } + ], + "buttons": [ + { + "action_alias": "exface.core.ShowObjectEditDialog", + "caption": "Details", + "icon": "info-circle", + "bind_to_double_click": true + }, + { + "action_alias": "axenox.PackageManager.ShowMonitorError" + }, + { + "action_alias": "axenox.PackageManager.ShowMonitorErrorWidget" + } + ] + } + ] + } + } } ] }, diff --git a/QueryBuilders/AbstractSqlBuilder.php b/QueryBuilders/AbstractSqlBuilder.php index 589998af3..95276c1f9 100644 --- a/QueryBuilders/AbstractSqlBuilder.php +++ b/QueryBuilders/AbstractSqlBuilder.php @@ -996,8 +996,14 @@ public function create(DataConnectionInterface $data_connection) : DataQueryResu $insertValues = implode(',', $output); $sql = 'INSERT INTO ' . $this->buildSqlDataAddress($mainObj, static::OPERATION_WRITE) . ' (' . $insertColumns . ') VALUES (' . $insertValues . ')'; - $beforeSql = $before_each_insert_sqls[$rowIdx] . ($uidBeforeEach ?? ''); - $afterSql = $after_each_insert_sqls[$rowIdx] . ($uidAfterEach ?? ''); + $beforeSql = $before_each_insert_sqls !== null ? + $before_each_insert_sqls[$rowIdx] . ($uidBeforeEach ?? '') : + null; + + $afterSql = $after_each_insert_sqls !== null ? + $after_each_insert_sqls[$rowIdx] . ($uidAfterEach ?? '') : + null; + if ($beforeSql || $afterSql) { $query = $data_connection->runSql($beforeSql . $sql . '; ' . $afterSql, true); if ($uidAddress && $customUid === null && $rRow = $query->getResultArray()[0]) { @@ -1282,6 +1288,7 @@ function update(DataConnectionInterface $data_connection) : DataQueryResultDataI } $uidConditionGrp = ConditionGroupFactory::createAND($this->getMainObject()); $uidConditionGrp->addConditionFromAttribute($uidAttr, '', ComparatorDataType::IN, false); + $affected_rows = 0; foreach ($updates_by_uid as $uid => $row) { $uidConditionGrp->getConditions()[0]->setValue($uid); $uidWhere = $this->buildSqlWhere(