From 615dfbf8149a19de9e9bce578256350e2620c46b Mon Sep 17 00:00:00 2001 From: Gregory Chalenko Date: Tue, 3 Aug 2021 15:24:57 +0300 Subject: ..F....... [ZBX-18271] fixed incorrect ordering for tags and overrides in widgets, operations overrides in host prototype form and interface order in item and discovery prototypes forms Merge in ZBX/zabbix from feature/ZBX-18271-5.3 to master * commit '038b30d6a652c717949f633305ff81b1fcb316e2': (21 commits) .......... [ZBX-18271] fixed changelog .......... [ZBX-18271] returned comment .......... [ZBX-18271] removed comment from autotest .......... [ZBX-18271] fixed Selenium test, changed parameter name in data provider .......... [ZBX-18271] added changelog ..F....... [ZBX-18271] reverted convertDottedKeys changes; added specific array sorting by key .......... [ZBX-18271] commented back Selenium test for dynamic widget A.F....... [ZBX-18271] reverted sorting in API; added sorting in frontend A.F....... [ZBX-18271] sort tags by tag and value; removed api sorting A......... [ZBX-18271] added sort by primary key for discovery rule override tags A......... [ZBX-18271] script webhook params sorted by name ..F....... [ZBX-18271] added sort flag to ksort A......... [ZBX-18271] additional sorting for postgres script type webscript parameter sorting ..F....... [ZBX-18271] sort interfaces by main property and additionally by interfaceid in asc order in forms: item, item prototype, discovery rule .......... [ZBX-18271] fixed Selenium test, changed function declaration and macro name in data provider .......... [ZBX-18271] fixed Selenium framework, changed functions declaration ..F....... [ZBX-18271] fixed unsupported key in dotted key conversion ..F....... [ZBX-18271] fixed incorrect sorting of double nested arrays in dotted notation converter ..F....... [ZBX-18271] fixed order in arrays when converted from dotted key notation .......... [ZBX-18271] uncommented Selenium tests ... (cherry picked from commit 9e34be9ee049eecb0ed47140e187ec366d8e6014) --- ui/app/controllers/CControllerScriptEdit.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ui/app/controllers/CControllerScriptEdit.php') diff --git a/ui/app/controllers/CControllerScriptEdit.php b/ui/app/controllers/CControllerScriptEdit.php index e991cba5a68..7648e6958e3 100644 --- a/ui/app/controllers/CControllerScriptEdit.php +++ b/ui/app/controllers/CControllerScriptEdit.php @@ -156,6 +156,10 @@ class CControllerScriptEdit extends CController { $data['menu_path'] = $script['menu_path']; $data['parameters'] = $script['parameters']; $data['actions'] = $script['actions']; + + if ($data['type'] == ZBX_SCRIPT_TYPE_WEBHOOK) { + CArrayHelper::sort($data['parameters'], ['field' => 'name', 'order' => ZBX_SORT_UP]); + } } } -- cgit v1.2.3