Skip to content

Commit

Permalink
Transfer LinkInspector settings from the 'OSGi console' to the 'Grani…
Browse files Browse the repository at this point in the history
…t' console. #47

-added missed fields to options page
-fixed css styles
  • Loading branch information
Saldatsenka, Siarhei committed Sep 6, 2024
1 parent 9c0374b commit e176441
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,8 @@ tr.elc-card {
}
}

.options-page{
min-width: 40rem ;
width: 50% ;
}

Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,21 @@
<clientlibs
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/includeclientlibs"
categories="[coralui3,granite.ui.coral.foundation]"/>
categories="[coralui3,granite.ui.coral.foundation,link-inspector-ui]"/>
</head>
<title jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/text"
text="Link Inspector options"/>
<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"
Expand All @@ -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"
Expand Down Expand Up @@ -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>
Expand All @@ -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>
Expand Down

0 comments on commit e176441

Please sign in to comment.