From db2162db3cb9e77a68a9261e4a79d0570bbcc8d5 Mon Sep 17 00:00:00 2001 From: Hongwei Date: Tue, 18 Jun 2024 09:22:00 +0200 Subject: [PATCH 1/2] bugfix/fixed the bug for method routing form --- .../methodrouting/static/methodrouting/js/methodrouting.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apimanager/methodrouting/static/methodrouting/js/methodrouting.js b/apimanager/methodrouting/static/methodrouting/js/methodrouting.js index 912fc07..b1bc56d 100644 --- a/apimanager/methodrouting/static/methodrouting/js/methodrouting.js +++ b/apimanager/methodrouting/static/methodrouting/js/methodrouting.js @@ -41,9 +41,9 @@ $(document).ready(function($) { let json_editor_number = jsoneditor_id.replace("jsoneditor",""); //if the user do not click the `parameters` box, then there is no json_editors here,so we use the parameters directly. if (typeof json_editors[json_editor_number] === 'undefined') { - let parameters_Json_editor = parameters; + parameters_Json_editor = parameters; } else { - let parameters_Json_editor = JSON.stringify(json_editors[json_editor_number].get()); + parameters_Json_editor = JSON.stringify(json_editors[json_editor_number].get()); } $('.runner button.forSave').attr("disabled","disabled"); $('.runner button.forDelete').attr("disabled","disabled"); From 2cd6f1ce90b41b0525dd9dfe11cce33dd5527f9b Mon Sep 17 00:00:00 2001 From: Hongwei Date: Tue, 18 Jun 2024 09:29:09 +0200 Subject: [PATCH 2/2] refactor/set the default jsoneditor_div to none --- apimanager/base/static/css/obpjsoneditor.css | 1 + apimanager/methodrouting/templates/methodrouting/index.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apimanager/base/static/css/obpjsoneditor.css b/apimanager/base/static/css/obpjsoneditor.css index b5ac859..13f707a 100644 --- a/apimanager/base/static/css/obpjsoneditor.css +++ b/apimanager/base/static/css/obpjsoneditor.css @@ -15,5 +15,6 @@ } .jsoneditor_div{ + display: none; height: 400px; } \ No newline at end of file diff --git a/apimanager/methodrouting/templates/methodrouting/index.html b/apimanager/methodrouting/templates/methodrouting/index.html index 644124f..3652a53 100644 --- a/apimanager/methodrouting/templates/methodrouting/index.html +++ b/apimanager/methodrouting/templates/methodrouting/index.html @@ -131,7 +131,7 @@ {% endif %}
- +