From 369b5df5969cbbbe582a3d2bed126f8e69b9df95 Mon Sep 17 00:00:00 2001 From: hanson Date: Tue, 10 Sep 2019 14:58:17 +0800 Subject: [PATCH 1/2] no check kong version for left aside menu --- lib/kong-schemas.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/kong-schemas.js b/lib/kong-schemas.js index 134ae52..913629b 100644 --- a/lib/kong-schemas.js +++ b/lib/kong-schemas.js @@ -2989,7 +2989,13 @@ var schemas = { var Schema = { get: function(version) { - return schemas[semver.major(version) + '.' + semver.minor(version)]; + let schema = schemas[semver.major(version) + '.' + semver.minor(version)]; + if(!schema){ + for(let key in schemas){ + schema=schemas[key] + } + } + return schema; } }; From a316669e5205796d0be4e6c527ab6e1fa15127ad Mon Sep 17 00:00:00 2001 From: hanson Date: Thu, 22 Oct 2020 17:43:09 +0800 Subject: [PATCH 2/2] fix bugs --- bin/kong-dashboard.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/kong-dashboard.js b/bin/kong-dashboard.js index 1c4289b..380d9ff 100755 --- a/bin/kong-dashboard.js +++ b/bin/kong-dashboard.js @@ -159,12 +159,12 @@ function start(argv) { process.exit(1); }).then((version) => { if (semver.lt(version, '0.9.0')) { - terminal.error("This version of Kong dashboard doesn't support Kong v0.9 and lower."); - process.exit(1); + terminal.error("This version of Kong dashboard doesn't support Kong v0.9 and lower.current is -->"+version); + // process.exit(1); } if (semver.gte(version, '2.0.0')) { - terminal.error("This version of Kong dashboard doesn't support Kong v2.0 and higher."); - process.exit(1); + terminal.error("This version of Kong dashboard doesn't support Kong v2.0 and higher.current is -->"+version); + // process.exit(1); } terminal.success("Connected to Kong on " + argv.kongUrl + "."); terminal.info("Kong version is " + version);