diff --git a/app/views/console/functions/function.phtml b/app/views/console/functions/function.phtml index 8ea9d2f8a0..5ad830bcd4 100644 --- a/app/views/console/functions/function.phtml +++ b/app/views/console/functions/function.phtml @@ -1,9 +1,29 @@ getParam('fileLimit', 0); $fileLimitHuman = $this->getParam('fileLimitHuman', 0); -$events = array_keys($this->getParam('events', [])); +$events = $this->getParam('events', []); $timeout = $this->getParam('timeout', 900); $usageStatsEnabled = $this->getParam('usageStatsEnabled', true); +$patterns = []; + +foreach ($events as $name => $event) { + foreach ($event as $key => $value) { + if (!\str_starts_with($key, '$')) { + if (!($value['$resource'] ?? false)) { + $patterns[] = "{$name}.{$key}"; + } else { + foreach ($value as $key2 => $value2) { + if (!\str_starts_with($key2, '$')) { + if (!($value2['$resource'] ?? false)) { + $patterns[] = "{$key}.{$key2}"; + } + } + } + } + } + } +} + ?>
getParam('usageStatsEnabled', true);
Max value is escape(number_format($timeout)); ?> seconds (escape((int) ($timeout / 60)); ?> minutes)
-
- -
- $event): ?> -
- -   - +
+ + + +
+ + +
Leave empty for wildcard access
+
+ + +
Leave empty for wildcard access
+
+
+ + +
+
diff --git a/app/views/console/webhooks/index.phtml b/app/views/console/webhooks/index.phtml index 54c9f6e765..6463acf330 100644 --- a/app/views/console/webhooks/index.phtml +++ b/app/views/console/webhooks/index.phtml @@ -1,6 +1,7 @@ getParam('events', []); +$patterns = []; foreach ($events as $name => $event) { foreach ($event as $key => $value) { @@ -83,22 +84,21 @@ foreach ($events as $name => $event) {
-
@@ -229,10 +229,10 @@ foreach ($events as $name => $event) {