-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'refactor-diagnostics-utility' into develop
- Loading branch information
Showing
26 changed files
with
220 additions
and
285 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
$('.putyourlightson\\\\blitz\\\\widgets\\\\cachewidget .action .heading').click(function() { | ||
$(this).closest('.action').find('.form').toggleClass('hidden'); | ||
}); | ||
|
||
if ($('.blitz-diagnostics #crumbs').length) { | ||
$('#global-header #crumbs').replaceWith($('.blitz-diagnostics #crumbs').removeClass('hidden')); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
src/templates/_utilities/diagnostics/element-queries/element-query-type.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
{% extends 'blitz/_utilities/diagnostics/layouts/element-queries' %} | ||
|
||
{% set element = craft.blitz.diagnostics.getElementOfType() %} | ||
{% set title = 'Tracked ' ~ element.displayName ~ ' Queries' %} | ||
|
||
{% block content %} | ||
|
||
{{ sprig('blitz/_utilities/diagnostics/components/elementQueries', { | ||
siteId: siteId, | ||
elementType: className(element), | ||
displayName: element.displayName, | ||
pluralDisplayName: element.displayName ~ ' Queries', | ||
}) }} | ||
|
||
{% endblock %} |
88 changes: 41 additions & 47 deletions
88
src/templates/_utilities/diagnostics/element-queries/index.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,49 @@ | ||
{% extends 'blitz/_utilities/diagnostics/layouts/base' %} | ||
|
||
{% set crumbs = [] %} | ||
{% set title = 'Tracked Element Queries'|t('blitz') %} | ||
{% set elementQueryTypes = craft.blitz.diagnostics.getElementQueryTypes(siteId) %} | ||
|
||
{% block content %} | ||
|
||
<header id="header"> | ||
<div class="page-title flex"> | ||
<h1> | ||
{{ elementQueryTypes|length ? 'Tracked Element Queries'|t('blitz') : 'No Tracked Element Queries'|t('blitz') }} | ||
</h1> | ||
{% if craft.app.getIsMultiSite() %} | ||
{% include '_elements/sitemenu' with { | ||
selectedSiteId: siteId, | ||
urlFormat: 'utilities/blitz-diagnostics/element-queries?site={handle}', | ||
} only %} | ||
{% endif %} | ||
</div> | ||
</header> | ||
{% block pageTitle %} | ||
<div class="page-title flex"> | ||
<h1 class="screen-title" title="{{ title }}">{{ title }}</h1> | ||
{% if craft.app.getIsMultiSite() %} | ||
{% include '_elements/sitemenu' with { | ||
selectedSiteId: siteId, | ||
urlFormat: 'blitz/diagnostics/element-queries?site={handle}', | ||
} only %} | ||
{% endif %} | ||
</div> | ||
{% endblock %} | ||
|
||
{% if elementQueryTypes|length %} | ||
<div class="elements"> | ||
<table class="data fullwidth"> | ||
<thead> | ||
{% block content %} | ||
<div class="elements"> | ||
<table class="data fullwidth"> | ||
<thead> | ||
<tr> | ||
<th> | ||
{{ 'Element Type'|t('blitz') }} | ||
</th> | ||
<th> | ||
{{ 'Element Queries'|t('blitz') }} | ||
</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for elementQueryType in elementQueryTypes %} | ||
<tr> | ||
<th> | ||
{{ 'Element Type'|t('blitz') }} | ||
</th> | ||
<th> | ||
{{ 'Element Queries'|t('blitz') }} | ||
</th> | ||
<td class="code"> | ||
<a href="{{ url('blitz/diagnostics/element-queries/element-query-type', { | ||
elementType: elementQueryType.type | ||
}) }}"> | ||
{{ elementQueryType.type }} | ||
</a> | ||
</td> | ||
<td> | ||
{{ elementQueryType.count|number }} | ||
</td> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for elementQueryType in elementQueryTypes %} | ||
<tr> | ||
<td class="code"> | ||
<a href="{{ url('utilities/blitz-diagnostics/element-queries/element-query-type', { | ||
elementType: elementQueryType.type | ||
}) }}"> | ||
{{ elementQueryType.type }} | ||
</a> | ||
</td> | ||
<td> | ||
{{ elementQueryType.count|number }} | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
</div> | ||
{% endif %} | ||
|
||
{% endfor %} | ||
</tbody> | ||
</table> | ||
</div> | ||
{% endblock %} |
3 changes: 1 addition & 2 deletions
3
src/templates/_utilities/diagnostics/elements/element-type.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
{% extends 'blitz/_utilities/diagnostics/layouts/elements' %} | ||
|
||
{% set element = craft.blitz.diagnostics.getElementOfType() %} | ||
{% set title = 'Tracked ' ~ element.pluralDisplayName %} | ||
|
||
{% block content %} | ||
|
||
{{ sprig('blitz/_utilities/diagnostics/components/elements', { | ||
siteId: siteId, | ||
elementType: className(element), | ||
displayName: element.displayName, | ||
pluralDisplayName: element.pluralDisplayName, | ||
hasUris: element.hasUris, | ||
}) }} | ||
|
||
{% endblock %} |
Oops, something went wrong.