Skip to content

Commit

Permalink
improvement of status management
Browse files Browse the repository at this point in the history
  • Loading branch information
J0ris-K committed Jan 6, 2025
1 parent 13d0ac1 commit ee49e4d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -255,20 +255,15 @@ const getNetworkData = (type: keyof XenApiNetwork) => {
}
const getPifStatus = (pif: XenApiPif) => {
const carrier = getPifCarrier(pif)
const currentlyAttached = pif.currently_attached
if (currentlyAttached && carrier) {
return 'connected'
}
if (currentlyAttached && !carrier) {
return 'partially-connected'
}
return 'disconnected'
return currentlyAttached ? 'connected' : 'disconnected'
}
const getPhysicalInterfaceStatus = (pif: XenApiPif) => {
return pif.physical ? 'connected' : 'disconnected-from-physical-device'
const carrier = getPifCarrier(pif)
return carrier ? 'connected' : 'disconnected-from-physical-device'
}
const getSpeedData = (speedRef: string) => {
Expand Down
3 changes: 0 additions & 3 deletions @xen-orchestra/lite/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"close": "Close",
"community": "Community",
"community-name": "{name} community",
"connected": "Connected",
"configuration": "Configuration",
"confirm-cancel": "Are you sure you want to cancel?",
"confirm-delete": "You're about to delete {0}",
Expand Down Expand Up @@ -63,8 +62,6 @@
"description": "Description",
"device": "Device",
"dhcp": "DHCP",
"disconnected": "Disconnected",
"disconnected-from-physical-device": "Disconnected from physical device",
"disabled": "Disabled",
"display": "Display",
"dns": "DNS",
Expand Down
3 changes: 0 additions & 3 deletions @xen-orchestra/lite/src/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"community": "Communauté",
"community-name": "Communauté {name}",
"configuration": "Configuration",
"connected": "Connecté",
"confirm-cancel": "Êtes-vous sûr de vouloir annuler ?",
"confirm-delete": "Vous êtes sur le point de supprimer {0}",
"console-unavailable": "Console indisponible",
Expand All @@ -63,8 +62,6 @@
"description": "Description",
"device": "Appareil",
"dhcp": "DHCP",
"disconnected": "Déconnecté",
"disconnected-from-physical-device": "Déconnecté de l'appareil physique",
"dns": "DNS",
"disabled": "Désactivé",
"display": "Affichage",
Expand Down

0 comments on commit ee49e4d

Please sign in to comment.