Refactor to remove empty catch exception.
[controller.git] / opendaylight / web / root / src / main / resources / js / open.js
index 43a7dfdc443ab7447fb472dc31afa1b83402f9d7..6a2efdbf9a730e51fc37bc18a3fd297d91c93535 100644 (file)
@@ -443,9 +443,12 @@ one.main.admin = {
       // change password binding
       $('#'+one.main.admin.id.modal.password.submit, $modal).click(function() {
         one.main.admin.password.submit(id, $modal, function(result) {
-          if (result.code == 'SUCCESS') {
-            $modal.modal('hide');
-            successCallback();
+          if (result.success) {
+            //if changed own password, enforce relogin
+            if (id.trim() == $('#currentuser').val().trim()) {
+                alert("Password changed successfully. Please re-login with your new password.");
+                window.location = '/';
+            }
           } else {
             alert(result.code+': '+result.description);
           }
@@ -725,6 +728,11 @@ $("#logout").click(function() {
   location.href = "/logout";
 });
 
+// felix osgi runtime
+$("#osgi").click(function() {
+  window.open("/controller/osgi/system/console", '_newtab');
+});
+
 $.ajaxSetup({
   complete : function(xhr, textStatus) {
     var mime = xhr.getResponseHeader('Content-Type');