Isaac Connor and Claude Opus 5.5
1779e7acae
fix: store the computed event disk space when Storage.DiskSpace is NULL refs #5191
...
Storage.DiskSpace defaults to NULL on fresh installs, and zmc's
DiskSpace = DiskSpace + N leaves it NULL. Storage::event_disk_space()
treated NULL as uncached and ran SUM(DiskSpace) over Events on every
navbar render and status refresh, taking seconds per page on large
Events tables.
Write the computed sum back to the Storage row (only while it is still
NULL, so a value set by zmaudit is not overwritten). Later page loads use
the stored value and zmc keeps it current. COALESCE the sum so a storage
area with no events stores 0 instead of NULL.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-07 08:50:55 -04:00
Isaac Connor
07fcb72e3b
Use the same filter on Storage Name as we use in Monitor Name.
2024-09-30 06:33:09 -04:00
adhamiamirhossein
27977acdd4
fix: php 8.3 deprecated get_class method call without argument
2023-11-22 10:48:04 +03:30
Isaac Connor
aaebd725bb
Set default values on members, fixing bad defaults on nwe storage.
2023-11-13 11:37:31 -05:00
Isaac Connor
057159cde6
Make properties public so that they can be access in Storage object
2023-09-21 10:10:57 -04:00
Isaac Connor
d7090ce84a
Define properties
2023-09-13 13:08:12 -04:00
Isaac Connor
976de0606f
Add default value for Storage Path
2022-06-01 11:20:28 -04:00
Isaac Connor
5d826fd558
Don't try to addup/update DIskSpace used by incomplete events.
2021-02-20 17:11:20 -05:00
Isaac Connor
10c0a6617c
Return Debug to a regular function to match other logging functions. Since we switched to using namespaces we no longer clash with cake_php.
2020-10-14 10:39:25 -04:00
Isaac Connor
762bea0761
Bulk load monitor/Group relationships. Instead of using DESCRIBE Monitors Function, use a new function getMonitorFUnctionTypes to get this data for dropdown purposeses. Reduces db hits a lot.
2020-08-31 18:30:05 -04:00
Isaac Connor
479768a2a4
implement disk_used_blocks in Storage. Also use Type() instead of ->{Type} to get default value.
2020-08-17 16:57:53 -04:00
Isaac Connor
e5513bc7a4
Add setting Name and Path
2020-08-04 17:35:16 -04:00
Isaac Connor
dda630f522
fix filter_regexp to remove trailing /
2020-07-25 14:27:09 -04:00
Isaac Connor
fe9db4cfa2
add filtering to Storage->Path()
2020-07-25 13:51:13 -04:00
Isaac Connor
0b267fbdee
Add Enabled to Storage
2020-03-04 10:46:16 -05:00
Isaac Connor
f3a9e608db
Merge branch 'master' of github.com:ZoneMinder/zoneminder
2020-01-13 16:11:19 -05:00
Isaac Connor
b11815cfa9
Introduce Storage->EventCount to get the # of events per storage without actually loading all events.
2020-01-13 12:53:50 -05:00
Isaac Connor
6cd76ee2ff
Clear cache after loading Events so as to free ram.
2020-01-13 12:53:05 -05:00
Isaac Connor
4632bbd124
Apply relevant changes to deal with php7,4 deprecations
2019-12-07 11:45:32 -05:00
Isaac Connor
5ebf929598
Add Event counts, event disk usage to storage tab of options. Disable checkbox selection when there are events stored on the storage area.
2019-11-26 14:36:39 -05:00
Isaac Connor
606c89962f
eliminate an extra db call
2019-11-20 16:30:26 -05:00
Isaac Connor
5494fdb087
When upgrading from a version that doesn't do DiskSpace storage, there can be a lot of events to update. Can't load them all or we run out of ram. Batch them in 1000's
2019-11-20 09:31:16 -05:00
Isaac Connor
d036613776
Fix Server() not returning a ServerObject if not found when ServerId is null or 0
2019-10-21 13:45:27 -04:00
Isaac Connor
91651652c7
Only report an error for not finding the server if ServerId had a value
2019-10-21 13:41:32 -04:00
Isaac Connor
ee1e12b938
Be more robust about returning a Server object when instantiating the default Storage area.
2019-10-11 17:29:47 -04:00
Isaac Connor
35ec60ca03
Change Storage object to extend ZM_Object
2019-07-23 09:58:05 -04:00
Isaac Connor
5fe565b99d
spacing
2019-05-06 10:49:18 -04:00
Isaac Connor
8dd8888975
Php namespace ( #2537 )
...
* experiment with namespaces on the Server class
* experiment with namespaces on the Server class
* Implement the ZM namespace on objects
* Implement the ZM namespace on objects
* Implement the ZM namespace on objects
2019-02-22 09:19:07 -05:00
Isaac Connor
8e62c93f5f
add to_json function to Storage.
2019-02-06 11:44:36 -05:00
Isaac Connor
bdb50567df
fix disk_event_space to event_disk_space
2018-10-31 11:56:08 -04:00
Isaac Connor
b0c555599c
Merge updated objects from sa. Implements caching of objects and fixes logged errors when using the default storage group. Fixes #2209
2018-09-15 09:42:59 -04:00
Isaac Connor
55dcb161ae
find should always return an array
2018-09-09 13:59:10 -04:00
Isaac Connor
dfdac2ed70
make find and find_one functions consistent across Objects
2018-09-07 16:31:11 -04:00
Isaac Connor
0acad44b4a
test for existence of Storage path before trying things like disk_total_space which will fill the html output with php errors.
2018-07-11 17:21:44 -04:00
Isaac Connor
da7c953e3d
adda blank line
2018-05-07 14:08:32 -07:00
Isaac Connor
de149c1328
spacing
2018-04-24 08:48:35 -07:00
Isaac Connor
aaa7844350
Merge branch 'storageareas' of github.com:connortechnology/ZoneMinder into storageareas
2018-04-17 14:18:01 -07:00
Isaac Connor
10a191ae5b
add event_disk_space to storage to differentiate between real used space versus event used disk space. Use this in the navbar to show actual disk use and also event disk use
2018-04-17 14:14:40 -07:00
Isaac Connor
c043a157ad
spacing and add Server function
2018-04-17 12:37:30 -04:00
Isaac Connor
2860e067bc
Fix caching when an array is passed to new
2018-04-15 10:26:57 -04:00
Isaac Connor
03ff2fcde4
add caching and find_one to Storage and Groups
2018-04-10 13:05:37 -07:00
Isaac Connor
3abd873c34
Turn off debug
2018-01-19 08:17:17 -08:00
Isaac Connor
fe7c54bc26
Fix Debug
2018-01-16 17:54:37 -05:00
Isaac Connor
a8dde207e1
Warning should be a debug
2018-01-16 12:33:50 -05:00
Isaac Connor
9f42871c86
Fix Zone Triggers, bump version
2018-01-16 11:49:17 -05:00
Isaac Connor
0d7fff761c
upgrade find_all to take parameters
2017-12-22 11:38:42 -08:00
Isaac Connor
f51259443c
fix disk_used_percentage to use db calculated used size
2017-12-22 09:02:49 -08:00
Isaac Connor
dd3f9492ba
fix dulicate logic
2017-11-26 15:12:35 -05:00
Isaac Connor
485567349d
Don't calc DiskSpace if it is already defined
2017-11-23 07:29:05 -08:00
Isaac Connor
df8fbaccea
Fixes
2017-10-23 11:50:45 -07:00