Преглед на файлове

status page boilerplate fe

jusrhee преди 2 години
родител
ревизия
024ff010d0
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      dashboard/src/main/status/ClusterStatus.tsx

+ 2 - 1
dashboard/src/main/status/ClusterStatus.tsx

@@ -72,6 +72,7 @@ const groupServicesByNamespace = (services: Service[]): GroupedServices => {
 
 
 const ClusterStatus: React.FC<Props> = ({ projectId, clusterId }) => {
 const ClusterStatus: React.FC<Props> = ({ projectId, clusterId }) => {
   // TODO: make API call to get cluster status
   // TODO: make API call to get cluster status
+  // TODO: add types for the response
   const [statusData, setStatusData] = useState<any | null>(null);
   const [statusData, setStatusData] = useState<any | null>(null);
 
 
   useEffect(() => {
   useEffect(() => {
@@ -134,7 +135,7 @@ const ClusterStatus: React.FC<Props> = ({ projectId, clusterId }) => {
                   </Container>
                   </Container>
                 }
                 }
               >
               >
-                {statusData.services[key].map((service, i) => {
+                {statusData.services[key].map((service: Service) => {
                   return (
                   return (
                     <>
                     <>
                       <Text color="helper">{service.system_service.name}</Text>
                       <Text color="helper">{service.system_service.name}</Text>