diff --git a/kandji_processor.php b/kandji_processor.php index 75bd17f..9fdcdd1 100644 --- a/kandji_processor.php +++ b/kandji_processor.php @@ -39,7 +39,7 @@ public function run($plist) // Load Kandji helper require_once($module_dir.'/lib/kandji_helper.php'); $kandji_helper = new munkireport\module\kandji\kandji_helper; - $json = $kandji_helper->pull_kandji_data($model); + $json = $kandji_helper->pull_kandji_data($this->serial_number); // Transpose Kandji API output into Kandji model // General section diff --git a/lib/kandji_helper.php b/lib/kandji_helper.php index 4da8173..11f745e 100755 --- a/lib/kandji_helper.php +++ b/lib/kandji_helper.php @@ -11,7 +11,7 @@ class Kandji_helper * @param object Kandji machine instance * @author jc0b **/ - public function pull_kandji_data(&$Kandji_machine) + public function pull_kandji_data($serial_number) { // Error message $error = ''; @@ -20,7 +20,7 @@ public function pull_kandji_data(&$Kandji_machine) $kandji_api_endpoint = rtrim(conf('kandji_api_endpoint'), '/'); // Get computer data from Kandji - $url = "{$kandji_api_endpoint}/api/v1/devices/?serial_number={$Kandji_machine->serial_number}"; + $url = "{$kandji_api_endpoint}/api/v1/devices/?serial_number={$serial_number}"; $kandji_computer_result = $this->send_kandji_query($url); if(! $kandji_computer_result){ diff --git a/views/kandji_listing.php b/views/kandji_listing.php index ff673c4..9ef948b 100755 --- a/views/kandji_listing.php +++ b/views/kandji_listing.php @@ -71,7 +71,7 @@ $('td:eq(0)', nRow).html(link); // Make serial number in second column link to Kandji var serial=$('td:eq(1)', nRow).html(); - var kandji_id=$('td:eq(6)', nRow).html(); + var kandji_id=$('td:eq(7)', nRow).html(); var kandji_tenant_address = ""; // Get the Kandji server address var link = ''+serial+''; $('td:eq(1)', nRow).html(link);