diff --git a/classes/Pod.ts b/classes/Pod.ts
index 8fa249e..c13e1ff 100644
--- a/classes/Pod.ts
+++ b/classes/Pod.ts
@@ -5,11 +5,12 @@ import type { HasMetadata } from "./repo/ResourceRepo";
export class Pod implements HasMetadata
{
- status?: Status
+
constructor (
public metadata: Metadata,
- public spec: Spec
+ public spec: Spec,
+ public status: Status
) { }
}
@@ -24,6 +25,10 @@ class Spec {
class Status
{
phase?: PodStatus
+
+ constructor(
+ public containerStatuses: ContainerStatus[]
+ ) {}
}
export class Container
@@ -34,6 +39,13 @@ export class Container
) {}
}
+export class ContainerStatus
+{
+ constructor(
+ public restartCount: number
+ ) {}
+}
+
enum PodStatus
{
RUNNING = "Running",
diff --git a/components/NamespaceComponent.vue b/components/NamespaceComponent.vue
index 03bcaca..2ba6c91 100644
--- a/components/NamespaceComponent.vue
+++ b/components/NamespaceComponent.vue
@@ -2,9 +2,6 @@
{{ namespace.metadata.name }}
{{ calcAge(namespace.metadata.creationTimestamp) }}
-
diff --git a/components/PersistentVolumeClaimComponent.vue b/components/PersistentVolumeClaimComponent.vue
index d3e16a8..032d669 100644
--- a/components/PersistentVolumeClaimComponent.vue
+++ b/components/PersistentVolumeClaimComponent.vue
@@ -5,9 +5,6 @@
{{ calcAge(persistentVolumeClaim.metadata.creationTimestamp) }}
{{ persistentVolumeClaim.spec.storageClassName }}
{{ persistentVolumeClaim.spec.accessModes.map(mode => mapAccessMode(mode)).join(", ") }}
-
diff --git a/components/PersistentVolumeComponent.vue b/components/PersistentVolumeComponent.vue
index 38c7b90..8922e11 100644
--- a/components/PersistentVolumeComponent.vue
+++ b/components/PersistentVolumeComponent.vue
@@ -2,9 +2,6 @@
{{ persistentVolume.metadata.name }}
{{ calcAge(persistentVolume.metadata.creationTimestamp) }}
-
diff --git a/components/configmap/ConfigMapComponent.vue b/components/configmap/ConfigMapComponent.vue
index e8e7ac3..49fb8f5 100644
--- a/components/configmap/ConfigMapComponent.vue
+++ b/components/configmap/ConfigMapComponent.vue
@@ -4,9 +4,6 @@
{{ configMap.metadata.namespace }}
{{ calcAge(configMap.metadata.creationTimestamp) }}
{{ Object.keys(configMap.data).length }}-
-
diff --git a/components/deployment/DeploymentComponent.vue b/components/deployment/DeploymentComponent.vue
index 4f5d01f..4479f01 100644
--- a/components/deployment/DeploymentComponent.vue
+++ b/components/deployment/DeploymentComponent.vue
@@ -5,7 +5,6 @@
{{ calcAge(deployment.metadata.creationTimestamp) }}
{{ deployment.spec.replicas }}
diff --git a/components/ingress/IngressComponent.vue b/components/ingress/IngressComponent.vue
index fb5cff0..29c077e 100644
--- a/components/ingress/IngressComponent.vue
+++ b/components/ingress/IngressComponent.vue
@@ -5,9 +5,6 @@
{{ calcAge(ingress.metadata.creationTimestamp) }}
{{ ingress.spec.ingressClassName }}
{{ ingress.spec.rules.length }}
-
diff --git a/components/inspect/resources/ConfigMapList.vue b/components/inspect/resources/ConfigMapList.vue
index c250bee..a2aec56 100644
--- a/components/inspect/resources/ConfigMapList.vue
+++ b/components/inspect/resources/ConfigMapList.vue
@@ -6,7 +6,6 @@
Namespace
Age
Entries
- Actions
@@ -30,6 +29,6 @@ onUnmounted(() => {
\ No newline at end of file
diff --git a/components/inspect/resources/CustomResourceDefinitionList.vue b/components/inspect/resources/CustomResourceDefinitionList.vue
index 9f4273e..5da6f1d 100644
--- a/components/inspect/resources/CustomResourceDefinitionList.vue
+++ b/components/inspect/resources/CustomResourceDefinitionList.vue
@@ -1,5 +1,5 @@
-
+
@@ -27,6 +26,6 @@ onUnmounted(() => {
\ No newline at end of file
diff --git a/components/inspect/resources/PersistentVolumeClaimList.vue b/components/inspect/resources/PersistentVolumeClaimList.vue
index 5cde413..3138f21 100644
--- a/components/inspect/resources/PersistentVolumeClaimList.vue
+++ b/components/inspect/resources/PersistentVolumeClaimList.vue
@@ -7,7 +7,6 @@
Age
Storage Class
Access Modes
-
Actions
@@ -32,6 +31,6 @@ onUnmounted(() => {
\ No newline at end of file
diff --git a/components/inspect/resources/PersistentVolumeList.vue b/components/inspect/resources/PersistentVolumeList.vue
index 30c7336..670420d 100644
--- a/components/inspect/resources/PersistentVolumeList.vue
+++ b/components/inspect/resources/PersistentVolumeList.vue
@@ -4,7 +4,6 @@
@@ -29,6 +28,6 @@ onUnmounted(() => {
\ No newline at end of file
diff --git a/components/inspect/resources/PodList.vue b/components/inspect/resources/PodList.vue
index 13bfa90..98537a3 100644
--- a/components/inspect/resources/PodList.vue
+++ b/components/inspect/resources/PodList.vue
@@ -7,6 +7,7 @@
Age
Node
Containers
+ Restarts
Status
Actions
@@ -32,6 +33,6 @@ onUnmounted(() => {
\ No newline at end of file
diff --git a/components/inspect/resources/SecretList.vue b/components/inspect/resources/SecretList.vue
index 65f8be2..738f97a 100644
--- a/components/inspect/resources/SecretList.vue
+++ b/components/inspect/resources/SecretList.vue
@@ -10,7 +10,6 @@
Age
Type
Entries
- Actions
@@ -37,6 +36,6 @@ const secretAddComponent = ref();
\ No newline at end of file
diff --git a/components/inspect/resources/ServiceList.vue b/components/inspect/resources/ServiceList.vue
index c78e7a7..d49f0cd 100644
--- a/components/inspect/resources/ServiceList.vue
+++ b/components/inspect/resources/ServiceList.vue
@@ -6,7 +6,6 @@
Namespace
Age
Type
- Actions
@@ -28,6 +27,6 @@ onUnmounted(() => {
\ No newline at end of file
diff --git a/components/pod/PodComponent.vue b/components/pod/PodComponent.vue
index cf69e23..9a0db05 100644
--- a/components/pod/PodComponent.vue
+++ b/components/pod/PodComponent.vue
@@ -5,12 +5,12 @@
{{ calcAge(pod.metadata.creationTimestamp) }}
{{ pod.spec.nodeName }}
{{ pod.spec.containers.length }}
+ {{ pod.status.containerStatuses.map(s => s.restartCount).reduce((total, value) => total = total + value) }}
@@ -24,7 +24,7 @@ import type { Pod } from '~/classes/Pod';
import { calcAge } from '~/classes/Pod';
import PodDeletePopup from './view/PodDeletePopup.vue';
-const props = defineProps<{
+defineProps<{
pod: Pod
}>();
diff --git a/components/pod/env/EnvVar.ts b/components/pod/env/EnvVar.ts
index 7570598..9f3db35 100644
--- a/components/pod/env/EnvVar.ts
+++ b/components/pod/env/EnvVar.ts
@@ -10,7 +10,11 @@ export class EnvVar
static get(namespace: string, name: string, containerName: string, onSuccess: (envVars: EnvVar[]) => void, onError: () => void)
{
const url = StringUtils.format('%s/pods/%s/%s/%s/env', ApiConfig.getHttpBase(), namespace, name, containerName);
- axios.get(url)
+ axios.get(url, {
+ headers: {
+ Authorization: "Bearer " + requireToken()
+ }
+ })
.then((response) => {
onSuccess(response.data);
})
diff --git a/components/secrets/SecretComponent.vue b/components/secrets/SecretComponent.vue
index 06ba5b2..1787dbe 100644
--- a/components/secrets/SecretComponent.vue
+++ b/components/secrets/SecretComponent.vue
@@ -5,10 +5,6 @@
{{ calcAge(secret.metadata.creationTimestamp) }}
{{ secret.type }}
{{ Object.keys(secret.data).length }}-
-
showViewPopup = false">
diff --git a/components/service/ServiceComponent.vue b/components/service/ServiceComponent.vue
index 6c68eca..11b6246 100644
--- a/components/service/ServiceComponent.vue
+++ b/components/service/ServiceComponent.vue
@@ -4,9 +4,6 @@
{{ service.metadata.namespace }}
{{ calcAge(service.metadata.creationTimestamp) }}
{{ service.spec.type }}
-