From e17644162ec94ff38f603c87d7c69ce6a900df1d Mon Sep 17 00:00:00 2001 From: "Saldatsenka, Siarhei" Date: Fri, 6 Sep 2024 16:35:04 +0200 Subject: [PATCH] Transfer LinkInspector settings from the 'OSGi console' to the 'Granit' console. #47 -added missed fields to options page -fixed css styles --- .../link-inspector-ui/css/console-ui.less | 5 ++ .../options/.content.xml | 77 +++++++++++++------ 2 files changed, 58 insertions(+), 24 deletions(-) diff --git a/ui.apps/src/main/content/jcr_root/apps/etoolbox-link-inspector/clientlibs/link-inspector-ui/css/console-ui.less b/ui.apps/src/main/content/jcr_root/apps/etoolbox-link-inspector/clientlibs/link-inspector-ui/css/console-ui.less index c00ccbd7..bbf26029 100644 --- a/ui.apps/src/main/content/jcr_root/apps/etoolbox-link-inspector/clientlibs/link-inspector-ui/css/console-ui.less +++ b/ui.apps/src/main/content/jcr_root/apps/etoolbox-link-inspector/clientlibs/link-inspector-ui/css/console-ui.less @@ -159,3 +159,8 @@ tr.elc-card { } } +.options-page{ + min-width: 40rem ; + width: 50% ; +} + diff --git a/ui.apps/src/main/content/jcr_root/apps/etoolbox-link-inspector/options/.content.xml b/ui.apps/src/main/content/jcr_root/apps/etoolbox-link-inspector/options/.content.xml index 448f2165..10ddbfd0 100644 --- a/ui.apps/src/main/content/jcr_root/apps/etoolbox-link-inspector/options/.content.xml +++ b/ui.apps/src/main/content/jcr_root/apps/etoolbox-link-inspector/options/.content.xml @@ -26,26 +26,21 @@ + categories="[coralui3,granite.ui.coral.foundation,link-inspector-ui]"/> <actions jcr:primaryType="nt:unstructured"> <secondary jcr:primaryType="nt:unstructured"> - <!--<cancel + <save jcr:primaryType="nt:unstructured" - sling:resourceType="granite/ui/components/coral/foundation/anchorbutton" - text="Cancel" - granite:class="elc-options-cancel-button" - x-cq-linkchecker="skip"/> - <apply - jcr:primaryType="nt:unstructured" - sling:resourceType="granite/ui/components/coral/foundation/anchorbutton" - text="Apply" - variant="primary" - granite:class="elc-options-apply-button" - x-cq-linkchecker="skip"/>--> + sling:resourceType="granite/ui/components/coral/foundation/button" + type="submit" + formId="elc-options-savesettings" + granite:title="Save settings" + icon="save" + text="Save settings"/> </secondary> </actions> <content jcr:primaryType="nt:unstructured" @@ -57,11 +52,18 @@ maximized="{Boolean}true"> <items jcr:primaryType="nt:unstructured"> <form jcr:primaryType="nt:unstructured" + granite:class="options-page" sling:resourceType="granite/ui/components/coral/foundation/form" + granite:id="elc-options-savesettings" method="post" + foundationForm="true" dataPath="/conf/etoolbox-link-inspector/data/optionsconfig" action="/conf/etoolbox-link-inspector/data/optionsconfig" style="vertical"> + <successresponse + jcr:primaryType="nt:unstructured" + jcr:title="Settings saved" + sling:resourceType="granite/ui/components/coral/foundation/form/responses/reload"/> <items jcr:primaryType="nt:unstructured"> <tabs jcr:primaryType="nt:unstructured" maximized="{Boolean}true" @@ -160,6 +162,39 @@ sling:resourceType="/bin/etoolbox/link-inspector/settings/linktypes"/> </linkTypes> + <allowCustomLinkTypes + jcr:primaryType="nt:unstructured" + sling:resourceType="granite/ui/components/coral/foundation/form/checkbox" + name="./customTypeAllowed" + text="Allow custom link type" + fieldDescription="If checked custom link types will be included in the reports" + uncheckedValue="{Boolean}false" + checked="{Boolean}false" + value="{Boolean}true"/> + <excludeTags + jcr:primaryType="nt:unstructured" + sling:resourceType="granite/ui/components/coral/foundation/form/checkbox" + name="./excludeTags" + text="Exclude tags" + fieldDescription="If checked, the internal links starting with /content/cq:tags will be excluded" + uncheckedValue="{Boolean}false" + checked="{Boolean}false" + value="{Boolean}true"/> + <statusCodes + granite:class="foundation-layout-util-maximized-alt" + jcr:primaryType="nt:unstructured" + sling:resourceType="granite/ui/components/coral/foundation/form/multifield" + composite="{Boolean}true" + name="./statusCodes" + fieldLabel="Status codes" + fieldDescription="The list of status codes allowed for broken links in the report. Set a single negative value to allow all http error codes" + renderReadOnly="{Boolean}true"> + <field + jcr:primaryType="nt:unstructured" + sling:resourceType="granite/ui/components/coral/foundation/form/numberfield" + name="./statusCodes"> + </field> + </statusCodes> </items> </main> @@ -171,23 +206,17 @@ <items jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/container"> <text jcr:primaryType="nt:unstructured" - sling:resourceType="granite/ui/components/coral/foundation/form/textfield" - fieldLabel="Advanced Tab - Text" - name="./advancedText"> + sling:resourceType="granite/ui/components/coral/foundation/form/numberfield" + fieldLabel="Threads per core" + fieldDescription="The number of threads created per each CPU core for validating links in parallel" + defaultValuestring="60" + name="./threadsPerCore"> </text> </items> </advanced> <datasource jcr:primaryType="nt:unstructured" sling:resourceType="/bin/etoolbox/link-inspector/settings"/> </tabs> - <save - jcr:primaryType="nt:unstructured" - sling:resourceType="granite/ui/components/coral/foundation/button" - type="submit" - granite:id="elc-options-savesettings" - granite:title="Save settings" - icon="save" - text="Save settings"/> </items> </form> </items>