Closed Qi-ming-Zhang closed 2 months ago
The second PR, submitted on 0828, primarily implements automatic retrieval of pod information through the KubeSphere API, specifically including:
Main Page
Using useState and useEffect
Use useState to manage the state of podStatuses.
Use useEffect to call the API and fetch data when the component loads.
API Calls
Auto Refresh
Add a button to refresh the data by reloading the page with window.location.reload().
Information Details Page
Interface Updates
Update the Pod interface to include nodeName, podIP, and updateTime.
API Data Handling
Get the node name from pod.spec.nodeName.
Get the pod IP address from pod.status.podIP.
Get the update time from pod.metadata.creationTimestamp.
the effect after deploying the KubeSphere plugin is as follows:
The second PR, submitted on 0828, primarily implements automatic retrieval of pod information through the KubeSphere API, specifically including:
Main Page
Using useState and useEffect
Use useState to manage the state of podStatuses.
Use useEffect to call the API and fetch data when the component loads.
API Calls
Auto Refresh
Add a button to refresh the data by reloading the page with window.location.reload().
Information Details Page
Interface Updates
Update the Pod interface to include nodeName, podIP, and updateTime.
API Data Handling
Get the node name from pod.spec.nodeName.
Get the pod IP address from pod.status.podIP.
Get the update time from pod.metadata.creationTimestamp.
the effect after deploying the KubeSphere plugin is as follows: