better logging, update kickoff
This commit is contained in:
		
							parent
							
								
									d5e6b4331f
								
							
						
					
					
						commit
						ad288b1c95
					
				@ -183,7 +183,7 @@
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  steps[1] = function () {
 | 
					  steps[1] = function () {
 | 
				
			||||||
    console.info("1. Show domains form");
 | 
					    console.info("\n1. Show domains form");
 | 
				
			||||||
    updateProgress(0);
 | 
					    updateProgress(0);
 | 
				
			||||||
    hideForms();
 | 
					    hideForms();
 | 
				
			||||||
    $qs('.js-acme-form-domains').hidden = false;
 | 
					    $qs('.js-acme-form-domains').hidden = false;
 | 
				
			||||||
@ -212,7 +212,7 @@
 | 
				
			|||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  steps[2] = function () {
 | 
					  steps[2] = function () {
 | 
				
			||||||
    console.info("2. Show account (email, ToS) form");
 | 
					    console.info("\n2. Show account (email, ToS) form");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    updateProgress(0);
 | 
					    updateProgress(0);
 | 
				
			||||||
    hideForms();
 | 
					    hideForms();
 | 
				
			||||||
@ -355,7 +355,7 @@
 | 
				
			|||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  steps[3] = function () {
 | 
					  steps[3] = function () {
 | 
				
			||||||
    console.info("3. Present challenge options");
 | 
					    console.info("\n3. Present challenge options");
 | 
				
			||||||
    updateProgress(1);
 | 
					    updateProgress(1);
 | 
				
			||||||
    hideForms();
 | 
					    hideForms();
 | 
				
			||||||
    $qs('.js-acme-form-challenges').hidden = false;
 | 
					    $qs('.js-acme-form-challenges').hidden = false;
 | 
				
			||||||
@ -408,7 +408,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  // spinner
 | 
					  // spinner
 | 
				
			||||||
  steps[4] = function () {
 | 
					  steps[4] = function () {
 | 
				
			||||||
    console.info('4. Show loading spinner');
 | 
					    console.info('\n4. Show loading spinner');
 | 
				
			||||||
    updateProgress(1);
 | 
					    updateProgress(1);
 | 
				
			||||||
    hideForms();
 | 
					    hideForms();
 | 
				
			||||||
    $qs('.js-acme-form-poll').hidden = false;
 | 
					    $qs('.js-acme-form-poll').hidden = false;
 | 
				
			||||||
@ -420,20 +420,16 @@
 | 
				
			|||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  steps[5] = function () {
 | 
					  steps[5] = function () {
 | 
				
			||||||
    console.info('5. Present certificates (yay!)');
 | 
					    console.info('\n5. Present certificates (yay!)');
 | 
				
			||||||
    updateProgress(2);
 | 
					    updateProgress(2);
 | 
				
			||||||
    hideForms();
 | 
					    hideForms();
 | 
				
			||||||
    $qs('.js-acme-form-download').hidden = false;
 | 
					    $qs('.js-acme-form-download').hidden = false;
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  function init() {
 | 
					  function init() {
 | 
				
			||||||
    var params = new URLSearchParams(window.location.search);
 | 
					 | 
				
			||||||
    var apiType = params.get('acme-api-type') || "staging-v02";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    $qsa('.js-acme-api-type').forEach(function ($el) {
 | 
					    $qsa('.js-acme-api-type').forEach(function ($el) {
 | 
				
			||||||
      $el.addEventListener('change', updateApiType);
 | 
					      $el.addEventListener('change', updateApiType);
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					 | 
				
			||||||
    updateApiType();
 | 
					    updateApiType();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    $qsa('.js-acme-form').forEach(function ($el) {
 | 
					    $qsa('.js-acme-form').forEach(function ($el) {
 | 
				
			||||||
@ -443,11 +439,13 @@
 | 
				
			|||||||
      });
 | 
					      });
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
    $qsa('.js-acme-challenge-type').forEach(function ($el) {
 | 
					    $qsa('.js-acme-challenge-type').forEach(function ($el) {
 | 
				
			||||||
      $el.addEventListener('change', updateChallengeType);
 | 
					      $el.addEventListener('change', updateChallengeType);
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    var params = new URLSearchParams(window.location.search);
 | 
				
			||||||
 | 
					    var apiType = params.get('acme-api-type') || "staging-v02";
 | 
				
			||||||
    if (params.has('acme-domains')) {
 | 
					    if (params.has('acme-domains')) {
 | 
				
			||||||
      $qs('.js-acme-domains').value = params.get('acme-domains');
 | 
					      $qs('.js-acme-domains').value = params.get('acme-domains');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -460,13 +458,11 @@
 | 
				
			|||||||
      updateApiType();
 | 
					      updateApiType();
 | 
				
			||||||
      steps[2]();
 | 
					      steps[2]();
 | 
				
			||||||
      submitForm();
 | 
					      submitForm();
 | 
				
			||||||
 | 
					    } else {
 | 
				
			||||||
 | 
					      steps[1]();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // The kickoff
 | 
					 | 
				
			||||||
  steps[1]();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  init();
 | 
					  init();
 | 
				
			||||||
  $qs('body').hidden = false;
 | 
					  $qs('body').hidden = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user