(function() {
  angular.module('ncsaas')
    .controller('KeyAddController', ['baseControllerAddClass', 'keysService', '$state', KeyAddController]);

  function KeyAddController(baseControllerAddClass, keysService, $state) {
    var controllerScope = this;
    var Controller = baseControllerAddClass.extend({
      init: function() {
        this.service = keysService;
        this.controllerScope = controllerScope;
        this._super();
        this.listState = 'profile.details';
      },
      successRedirect: function() {
        $state.go('profile.details', {tab: 'keys'});
      }
    });

    controllerScope.__proto__ = new Controller();
  }
})();
@@ -577,16 +577,546 @@
 eys'%7D);%0A
+      %7D,%0A      save: function() %7B%0A        if (this.instance.name) %7B%0A          this._super();%0A        %7D else %7B%0A          if (this.instance.public_key) %7B%0A            var key = this.instance.public_key.split('==');%0A            if (key%5B1%5D) %7B%0A              this.instance.name = key%5B1%5D;%0A              this._super();%0A            %7D else %7B%0A              this.errors = %7Bname: %5B'This field may not be blank.'%5D%7D;%0A            %7D%0A          %7D else %7B%0A            this.errors = %7Bpublic_key: %5B'This field may not be blank.'%5D%7D;%0A          %7D%0A        %7D%0A
       %7D%0A

Improve user SSH key management (SAAS-612)