Skip to content

Commit

Permalink
Merge pull request #12 from fusionx1/fixed-warning-notices
Browse files Browse the repository at this point in the history
Fixed notices/warnings
  • Loading branch information
fusionx1 authored Mar 13, 2019
2 parents a4c1152 + 4b4b3a6 commit 72124b1
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/Commands/GetNewrelicCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ public function org($org_id, $plan = null,

foreach ($sites as $site)
{
$service_level = $site['service_level'];
$counter++;
if ($environments = $this->getSite($site['name'])->getEnvironments()->serialize()) {
foreach ($environments as $environment)
Expand All @@ -109,7 +108,7 @@ public function org($org_id, $plan = null,
$appserver_data = array_pop($appserver);
$dash_link = empty($appserver_data) ? "--" : $dash_path . $appserver_data->get('site');


$service_level = $site['service_level'];
$data = array( "Site" => $site['name'],
"Service level" => $site['service_level'],
"Framework" => $site['framework'],
Expand Down Expand Up @@ -365,7 +364,6 @@ public function check_array_keys($obj, $status, $reporting)

if((!empty($reporting) OR $reporting != 'Not Reporting') AND isset($obj['application_summary'])) {
$sum_obj = $obj['application_summary'];
$end_user_obj = $obj['end_user_summary'];
foreach ($arr_components as $key => $val)
{
if (array_key_exists($key, $sum_obj)) {
Expand All @@ -377,15 +375,19 @@ public function check_array_keys($obj, $status, $reporting)
}
$items[$val] = $sum_obj[$key];
}
if (array_key_exists($key, $end_user_obj)) {
if($key == 'response_time'){
$val = 'Browser Load Time';
}
if($key == 'throughput'){
$val = 'Avg Page Load Time';
if(isset($obj['end_user_summary'])){
$end_user_obj = $obj['end_user_summary'];
if (array_key_exists($key, $end_user_obj)) {
if($key == 'response_time'){
$val = 'Browser Load Time';
}
if($key == 'throughput'){
$val = 'Avg Page Load Time';
}
$items[$val] = $end_user_obj[$key];
}
$items[$val] = $end_user_obj[$key];
}

}
}

Expand Down

0 comments on commit 72124b1

Please sign in to comment.