Coding style fixes

This commit is contained in:
Girish Ramakrishnan
2017-09-14 18:12:07 -07:00
parent 72e912770a
commit c05a7c188f
4 changed files with 35 additions and 36 deletions

View File

@@ -40,9 +40,9 @@ app.controller('SetupDNSController', ['$scope', '$http', 'Client', function ($sc
// keep in sync with certs.js
$scope.dnsProvider = [
{ name: 'AWS Route53', value: 'route53' },
{ name: 'Google Cloud DNS', value: 'gcdns' },
{ name: 'Digital Ocean', value: 'digitalocean' },
{ name: 'Cloudflare (DNS only)', value: 'cloudflare' },
{ name: 'Digital Ocean', value: 'digitalocean' },
{ name: 'Google Cloud DNS', value: 'gcdns' },
{ name: 'Wildcard', value: 'wildcard' },
{ name: 'Manual (not recommended)', value: 'manual' },
{ name: 'No-op (only for development)', value: 'noop' }
@@ -53,7 +53,7 @@ app.controller('SetupDNSController', ['$scope', '$http', 'Client', function ($sc
domain: '',
accessKeyId: '',
secretAccessKey: '',
gcdnsKey: {keyFileName: "", content: ""},
gcdnsKey: { keyFileName: '', content: '' },
digitalOceanToken: '',
provider: 'route53'
};

View File

@@ -89,6 +89,7 @@
<i class="fa fa-upload" onclick="getElementById('gcdnsKeyFileInput').click();"></i>
</span>
</div>
<br/>
<span ng-show="isDomain || explicitZone"><b>{{ explicitZone ? explicitZone : (dnsCredentials.domain | zoneName) }}</b> must be hosted on <a href="https://console.cloud.google.com/net-services/dns/zones" target="_blank">Google Cloud DNS</a>.</span>
</div>

View File

@@ -9,9 +9,9 @@ angular.module('Application').controller('CertsController', ['$scope', '$locatio
// keep in sync with setupdns.js
$scope.dnsProvider = [
{ name: 'AWS Route53', value: 'route53' },
{ name: 'Google Cloud DNS', value: 'gcdns' },
{ name: 'Digital Ocean', value: 'digitalocean' },
{ name: 'Cloudflare (DNS only)', value: 'cloudflare' },
{ name: 'Digital Ocean', value: 'digitalocean' },
{ name: 'Google Cloud DNS', value: 'gcdns' },
{ name: 'Wildcard', value: 'wildcard' },
{ name: 'Manual (not recommended)', value: 'manual' },
{ name: 'No-op (only for development)', value: 'noop' }
@@ -44,7 +44,7 @@ angular.module('Application').controller('CertsController', ['$scope', '$locatio
customDomain: '',
accessKeyId: '',
secretAccessKey: '',
gcdnsKey: {keyFileName: "", content: ""},
gcdnsKey: { keyFileName: '', content: '' },
digitalOceanToken: '',
cloudflareToken: '',
cloudflareEmail: '',
@@ -144,10 +144,10 @@ angular.module('Application').controller('CertsController', ['$scope', '$locatio
};
if (!data.projectId || !data.credentials || !data.credentials.client_email || !data.credentials.private_key) {
throw "fields_missing";
throw 'fields_missing';
}
} catch(e) {
$scope.dnsCredentials.error = "Cannot parse Google Service Account Key";
} catch (e) {
$scope.dnsCredentials.error = 'Cannot parse Google Service Account Key: ' + e.message;
$scope.dnsCredentials.busy = false;
return;
}