Display the pretty domain provider name in the table

This is especially needed to distinguish wildcard/manual.
This commit is contained in:
Girish Ramakrishnan
2018-02-21 10:10:19 -08:00
parent c2232936e0
commit 767b31caa2
2 changed files with 13 additions and 1 deletions

View File

@@ -214,7 +214,7 @@
{{ domain.domain }}
</td>
<td class="text-left elide-table-cell hidden-xs hidden-sm">
{{ domain.provider }}
{{ prettyProviderName(domain) }}
</td>
<td class="text-right no-wrap" style="vertical-align: bottom">
<button class="btn btn-xs btn-default" ng-click="domainMigrate.show(domain)" ng-show="domain.domain !== config.adminDomain && domain.provider !== 'caas' && provider === 'caas'" title="Migrate Domain"><i class="fa fa-exchange"></i></button>

View File

@@ -22,6 +22,18 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
{ name: 'No-op (only for development)', value: 'noop' }
];
$scope.prettyProviderName = function (domain) {
switch (domain.provider) {
case 'route53': return 'AWS Route53';
case 'cloudflare': return 'Cloudflare (DNS only)';
case 'digitalocean': return 'Digital Ocean';
case 'gcdns': return 'Google Cloud';
case 'manual': return domain.config.wildcard ? 'Wildcard' : 'Manual';
case 'noop': return 'No-op';
default: return 'Unknown';
}
};
function readFileLocally(obj, file, fileName) {
return function (event) {
$scope.$apply(function () {