Merge remote-tracking branch 'origin/master' into feature/add-to-dashboard-4537
This commit is contained in:
commit
8805e4af4b
|
@ -76,6 +76,7 @@ CREATE UNIQUE INDEX idx_icingaweb_user
|
|||
CREATE TABLE "icingaweb_user_preference" (
|
||||
"username" character varying(64) NOT NULL,
|
||||
"name" character varying(64) NOT NULL,
|
||||
"section" character varying(64) NOT NULL,
|
||||
"value" character varying(255) NOT NULL,
|
||||
"ctime" timestamp NULL DEFAULT NULL,
|
||||
"mtime" timestamp NULL DEFAULT NULL
|
||||
|
@ -85,6 +86,7 @@ ALTER TABLE ONLY "icingaweb_user_preference"
|
|||
ADD CONSTRAINT pk_icingaweb_user_preference
|
||||
PRIMARY KEY (
|
||||
"username",
|
||||
"section",
|
||||
"name"
|
||||
);
|
||||
|
||||
|
@ -92,5 +94,6 @@ CREATE UNIQUE INDEX idx_icingaweb_user_preference
|
|||
ON "icingaweb_user_preference"
|
||||
USING btree (
|
||||
lower((username)::text),
|
||||
lower((section)::text),
|
||||
lower((name)::text)
|
||||
);
|
|
@ -428,7 +428,7 @@ class ActionController extends Zend_Controller_Action
|
|||
}
|
||||
|
||||
if ($this->autorefreshInterval !== null) {
|
||||
// $resp->setHeader('X-Icinga-Refresh', $this->autorefreshInterval);
|
||||
$resp->setHeader('X-Icinga-Refresh', $this->autorefreshInterval);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,6 @@ class Number extends FormElement
|
|||
*/
|
||||
public function init()
|
||||
{
|
||||
$this->addValidator('Float', true); // true for breaking the validator chain on failure
|
||||
if ($this->min !== null) {
|
||||
$this->addValidator('GreaterThan', true, array('min' => $this->min));
|
||||
}
|
||||
|
@ -127,4 +126,19 @@ class Number extends FormElement
|
|||
{
|
||||
return $this->step;
|
||||
}
|
||||
|
||||
/**
|
||||
* (non-PHPDoc)
|
||||
* @see \Zend_Form_Element::isValid() For the method documentation.
|
||||
*/
|
||||
public function isValid($value, $context = null)
|
||||
{
|
||||
$this->setValue($value);
|
||||
$value = $this->getValue();
|
||||
if (! is_numeric($value)) {
|
||||
$this->addError(sprintf($this->translate('\'%s\' is not a valid number'), $value));
|
||||
return false;
|
||||
}
|
||||
return parent::isValid($value, $context);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,15 +7,15 @@ if ($object->getType() === $object::TYPE_HOST) {
|
|||
'monitoring/host/reschedule-check',
|
||||
array('host' => $object->getName())
|
||||
);
|
||||
$check_attempts = $object->host_current_check_attempt . '/' . $object->host_max_check_attempts;
|
||||
$state_type = (int) $object->host_state_type;
|
||||
$checkAttempts = $object->host_current_check_attempt . '/' . $object->host_max_check_attempts;
|
||||
$stateType = (int) $object->host_state_type;
|
||||
} else {
|
||||
$reschedule = $this->href(
|
||||
'monitoring/service/reschedule-check',
|
||||
array('host' => $object->getHost()->getName(), 'service' => $object->getName())
|
||||
);
|
||||
$check_attempts = $object->service_attempt;
|
||||
$state_type = (int) $object->service_state_type;
|
||||
$checkAttempts = $object->service_attempt;
|
||||
$stateType = (int) $object->service_state_type;
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -38,10 +38,10 @@ if ($object->getType() === $object::TYPE_HOST) {
|
|||
</tr>
|
||||
<tr>
|
||||
<th><?= $this->translate('Check attempts') ?></th>
|
||||
<?php if ($state_type === 0): ?>
|
||||
<td><?= $check_attempts ?> <?= $this->translate('(soft state)') ?></td>
|
||||
<?php if ($stateType === 0): ?>
|
||||
<td><?= $checkAttempts ?> <?= $this->translate('(soft state)') ?></td>
|
||||
<?php else: ?>
|
||||
<td><?= $check_attempts ?> <?= $this->translate('(hard state)') ?></td>
|
||||
<td><?= $checkAttempts ?> <?= $this->translate('(hard state)') ?></td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<?php if ($object->check_execution_time): ?>
|
||||
|
|
Loading…
Reference in New Issue