diff --git a/app/views/console/functions/function.phtml b/app/views/console/functions/function.phtml
index 4914710555..38d8de8d9c 100644
--- a/app/views/console/functions/function.phtml
+++ b/app/views/console/functions/function.phtml
@@ -7,11 +7,13 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled', true);
$patterns = [];
foreach ($events as $name => $event) {
+ $patterns[] = $name;
foreach ($event as $key => $value) {
if (!\str_starts_with($key, '$')) {
if (!($value['$resource'] ?? false)) {
$patterns[] = "{$name}.{$key}";
} else {
+ $patterns[] = $key;
foreach ($value as $key2 => $value2) {
if (!\str_starts_with($key2, '$')) {
if (!($value2['$resource'] ?? false)) {
@@ -24,6 +26,8 @@ foreach ($events as $name => $event) {
}
}
+sort($patterns);
+
?>
$event) {
-
Leave empty for wildcard access
+
Leave empty for wildcard
-
Leave empty for wildcard access
+
Leave empty for wildcard
diff --git a/app/views/console/webhooks/webhook.phtml b/app/views/console/webhooks/webhook.phtml
index 78f02822a3..1e23d83f57 100644
--- a/app/views/console/webhooks/webhook.phtml
+++ b/app/views/console/webhooks/webhook.phtml
@@ -4,11 +4,13 @@ $events = $this->getParam('events', []);
$patterns = [];
foreach ($events as $name => $event) {
+ $patterns[] = $name;
foreach ($event as $key => $value) {
if (!\str_starts_with($key, '$')) {
if (!($value['$resource'] ?? false)) {
$patterns[] = "{$name}.{$key}";
} else {
+ $patterns[] = $key;
foreach ($value as $key2 => $value2) {
if (!\str_starts_with($key2, '$')) {
if (!($value2['$resource'] ?? false)) {
@@ -21,6 +23,8 @@ foreach ($events as $name => $event) {
}
}
+sort($patterns);
+
?>
$event) {
-
Leave empty for wildcard access
+
Leave empty for wildcard
-
Leave empty for wildcard access
+
Leave empty for wildcard