WIP: update: adaptations to use the new backend #1

Draft
arthur.wambst wants to merge 21 commits from dev into master
Showing only changes of commit 014a476177 - Show all commits

View File

@ -40,7 +40,7 @@ function Immersion() {
setAllInstances(res.data);
// Récupérer le status de chaque instance
res.data.forEach((inst: Instance) => {
axios.get(`/api/ji/${id}/container`).then((statusRes) => {
axios.get(`/api/ji/${id}/container-admin?instId=${inst.id}`).then((statusRes) => {
setInstancesStatus(prev => ({
...prev,
[inst.id]: statusRes.data
@ -55,7 +55,7 @@ function Immersion() {
const intervalId = setInterval(() => {
if (allInstances.length > 0) {
allInstances.forEach((inst: Instance) => {
axios.get(`/api/ji/${id}/container`).then((statusRes) => {
axios.get(`/api/ji/${id}/container-admin?instId=${inst.id}`).then((statusRes) => {
setInstancesStatus(prev => ({
...prev,
[inst.id]: statusRes.data
@ -331,9 +331,9 @@ function Immersion() {
<td className="p-4">{username}</td>
<td className="p-4">
<div className="flex items-center gap-2">
<span className="font-mono">{inst.pwd}</span>
<span className="font-mono">{inst.password}</span>
<button
onClick={() => copyText(inst.pwd)}
onClick={() => copyText(inst.password)}
className="btn btn-sm btn-ghost"
>
<ClipboardIcon className="size-4" />