WIP: update: adaptations to use the new backend #1
@ -40,7 +40,7 @@ function Immersion() {
|
|||||||
setAllInstances(res.data);
|
setAllInstances(res.data);
|
||||||
// Récupérer le status de chaque instance
|
// Récupérer le status de chaque instance
|
||||||
res.data.forEach((inst: 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 => ({
|
setInstancesStatus(prev => ({
|
||||||
...prev,
|
...prev,
|
||||||
[inst.id]: statusRes.data
|
[inst.id]: statusRes.data
|
||||||
@ -55,7 +55,7 @@ function Immersion() {
|
|||||||
const intervalId = setInterval(() => {
|
const intervalId = setInterval(() => {
|
||||||
if (allInstances.length > 0) {
|
if (allInstances.length > 0) {
|
||||||
allInstances.forEach((inst: Instance) => {
|
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 => ({
|
setInstancesStatus(prev => ({
|
||||||
...prev,
|
...prev,
|
||||||
[inst.id]: statusRes.data
|
[inst.id]: statusRes.data
|
||||||
@ -331,9 +331,9 @@ function Immersion() {
|
|||||||
<td className="p-4">{username}</td>
|
<td className="p-4">{username}</td>
|
||||||
<td className="p-4">
|
<td className="p-4">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<span className="font-mono">{inst.pwd}</span>
|
<span className="font-mono">{inst.password}</span>
|
||||||
<button
|
<button
|
||||||
onClick={() => copyText(inst.pwd)}
|
onClick={() => copyText(inst.password)}
|
||||||
className="btn btn-sm btn-ghost"
|
className="btn btn-sm btn-ghost"
|
||||||
>
|
>
|
||||||
<ClipboardIcon className="size-4" />
|
<ClipboardIcon className="size-4" />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user