diff --git a/view/index.html b/view/index.html index 46b5cac..cd5308b 100644 --- a/view/index.html +++ b/view/index.html @@ -34,17 +34,11 @@

Website

-
- - +

-
@@ -295,6 +289,8 @@

W3C CSS {{nb_errors}}< ArrayTemplates.forEach(function(element) { $("#" + element).html(' '); }); + $('#ProgressBar').attr('style','width: 0%'); + $('#progressTitle').html(''); } /* End Clean Template */ @@ -359,7 +355,7 @@

W3C CSS {{nb_errors}}< }); /* Wappalyzer */ - //PBar.startStep('wappalyzer'); + PBar.startStep('wappalyzer'); Website.wappalyzer((response)=>{ var wapp = []; @@ -368,7 +364,7 @@

W3C CSS {{nb_errors}}< }); generateTemplate('wappalyzer', {wapp:wapp}); - //PBar.finishStep('wappalyzer'); + PBar.finishStep('wappalyzer'); }, Website.getUrl()); PBar.finishStep('AnalyseHeader'); diff --git a/view/res/img/check.png b/view/res/img/check.png new file mode 100644 index 0000000..1c3f941 Binary files /dev/null and b/view/res/img/check.png differ diff --git a/view/res/js/ProgressBar.class.js b/view/res/js/ProgressBar.class.js index abc84e5..ab64827 100644 --- a/view/res/js/ProgressBar.class.js +++ b/view/res/js/ProgressBar.class.js @@ -6,27 +6,35 @@ class ProgressBar { } changeState(){ + var html = ''; var total = 0; var nbFinish = 0; + html += '
    '; $.each(this.Step, function(index, value) { + var img = 'loading.gif'; total++; - if(value == 0) + if(value == 0){ nbFinish++; + img = 'check.png'; + } + + /* HTML */ + html += '
  • ' + index + ' ' + '
  • '; }); + html += '
'; var prc = 100 - Math.floor((nbFinish / total) * 100); $('#' + this.id).attr('style','width: ' + (100 - prc) + '%'); + $('#' + this.text).html(html); } startStep(stepName){ - $('#' + this.text).html('Start ' + stepName); this.Step[stepName] = 1; this.changeState(); } finishStep(stepName){ - $('#' + this.text).html('Finish ' + stepName); this.Step[stepName] = 0; this.changeState(); }