Skip to content

Commit

Permalink
Compare qtest version > 8.9.4 then enable new UI
Browse files Browse the repository at this point in the history
  • Loading branch information
phuthanhta committed Feb 6, 2018
1 parent bb32dba commit 796c984
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ public JSONObject getQtestInfo(String qTestUrl) {
try {
Object qTestInfo = ConfigService.getQtestInfo(qTestUrl);
if (null != qTestInfo) {
res.put("qTestInfo", null == qTestInfo ? "" : JSONObject.fromObject(qTestInfo));
res.put("qTestInfo", JSONObject.fromObject(qTestInfo));
return res;
}
} catch (Exception ex) {
Expand Down
7 changes: 4 additions & 3 deletions src/main/webapp/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,10 @@ $j(document).ready(function () {
var name = (data.qTestInfo.name || "").toLowerCase();
var versions = (data.qTestInfo.version || "").split(".");
if (("test-conductor" === name || "${pom.name}" === name) && 3 === versions.length) {
// 8.7.3
if ((+versions[0] === 8 && +versions[1] > 7)
|| (+versions[0] === 8 && +versions[1] === 7 && +versions[2] > 3)
// 8.9.4
if (
(+versions[0] === 8 && +versions[1] > 9)
|| (+versions[0] === 8 && +versions[1] === 9 && +versions[2] > 4)
|| (+versions[0] > 8)
) {
enabled = true;
Expand Down

0 comments on commit 796c984

Please sign in to comment.