Skip to content

Commit

Permalink
Update profile_controller.php
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxudo committed Apr 3, 2023
1 parent b2ec28b commit 249e893
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions profile_controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ public function index()
**/
public function get_profile_groups()
{
$sql = "SELECT profile_name, COUNT(DISTINCT serial_number) AS count FROM profile
$sql = "SELECT profile_name, COUNT(DISTINCT serial_number) AS count FROM profile
LEFT JOIN reportdata USING (serial_number)
WHERE ".get_machine_group_filter('')."
GROUP BY profile_name
ORDER BY COUNT DESC";

Expand Down Expand Up @@ -80,7 +82,7 @@ public function get_payload_data($serial_number, $profile_uuid, $payload_name)
$json_string = str_replace('{}', 'No Payload Data', $json_string);
$json_string = str_replace('null', 'No Payload Data', $json_string);
echo '<div style="white-space: pre-wrap">'. $json_string.'</div>';
}
}

/**
* Retrieve data in json format for client tab
Expand All @@ -94,7 +96,7 @@ public function get_data($serial_number = '')
$sql = "SELECT profile_name, profile_uuid, user, profile_method, payload_name, payload_display, serial_number, profile_removal_allowed, profile_install_date, profile_organization, profile_verification_state, profile_description
FROM profile
WHERE serial_number = '$serial_number';";

$queryobj = new Profile_model;
jsonView($queryobj->query($sql));
}
Expand Down

0 comments on commit 249e893

Please sign in to comment.