Skip to content

Commit

Permalink
Add column environment_id to the models related to the dependency f…
Browse files Browse the repository at this point in the history
…eature
  • Loading branch information
raviks789 committed Dec 18, 2024
1 parent 945eb5f commit e2eb67c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 2 deletions.
3 changes: 3 additions & 0 deletions library/Icingadb/Model/DependencyEdge.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
/**
* Dependency edge model.
*
* @property string $environment_id
* @property string $to_node_id
* @property string $from_node_id
* @property string $display_name
Expand All @@ -37,6 +38,7 @@ public function getKeyName(): array
public function getColumns(): array
{
return [
'environment_id',
'to_node_id',
'from_node_id',
'display_name',
Expand All @@ -47,6 +49,7 @@ public function getColumns(): array
public function createBehaviors(Behaviors $behaviors): void
{
$behaviors->add(new Binary([
'environment_id',
'to_node_id',
'from_node_id',
'dependency_edge_state_id'
Expand Down
5 changes: 4 additions & 1 deletion library/Icingadb/Model/DependencyEdgeState.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* Dependency edge state model.
*
* @property string $id
* @property string $environment_id
* @property bool $failed
*/
class DependencyEdgeState extends Model
Expand All @@ -28,6 +29,7 @@ public function getKeyName(): string
public function getColumns(): array
{
return [
'environment_id',
'failed'
];
}
Expand All @@ -42,7 +44,8 @@ public function getColumnDefinitions(): array
public function createBehaviors(Behaviors $behaviors): void
{
$behaviors->add(new Binary([
'id'
'id',
'environment_id'
]));
$behaviors->add(new BoolCast([
'failed'
Expand Down
3 changes: 3 additions & 0 deletions library/Icingadb/Model/DependencyNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* Dependency node model.
*
* @property string $id
* @property string $environment_id
* @property ?string $host_id
* @property ?string $service_id
* @property ?string $redundancy_group_id
Expand Down Expand Up @@ -46,6 +47,7 @@ public function getColumns(): array
{
return [
'id',
'environment_id',
'host_id',
'service_id',
'redundancy_group_id',
Expand Down Expand Up @@ -85,6 +87,7 @@ public function createBehaviors(Behaviors $behaviors): void
{
$behaviors->add(new Binary([
'id',
'environment_id',
'host_id',
'service_id',
'redundancy_group_id'
Expand Down
5 changes: 4 additions & 1 deletion library/Icingadb/Model/RedundancyGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* Redundancy group model.
*
* @property string $id
* @property string $environment_id
* @property string $display_name
*
* @property (?RedundancyGroupState)|Query $state
Expand All @@ -37,6 +38,7 @@ public function getKeyName(): string
public function getColumns(): array
{
return [
'environment_id',
'display_name'
];
}
Expand All @@ -51,7 +53,8 @@ public function getColumnDefinitions(): array
public function createBehaviors(Behaviors $behaviors): void
{
$behaviors->add(new Binary([
'id'
'id',
'environment_id'
]));
$behaviors->add(new ReRoute([
'child' => 'to.from',
Expand Down
3 changes: 3 additions & 0 deletions library/Icingadb/Model/RedundancyGroupState.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* Redundancy group state model.
*
* @property string $id
* @property string $environment_id
* @property string $redundancy_group_id
* @property bool $failed
* @property DateTime $last_state_change
Expand All @@ -38,6 +39,7 @@ public function getKeyName(): string
public function getColumns(): array
{
return [
'environment_id',
'redundancy_group_id',
'failed',
'last_state_change'
Expand All @@ -48,6 +50,7 @@ public function createBehaviors(Behaviors $behaviors): void
{
$behaviors->add(new Binary([
'id',
'environment_id',
'redundancy_group_id'
]));
$behaviors->add(new BoolCast([
Expand Down

0 comments on commit e2eb67c

Please sign in to comment.