diff --git a/src/main/frontend/src/components/Link.js b/src/main/frontend/src/components/Link.js index b39901c..ca63ae1 100644 --- a/src/main/frontend/src/components/Link.js +++ b/src/main/frontend/src/components/Link.js @@ -17,8 +17,33 @@ import React from 'react'; import {Link as OriginalRouterLink} from 'react-router-dom'; import {uid} from '../metadata'; -import {Icon} from './'; -import i from './icons'; +import { + Icon, + EndpointsIcon, + ClusterRoleIcon, + ClusterRoleBindingIcon, + ConfigMapIcon, + CronJobIcon, + CustomResourceDefinitionIcon, + DaemonSetIcon, + DeploymentIcon, + DeploymentConfigIcon, + HorizontalPodAutoscalerIcon, + IngressIcon, + JobIcon, + NamespaceIcon, + NodeIcon, + PersistentVolumeIcon, + PersistentVolumeClaimIcon, + PodIcon, + ReplicaSetIcon, + RoleIcon, + RouteIcon, + SecretIcon, + ServiceIcon, + ServiceAccountIcon, + StatefulSetIcon +} from './'; const variants = { none: '', @@ -95,64 +120,66 @@ Link.ResourceLink = ({ ); Link.ClusterRole = ({...props}) => ( - + ); Link.ClusterRoleBinding = ({...props}) => ( - + ); Link.ConfigMap = ({...props}) => ( - + ); Link.CronJob = ({...props}) => ( - + ); Link.CustomResourceDefinition = ({...props}) => ( - + ); Link.DaemonSet = ({...props}) => ( - + ); Link.DeploymentConfig = ({...props}) => ( - + ); Link.Deployment = ({...props}) => ( - + ); Link.Endpoints = ({...props}) => ( - + ); Link.HorizontalPodAutoscaler = ({...props}) => ( - + ); Link.Ingress = ({...props}) => ( - + ); -Link.Job = ({...props}) => ; +Link.Job = ({...props}) => ; Link.Namespace = ({...props}) => ( - + ); -Link.Node = ({...props}) => ; +Link.Node = ({...props}) => ; Link.PersistentVolume = ({...props}) => ( - + ); Link.PersistentVolumeClaim = ({...props}) => ( - + ); -Link.Pod = ({...props}) => ; +Link.Pod = ({...props}) => ; Link.ReplicationController = ({...props}) => ( - + +); +Link.Role = ({...props}) => ; +Link.Route = ({...props}) => ; +Link.Secret = ({...props}) => ( + ); -Link.Role = ({...props}) => ; -Link.Route = ({...props}) => ; -Link.Secret = ({...props}) => ; Link.Service = ({...props}) => ( - + ); Link.ServiceAccount = ({...props}) => ( - + ); Link.StatefulSet = ({...props}) => ( - + ); Link.EditLink = ({path, resource, ...props}) => ( diff --git a/src/main/frontend/src/components/StatusCard.js b/src/main/frontend/src/components/StatusCard.js index 4691bd1..133639b 100644 --- a/src/main/frontend/src/components/StatusCard.js +++ b/src/main/frontend/src/components/StatusCard.js @@ -16,8 +16,7 @@ */ import React from 'react'; import {useNavigate} from 'react-router-dom'; -import {Tooltip} from './'; -import icons from '../components/icons'; +import {Tooltip, KubernetesIcon} from './'; const Progress = ({ bg = 'bg-orange-400', @@ -50,7 +49,7 @@ const Progress = ({ export const StatusCard = ({ header, - Icon = icons.k8s, + Icon = KubernetesIcon, ready = 0, succeeded = 0, total = 0, diff --git a/src/main/frontend/src/components/icons/ClusterRoleBinding.js b/src/main/frontend/src/components/icons/ClusterRoleBindingIcon.js similarity index 96% rename from src/main/frontend/src/components/icons/ClusterRoleBinding.js rename to src/main/frontend/src/components/icons/ClusterRoleBindingIcon.js index 5a06b81..3776944 100644 --- a/src/main/frontend/src/components/icons/ClusterRoleBinding.js +++ b/src/main/frontend/src/components/icons/ClusterRoleBindingIcon.js @@ -16,7 +16,7 @@ */ import React from 'react'; -const ClusterRoleBinding = ({...props}) => ( +export const ClusterRoleBindingIcon = ({...props}) => ( ( /> ); - -export default ClusterRoleBinding; diff --git a/src/main/frontend/src/components/icons/ClusterRole.js b/src/main/frontend/src/components/icons/ClusterRoleIcon.js similarity index 97% rename from src/main/frontend/src/components/icons/ClusterRole.js rename to src/main/frontend/src/components/icons/ClusterRoleIcon.js index 92873a0..465eded 100644 --- a/src/main/frontend/src/components/icons/ClusterRole.js +++ b/src/main/frontend/src/components/icons/ClusterRoleIcon.js @@ -16,7 +16,7 @@ */ import React from 'react'; -const ClusterRole = ({...props}) => ( +export const ClusterRoleIcon = ({...props}) => ( ( ); - -export default ClusterRole; diff --git a/src/main/frontend/src/components/icons/ConfigMap.js b/src/main/frontend/src/components/icons/ConfigMapIcon.js similarity index 97% rename from src/main/frontend/src/components/icons/ConfigMap.js rename to src/main/frontend/src/components/icons/ConfigMapIcon.js index d56e014..2a530ed 100644 --- a/src/main/frontend/src/components/icons/ConfigMap.js +++ b/src/main/frontend/src/components/icons/ConfigMapIcon.js @@ -16,7 +16,7 @@ */ import React from 'react'; -const ConfigMap = ({...props}) => ( +export const ConfigMapIcon = ({...props}) => ( ( ); - -export default ConfigMap; diff --git a/src/main/frontend/src/components/icons/CronJob.js b/src/main/frontend/src/components/icons/CronJobIcon.js similarity index 97% rename from src/main/frontend/src/components/icons/CronJob.js rename to src/main/frontend/src/components/icons/CronJobIcon.js index 5df41ec..a797967 100644 --- a/src/main/frontend/src/components/icons/CronJob.js +++ b/src/main/frontend/src/components/icons/CronJobIcon.js @@ -16,7 +16,7 @@ */ import React from 'react'; -const CronJob = ({...props}) => ( +export const CronJobIcon = ({...props}) => ( ( ); - -export default CronJob; diff --git a/src/main/frontend/src/components/icons/CustomResourceDefinition.js b/src/main/frontend/src/components/icons/CustomResourceDefinitionIcon.js similarity index 96% rename from src/main/frontend/src/components/icons/CustomResourceDefinition.js rename to src/main/frontend/src/components/icons/CustomResourceDefinitionIcon.js index cf873c1..42c1534 100644 --- a/src/main/frontend/src/components/icons/CustomResourceDefinition.js +++ b/src/main/frontend/src/components/icons/CustomResourceDefinitionIcon.js @@ -16,7 +16,7 @@ */ import React from 'react'; -const CustomResourceDefinition = ({...props}) => ( +export const CustomResourceDefinitionIcon = ({...props}) => ( ( /> ); - -export default CustomResourceDefinition; diff --git a/src/main/frontend/src/components/icons/DaemonSet.js b/src/main/frontend/src/components/icons/DaemonSetIcon.js similarity index 98% rename from src/main/frontend/src/components/icons/DaemonSet.js rename to src/main/frontend/src/components/icons/DaemonSetIcon.js index 569b86b..9856c69 100644 --- a/src/main/frontend/src/components/icons/DaemonSet.js +++ b/src/main/frontend/src/components/icons/DaemonSetIcon.js @@ -16,7 +16,7 @@ */ import React from 'react'; -const DaemonSet = ({...props}) => ( +export const DaemonSetIcon = ({...props}) => ( ( ); - -export default DaemonSet; diff --git a/src/main/frontend/src/components/icons/Deployment.js b/src/main/frontend/src/components/icons/DeploymentIcon.js similarity index 96% rename from src/main/frontend/src/components/icons/Deployment.js rename to src/main/frontend/src/components/icons/DeploymentIcon.js index c9d4255..e036706 100644 --- a/src/main/frontend/src/components/icons/Deployment.js +++ b/src/main/frontend/src/components/icons/DeploymentIcon.js @@ -16,7 +16,7 @@ */ import React from 'react'; -const Deployment = ({kubernetesColor = '#326ce5', ...props}) => ( +export const DeploymentIcon = ({kubernetesColor = '#326ce5', ...props}) => ( ( ); - -export default Deployment; diff --git a/src/main/frontend/src/components/icons/Endpoints.js b/src/main/frontend/src/components/icons/EndpointsIcon.js similarity index 99% rename from src/main/frontend/src/components/icons/Endpoints.js rename to src/main/frontend/src/components/icons/EndpointsIcon.js index f5c1f6d..f87ae41 100644 --- a/src/main/frontend/src/components/icons/Endpoints.js +++ b/src/main/frontend/src/components/icons/EndpointsIcon.js @@ -1,6 +1,6 @@ import * as React from 'react'; -export const Endpoints = props => ( +export const EndpointsIcon = props => ( ( +export const HorizontalPodAutoscalerIcon = ({...props}) => ( ( ); - -export default HorizontalPodAutoscaler; diff --git a/src/main/frontend/src/components/icons/Ingress.js b/src/main/frontend/src/components/icons/IngressIcon.js similarity index 96% rename from src/main/frontend/src/components/icons/Ingress.js rename to src/main/frontend/src/components/icons/IngressIcon.js index a7cf821..358c6d2 100644 --- a/src/main/frontend/src/components/icons/Ingress.js +++ b/src/main/frontend/src/components/icons/IngressIcon.js @@ -16,7 +16,7 @@ */ import React from 'react'; -const Ingress = ({kubernetesColor = '#326ce5', ...props}) => ( +export const IngressIcon = ({kubernetesColor = '#326ce5', ...props}) => ( ( /> ); - -export default Ingress; diff --git a/src/main/frontend/src/components/icons/Job.js b/src/main/frontend/src/components/icons/JobIcon.js similarity index 97% rename from src/main/frontend/src/components/icons/Job.js rename to src/main/frontend/src/components/icons/JobIcon.js index 64c9c94..c27966b 100644 --- a/src/main/frontend/src/components/icons/Job.js +++ b/src/main/frontend/src/components/icons/JobIcon.js @@ -16,7 +16,7 @@ */ import React from 'react'; -const Job = ({...props}) => ( +export const JobIcon = ({...props}) => ( ( ); - -export default Job; diff --git a/src/main/frontend/src/components/icons/Kubernetes.js b/src/main/frontend/src/components/icons/KubernetesIcon.js similarity index 98% rename from src/main/frontend/src/components/icons/Kubernetes.js rename to src/main/frontend/src/components/icons/KubernetesIcon.js index fbef17f..a45522f 100644 --- a/src/main/frontend/src/components/icons/Kubernetes.js +++ b/src/main/frontend/src/components/icons/KubernetesIcon.js @@ -16,7 +16,7 @@ */ import React from 'react'; -const Kubernetes = ({...props}) => ( +export const KubernetesIcon = ({...props}) => ( The Kubernetes logo icon ( /> ); - -export default Kubernetes; diff --git a/src/main/frontend/src/components/icons/Minikube.js b/src/main/frontend/src/components/icons/MinikubeIcon.js similarity index 98% rename from src/main/frontend/src/components/icons/Minikube.js rename to src/main/frontend/src/components/icons/MinikubeIcon.js index 15913fb..780b919 100644 --- a/src/main/frontend/src/components/icons/Minikube.js +++ b/src/main/frontend/src/components/icons/MinikubeIcon.js @@ -16,7 +16,7 @@ */ import React from 'react'; -const Minikube = ({...props}) => ( +export const MinikubeIcon = ({...props}) => ( @@ -47,5 +47,3 @@ const Minikube = ({...props}) => ( ); - -export default Minikube; diff --git a/src/main/frontend/src/components/icons/Namespace.js b/src/main/frontend/src/components/icons/NamespaceIcon.js similarity index 96% rename from src/main/frontend/src/components/icons/Namespace.js rename to src/main/frontend/src/components/icons/NamespaceIcon.js index 4727686..0944af2 100644 --- a/src/main/frontend/src/components/icons/Namespace.js +++ b/src/main/frontend/src/components/icons/NamespaceIcon.js @@ -16,7 +16,7 @@ */ import React from 'react'; -const Namespace = ({kubernetesColor = '#326ce5', ...props}) => ( +export const NamespaceIcon = ({kubernetesColor = '#326ce5', ...props}) => ( ( /> ); - -export default Namespace; diff --git a/src/main/frontend/src/components/icons/Node.js b/src/main/frontend/src/components/icons/NodeIcon.js similarity index 98% rename from src/main/frontend/src/components/icons/Node.js rename to src/main/frontend/src/components/icons/NodeIcon.js index 1c6d95d..ae7f1fc 100644 --- a/src/main/frontend/src/components/icons/Node.js +++ b/src/main/frontend/src/components/icons/NodeIcon.js @@ -16,7 +16,7 @@ */ import React from 'react'; -const Node = ({...props}) => ( +export const NodeIcon = ({...props}) => ( ( /> ); - -export default Node; diff --git a/src/main/frontend/src/components/icons/OpenShift.js b/src/main/frontend/src/components/icons/OpenShiftIcon.js similarity index 97% rename from src/main/frontend/src/components/icons/OpenShift.js rename to src/main/frontend/src/components/icons/OpenShiftIcon.js index e85e28e..100a064 100644 --- a/src/main/frontend/src/components/icons/OpenShift.js +++ b/src/main/frontend/src/components/icons/OpenShiftIcon.js @@ -16,7 +16,7 @@ */ import React from 'react'; -const OpenShift = ({...props}) => ( +export const OpenShiftIcon = ({...props}) => ( ( /> ); - -export default OpenShift; diff --git a/src/main/frontend/src/components/icons/PersistentVolumeClaim.js b/src/main/frontend/src/components/icons/PersistentVolumeClaimIcon.js similarity index 96% rename from src/main/frontend/src/components/icons/PersistentVolumeClaim.js rename to src/main/frontend/src/components/icons/PersistentVolumeClaimIcon.js index dbaba1b..f7b6914 100644 --- a/src/main/frontend/src/components/icons/PersistentVolumeClaim.js +++ b/src/main/frontend/src/components/icons/PersistentVolumeClaimIcon.js @@ -16,7 +16,7 @@ */ import React from 'react'; -const PersistentVolumeClaim = ({...props}) => ( +export const PersistentVolumeClaimIcon = ({...props}) => ( ( /> ); - -export default PersistentVolumeClaim; diff --git a/src/main/frontend/src/components/icons/PersistentVolume.js b/src/main/frontend/src/components/icons/PersistentVolumeIcon.js similarity index 97% rename from src/main/frontend/src/components/icons/PersistentVolume.js rename to src/main/frontend/src/components/icons/PersistentVolumeIcon.js index 0bc82d5..00594dd 100644 --- a/src/main/frontend/src/components/icons/PersistentVolume.js +++ b/src/main/frontend/src/components/icons/PersistentVolumeIcon.js @@ -16,7 +16,7 @@ */ import React from 'react'; -const PersistentVolume = ({...props}) => ( +export const PersistentVolumeIcon = ({...props}) => ( ( ); - -export default PersistentVolume; diff --git a/src/main/frontend/src/components/icons/Pod.js b/src/main/frontend/src/components/icons/PodIcon.js similarity index 97% rename from src/main/frontend/src/components/icons/Pod.js rename to src/main/frontend/src/components/icons/PodIcon.js index 0afcbe2..a5b798b 100644 --- a/src/main/frontend/src/components/icons/Pod.js +++ b/src/main/frontend/src/components/icons/PodIcon.js @@ -16,7 +16,7 @@ */ import React from 'react'; -const Pod = ({...props}) => ( +export const PodIcon = ({...props}) => ( ( ); - -export default Pod; diff --git a/src/main/frontend/src/components/icons/ReplicaSet.js b/src/main/frontend/src/components/icons/ReplicaSetIcon.js similarity index 97% rename from src/main/frontend/src/components/icons/ReplicaSet.js rename to src/main/frontend/src/components/icons/ReplicaSetIcon.js index 576489b..d02e4f0 100644 --- a/src/main/frontend/src/components/icons/ReplicaSet.js +++ b/src/main/frontend/src/components/icons/ReplicaSetIcon.js @@ -16,7 +16,7 @@ */ import React from 'react'; -const ReplicaSet = ({...props}) => ( +export const ReplicaSetIcon = ({...props}) => ( ( ); - -export default ReplicaSet; diff --git a/src/main/frontend/src/components/icons/Role.js b/src/main/frontend/src/components/icons/RoleIcon.js similarity index 98% rename from src/main/frontend/src/components/icons/Role.js rename to src/main/frontend/src/components/icons/RoleIcon.js index e7b2020..da1d6c2 100644 --- a/src/main/frontend/src/components/icons/Role.js +++ b/src/main/frontend/src/components/icons/RoleIcon.js @@ -16,7 +16,7 @@ */ import React from 'react'; -const Role = ({...props}) => ( +export const RoleIcon = ({...props}) => ( ( ); - -export default Role; diff --git a/src/main/frontend/src/components/icons/Secret.js b/src/main/frontend/src/components/icons/SecretIcon.js similarity index 98% rename from src/main/frontend/src/components/icons/Secret.js rename to src/main/frontend/src/components/icons/SecretIcon.js index e59bf1e..90f0906 100644 --- a/src/main/frontend/src/components/icons/Secret.js +++ b/src/main/frontend/src/components/icons/SecretIcon.js @@ -16,7 +16,7 @@ */ import React from 'react'; -const Secret = ({...props}) => ( +export const SecretIcon = ({...props}) => ( ( ); - -export default Secret; diff --git a/src/main/frontend/src/components/icons/ServiceAccount.js b/src/main/frontend/src/components/icons/ServiceAccountIcon.js similarity index 98% rename from src/main/frontend/src/components/icons/ServiceAccount.js rename to src/main/frontend/src/components/icons/ServiceAccountIcon.js index 4fb9b74..becc048 100644 --- a/src/main/frontend/src/components/icons/ServiceAccount.js +++ b/src/main/frontend/src/components/icons/ServiceAccountIcon.js @@ -16,7 +16,7 @@ */ import React from 'react'; -export const ServiceAccount = ({...props}) => ( +export const ServiceAccountIcon = ({...props}) => ( ( +export const ServiceIcon = ({...props}) => ( ( ); - -export default Service; diff --git a/src/main/frontend/src/components/icons/StatefulSet.js b/src/main/frontend/src/components/icons/StatefulSetIcon.js similarity index 98% rename from src/main/frontend/src/components/icons/StatefulSet.js rename to src/main/frontend/src/components/icons/StatefulSetIcon.js index 41c0fca..4fb71b5 100644 --- a/src/main/frontend/src/components/icons/StatefulSet.js +++ b/src/main/frontend/src/components/icons/StatefulSetIcon.js @@ -16,7 +16,7 @@ */ import React from 'react'; -const StatefulSet = ({...props}) => ( +export const StatefulSetIcon = ({...props}) => ( ( ); - -export default StatefulSet; diff --git a/src/main/frontend/src/components/icons/index.js b/src/main/frontend/src/components/icons/index.js index b3baecb..1e87722 100644 --- a/src/main/frontend/src/components/icons/index.js +++ b/src/main/frontend/src/components/icons/index.js @@ -15,64 +15,38 @@ * */ import React from 'react'; -import ClusterRole from './ClusterRole'; -import ClusterRoleBinding from './ClusterRoleBinding'; -import ConfigMap from './ConfigMap'; -import CronJob from './CronJob'; -import CustomResourceDefinition from './CustomResourceDefinition'; -import DaemonSet from './DaemonSet'; -import Deployment from './Deployment'; -import {Endpoints} from './Endpoints'; -import HorizontalPodAutoscaler from './HorizontalPodAutoscaler'; -import Ingress from './Ingress'; -import Job from './Job'; -import Kubernetes from './Kubernetes'; -import Minikube from './Minikube'; -import Namespace from './Namespace'; -import Node from './Node'; -import OpenShift from './OpenShift'; -import PersistentVolume from './PersistentVolume'; -import PersistentVolumeClaim from './PersistentVolumeClaim'; -import Pod from './Pod'; -import ReplicaSet from './ReplicaSet'; -import Role from './Role'; -import Secret from './Secret'; -import Service from './Service'; -import {ServiceAccount} from './ServiceAccount'; -import StatefulSet from './StatefulSet'; -import {YAKDLogo} from './YAKDLogo'; +import {DeploymentIcon} from './DeploymentIcon'; +import {IngressIcon} from './IngressIcon'; +export {ClusterRoleIcon} from './ClusterRoleIcon'; +export {ClusterRoleBindingIcon} from './ClusterRoleBindingIcon'; +export {ConfigMapIcon} from './ConfigMapIcon'; +export {CronJobIcon} from './CronJobIcon'; +export {CustomResourceDefinitionIcon} from './CustomResourceDefinitionIcon'; +export {DaemonSetIcon} from './DaemonSetIcon'; +export {DeploymentIcon} from './DeploymentIcon'; +export {EndpointsIcon} from './EndpointsIcon'; +export {HorizontalPodAutoscalerIcon} from './HorizontalPodAutoscalerIcon'; +export {IngressIcon} from './IngressIcon'; +export {JobIcon} from './JobIcon'; +export {KubernetesIcon} from './KubernetesIcon'; +export {MinikubeIcon} from './MinikubeIcon'; +export {NamespaceIcon} from './NamespaceIcon'; +export {NodeIcon} from './NodeIcon'; +export {OpenShiftIcon} from './OpenShiftIcon'; +export {PersistentVolumeIcon} from './PersistentVolumeIcon'; +export {PersistentVolumeClaimIcon} from './PersistentVolumeClaimIcon'; +export {PodIcon} from './PodIcon'; +export {ReplicaSetIcon} from './ReplicaSetIcon'; +export {RoleIcon} from './RoleIcon'; +export {SecretIcon} from './SecretIcon'; +export {ServiceIcon} from './ServiceIcon'; +export {ServiceAccountIcon} from './ServiceAccountIcon'; +export {StatefulSetIcon} from './StatefulSetIcon'; +export {YAKDLogo} from './YAKDLogo'; -const icons = {}; - -icons.ClusterRole = ClusterRole; -icons.ClusterRoleBinding = ClusterRoleBinding; -icons.ConfigMap = ConfigMap; -icons.CronJob = CronJob; -icons.CustomResourceDefinition = CustomResourceDefinition; -icons.DaemonSet = DaemonSet; -icons.DeploymentConfig = ({...props}) => ( - +export const DeploymentConfigIcon = ({...props}) => ( + +); +export const RouteIcon = ({...props}) => ( + ); -icons.Deployment = Deployment; -icons.Endpoints = Endpoints; -icons.HorizontalPodAutoscaler = HorizontalPodAutoscaler; -icons.Ingress = Ingress; -icons.Job = Job; -icons.Kubernetes = Kubernetes; -icons.Minikube = Minikube; -icons.Namespace = Namespace; -icons.Node = Node; -icons.OpenShift = OpenShift; -icons.PersistentVolume = PersistentVolume; -icons.PersistentVolumeClaim = PersistentVolumeClaim; -icons.Pod = Pod; -icons.ReplicaSet = ReplicaSet; -icons.Role = Role; -icons.Route = ({...props}) => ; -icons.Secret = Secret; -icons.Service = Service; -icons.ServiceAccount = ServiceAccount; -icons.StatefulSet = StatefulSet; -icons.YAKDLogo = YAKDLogo; - -export default icons; diff --git a/src/main/frontend/src/components/index.js b/src/main/frontend/src/components/index.js index ac19eaf..79a72cd 100644 --- a/src/main/frontend/src/components/index.js +++ b/src/main/frontend/src/components/index.js @@ -16,6 +16,7 @@ */ export * from './popup'; +export * from './icons'; export {Age} from './Age'; export {Alert} from './Alert'; export {Card} from './Card'; diff --git a/src/main/frontend/src/dashboard/DashboardPage.js b/src/main/frontend/src/dashboard/DashboardPage.js index f17b887..c135d34 100644 --- a/src/main/frontend/src/dashboard/DashboardPage.js +++ b/src/main/frontend/src/dashboard/DashboardPage.js @@ -18,10 +18,17 @@ import React, {useState} from 'react'; import {shallowEqual, useDispatch, useSelector} from 'react-redux'; import {clearError} from '../redux'; import * as apis from '../apis'; -import i from '../components/icons'; import {name as metadataName} from '../metadata'; import {selectors as nodeSelectors} from '../nodes'; -import {Alert, Icon, Link, Tooltip} from '../components'; +import { + Alert, + Icon, + Link, + Tooltip, + MinikubeIcon, + OpenShiftIcon, + YAKDLogo +} from '../components'; import {NewResource} from './NewResource'; import {NewResourceButton} from './NewResourceButton'; import {SideBar} from './SideBar'; @@ -63,17 +70,17 @@ const Header = ({setSideBarOpen, title}) => { strokeLinejoin='round' /> - +
{isMinikube && ( - + )} {isOpenShift && ( - + )} {title} diff --git a/src/main/frontend/src/dashboard/SideBar.js b/src/main/frontend/src/dashboard/SideBar.js index 03b360e..afc535f 100644 --- a/src/main/frontend/src/dashboard/SideBar.js +++ b/src/main/frontend/src/dashboard/SideBar.js @@ -18,10 +18,38 @@ import React, {useRef, useLayoutEffect} from 'react'; import {connect} from 'react-redux'; import {useMatch} from 'react-router-dom'; import * as apis from '../apis'; -import i from '../components/icons'; import {useUiSidebar} from '../redux'; import * as crd from '../customresourcedefinitions'; -import {Icon, Link} from '../components'; +import { + Icon, + Link, + EndpointsIcon, + ClusterRoleBindingIcon, + ClusterRoleIcon, + ConfigMapIcon, + CronJobIcon, + CustomResourceDefinitionIcon, + DaemonSetIcon, + DeploymentConfigIcon, + DeploymentIcon, + HorizontalPodAutoscalerIcon, + IngressIcon, + JobIcon, + KubernetesIcon, + NamespaceIcon, + NodeIcon, + PersistentVolumeClaimIcon, + PersistentVolumeIcon, + PodIcon, + ReplicaSetIcon, + RoleIcon, + RouteIcon, + SecretIcon, + ServiceAccountIcon, + ServiceIcon, + StatefulSetIcon, + YAKDLogo +} from '../components'; import './SideBar.css'; @@ -117,13 +145,13 @@ const NavSection = ({ Search - + Home - + Nodes - + Namespaces
@@ -133,35 +161,35 @@ const NavSection = ({ label='Workloads' icon='fa-cubes' > - + Pods - + Deployments {isOpenShift && ( - + Deployment Configs )} - + StatefulSets - + CronJobs - + Jobs - + DaemonSets - + Replication Controllers Horizontal Pod Autoscalers @@ -172,17 +200,17 @@ const NavSection = ({ label='Network' icon='fa-network-wired' > - + Services - + Endpoints - + Ingresses {isOpenShift && ( - + Routes )} @@ -193,10 +221,10 @@ const NavSection = ({ label='Configuration' icon='fa-list' > - + ConfigMaps - + Secrets @@ -206,12 +234,12 @@ const NavSection = ({ label='Storage' icon='fa-database' > - + PersistentVolumes PersistentVolume Claims @@ -222,19 +250,19 @@ const NavSection = ({ label='Access Control' icon='fa-shield-alt' > - + ServiceAccounts - + ClusterRoles - + ClusterRoleBindings - + Roles - + Secrets @@ -246,7 +274,7 @@ const NavSection = ({ > Definitions @@ -300,7 +328,7 @@ export const SideBar = connect(mapStateToProps)(({ variant={Link.variants.none} className='flex flex-col items-center' > - +
Kubernetes Dashboard
diff --git a/src/main/frontend/src/deployments/DeploymentsCard.js b/src/main/frontend/src/deployments/DeploymentsCard.js index 4b8c65b..0080360 100644 --- a/src/main/frontend/src/deployments/DeploymentsCard.js +++ b/src/main/frontend/src/deployments/DeploymentsCard.js @@ -16,8 +16,7 @@ */ import React from 'react'; import {connect} from 'react-redux'; -import {StatusCard} from '../components'; -import icons from '../components/icons'; +import {StatusCard, DeploymentIcon} from '../components'; import {selectors} from './'; const mapStateToProps = ({deployments}) => ({ @@ -35,7 +34,7 @@ export const DeploymentsCard = connect(mapStateToProps)(({ { @@ -28,7 +27,7 @@ export const NodesCard = ({...properties}) => { } + actions={isMinikube && } body={
diff --git a/src/main/frontend/src/pods/PodsCard.js b/src/main/frontend/src/pods/PodsCard.js index bce3bb9..c17409b 100644 --- a/src/main/frontend/src/pods/PodsCard.js +++ b/src/main/frontend/src/pods/PodsCard.js @@ -16,8 +16,7 @@ */ import React from 'react'; import {connect} from 'react-redux'; -import {StatusCard} from '../components'; -import icons from '../components/icons'; +import {StatusCard, PodIcon} from '../components'; import {selectors} from './'; const mapStateToProps = ({pods}) => ({ @@ -33,7 +32,7 @@ export const PodsCard = connect(mapStateToProps)(({pods, ...properties}) => {