mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-05-28 04:36:06 -04:00
Add column environment_id to the models related to the dependency feature
This commit is contained in:
parent
ffd51260d7
commit
46577ff26b
5 changed files with 17 additions and 2 deletions
|
|
@ -13,6 +13,7 @@ use ipl\Orm\Relations;
|
|||
/**
|
||||
* Dependency edge model.
|
||||
*
|
||||
* @property string $environment_id
|
||||
* @property string $to_node_id
|
||||
* @property string $from_node_id
|
||||
* @property string $display_name
|
||||
|
|
@ -37,6 +38,7 @@ class DependencyEdge extends Model
|
|||
public function getColumns(): array
|
||||
{
|
||||
return [
|
||||
'environment_id',
|
||||
'to_node_id',
|
||||
'from_node_id',
|
||||
'display_name',
|
||||
|
|
@ -47,6 +49,7 @@ class DependencyEdge extends Model
|
|||
public function createBehaviors(Behaviors $behaviors): void
|
||||
{
|
||||
$behaviors->add(new Binary([
|
||||
'environment_id',
|
||||
'to_node_id',
|
||||
'from_node_id',
|
||||
'dependency_edge_state_id'
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ use ipl\Orm\Model;
|
|||
* Dependency edge state model.
|
||||
*
|
||||
* @property string $id
|
||||
* @property string $environment_id
|
||||
* @property bool $failed
|
||||
*/
|
||||
class DependencyEdgeState extends Model
|
||||
|
|
@ -28,6 +29,7 @@ class DependencyEdgeState extends Model
|
|||
public function getColumns(): array
|
||||
{
|
||||
return [
|
||||
'environment_id',
|
||||
'failed'
|
||||
];
|
||||
}
|
||||
|
|
@ -42,7 +44,8 @@ class DependencyEdgeState extends Model
|
|||
public function createBehaviors(Behaviors $behaviors): void
|
||||
{
|
||||
$behaviors->add(new Binary([
|
||||
'id'
|
||||
'id',
|
||||
'environment_id'
|
||||
]));
|
||||
$behaviors->add(new BoolCast([
|
||||
'failed'
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ use ipl\Sql\Expression;
|
|||
* Dependency node model.
|
||||
*
|
||||
* @property string $id
|
||||
* @property string $environment_id
|
||||
* @property ?string $host_id
|
||||
* @property ?string $service_id
|
||||
* @property ?string $redundancy_group_id
|
||||
|
|
@ -46,6 +47,7 @@ class DependencyNode extends Model
|
|||
{
|
||||
return [
|
||||
'id',
|
||||
'environment_id',
|
||||
'host_id',
|
||||
'service_id',
|
||||
'redundancy_group_id',
|
||||
|
|
@ -85,6 +87,7 @@ class DependencyNode extends Model
|
|||
{
|
||||
$behaviors->add(new Binary([
|
||||
'id',
|
||||
'environment_id',
|
||||
'host_id',
|
||||
'service_id',
|
||||
'redundancy_group_id'
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ use ipl\Orm\Relations;
|
|||
* Redundancy group model.
|
||||
*
|
||||
* @property string $id
|
||||
* @property string $environment_id
|
||||
* @property string $display_name
|
||||
*
|
||||
* @property (?RedundancyGroupState)|Query $state
|
||||
|
|
@ -37,6 +38,7 @@ class RedundancyGroup extends Model
|
|||
public function getColumns(): array
|
||||
{
|
||||
return [
|
||||
'environment_id',
|
||||
'display_name'
|
||||
];
|
||||
}
|
||||
|
|
@ -51,7 +53,8 @@ class RedundancyGroup extends Model
|
|||
public function createBehaviors(Behaviors $behaviors): void
|
||||
{
|
||||
$behaviors->add(new Binary([
|
||||
'id'
|
||||
'id',
|
||||
'environment_id'
|
||||
]));
|
||||
$behaviors->add(new ReRoute([
|
||||
'child' => 'to.from',
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ use ipl\Orm\Relations;
|
|||
* Redundancy group state model.
|
||||
*
|
||||
* @property string $id
|
||||
* @property string $environment_id
|
||||
* @property string $redundancy_group_id
|
||||
* @property bool $failed
|
||||
* @property DateTime $last_state_change
|
||||
|
|
@ -38,6 +39,7 @@ class RedundancyGroupState extends Model
|
|||
public function getColumns(): array
|
||||
{
|
||||
return [
|
||||
'environment_id',
|
||||
'redundancy_group_id',
|
||||
'failed',
|
||||
'last_state_change'
|
||||
|
|
@ -48,6 +50,7 @@ class RedundancyGroupState extends Model
|
|||
{
|
||||
$behaviors->add(new Binary([
|
||||
'id',
|
||||
'environment_id',
|
||||
'redundancy_group_id'
|
||||
]));
|
||||
$behaviors->add(new BoolCast([
|
||||
|
|
|
|||
Loading…
Reference in a new issue