X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fweb%2Fdevices%2Fsrc%2Fmain%2Fresources%2Fjs%2Fpage.js;h=38df0455264c51d929c6ed3405a7f714ab4fe63a;hp=ce59238be60b106ecacba66e8207aeb259955b42;hb=refs%2Fchanges%2F80%2F780%2F1;hpb=5db7ed90dcf16bf3d533befd238020805d28b426 diff --git a/opendaylight/web/devices/src/main/resources/js/page.js b/opendaylight/web/devices/src/main/resources/js/page.js index ce59238be6..38df045526 100644 --- a/opendaylight/web/devices/src/main/resources/js/page.js +++ b/opendaylight/web/devices/src/main/resources/js/page.js @@ -110,14 +110,14 @@ one.f.switchmanager.nodesLearnt = { var h3; var footer = []; var $body = one.f.switchmanager.nodesLearnt.modal.body.updateNode(nodeId, evt.target.switchDetails, tiers); - if ( (one.main.registry == undefined || one.main.registry.container == 'default') && evt.target.privilege == 'WRITE'){ + if (evt.target.privilege == 'WRITE'){ h3 = "Update Node Information"; footer = one.f.switchmanager.nodesLearnt.modal.footer.updateNode(); } else { //disable node edit $body.find('*').attr('disabled', 'disabled'); h3 = 'Node Information'; } - + var $modal = one.lib.modal.spawn(one.f.switchmanager.nodesLearnt.id.modal.modal, h3, "", footer); // bind save button $('#' + one.f.switchmanager.nodesLearnt.id.modal.save, $modal).click(function() { @@ -167,6 +167,9 @@ one.f.switchmanager.nodesLearnt = { var $select = one.lib.form.select.create( ["Allow reactive forwarding", "Proactive forwarding only"]); $select.attr('id', one.f.switchmanager.nodesLearnt.id.modal.form.operationMode); + if ((one.main.registry != undefined) && (one.main.registry.container != 'default')) { + $select.attr("disabled", true); + } $select.val(switchDetails["mode"]); $fieldset.append($label).append($select); $form.append($fieldset);