Skip to content

Commit

Permalink
Show YAML
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoxhaa committed Apr 17, 2024
1 parent 1ee1c87 commit f25cc59
Show file tree
Hide file tree
Showing 32 changed files with 273 additions and 4 deletions.
2 changes: 2 additions & 0 deletions library/Kubernetes/Model/ConfigMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public function getColumnDefinitions()
'uid' => $this->translate('UID'),
'resource_version' => $this->translate('Resource Version'),
'immutable' => $this->translate('Immutable'),
'yaml' => $this->translate('YAML'),
'created' => $this->translate('Created At')
];
}
Expand All @@ -58,6 +59,7 @@ public function getColumns()
'uid',
'resource_version',
'immutable',
'yaml',
'created'
];
}
Expand Down
2 changes: 2 additions & 0 deletions library/Kubernetes/Model/CronJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public function getColumnDefinitions()
'active' => $this->translate('Active'),
'last_schedule_time' => $this->translate('Last Schedule Time'),
'last_successful_time' => $this->translate('Last Successful Time'),
'yaml' => $this->translate('YAML'),
'created' => $this->translate('Created At')
];
}
Expand All @@ -73,6 +74,7 @@ public function getColumns()
'active',
'last_schedule_time',
'last_successful_time',
'yaml',
'created'
];
}
Expand Down
2 changes: 2 additions & 0 deletions library/Kubernetes/Model/DaemonSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public function getColumnDefinitions()
'update_number_scheduled' => $this->translate('Update Number Scheduled'),
'number_available' => $this->translate('Number Available'),
'number_unavailable' => $this->translate('Number Unavailable'),
'yaml' => $this->translate('YAML'),
'created' => $this->translate('Created At')
];
}
Expand All @@ -79,6 +80,7 @@ public function getColumns()
'update_number_scheduled',
'number_available',
'number_unavailable',
'yaml',
'created'
];
}
Expand Down
2 changes: 2 additions & 0 deletions library/Kubernetes/Model/Deployment.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public function getColumnDefinitions()
'ready_replicas' => $this->translate('Ready Replicas'),
'available_replicas' => $this->translate('Available Replicas'),
'unavailable_replicas' => $this->translate('Unavailable Replicas'),
'yaml' => $this->translate('YAML'),
'created' => $this->translate('Created At')
];
}
Expand All @@ -89,6 +90,7 @@ public function getColumns()
'ready_replicas',
'available_replicas',
'unavailable_replicas',
'yaml',
'created'
];
}
Expand Down
1 change: 1 addition & 0 deletions library/Kubernetes/Model/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public function getColumns()
'first_seen',
'last_seen',
'count',
'yaml',
'created'
];
}
Expand Down
2 changes: 2 additions & 0 deletions library/Kubernetes/Model/Ingress.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public function getColumnDefinitions()
'name' => $this->translate('Name'),
'uid' => $this->translate('UID'),
'resource_version' => $this->translate('Resource Version'),
'yaml' => $this->translate('YAML'),
'created' => $this->translate('Created At')
];
}
Expand All @@ -55,6 +56,7 @@ public function getColumns()
'name',
'uid',
'resource_version',
'yaml',
'created'
];
}
Expand Down
2 changes: 2 additions & 0 deletions library/Kubernetes/Model/Job.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public function getColumnDefinitions()
'active' => $this->translate('Active'),
'succeeded' => $this->translate('Succeeded'),
'failed' => $this->translate('Failed'),
'yaml' => $this->translate('YAML'),
'created' => $this->translate('Created At')
];
}
Expand All @@ -85,6 +86,7 @@ public function getColumns()
'active',
'succeeded',
'failed',
'yaml',
'created'
];
}
Expand Down
2 changes: 2 additions & 0 deletions library/Kubernetes/Model/NamespaceModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public function getColumnDefinitions()
'uid' => $this->translate('UID'),
'resource_version' => $this->translate('Resource Version'),
'phase' => $this->translate('Phase'),
'yaml' => $this->translate('YAML'),
'created' => $this->translate('Created At')
];
}
Expand All @@ -57,6 +58,7 @@ public function getColumns()
'uid',
'resource_version',
'phase',
'yaml',
'created'
];
}
Expand Down
2 changes: 2 additions & 0 deletions library/Kubernetes/Model/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public function getColumnDefinitions()
'memory_capacity' => $this->translate('Memory Capacity'),
'memory_allocatable' => $this->translate('Memory Allocatable'),
'pod_capacity' => $this->translate('Pod Capacity'),
'yaml' => $this->translate('YAML'),
'created' => $this->translate('Created At')
];
}
Expand All @@ -81,6 +82,7 @@ public function getColumns()
'memory_capacity',
'memory_allocatable',
'pod_capacity',
'yaml',
'created'
];
}
Expand Down
2 changes: 2 additions & 0 deletions library/Kubernetes/Model/PersistentVolume.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public function getColumnDefinitions()
'volume_source_type' => $this->translate('Volume Source Type'),
'storage_class' => $this->translate('Storage Class'),
'reclaim_policy' => $this->translate('Reclaim Policy'),
'yaml' => $this->translate('YAML'),
'created' => $this->translate('Created At')
];
}
Expand All @@ -81,6 +82,7 @@ public function getColumns()
'volume_source_type',
'storage_class',
'reclaim_policy',
'yaml',
'created'
];
}
Expand Down
2 changes: 2 additions & 0 deletions library/Kubernetes/Model/PersistentVolumeClaim.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public function getColumnDefinitions()
'volume_name' => $this->translate('Volume Name'),
'volume_mode' => $this->translate('Volume Mode'),
'storage_class' => $this->translate('Storage Class'),
'yaml' => $this->translate('YAML'),
'created' => $this->translate('Created At')
];
}
Expand All @@ -93,6 +94,7 @@ public function getColumns()
'volume_name',
'volume_mode',
'storage_class',
'yaml',
'created'
];
}
Expand Down
2 changes: 2 additions & 0 deletions library/Kubernetes/Model/Pod.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ public function getColumnDefinitions()
'reason' => $this->translate('Phase Reason'),
'message' => $this->translate('Phase Message'),
'qos' => $this->translate('Quality of Service'),
'yaml' => $this->translate('YAML'),
'created' => $this->translate('Created At')
];
}
Expand All @@ -145,6 +146,7 @@ public function getColumns()
'reason',
'message',
'qos',
'yaml',
'created'
];
}
Expand Down
2 changes: 2 additions & 0 deletions library/Kubernetes/Model/ReplicaSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public function getColumnDefinitions()
'fully_labeled_replicas' => $this->translate('Fully Labeled Replicas'),
'ready_replicas' => $this->translate('Ready Replicas'),
'available_replicas' => $this->translate('Available Replicas'),
'yaml' => $this->translate('YAML'),
'created' => $this->translate('Created At')
];
}
Expand All @@ -81,6 +82,7 @@ public function getColumns()
'fully_labeled_replicas',
'ready_replicas',
'available_replicas',
'yaml',
'created'
];
}
Expand Down
1 change: 1 addition & 0 deletions library/Kubernetes/Model/Secret.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public function getColumns()
'resource_version',
'type',
'immutable',
'yaml',
'created'
];
}
Expand Down
2 changes: 2 additions & 0 deletions library/Kubernetes/Model/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public function getColumnDefinitions()
'allocate_load_balancer_node_ports' => $this->translate('Allocated Load Balancer Node Ports'),
'load_balancer_class' => $this->translate('Load Balancer Class'),
'internal_traffic_policy' => $this->translate('Internal Traffic Policy'),
'yaml' => $this->translate('YAML'),
'created' => $this->translate('Created At')
];
}
Expand All @@ -93,6 +94,7 @@ public function getColumns()
'allocate_load_balancer_node_ports',
'load_balancer_class',
'internal_traffic_policy',
'yaml',
'created'
];
}
Expand Down
2 changes: 2 additions & 0 deletions library/Kubernetes/Model/StatefulSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public function getColumnDefinitions()
'current_replicas' => $this->translate('Current Replicas'),
'updated_replicas' => $this->translate('Updated Replicas'),
'available_replicas' => $this->translate('Available Replicas'),
'yaml' => $this->translate('YAML'),
'created' => $this->translate('Created At')
];
}
Expand All @@ -83,6 +84,7 @@ public function getColumns()
'current_replicas',
'updated_replicas',
'available_replicas',
'yaml',
'created'
];
}
Expand Down
18 changes: 17 additions & 1 deletion library/Kubernetes/Web/ConfigMapDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
use Icinga\Module\Kubernetes\Common\Icons;
use Icinga\Module\Kubernetes\Common\ResourceDetails;
use Icinga\Module\Kubernetes\Model\ConfigMap;
use ipl\Html\Attributes;
use ipl\Html\BaseHtmlElement;
use ipl\Html\HtmlElement;
use ipl\Html\Text;
use ipl\I18n\Translation;

class ConfigMapDetail extends BaseHtmlElement
Expand All @@ -34,7 +37,20 @@ protected function assemble()
]
)),
new Labels($this->configMap->label),
new Data($this->configMap->data->execute())
new Data($this->configMap->data->execute()),
new HtmlElement(
'section',
null,
new HtmlElement('h2', null, new Text('YAML')),
new HtmlElement(
'pre',
new Attributes([
'class' => 'collapsible',
'data-visible-height' => 100
]),
new Text($this->configMap->yaml)
)
)
);
}
}
18 changes: 17 additions & 1 deletion library/Kubernetes/Web/CronJobDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@

use Icinga\Module\Kubernetes\Common\ResourceDetails;
use Icinga\Module\Kubernetes\Model\CronJob;
use ipl\Html\Attributes;
use ipl\Html\BaseHtmlElement;
use ipl\Html\HtmlElement;
use ipl\Html\Text;
use ipl\I18n\Translation;

class CronJobDetail extends BaseHtmlElement
Expand Down Expand Up @@ -46,7 +49,20 @@ protected function assemble()
$this->translate('Last Schedule Time') => $lastScheduleTime,
$this->translate('Last Successful Time') => $lastSuccessfulTime
])),
new Labels($this->cronJob->label)
new Labels($this->cronJob->label),
new HtmlElement(
'section',
null,
new HtmlElement('h2', null, new Text('YAML')),
new HtmlElement(
'pre',
new Attributes([
'class' => 'collapsible',
'data-visible-height' => 100
]),
new Text($this->cronJob->yaml)
)
)
);
}
}
14 changes: 14 additions & 0 deletions library/Kubernetes/Web/DaemonSetDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Icinga\Module\Kubernetes\Common\ResourceDetails;
use Icinga\Module\Kubernetes\Model\DaemonSet;
use Icinga\Module\Kubernetes\Model\DaemonSetCondition;
use ipl\Html\Attributes;
use ipl\Html\BaseHtmlElement;
use ipl\Html\HtmlElement;
use ipl\Html\Text;
Expand Down Expand Up @@ -48,6 +49,19 @@ protected function assemble()
null,
new HtmlElement('h2', null, new Text($this->translate('Pods'))),
new PodList($this->daemonSet->pod->with(['node']))
),
new HtmlElement(
'section',
null,
new HtmlElement('h2', null, new Text('YAML')),
new HtmlElement(
'pre',
new Attributes([
'class' => 'collapsible',
'data-visible-height' => 100
]),
new Text($this->daemonSet->yaml)
)
)
);
}
Expand Down
14 changes: 14 additions & 0 deletions library/Kubernetes/Web/DeploymentDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Icinga\Module\Kubernetes\Common\ResourceDetails;
use Icinga\Module\Kubernetes\Model\Deployment;
use Icinga\Module\Kubernetes\Model\DeploymentCondition;
use ipl\Html\Attributes;
use ipl\Html\BaseHtmlElement;
use ipl\Html\HtmlElement;
use ipl\Html\Text;
Expand Down Expand Up @@ -51,6 +52,19 @@ protected function assemble()
null,
new HtmlElement('h2', null, new Text($this->translate('Replica Sets'))),
new ReplicaSetList($this->deployment->replica_set)
),
new HtmlElement(
'section',
null,
new HtmlElement('h2', null, new Text('YAML')),
new HtmlElement(
'pre',
new Attributes([
'class' => 'collapsible',
'data-visible-height' => 100
]),
new Text($this->deployment->yaml)
)
)
);
}
Expand Down
14 changes: 14 additions & 0 deletions library/Kubernetes/Web/EventDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use Icinga\Module\Kubernetes\Common\ResourceDetails;
use Icinga\Module\Kubernetes\Model\Event;
use ipl\Html\Attributes;
use ipl\Html\BaseHtmlElement;
use ipl\Html\HtmlElement;
use ipl\Html\Text;
Expand Down Expand Up @@ -47,6 +48,19 @@ protected function assemble()
null,
new HtmlElement('h2', null, new Text($this->translate('Note'))),
new Text($this->event->note)
),
new HtmlElement(
'section',
null,
new HtmlElement('h2', null, new Text('YAML')),
new HtmlElement(
'pre',
new Attributes([
'class' => 'collapsible',
'data-visible-height' => 100
]),
new Text($this->event->yaml)
)
)
);
}
Expand Down

0 comments on commit f25cc59

Please sign in to comment.