File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -29,17 +29,20 @@ class UpdateVclCommand extends Command
29
29
/**
30
30
* @param \Sectionio\Metrics\Helper\Aperture $aperture
31
31
* @param \Sectionio\Metrics\Helper\State $state
32
+ * @param \Sectionio\Metrics\Helper\Data $helper
32
33
* @param \Magento\PageCache\Model\Config $pageCacheConfig
33
34
*/
34
35
public function __construct (
35
36
\Sectionio \Metrics \Helper \Aperture $ aperture ,
36
37
\Sectionio \Metrics \Helper \State $ state ,
38
+ \Sectionio \Metrics \Helper \Data $ helper ,
37
39
\Magento \PageCache \Model \Config $ pageCacheConfig
38
40
) {
39
41
parent ::__construct ();
40
42
$ this ->aperture = $ aperture ;
41
43
$ this ->state = $ state ;
42
44
$ this ->pageCacheConfig = $ pageCacheConfig ;
45
+ $ this ->helper = $ helper
43
46
}
44
47
45
48
/**
Original file line number Diff line number Diff line change @@ -583,14 +583,18 @@ public function clearDefaultApplication()
583
583
584
584
public function getProxyImage ($ account_id , $ application_id )
585
585
{
586
+ /**generateApertureUrl takes an associative array */
586
587
$ parameters = array ("accountId " =>$ account_id , "applicationId " =>$ application_id , "environmentName " =>"Production " );
588
+
589
+ /** build the account url */
587
590
$ partial_url = $ this ->generateApertureUrl ($ parameters );
588
591
$ url = $ partial_url . "/stack " ;
592
+
589
593
$ curl_response = $ this ->performCurl ($ url );
590
594
/** return response as an associative array */
591
595
$ response = json_decode ($ curl_response ['body_content ' ], true );
592
- /** find object with name=varnish */
593
- error_log ( print_r ( $ curl_response , true ));
596
+ /** find object with name=varnish, grab the image */
597
+
594
598
$ image ;
595
599
foreach ($ response as $ proxy ){
596
600
if ($ proxy ['name ' ] == 'varnish ' ) {
You can’t perform that action at this time.
0 commit comments