angular.module("Prometheus.filters").filter('toPercent', function() {
  return function(input) {
    return parseFloat(input, 10) * 100 + "%";
  };
});

angular.module("Prometheus.filters").filter('toPercentile', function() {
  return function(input) {
    return parseFloat(input, 10) * 100 + "th";
  };
});

angular.module("Prometheus.filters").filter('hostnameFqdn', function() {
  return function(input) {
    var re = /^([^:\/?]+:\/\/(www\.)?)?([^\/]+)/;
    var match = input.match(re);
    if (match && match[3]) {
      return match[3].replace('www.', '').replace(/:[0-9]+/,'');
    }
    return '';
  };
});

angular.module("Prometheus.filters").filter('hostname', ['$filter', function($filter) {
  return function(input) {
    return $filter('hostnameFqdn')(input).split('.')[0];
  };
}]);

angular.module("Prometheus.filters").filter('regex', function() {
  return function(input, regex, replace) {
    return input.replace(new RegExp(regex, "g"), replace);
  };
});

@@ -963,16 +963,298 @@
 lace);%0A  %7D;%0A%7D);%0A
+%0Aangular.module(%22Prometheus.filters%22).filter('toLowerCase', function() %7B%0A  return function(input) %7B%0A    return input.toLowerCase();%0A  %7D;%0A%7D);%0A%0Aangular.module(%22Prometheus.filters%22).filter('toUpperCase', function() %7B%0A  return function(input) %7B%0A    return input.toUpperCase();%0A  %7D;%0A%7D);%0A

Add filters for uppercase and lowercase