File tree 3 files changed +33
-4
lines changed 3 files changed +33
-4
lines changed Original file line number Diff line number Diff line change 5
5
use Magento \Framework \View \Element \Template as BaseTemplate ;
6
6
use Magento \Framework \View \Element \Template \Context ;
7
7
use Magento \Framework \App \DeploymentConfig ;
8
+ use Magento \Framework \App \ProductMetadataInterface ;
8
9
use JetRails \Varnish \Helper \Data as Helper ;
9
10
10
11
/**
@@ -23,11 +24,13 @@ public function __construct (
23
24
Context $ context ,
24
25
Helper $ helper ,
25
26
DeploymentConfig $ config ,
27
+ ProductMetadataInterface $ metadata ,
26
28
array $ data = []
27
29
) {
28
30
parent ::__construct ( $ context , $ data );
29
31
$ this ->helper = $ helper ;
30
32
$ this ->config = $ config ;
33
+ $ this ->metadata = $ metadata ;
31
34
}
32
35
33
36
}
Original file line number Diff line number Diff line change 115
115
<table>
116
116
<tr>
117
117
<th width="33.33%" >Varnish Server</th>
118
- <th width="33.33%" >Magento Version</th>
119
- <th width="33.33%" >Module Version</th>
118
+ <th width="33.33%" >Generated VCL With Magento Version</th>
119
+ <th width="33.33%" >Generated VCL With Module Version</th>
120
+ <th width="33.33%" >Update Needed</th>
120
121
</tr>
121
122
<?php if ( $ edited ): ?>
122
123
<?php foreach ( $ servers as $ index => $ server ): ?>
123
124
<tr>
124
125
<td><?= $ server ->host . ": " . $ server ->port ?> </td>
125
- <td><?= $ server ->magento ?> </td>
126
- <td><?= $ server ->version ?> </td>
126
+ <td><span class="tag <?= $ server ->magento == $ block ->metadata ->getVersion () ? "match " : "no-match " ?> " ><?= $ server ->magento ?> </span></td>
127
+ <td><span class="tag <?= $ server ->version == $ block ->helper ->getModuleVersion () ? "match " : "no-match " ?> " ><?= $ server ->version ?> </span></td>
128
+ <td>
129
+ <?=
130
+ $ server ->magento == $ block ->metadata ->getVersion () &&
131
+ $ server ->version == $ block ->helper ->getModuleVersion ()
132
+ ? "No " : "Yes "
133
+ ?>
134
+ </td>
127
135
</tr>
128
136
<?php endforeach ; ?>
129
137
<?php else : ?>
Original file line number Diff line number Diff line change @@ -241,6 +241,24 @@ section.varnish .card .method-container .tray img {
241
241
border : solid 1px # E6E6E6 ;
242
242
}
243
243
244
+ section .varnish .tag {
245
+ background-color : # F3F2F1 ;
246
+ border-radius : 3px ;
247
+ padding : 1px 4px ;
248
+ position : relative;
249
+ }
250
+
251
+ section .varnish .tag .no-match ::after {
252
+ position : absolute;
253
+ top : -2px ;
254
+ right : -5px ;
255
+ height : 8px ;
256
+ width : 8px ;
257
+ content : "" ;
258
+ background-color : # DC5549 ;
259
+ border-radius : 5px ;
260
+ }
261
+
244
262
section .varnish table {
245
263
width : 100% ;
246
264
}
You can’t perform that action at this time.
0 commit comments