Skip to content

Commit 29efcba

Browse files
author
Rafael Grigorian
committed
Changes related to #51
- Fixed 'Not clear what the next step is supposed to be (install downloaded vcl file)' - Fixed 'Notify user to restart vanish once default.vcl file is updated.' - Fixed 'For debug mode, clarify where response headers can be found (i.e. browser console)'
1 parent 57346fd commit 29efcba

File tree

5 files changed

+55
-19
lines changed

5 files changed

+55
-19
lines changed

view/adminhtml/templates/configuration.phtml

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<h3>Set Caching Application<span><?= $enabled ? "Complete" : "Pending" ?></span></h3>
2727
<p>The current caching application is set to <code><?= $enabled ? "Varnish Cache" : "Built-In Cache" ?></code>.</p>
2828
<p>
29-
On this step, we change the default caching application from Magento's Built-In Cache to Varnish Cache.
29+
The default caching application needs to be changed from Magento's Built-In Cache to Varnish Cache.
3030
This change can be made through the <b>Command-Line</b> or <b>Magento Admin Dashboard</b>.
3131
</p>
3232
<div class="tray-labels" >
@@ -44,6 +44,7 @@
4444
This can be done by navigating to <a href="<?= $block->getUrl ("adminhtml/system_config/edit/section/system") ?>" target="_blank" >Stores &#10095; Settings &#10095; Configuration &#10095; Advanced &#10095; System</a> &#10095; Full Page Cache &#10095; Caching Application.
4545
Once there you can change the caching application from <b>Built-In Cache</b> to <b>Varnish Cache</b>.
4646
</p>
47+
<img src="<?= $block->getViewFileUrl ("JetRails_Varnish::images/step-1.gif") ?>" />
4748
</div>
4849
</fieldset>
4950
</div>
@@ -53,7 +54,7 @@
5354
<fieldset class="method-container" >
5455
<h3>Configure Varnish Server(s)<span><?= $edited ? "Complete" : "Pending" ?></span></h3>
5556
<p>
56-
On this step, we will configure the available Varnish server(s).
57+
We need to configure our Varnish server(s).
5758
This change can be made through the <b>Command-Line</b> or <b>Env Config File</b>.
5859
</p>
5960
<table>
@@ -107,7 +108,10 @@
107108
<div class="card <?= $installed ? "done" : "" ?>" data-section="Download Custom VCL" >
108109
<div class="methods" >
109110
<fieldset class="method-container" >
110-
<h3>Install Varnish Config File<span><?= $installed ? "Complete" : "Pending" ?></span></h3>
111+
<h3>Install Varnish Configuration File<span><?= $installed ? "Complete" : "Pending" ?></span></h3>
112+
<p>
113+
Each configured Varnish server needs to have their configuration file (usually found in <code>/etc/varnish/default.vcl</code>) updated. Once updated, the Varnish service on said server needs to be restarted so our configuration changes can be put into place. Generating the configuration contents can be done via <b>Command-Line</b> or <b>Admin-Dashboard</b>.
114+
</p>
111115
<table>
112116
<tr>
113117
<th width="33.33%" >Varnish Server</th>
@@ -148,8 +152,9 @@
148152
<div class="tray" data-tray="dashboard" >
149153
<p>
150154
This can be done by navigating to <a href="<?= $block->getUrl ("adminhtml/system_config/edit/section/system") ?>" target="_blank" >Stores &#10095; Settings &#10095; Configuration &#10095; Advanced &#10095; System</a> &#10095; <b>Full Page Cache</b> &#10095; <b>Varnish Configuration</b>.
151-
Once there you can configure your desired backend and download the VCL under <b>Export Configuration</b>.
155+
Once there you can configure your desired backend and download the configuration file by clicking <b>Export Configuration</b>.
152156
</p>
157+
<img src="<?= $block->getViewFileUrl ("JetRails_Varnish::images/step-3.gif") ?>" />
153158
</div>
154159
</fieldset>
155160
</div>
@@ -161,21 +166,29 @@
161166
<p>Currently debug mode is <b><?= $debug ? "Enabled" : "Disabled" ?></b>.</p>
162167
<p>
163168
When Debug Mode is enabled, extra HTTP parameter will be sent in the response header of every page.
164-
These parameters will be prefixed with <code>JR-</code>.
165-
In addition to exclusion rule debug headers being present, the following will also be present:
166-
<ul>
167-
<li><code>JR-Hit-Miss</code>, will either be <b>HIT</b> or <b>MISS</b></li>
168-
<li><code>JR-Hit-Count</code>, will display the number of hits in cache</li>
169-
<li><code>JR-Current-Url</code>, will display the current page's full URL that is used with exclusion rules</li>
170-
<li><code>JR-Current-Path</code>, will display the current page's URL path that is used with exclusion rules</li>
171-
<li><code>JR-Current-Route</code>, will display the current page's route that is used with exclusion rules</li>
172-
</ul>
169+
These parameters will be prefixed with <code>JR-</code>. You can see these response headers by opening the dev-console in your favorite browser.
173170
</p>
174171
<form method="post" action="<?= $block->getUrl ('varnish/configuration/save') ?>" >
175172
<?php echo $block->getBlockHtml ("formkey") ?>
176173
<input type="hidden" name="debug" value="<?= $debug ? "disable" : "enable" ?>" />
177174
<button type="submit" ><span><?= $debug ? "Disable" : "Enable" ?></span></button>
178175
</form>
176+
<div class="tray-labels" >
177+
<div data-tray="more-info" >More-Info<span>&blacktriangleright;</span></div>
178+
</div>
179+
<div class="tray" data-tray="more-info" >
180+
<p>
181+
In addition to exclusion rule debug headers being present, the following will also be present:
182+
<ul>
183+
<li><code>JR-Hit-Miss</code>, will either be <b>HIT</b> or <b>MISS</b></li>
184+
<li><code>JR-Hit-Count</code>, will display the number of hits in cache</li>
185+
<li><code>JR-Current-Url</code>, will display the current page's full URL that is used with exclusion rules</li>
186+
<li><code>JR-Current-Path</code>, will display the current page's URL path that is used with exclusion rules</li>
187+
<li><code>JR-Current-Route</code>, will display the current page's route that is used with exclusion rules</li>
188+
</ul>
189+
</p>
190+
<img src="<?= $block->getViewFileUrl ("JetRails_Varnish::images/dev-console.gif") ?>" />
191+
</div>
179192
</fieldset>
180193
</div>
181194
</div>

view/adminhtml/web/css/styles.css

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ section.varnish .progress-container {
1515
}
1616

1717
section.varnish code {
18-
background: #F3F2F1;
18+
background: #ADA9A326;
1919
border-radius: 3px;
2020
padding: 2px 4px;
2121
margin: 0;
@@ -206,16 +206,39 @@ section.varnish .card .method-container .tray-labels > div {
206206
border-radius: 3px;
207207
cursor: pointer;
208208
transition: background-color 250ms;
209+
border: solid 1px transparent;
210+
border-bottom: none;
211+
box-sizing: border-box;
212+
}
213+
214+
section.varnish .card .method-container .tray-labels > div > span {
215+
margin-left: 5px;
216+
width: 8px;
217+
display: inline-block;
218+
}
219+
220+
section.varnish .card .method-container .tray-labels > div:hover {
221+
background: #E8F5FF;
209222
}
210223

211-
section.varnish .card .method-container .tray-labels > div:hover,
212224
section.varnish .card .method-container .tray-labels > div.active {
213-
background: #e8f5ff;
225+
background: #E8F5FF;
226+
border: solid 1px #E6E6E6;
227+
border-bottom: none;
228+
border-radius: 3px 3px 0 0;
214229
}
215230

216231
section.varnish .card .method-container .tray {
217232
display: none;
218-
padding: 25px 0 0 0;
233+
margin: 0px -20px -20px;
234+
width: calc(100% + 40px);
235+
padding: 20px;
236+
border-top: solid 1px #E6E6E6;
237+
}
238+
239+
section.varnish .card .method-container .tray img {
240+
margin-top: 15px;
241+
border: solid 1px #E6E6E6;
219242
}
220243

221244
section.varnish table {
@@ -226,7 +249,7 @@ section.varnish table th {
226249
font-weight: bold;
227250
text-align: left;
228251
white-space: nowrap;
229-
background: #F3F2F1;
252+
background: #ADA9A326;
230253
}
231254

232255
section.varnish table th,
@@ -269,7 +292,7 @@ section.varnish .card .method-container > h3 > span {
269292
border: solid 1px #00000030;
270293
box-sizing: border-box;
271294
color: #000000CC;
272-
background: url("../images/close.svg"), #F3F2F1;
295+
background: url("../images/close.svg"), #ADA9A326;
273296
background-repeat: no-repeat;
274297
background-position: 5px center;
275298
background-size: 16px;
3.63 MB
Loading
1.77 MB
Loading
3.52 MB
Loading

0 commit comments

Comments
 (0)