Closed (fixed)
Project:
Monitoring
Version:
8.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
31 Aug 2015 at 07:16 UTC
Updated:
1 Oct 2015 at 06:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
miro_dietikerSure, check all plugins and consider a fixed value type. Only leave it configurable if it makes sense.
(And extend the tests to check if it is properly persisted / applied.)
Comment #3
giancarlosotelo commentedAdded the configurableValueType property, now can be added in any plugin to leave it configurable or not.
I am setting all the addable sensors with a default value like ConfigValue sensor with bool. All Agreggators with default value number. I am missing the queue sensor, not sure if could be no configurable.
Other default sensors that I think doesnt need a configurable option: CoreRequirement, UpdateStatus, UserFailLogin, UserIntegrity. Probably I am missing some others that also need this option.
I also extended tests with the watchdog,config value and viewdisplay aggregators that assert the default value type.
Comment #4
miro_dietikerNice step, some improvements required.
We can not lock this. Not all config values are numeric or boolean. This needs to stay editable.
Hmm... Followup identified! This sensor has no value (type) and thus a value label doesn't make sense at all.
This should then default to number... Is it?
This extends DatabaseAggregator so should be numeric and non-configurable already.
All other configurable flags are directly accessed through the value, not through a getter. Please do similarly.
Comment #5
miro_dietikerCreated issue for the value label followup #2560575: Hide value label for value type none
Comment #6
giancarlosotelo commented1. Config value stays editable.
3. Installed sensors have a default value(install file) so we don't have to define one in the plugin when is non configurable.
4. Yes, removed.
5. They are directly accessed because all sensors extends from SensorPluginBase but in this case we are on the SensorForm
'#access' => $sensor_config->getPlugin()->getConfigurableValueType()So the only way to access that protected variable is with a getter. Correct me if I am wrong or if is not the correct approach.
Now probably some others plugins need to be non editable, I will wait some feedback.
Comment #7
LKS90 commentedCan confirm all the points have been addressed. Point 5 as well, I don't see a way to get the flag without a getter method in that context.
Comment #8
miro_dietikerYeah that looks pretty fine. The Queue Size sensor also needs to hide value type and set to numeric.
Fixed, committed. Hope tests still pass... ;-)
Comment #13
juanse254 commentedComment #16
giancarlosotelo commented