Apply suggestions from code review

Co-authored-by: David Rowe <david@ctrlaltstudio.com>
This commit is contained in:
kasenvr 2020-10-28 02:05:17 -04:00 committed by GitHub
parent 6232aba63e
commit bb35521d29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -356,7 +356,7 @@ $(document).ready(function(){
});
}
function showDomainCreationAlert (justConnected) {
function showDomainCreationAlert(justConnected) {
swal({
title: 'Create new domain ID',
type: 'input',
@ -381,7 +381,7 @@ $(document).ready(function(){
});
}
function createNewDomainID (label, justConnected) {
function createNewDomainID(label, justConnected) {
// get the JSON object ready that we'll use to create a new domain
var domainJSON = {
"label": label
@ -413,15 +413,15 @@ $(document).ready(function(){
text: successText,
html: true,
confirmButtonText: 'Save'
}, function() {
}, function () {
saveSettings();
});
}, 'json').fail(function(data) {
}, 'json').fail(function (data) {
failedToCreateDomainID(data, justConnected);
});
}
function failedToCreateDomainID (data, justConnected) {
function failedToCreateDomainID(data, justConnected) {
var errorText = "There was a problem creating your new domain ID. Do you want to try again or";
if (data && data.status === "failure") {