diff --git a/src/locales/en.json b/src/locales/en.json index a48bc8a7..cd849f52 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1000,7 +1000,7 @@ "Fedora": "Fedora", "Fiji": "Fiji", "File": "File", - "File System Free Space": "File System Free Space", + "File System Used Space": "File System Used Space", "File URL": "File URL", "Filename": "Filename", "Files: {names}": "Files: {names}", diff --git a/src/locales/ko-kr.json b/src/locales/ko-kr.json index 620193e0..4a42ddcd 100644 --- a/src/locales/ko-kr.json +++ b/src/locales/ko-kr.json @@ -1000,7 +1000,7 @@ "Fedora": "", "Fiji": "", "File": "파일", - "File System Free Space": "파일 시스템 Free 공간", + "File System Used Space": "파일 시스템 사용 공간", "File URL": "파일 URL", "Filename": "파일 이름", "Files: {names}": "파일: {names}", diff --git a/src/locales/ru.json b/src/locales/ru.json index 72a08943..bb929422 100644 --- a/src/locales/ru.json +++ b/src/locales/ru.json @@ -1000,7 +1000,7 @@ "Fedora": "Fedora", "Fiji": "Fiji", "File": "File", - "File System Free Space": "Свободное место в файловой системе", + "File System Used Space": "Используемое пространство файловой системы", "File URL": "URL файла", "Filename": "Имя файла", "Files: {names}": "Файлы: {names}", diff --git a/src/locales/tr-tr.json b/src/locales/tr-tr.json index 4644d289..40828ede 100644 --- a/src/locales/tr-tr.json +++ b/src/locales/tr-tr.json @@ -1000,7 +1000,7 @@ "Fedora": "Fedora", "Fiji": "Fiji", "File": "Dosya", - "File System Free Space": "Dosya Sistemi Boş Alanı", + "File System Used Space": "Dosya Sistemi Kullanılan Alan", "File URL": "Dosya URL'si", "Filename": "Dosya Adı", "Files: {names}": "Dosyalar: {names}", diff --git a/src/locales/zh-hans.json b/src/locales/zh-hans.json index ed2d1943..e17fd7d5 100644 --- a/src/locales/zh-hans.json +++ b/src/locales/zh-hans.json @@ -1000,7 +1000,7 @@ "Fedora": "", "Fiji": "斐济", "File": "文件", - "File System Free Space": "文件系统可用空间", + "File System Used Space": "文件系统已用空间", "File URL": "文件URL", "Filename": "文件名", "Files: {names}": "文件:{names}", diff --git a/src/pages/monitor/containers/PhysicalNode/index.jsx b/src/pages/monitor/containers/PhysicalNode/index.jsx index 1e41da99..bd1eb890 100644 --- a/src/pages/monitor/containers/PhysicalNode/index.jsx +++ b/src/pages/monitor/containers/PhysicalNode/index.jsx @@ -66,7 +66,7 @@ export const topCardList = [ ), }, { - title: t('File System Free Space'), + title: t('File System Used Space'), span: 9, createFetchParams: { metricKey: 'physicalNode.fileSystemFreeSpace', @@ -78,11 +78,17 @@ export const topCardList = [ const { data: { result } = { result: [] } } = avail; const temp = []; result.forEach((item, index) => { + const availValue = parseFloat(get(item, 'value[1]', 0)); + const total = parseFloat( + get(size, `data.result[${index}].value[1]`, 0) + ); + const used = total - availValue; temp.push({ mountpoint: get(item, `metric.${deviceKey}`) + get(item, `metric.${typeKey}`), - avail: parseFloat(get(item, 'value[1]', 0)), - total: parseFloat(get(size, `data.result[${index}].value[1]`, 0)), + avail: availValue, + total, + used, }); }); return temp; @@ -98,7 +104,7 @@ export const topCardList = [ }} > {(value.data || []).map((item, index) => { - const percentage = computePercentage(item.avail, item.total); + const percentage = computePercentage(item.used, item.total); const percentageColor = percentage > 80 ? globalCSS.warnDarkColor : globalCSS.primaryColor; return ( @@ -109,16 +115,16 @@ export const topCardList = [