app.filter('attributeName', function($sce) {
  return function(input) {
    var parts = input.split('.');
    if (parts.length == 2) {
      return $sce.trustAsHtml('<span class="attribute-prefix">' + parts[0] + '.</span>' + parts[1]);
    }
    return $sce.trustAsHtml(input);
  };
});

app.filter('attributeName', function($sce) {
  return function(input) {
    var parts = input.split('.');
    if (parts.length > 1) {
      var prefix = parts.slice(0,parts.length-1).join('.')
      return $sce.trustAsHtml('<span class="attribute-prefix">' + prefix + '.</span>' + parts[parts.length-1]);
    }
    return $sce.trustAsHtml(input);
  };
});

Correct graying of attribute names in deep nesting
Correct graying of attribute names in deep nesting

Properly gray the prefix of attribute names in a table when there are more than 2 nested hashes/structs.


Signed-off-by: Josep M. Blanquer <843d9a062ab1c6792ebebca5589f22ce86ac85ce@rightscale.com>