MaheshRaju-Huawei
Committed by Gerrit Code Review

PCE WEB GUI defect Fixes[ONOS-4811,ONOS-4812, ONOS-4813]

Change-Id: I0bd57e27ec3536e696b5194fdb2b7fba0d06ed29
...@@ -198,7 +198,7 @@ public class PceWebTopovMessageHandler extends UiMessageHandler { ...@@ -198,7 +198,7 @@ public class PceWebTopovMessageHandler extends UiMessageHandler {
198 String tunnelName = string(payload, TUNNEL_NAME); 198 String tunnelName = string(payload, TUNNEL_NAME);
199 199
200 if (tunnelName.equals(STRING_NULL)) { 200 if (tunnelName.equals(STRING_NULL)) {
201 - log.error("tunnel name should not be empty"); 201 + log.error("PCE setup path is failed as tunnel name should not be empty");
202 return; 202 return;
203 } 203 }
204 204
...@@ -207,8 +207,8 @@ public class PceWebTopovMessageHandler extends UiMessageHandler { ...@@ -207,8 +207,8 @@ public class PceWebTopovMessageHandler extends UiMessageHandler {
207 return; 207 return;
208 } 208 }
209 209
210 - if (lspType == null) { 210 + if (lspType == null || lspType.equals(STRING_NULL)) {
211 - log.error("PCE setup path is failed."); 211 + log.error("PCE setup path is failed as LSP type is mandatory");
212 } 212 }
213 213
214 if ((src != null) && (dst != null)) { 214 if ((src != null) && (dst != null)) {
......
...@@ -83,12 +83,22 @@ ...@@ -83,12 +83,22 @@
83 83
84 function addAttribute(name, id, nameField, type) { 84 function addAttribute(name, id, nameField, type) {
85 if (type == 'radio') { 85 if (type == 'radio') {
86 + if (id == 'pce-lsp-type-cr') {
87 + p.append('input').attr({
88 + type: type,
89 + name: name,
90 + id: id,
91 + checked: 'checked',
92 + class: 'radioButtonSpace'
93 + });
94 + } else {
86 p.append('input').attr({ 95 p.append('input').attr({
87 type: type, 96 type: type,
88 name: name, 97 name: name,
89 id: id, 98 id: id,
90 class: 'radioButtonSpace' 99 class: 'radioButtonSpace'
91 }); 100 });
101 + }
92 } else { 102 } else {
93 p.append('input').attr({ 103 p.append('input').attr({
94 type: type, 104 type: type,
...@@ -112,7 +122,8 @@ ...@@ -112,7 +122,8 @@
112 addAttribute('pce-cost-type-valname', 'pce-cost-type-igp', 'IGP', 'radio'); 122 addAttribute('pce-cost-type-valname', 'pce-cost-type-igp', 'IGP', 'radio');
113 addAttribute('pce-cost-type-valname', 'pce-cost-type-te', 'TE', 'radio'); 123 addAttribute('pce-cost-type-valname', 'pce-cost-type-te', 'TE', 'radio');
114 //Add the LSP type related inputs. 124 //Add the LSP type related inputs.
115 - addAttribute('pce-lsp-type-name', 'pce-lsp-type', 'Lsp Type *', 'checkbox'); 125 + p.append('span').text("Lsp Type *");
126 + p.append('br');
116 addAttribute('pce-lsp-type-valname', 'pce-lsp-type-cr', 'With signalling', 'radio'); 127 addAttribute('pce-lsp-type-valname', 'pce-lsp-type-cr', 'With signalling', 'radio');
117 addAttribute('pce-lsp-type-valname', 'pce-lsp-type-srbe', 'Without SR without signalling', 'radio'); 128 addAttribute('pce-lsp-type-valname', 'pce-lsp-type-srbe', 'Without SR without signalling', 'radio');
118 addAttribute('pce-lsp-type-valname', 'pce-lsp-type-srte', 'With SR without signalling', 'radio'); 129 addAttribute('pce-lsp-type-valname', 'pce-lsp-type-srte', 'With SR without signalling', 'radio');
...@@ -453,10 +464,8 @@ ...@@ -453,10 +464,8 @@
453 } 464 }
454 } 465 }
455 466
456 - var lspType = isChecked('pce-lsp-type'), 467 + var lspTypeVal = null;
457 - lspTypeVal = null;
458 468
459 - if (lspType) {
460 if (isChecked('pce-lsp-type-cr')) { 469 if (isChecked('pce-lsp-type-cr')) {
461 lspTypeVal = 'cr'; 470 lspTypeVal = 'cr';
462 } else if (isChecked('pce-lsp-type-srbe')) { 471 } else if (isChecked('pce-lsp-type-srbe')) {
...@@ -464,7 +473,6 @@ ...@@ -464,7 +473,6 @@
464 } else if (isChecked('pce-lsp-type-srte')) { 473 } else if (isChecked('pce-lsp-type-srte')) {
465 lspTypeVal = 'srte'; 474 lspTypeVal = 'srte';
466 } 475 }
467 - }
468 476
469 wss.sendEvent(setPathmsg, { 477 wss.sendEvent(setPathmsg, {
470 srid: node[0], 478 srid: node[0],
...@@ -528,7 +536,7 @@ ...@@ -528,7 +536,7 @@
528 idx++; 536 idx++;
529 } 537 }
530 538
531 - flash.flash('remove path message'); 539 + flash.flash('query path message');
532 } 540 }
533 541
534 function remPath(node) { 542 function remPath(node) {
......