Skip to content

Commit e176441

Browse files
author
Saldatsenka, Siarhei
committed
Transfer LinkInspector settings from the 'OSGi console' to the 'Granit' console. #47
-added missed fields to options page -fixed css styles
1 parent 9c0374b commit e176441

File tree

2 files changed

+58
-24
lines changed

2 files changed

+58
-24
lines changed

ui.apps/src/main/content/jcr_root/apps/etoolbox-link-inspector/clientlibs/link-inspector-ui/css/console-ui.less

+5
Original file line numberDiff line numberDiff line change
@@ -159,3 +159,8 @@ tr.elc-card {
159159
}
160160
}
161161

162+
.options-page{
163+
min-width: 40rem ;
164+
width: 50% ;
165+
}
166+

ui.apps/src/main/content/jcr_root/apps/etoolbox-link-inspector/options/.content.xml

+53-24
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,21 @@
2626
<clientlibs
2727
jcr:primaryType="nt:unstructured"
2828
sling:resourceType="granite/ui/components/coral/foundation/includeclientlibs"
29-
categories="[coralui3,granite.ui.coral.foundation]"/>
29+
categories="[coralui3,granite.ui.coral.foundation,link-inspector-ui]"/>
3030
</head>
3131
<title jcr:primaryType="nt:unstructured"
3232
sling:resourceType="granite/ui/components/coral/foundation/text"
3333
text="Link Inspector options"/>
3434
<actions jcr:primaryType="nt:unstructured">
3535
<secondary jcr:primaryType="nt:unstructured">
36-
<!--<cancel
36+
<save
3737
jcr:primaryType="nt:unstructured"
38-
sling:resourceType="granite/ui/components/coral/foundation/anchorbutton"
39-
text="Cancel"
40-
granite:class="elc-options-cancel-button"
41-
x-cq-linkchecker="skip"/>
42-
<apply
43-
jcr:primaryType="nt:unstructured"
44-
sling:resourceType="granite/ui/components/coral/foundation/anchorbutton"
45-
text="Apply"
46-
variant="primary"
47-
granite:class="elc-options-apply-button"
48-
x-cq-linkchecker="skip"/>-->
38+
sling:resourceType="granite/ui/components/coral/foundation/button"
39+
type="submit"
40+
formId="elc-options-savesettings"
41+
granite:title="Save settings"
42+
icon="save"
43+
text="Save settings"/>
4944
</secondary>
5045
</actions>
5146
<content jcr:primaryType="nt:unstructured"
@@ -57,11 +52,18 @@
5752
maximized="{Boolean}true">
5853
<items jcr:primaryType="nt:unstructured">
5954
<form jcr:primaryType="nt:unstructured"
55+
granite:class="options-page"
6056
sling:resourceType="granite/ui/components/coral/foundation/form"
57+
granite:id="elc-options-savesettings"
6158
method="post"
59+
foundationForm="true"
6260
dataPath="/conf/etoolbox-link-inspector/data/optionsconfig"
6361
action="/conf/etoolbox-link-inspector/data/optionsconfig"
6462
style="vertical">
63+
<successresponse
64+
jcr:primaryType="nt:unstructured"
65+
jcr:title="Settings saved"
66+
sling:resourceType="granite/ui/components/coral/foundation/form/responses/reload"/>
6567
<items jcr:primaryType="nt:unstructured">
6668
<tabs jcr:primaryType="nt:unstructured"
6769
maximized="{Boolean}true"
@@ -160,6 +162,39 @@
160162
sling:resourceType="/bin/etoolbox/link-inspector/settings/linktypes"/>
161163

162164
</linkTypes>
165+
<allowCustomLinkTypes
166+
jcr:primaryType="nt:unstructured"
167+
sling:resourceType="granite/ui/components/coral/foundation/form/checkbox"
168+
name="./customTypeAllowed"
169+
text="Allow custom link type"
170+
fieldDescription="If checked custom link types will be included in the reports"
171+
uncheckedValue="{Boolean}false"
172+
checked="{Boolean}false"
173+
value="{Boolean}true"/>
174+
<excludeTags
175+
jcr:primaryType="nt:unstructured"
176+
sling:resourceType="granite/ui/components/coral/foundation/form/checkbox"
177+
name="./excludeTags"
178+
text="Exclude tags"
179+
fieldDescription="If checked, the internal links starting with /content/cq:tags will be excluded"
180+
uncheckedValue="{Boolean}false"
181+
checked="{Boolean}false"
182+
value="{Boolean}true"/>
183+
<statusCodes
184+
granite:class="foundation-layout-util-maximized-alt"
185+
jcr:primaryType="nt:unstructured"
186+
sling:resourceType="granite/ui/components/coral/foundation/form/multifield"
187+
composite="{Boolean}true"
188+
name="./statusCodes"
189+
fieldLabel="Status codes"
190+
fieldDescription="The list of status codes allowed for broken links in the report. Set a single negative value to allow all http error codes"
191+
renderReadOnly="{Boolean}true">
192+
<field
193+
jcr:primaryType="nt:unstructured"
194+
sling:resourceType="granite/ui/components/coral/foundation/form/numberfield"
195+
name="./statusCodes">
196+
</field>
197+
</statusCodes>
163198

164199
</items>
165200
</main>
@@ -171,23 +206,17 @@
171206
<items jcr:primaryType="nt:unstructured"
172207
sling:resourceType="granite/ui/components/coral/foundation/container">
173208
<text jcr:primaryType="nt:unstructured"
174-
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
175-
fieldLabel="Advanced Tab - Text"
176-
name="./advancedText">
209+
sling:resourceType="granite/ui/components/coral/foundation/form/numberfield"
210+
fieldLabel="Threads per core"
211+
fieldDescription="The number of threads created per each CPU core for validating links in parallel"
212+
defaultValuestring="60"
213+
name="./threadsPerCore">
177214
</text>
178215
</items>
179216
</advanced>
180217
<datasource jcr:primaryType="nt:unstructured"
181218
sling:resourceType="/bin/etoolbox/link-inspector/settings"/>
182219
</tabs>
183-
<save
184-
jcr:primaryType="nt:unstructured"
185-
sling:resourceType="granite/ui/components/coral/foundation/button"
186-
type="submit"
187-
granite:id="elc-options-savesettings"
188-
granite:title="Save settings"
189-
icon="save"
190-
text="Save settings"/>
191220
</items>
192221
</form>
193222
</items>

0 commit comments

Comments
 (0)