Skip to content

Commit

Permalink
fix Wireless Access Point > Access Point
Browse files Browse the repository at this point in the history
  • Loading branch information
ssteeltm committed Dec 9, 2024
1 parent 1d8a78b commit dc129fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions client_assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
} elseif (isset($_GET['type']) && ($_GET['type']) == 'virtual') {
$type_query = "asset_type = 'Virtual Machine'";
} elseif (isset($_GET['type']) && ($_GET['type']) == 'network') {
$type_query = "asset_type = 'Firewall/Router' OR asset_type = 'Switch' OR asset_type = 'Access Point'";
$type_query = "asset_type = 'Firewall/Router' OR asset_type = 'Switch' OR asset_type = 'Wireless Access Point'";
} elseif (isset($_GET['type']) && ($_GET['type']) == 'other') {
$type_query = "asset_type NOT LIKE 'laptop' AND asset_type NOT LIKE 'desktop' AND asset_type NOT LIKE 'server' AND asset_type NOT LIKE 'virtual machine' AND asset_type NOT LIKE 'firewall/router' AND asset_type NOT LIKE 'switch' AND asset_type NOT LIKE 'access point'";
$type_query = "asset_type NOT LIKE 'laptop' AND asset_type NOT LIKE 'desktop' AND asset_type NOT LIKE 'server' AND asset_type NOT LIKE 'virtual machine' AND asset_type NOT LIKE 'firewall/router' AND asset_type NOT LIKE 'switch' AND asset_type NOT LIKE 'wireless access point'";
} else {
$type_query = "asset_type LIKE '%'";
$_GET['type'] = '';
Expand All @@ -42,8 +42,8 @@
SUM(CASE WHEN asset_type IN ('laptop', 'desktop') THEN 1 ELSE 0 END) AS workstation_count,
SUM(CASE WHEN asset_type = 'server' THEN 1 ELSE 0 END) AS server_count,
SUM(CASE WHEN asset_type = 'virtual machine' THEN 1 ELSE 0 END) AS virtual_count,
SUM(CASE WHEN asset_type IN ('Firewall/Router', 'switch', 'access point') THEN 1 ELSE 0 END) AS network_count,
SUM(CASE WHEN asset_type NOT IN ('laptop', 'desktop', 'server', 'virtual machine', 'Firewall/Router', 'switch', 'access point') THEN 1 ELSE 0 END) AS other_count
SUM(CASE WHEN asset_type IN ('Firewall/Router', 'switch', 'wireless access point') THEN 1 ELSE 0 END) AS network_count,
SUM(CASE WHEN asset_type NOT IN ('laptop', 'desktop', 'server', 'virtual machine', 'Firewall/Router', 'switch', 'wireless access point') THEN 1 ELSE 0 END) AS other_count
FROM (
SELECT assets.* FROM assets
LEFT JOIN contacts ON asset_contact_id = contact_id
Expand Down
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ function getAssetIcon($asset_type)
$device_icon = "network-wired";
} elseif ($asset_type == 'Firewall/Router') {
$device_icon = "fire-alt";
} elseif ($asset_type == 'Access Point') {
} elseif ($asset_type == 'Wireless Access Point') {
$device_icon = "wifi";
} elseif ($asset_type == 'Phone') {
$device_icon = "phone";
Expand Down

0 comments on commit dc129fc

Please sign in to comment.