Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no check kong version for left aside menu #220

Open
wants to merge 2 commits into
base: 3.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions bin/kong-dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 7 additions & 1 deletion lib/kong-schemas.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
};

Expand Down