Skip to content

Commit

Permalink
Merge pull request #97 from Elao/clean-brokenlink-route
Browse files Browse the repository at this point in the history
delete brokenlink service
  • Loading branch information
al2b authored Oct 15, 2021
2 parents 6c6d496 + c2627be commit 004f90b
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 334 deletions.
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@ in `config/bundles.php` add:
Elao\Bundle\Accesseo\ElaoAccesseoBundle::class => ['dev' => true],
```

in `config/routes/dev`, create `accesseo.yaml` and add:

```yaml
accesseo:
resource: '@ElaoAccesseoBundle/config/routing/accesseo.xml'
prefix: /_accesseo
```
### Configuration options

in `config/packages/elao_accesseo.yaml` :
Expand Down
10 changes: 0 additions & 10 deletions config/routing/accesseo.xml

This file was deleted.

12 changes: 0 additions & 12 deletions config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,5 @@
<argument type="abstract" key="$icons"/>
<tag name="data_collector" template="@ElaoAccesseo/profiler/accessibility_collector.html.twig" id="elao.accesseo.accessibility_collector" />
</service>


<service id="Elao\Bundle\Accesseo\Checker\BrokenLinkChecker">
<argument type="service" id="http_client" on-invalid="null" />
</service>

<service id="Elao\Bundle\Accesseo\Controller\BrokenLinkController" public="true">
<argument type="service" id="twig" />
<argument type="service" id="profiler" />
<argument type="service" id="Elao\Bundle\Accesseo\Checker\BrokenLinkChecker" />
</service>

</services>
</container>
94 changes: 0 additions & 94 deletions src/Checker/BrokenLinkChecker.php

This file was deleted.

51 changes: 0 additions & 51 deletions src/Controller/BrokenLinkController.php

This file was deleted.

43 changes: 0 additions & 43 deletions templates/profiler/accessibility_collector.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -160,49 +160,6 @@
padding: 0;
}
</style>
<script>
function discoverLinks() {
const badgeSuccess = document.getElementById('badge-success');
const badgeErrors = document.getElementById('badge-errors');
const badgeRedirections = document.getElementById('badge-redirections');
Array.from(document.getElementById('invalid').children).forEach(item => {
const request = new Request(item.innerText);
fetch(request).then((response) => {
document.getElementById(response.status).appendChild(item);
badgeErrors.innerText = Array.from(document.getElementsByClassName('type-errors')).reduce((total, element) => total + element.childElementCount, 0);
badgeSuccess.innerText = Array.from(document.getElementsByClassName('type-success')).reduce((total, element) => total + element.childElementCount, 0);
badgeRedirections.innerText = Array.from(document.getElementsByClassName('type-redirections')).reduce((total, element) => total + element.childElementCount, 0);
});
});
}
function getStatusCode(event){
const httpRequest = new XMLHttpRequest();
const div = event.target.parentElement;
httpRequest.onreadystatechange = () => {
if (httpRequest.readyState === 4) {
if (httpRequest.status === 200) {
const data = JSON.parse(httpRequest.responseText);
div.innerHTML = data.template;
Sfjs.createTabs();
discoverLinks();
}
}
};
httpRequest.open('GET', '{{ path("_accesseo_status_code", {'token' : token}) }}');
httpRequest.send();
div.innerHTML = "<i>Loading...</i>";
}
window.addEventListener('load', () => document.getElementById('giveMeStatusCode').addEventListener('click', getStatusCode));
</script>
{{ parent() }}
{% endblock %}

Expand Down
100 changes: 0 additions & 100 deletions tests/BrokenLinkChecker/BrokenLinkCheckerTest.php

This file was deleted.

16 changes: 0 additions & 16 deletions tests/BrokenLinkChecker/broken-links.html

This file was deleted.

0 comments on commit 004f90b

Please sign in to comment.