diff -u b/src/Plugin/monitoring/SensorPlugin/ConfigValueSensorPlugin.php b/src/Plugin/monitoring/SensorPlugin/ConfigValueSensorPlugin.php --- b/src/Plugin/monitoring/SensorPlugin/ConfigValueSensorPlugin.php +++ b/src/Plugin/monitoring/SensorPlugin/ConfigValueSensorPlugin.php @@ -25,11 +25,6 @@ /** * {@inheritdoc} */ - protected $configurableValueType = FALSE; - - /** - * {@inheritdoc} - */ protected function getValueDescription() { return (t('The expected value of config %key, current value: %actVal', array( @@ -93,12 +88,2 @@ - /** - * {@inheritdoc} - */ - public function getDefaultConfiguration() { - $default_config = array( - 'value_type' => 'bool', - ); - return $default_config; - } - } reverted: --- b/src/Plugin/monitoring/SensorPlugin/UserFailedLoginsSensorPlugin.php +++ a/src/Plugin/monitoring/SensorPlugin/UserFailedLoginsSensorPlugin.php @@ -25,11 +25,6 @@ /** * {@inheritdoc} */ - protected $configurableValueType = FALSE; - - /** - * {@inheritdoc} - */ public function getAggregateQuery() { $query = parent::getAggregateQuery(); $query->addField('watchdog', 'variables'); diff -u b/src/Tests/MonitoringUITest.php b/src/Tests/MonitoringUITest.php --- b/src/Tests/MonitoringUITest.php +++ b/src/Tests/MonitoringUITest.php @@ -248,14 +248,16 @@ 'description' => 'Sensor created to test UI', 'value_label' => 'Test Value', 'caching_time' => 100, + 'value_type' => 'bool', 'settings[key]' => 'threshold.autorun', 'settings[config]' => 'system.cron', ), t('Save')); $this->assertText(SafeMarkup::format('Sensor @label saved.', array('@label' => 'UI created Sensor config'))); - // Check the value type has the default value. - $sensor_config = SensorConfig::load('ui_test_sensor_config'); - $this->assertEqual($sensor_config->getValueType(), 'bool'); + // Go back to the sensor edit page, + // Check the value type is properly selected. + $this->drupalGet('admin/config/system/monitoring/sensors/ui_test_sensor_config'); + $this->assertOptionSelected('edit-value-type', 'bool'); // Try to enable a sensor which is disabled by default and vice versa. // Check the default status of cron safe threshold and new users sensors.