johnnyq
9ba21cf352
Assets: add NAS, UPS, PDU, Modem/ONT and NVR/DVR types from a new registry in functions/asset_type.php that sets each type's icon, tone, group, fields and details; the asset form shows only the fields a type uses (fields that already hold a value stay shown) and adds a Details section per type (CPU/RAM/storage, VM host/vCPUs, switch ports/SFP/PoE/management, NAS drives/capacity/RAID, UPS capacity/output/runtime/outlets/battery dates, PDU kind/outlets/input, modem circuit ID/ISP account, printer, phone, mobile, display, camera and NVR details) stored in a new asset_specs table (database 3.4.9); new or changed port and SFP counts add the missing interfaces, continuing the asset's numbering, skipping Wi-Fi, VLAN and management ports and never deleting any; the asset page and quick look show the details, a server or NAS lists the VMs that run on it, and Assigned and Warranty show only on types that use them; the list gets Servers & NAS and Power tabs, an optional Details column, a UPS battery badge, an Assigned picker only on assigned types, and New buttons named for what they add; nightly UPS Battery Due notifications at 45, 7 and 1 days as a Support notification; copy leaves out per-unit details, Transfer to Client carries details and interface types, export adds per-detail columns, import reads detail columns after the standard twelve (VM hosts by name, resolved after every row is in) and reports values it could not keep, and the API reads and writes asset_specs; racks, client portal, client export, overview, document templates and AI lists group the new types; fix asset import carrying physical location and notes into the next row, saving 0000-00-00 for a missing purchase date and warning on an unknown contact or location, save API and import types in the list's spelling, and keep interface types on transfer; changelog updated
2026-10-27 15:59:03 -04:00
johnnyq
359851c876
Security sweep of the 26.11 work: API contact lookup by phone or mobile kept to the key's clients; API credentials refuse a wrong decrypt password instead of saving unreadable usernames and passwords, link credential_vendor_id and credential_software_id, and drop another client's contact or asset; Products Receive window lists expenses only with Financial access and only for clients the agent can open; account ledger, reconcile page and ledger export show lines for clients the agent can't open as Another client with only date, kind and amount, with search and the client filter kept to reachable clients; Tax Collected folds unreachable exempt clients into one line; client-limited agents no longer see other clients' names in the export window client filters, Transfer to Client, company vendor expense lists, My Activity or the New Client duplicate check; Stripe switched off stops guest pay links and saving cards, and the Stripe return never books a payment twice; Admin > Cron job window is admins only; records per page needs the CSRF token and takes only the listed sizes; uploads/canned_responses closed to direct access; Admin > Debug no longer stops at the footer; report export audit log no longer double-escapes names; bulk interface network refuses a deleted network; API assets/update keeps the primary interface IP, MAC and network, tickets/resolve reports success, software/read by name works, clients/create takes the company currency, certificates/create returns its error, clients/archive logs as Client, and the 405 response no longer echoes the method; changelog database step count corrected to sixty
2026-10-23 12:09:07 -04:00
johnnyq
49a3c2d266
Enforce client scoping on API expense reads and record updates
...
Fixes (expenses/read.php missing apiClientScopeSql), plus an unscoped UPDATE in contacts/update.php and follow-up writes firing on zero-row updates in assets/credentials.
2026-08-06 11:00:49 -04:00
johnnyq
f1836c70cd
Replace Function logAction() with logAudit()
2026-07-14 17:35:23 -04:00
wrongecho
5efdfc53ff
Asset API - History
2026-04-09 15:25:21 +01:00
wrongecho
0ae4c2fac9
- Prevent error 500s when existing data can't be cleanly re-inserted to database
...
- Full support for asset_uri_2
2026-04-04 10:52:32 +01:00
johnnyq
ba5e2b216b
Updated asset API to use new logAction function
2024-11-14 17:42:01 -05:00
johnnyq
836e1a3199
Updated Asset API to include its assets
2024-06-11 23:00:57 -04:00
o-psi
53c11edc8c
Update constructs to not have parenthesis.
2023-10-20 15:25:52 -05:00
johnnyq
cea210bcea
Added asset_uri field to the API
2023-09-20 16:39:55 -04:00
johnnyq
d1876e829c
Added asset description to the API for create and update
2023-06-19 16:34:44 -04:00
johnnyq
48fe49cf77
BREAKING CHANGES - MAKE FULL BACKUP BEFORE PROCEEDING - Requires Manual Intervention on files see Forum Post Make sure you run the Database update directly after update. This Removes Multi-Company Functionality. Fixes issues with Reponsive tables and bunch of other UI and small Fixes
2023-03-11 16:16:46 -05:00
johnnyq
c0af8e8eab
Add '' to the date vars under API assets if not empty so they dont error out when inserted into the DB
2023-03-04 16:13:38 -05:00
johnnyq
cdfb61b294
Added a helper if no tags exist when attempting to add them to a client, Added some santizeInput tags to API
2023-02-28 11:58:08 -05:00
Marcus Hill
85c28f889b
Allow setting asset status via API
2023-02-11 14:22:35 +00:00
Marcus Hill
f3456ead67
API
...
- Add PHP logging when API queries fail because of SQL errors
- Add user agent to logging
- Enhance asset update endpoint
2023-02-05 15:07:41 +00:00
Marcus Hill
ff741c223e
API code style tidy
2023-01-01 16:00:07 +00:00
Johnny
44f8569b50
Merge pull request #455 from wrongecho/api
...
Add delete asset API endpoint
2022-05-02 11:30:02 -04:00
Marcus Hill
25c610e963
Rename update_id to update_count - as it's a count, not the insert ID
2022-05-01 10:34:21 +01:00
Marcus Hill
917377ed17
Remove meshcentral references in api
2022-04-28 21:46:41 +01:00
Marcus Hill
2d6e7dbb37
Add clients/read.php API endpoint.
...
Adjust asset create/update so that they function without all attributes being provided. Update will default to using the value currently in the database, rather than overwriting blank.
2022-04-18 15:59:09 +01:00