+ {getResourcesError ? (
+
+ ) : (
+
+
+
+
+
+
+ {Language.resourceLabel}
+
+
+
+
+
+ {Language.agentLabel}
+
+
+
+ {canUpdateWorkspace && }
+
+
+
+ {displayResources.map((resource) => {
{
- /* If there is no agent, just display the resource name */
+ /* We need to initialize the agents to display the resource */
}
- if (!agent) {
- return (
-
- {resourceName}
-
-
+ const agents = resource.agents ?? [null]
+ const resourceName =
+
+ return agents.map((agent, agentIndex) => {
+ {
+ /* If there is no agent, just display the resource name */
+ }
+ if (!agent) {
+ return (
+
+ {resourceName}
+
+
+ )
+ }
+
+ const { displayVersion, outdated } = getDisplayVersionStatus(
+ agent.version,
+ serverVersion,
)
- }
+ const agentStatus = getDisplayAgentStatus(theme, agent)
+ return (
+
+ {/* We only want to display the name in the first row because we are using rowSpan */}
+ {/* The rowspan should be the same than the number of agents */}
+ {agentIndex === 0 && (
+
+ {resourceName}
+
+ )}
- const { displayVersion, outdated } = getDisplayVersionStatus(
- agent.version,
- serverVersion,
- )
- const agentStatus = getDisplayAgentStatus(theme, agent)
- return (
-
- {/* We only want to display the name in the first row because we are using rowSpan */}
- {/* The rowspan should be the same than the number of agents */}
- {agentIndex === 0 && (
-
- {resourceName}
+
+ {agent.name}
+
+
+ {Language.statusLabel}
+
+ {agentStatus.status}
+
+
+
+ {Language.osLabel}
+
+ {agent.operating_system}
+
+
+
+
{Language.versionLabel}
+
{displayVersion}
+
+
+
+
+
+
- )}
-
-
- {agent.name}
-
-
- {Language.statusLabel}
-
- {agentStatus.status}
-
-
-
- {Language.osLabel}
- {agent.operating_system}
-
-
-
{Language.versionLabel}
-
{displayVersion}
-
-
-
-
-
-
-
-
-
- {canUpdateWorkspace && agent.status === "connected" && (
- <>
-
-
- {agent.apps.map((app) => (
-
+
+ {canUpdateWorkspace && agent.status === "connected" && (
+ <>
+
+
- ))}
- >
- )}
- {canUpdateWorkspace && agent.status === "connecting" && (
- <>
-
-
- >
- )}
-
-
-
- )
- })
- })}
-
-
-
+ {agent.apps.map((app) => (
+
+ ))}
+ >
+ )}
+ {canUpdateWorkspace && agent.status === "connecting" && (
+ <>
+
+
+ >
+ )}
+
+
+
+ )
+ })
+ })}
+