Skip to content

Commit

Permalink
Use 'Yaml' widget
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoxhaa committed Jun 2, 2024
1 parent 5fad5e8 commit 52d91b6
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 212 deletions.
14 changes: 1 addition & 13 deletions library/Kubernetes/Web/ConfigMapDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,7 @@ protected function assemble()
)),
new Labels($this->configMap->label),
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)
)
)
new Yaml($this->configMap->yaml)
);
}
}
14 changes: 1 addition & 13 deletions library/Kubernetes/Web/CronJobDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,7 @@ protected function assemble()
$this->translate('Last Successful Time') => $lastSuccessfulTime
])),
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)
)
)
new Yaml($this->cronJob->yaml)
);
}
}
14 changes: 1 addition & 13 deletions library/Kubernetes/Web/DaemonSetDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,7 @@ protected function assemble()
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)
)
)
new Yaml($this->daemonSet->yaml)
);
}
}
14 changes: 1 addition & 13 deletions library/Kubernetes/Web/DeploymentDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,7 @@ protected function assemble()
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)
)
)
new Yaml($this->deployment->yaml)
);
}
}
14 changes: 1 addition & 13 deletions library/Kubernetes/Web/EventDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,7 @@ protected function assemble()
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)
)
)
new Yaml($this->event->yaml)
);
}
}
16 changes: 1 addition & 15 deletions library/Kubernetes/Web/IngressDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,6 @@ protected function assemble()
);
}

$this->addHtml(
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->ingress->yaml)
)
)
);
$this->addHtml(new Yaml($this->ingress->yaml));
}
}
14 changes: 1 addition & 13 deletions library/Kubernetes/Web/JobDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,7 @@ protected function assemble()
)
)
),
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->job->yaml)
)
)
new Yaml($this->job->yaml)
);
}
}
14 changes: 1 addition & 13 deletions library/Kubernetes/Web/NamespaceDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,7 @@ protected function assemble()
$this->translate('Phase') => $this->namespace->phase
]),
new Labels($this->namespace->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->namespace->yaml)
)
)
new Yaml($this->namespace->yaml)
);
}
}
14 changes: 1 addition & 13 deletions library/Kubernetes/Web/NodeDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,7 @@ protected function assemble()
Filter::equal('reference_name', $this->node->name)
)))
),
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->node->yaml)
)
)
new Yaml($this->node->yaml)
);
}
}
14 changes: 1 addition & 13 deletions library/Kubernetes/Web/PersistentVolumeClaimDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,7 @@ protected function assemble()
new HtmlElement('h2', null, new Text($this->translate('Pods'))),
new PodList($this->pvc->pod)
),
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->pvc->yaml)
)
)
new Yaml($this->pvc->yaml)
);
}
}
14 changes: 1 addition & 13 deletions library/Kubernetes/Web/PersistentVolumeDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,7 @@ protected function assemble()
new HtmlElement('h2', null, new Text($this->translate('Claims'))),
new PersistentVolumeClaimList($this->persistentVolume->pvc)
),
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->persistentVolume->yaml)
)
)
new Yaml($this->persistentVolume->yaml)
);
}
}
14 changes: 1 addition & 13 deletions library/Kubernetes/Web/PodDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,7 @@ protected function assemble()
)
)
),
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->pod->yaml)
)
)
new Yaml($this->pod->yaml)
);
}
}
14 changes: 1 addition & 13 deletions library/Kubernetes/Web/ReplicaSetDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,7 @@ protected function assemble()
Filter::equal('reference_name', $this->replicaSet->name)
)))
),
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->replicaSet->yaml)
)
)
new Yaml($this->replicaSet->yaml)
);
}
}
14 changes: 1 addition & 13 deletions library/Kubernetes/Web/SecretDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,7 @@ protected function assemble()
])),
new Labels($this->secret->label),
new Data($this->secret->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->secret->yaml)
)
)
new Yaml($this->secret->yaml)
);
}
}
16 changes: 1 addition & 15 deletions library/Kubernetes/Web/ServiceDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,20 +102,6 @@ protected function assemble()
)));
}

$this->addHtml(
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->service->yaml)
)
)
);
$this->addHtml(new Yaml($this->service->yaml));
}
}
14 changes: 1 addition & 13 deletions library/Kubernetes/Web/StatefulSetDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,7 @@ protected function assemble()
new HtmlElement('h2', null, new Text($this->translate('Pods'))),
new PodList($this->statefulSet->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->statefulSet->yaml)
)
)
new Yaml($this->statefulSet->yaml)
);
}
}

0 comments on commit 52d91b6

Please sign in to comment.