+ This option configures the warning threshold of free disk space. When free
+ space drops below this limit, a warning is shown for the corresponding agent
+ in the computer overview page, but the agent is not taken offline.
+
diff --git a/core/src/main/resources/hudson/node_monitors/DiskSpaceMonitor/column.jelly b/core/src/main/resources/hudson/node_monitors/DiskSpaceMonitor/column.jelly
index 81a19eb0a9..3d3ca8b23c 100644
--- a/core/src/main/resources/hudson/node_monitors/DiskSpaceMonitor/column.jelly
+++ b/core/src/main/resources/hudson/node_monitors/DiskSpaceMonitor/column.jelly
@@ -29,7 +29,19 @@ THE SOFTWARE.
This monitors the available disk space of
$JENKINS_HOME
- on each agent, and if it gets below a threshold, the agent will be marked
- offline.
+ on the controller or the remote root directory on each agent, and if it gets
+ below a threshold, the agent will be marked temporarily offline.
This directory is where all your builds are performed, so if it fills up,
diff --git a/core/src/main/resources/hudson/node_monitors/DiskSpaceMonitorNodeProperty/config.jelly b/core/src/main/resources/hudson/node_monitors/DiskSpaceMonitorNodeProperty/config.jelly
new file mode 100644
index 0000000000..8c1afdef6b
--- /dev/null
+++ b/core/src/main/resources/hudson/node_monitors/DiskSpaceMonitorNodeProperty/config.jelly
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/core/src/main/resources/hudson/node_monitors/DiskSpaceMonitorNodeProperty/config_de.properties b/core/src/main/resources/hudson/node_monitors/DiskSpaceMonitorNodeProperty/config_de.properties
new file mode 100644
index 0000000000..507903f0e7
--- /dev/null
+++ b/core/src/main/resources/hudson/node_monitors/DiskSpaceMonitorNodeProperty/config_de.properties
@@ -0,0 +1,2 @@
+Free\ Disk\ Space\ Threshold=Schwellwert für freien Festplattenspeicherplatz
+Free\ Temp\ Space\ Threshold=Schwellwert für freien temporären Speicherplatz
diff --git a/core/src/main/resources/hudson/node_monitors/DiskSpaceMonitorNodeProperty/help-freeDiskSpaceThreshold.html b/core/src/main/resources/hudson/node_monitors/DiskSpaceMonitorNodeProperty/help-freeDiskSpaceThreshold.html
new file mode 100644
index 0000000000..4e81303bcb
--- /dev/null
+++ b/core/src/main/resources/hudson/node_monitors/DiskSpaceMonitorNodeProperty/help-freeDiskSpaceThreshold.html
@@ -0,0 +1,8 @@
+
+ This option configures the amount of minimum amount of free disk space desired
+ for the agent's proper operation, such as "1.5GB", "100KiB", etc. If the agent
+ is found to have less free disk space than this amount, it will be marked
+ temporarily offline.
+
Set to 0 to disable this check on this agent.
+
Set to empty to use the globally defined value.
+
diff --git a/core/src/main/resources/hudson/node_monitors/DiskSpaceMonitorNodeProperty/help-freeDiskSpaceWarningThreshold.html b/core/src/main/resources/hudson/node_monitors/DiskSpaceMonitorNodeProperty/help-freeDiskSpaceWarningThreshold.html
new file mode 100644
index 0000000000..625b5525de
--- /dev/null
+++ b/core/src/main/resources/hudson/node_monitors/DiskSpaceMonitorNodeProperty/help-freeDiskSpaceWarningThreshold.html
@@ -0,0 +1,8 @@
+
+ This option configures the amount of minimum amount of free disk space desired
+ for the agent's proper operation, such as "1.5GB", "100KiB", etc. If the agent
+ is found to have less free disk space than this amount, a warning will be
+ shown for it on the computer overview page, but it will not be taken offline.
+
Set to 0 to disable this warning on this agent.
+
Set to empty to use the globally defined value.
+
diff --git a/core/src/main/resources/hudson/node_monitors/DiskSpaceMonitorNodeProperty/help-freeTempSpaceThreshold.html b/core/src/main/resources/hudson/node_monitors/DiskSpaceMonitorNodeProperty/help-freeTempSpaceThreshold.html
new file mode 100644
index 0000000000..56d8a35feb
--- /dev/null
+++ b/core/src/main/resources/hudson/node_monitors/DiskSpaceMonitorNodeProperty/help-freeTempSpaceThreshold.html
@@ -0,0 +1,8 @@
+
+ This option configures the amount of minimum amount of free temp space desired
+ for the agent's proper operation, such as "1.5GB", "100KiB", etc. If the agent
+ is found to have less free temp space than this amount, it will be marked
+ temporarily offline.
+
Set to 0 to disable this check on this agent.
+
Set to empty to use the globally defined value.
+
diff --git a/core/src/main/resources/hudson/node_monitors/DiskSpaceMonitorNodeProperty/help-freeTempSpaceWarningThreshold.html b/core/src/main/resources/hudson/node_monitors/DiskSpaceMonitorNodeProperty/help-freeTempSpaceWarningThreshold.html
new file mode 100644
index 0000000000..102843f441
--- /dev/null
+++ b/core/src/main/resources/hudson/node_monitors/DiskSpaceMonitorNodeProperty/help-freeTempSpaceWarningThreshold.html
@@ -0,0 +1,8 @@
+
+ This option configures the amount of minimum amount of free temp space desired
+ for the agent's proper operation, such as "1.5GB", "100KiB", etc. If the agent
+ is found to have less free temp space than this amount, a warning will be
+ shown for it on the computer overview page, but it will not be taken offline.
+
Set to 0 to disable this warning on this agent.
+
Set to empty to use the globally defined value.
+
diff --git a/core/src/main/resources/hudson/node_monitors/Messages.properties b/core/src/main/resources/hudson/node_monitors/Messages.properties
index 749b326d2a..75c656aa4f 100644
--- a/core/src/main/resources/hudson/node_monitors/Messages.properties
+++ b/core/src/main/resources/hudson/node_monitors/Messages.properties
@@ -31,6 +31,7 @@ ResponseTimeMonitor.TimeOut=Timed out for last {0} attempts
SwapSpaceMonitor.DisplayName=Free Swap Space
TemporarySpaceMonitor.DisplayName=Free Temp Space
AbstractNodeMonitorDescriptor.NoDataYet=Not yet
-DiskSpaceMonitorDescriptor.DiskSpace.FreeSpaceTooLow=Disk space is too low. Only {0}GB left on {1}.
-DiskSpaceMonitorDescriptor.DiskSpace.FreeSpace={0}GB left on {1}.
+DiskSpaceMonitorDescriptor.DiskSpace.FreeSpaceTooLow=Disk space is below threshold of {2}. Only {0} out of {3} left on {1}.
+DiskSpaceMonitorDescriptor.DiskSpace.FreeSpace={0} out of {2} left on {1}.
MonitorMarkedNodeOffline.DisplayName=Node Marked Offline Due to Health Check
+DiskSpaceMonitorNodeProperty.DisplayName=Disk Space Monitoring Thresholds
diff --git a/core/src/main/resources/hudson/node_monitors/Messages_bg.properties b/core/src/main/resources/hudson/node_monitors/Messages_bg.properties
index f7910a8de2..e6c3127b19 100644
--- a/core/src/main/resources/hudson/node_monitors/Messages_bg.properties
+++ b/core/src/main/resources/hudson/node_monitors/Messages_bg.properties
@@ -43,7 +43,7 @@ TemporarySpaceMonitor.DisplayName=\
AbstractNodeMonitorDescriptor.NoDataYet=\
Няма данни
DiskSpaceMonitorDescriptor.DiskSpace.FreeSpaceTooLow=\
- Дисковото пространство привършва. На {1} остават само {0} GB.
+ Дисковото пространство привършва. На {1} остават само {0} .
MonitorMarkedNodeOffline.DisplayName=\
Компютърът е отбелязан като извън линия в резултат на проверката на\
състоянието му.
diff --git a/core/src/main/resources/hudson/node_monitors/Messages_cs.properties b/core/src/main/resources/hudson/node_monitors/Messages_cs.properties
index 2010f4261c..68d3793c55 100644
--- a/core/src/main/resources/hudson/node_monitors/Messages_cs.properties
+++ b/core/src/main/resources/hudson/node_monitors/Messages_cs.properties
@@ -20,4 +20,4 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-DiskSpaceMonitorDescriptor.DiskSpace.FreeSpaceTooLow=Málo místa na disku. Zbývá pouze {0}GB.
+DiskSpaceMonitorDescriptor.DiskSpace.FreeSpaceTooLow=Málo místa na disku. Zbývá pouze {0}.
diff --git a/core/src/main/resources/hudson/node_monitors/Messages_da.properties b/core/src/main/resources/hudson/node_monitors/Messages_da.properties
index 6a9940dfab..edb1eff194 100644
--- a/core/src/main/resources/hudson/node_monitors/Messages_da.properties
+++ b/core/src/main/resources/hudson/node_monitors/Messages_da.properties
@@ -29,4 +29,4 @@ SwapSpaceMonitor.DisplayName=Ledig Swap Plads
ArchitectureMonitor.DisplayName=Arkitektur
ResponseTimeMonitor.MarkedOffline=Tager {0} offline midlertidigt da den ikke svarer
ResponseTimeMonitor.DisplayName=Respons Tid
-DiskSpaceMonitorDescriptor.DiskSpace.FreeSpaceTooLow=Disk plads for lav. Kun {0}GB tilbage.
+DiskSpaceMonitorDescriptor.DiskSpace.FreeSpaceTooLow=Disk plads for lav. Kun {0} tilbage.
diff --git a/core/src/main/resources/hudson/node_monitors/Messages_de.properties b/core/src/main/resources/hudson/node_monitors/Messages_de.properties
index cefa1860de..1d9b196fbb 100644
--- a/core/src/main/resources/hudson/node_monitors/Messages_de.properties
+++ b/core/src/main/resources/hudson/node_monitors/Messages_de.properties
@@ -28,8 +28,10 @@ ResponseTimeMonitor.DisplayName=Antwortzeit
ResponseTimeMonitor.TimeOut= {0} mal keine Antwort
SwapSpaceMonitor.DisplayName=Freier Swap Space
TemporarySpaceMonitor.DisplayName=Freier TEMP-Platz
-DiskSpaceMonitorDescriptor.DiskSpace.FreeSpaceTooLow=Zu wenig Festplattenplatz: Nur noch {0}GB frei.
+DiskSpaceMonitorDescriptor.DiskSpace.FreeSpaceTooLow=Festplattenplatz unterhalb der Schwelle von {2}. Nur noch {0} von {3} frei in {1}.
+DiskSpaceMonitorDescriptor.DiskSpace.FreeSpace={0} von {2} verbleibend in {1}.
DiskSpaceMonitor.MarkedOnline=Nehme {0} wieder online, da wieder genug Festplattenplatz verfügbar ist.
MonitorMarkedNodeOffline.DisplayName=Knoten durch Health-Check-Prüfung offline
ResponseTimeMonitor.MarkedOffline=Nehme {0} offline, da er nicht antwortet.
AbstractNodeMonitorDescriptor.NoDataYet=Noch keine Daten
+DiskSpaceMonitorNodeProperty.DisplayName=Schwellwerte für die Festplattenspeicherplatzüberwachung
diff --git a/core/src/main/resources/hudson/node_monitors/Messages_es.properties b/core/src/main/resources/hudson/node_monitors/Messages_es.properties
index 6ee2f1b6dd..a99d4a6f6b 100644
--- a/core/src/main/resources/hudson/node_monitors/Messages_es.properties
+++ b/core/src/main/resources/hudson/node_monitors/Messages_es.properties
@@ -29,4 +29,4 @@ ResponseTimeMonitor.MarkedOffline=Poniendo temporalmente {0} fuera de línea por
ResponseTimeMonitor.TimeOut=Se sobrepasó el tiempo de espera en el último intento de {0}
SwapSpaceMonitor.DisplayName=Espacio de intercambio libre
TemporarySpaceMonitor.DisplayName=Espacio temporal libre
-DiskSpaceMonitorDescriptor.DiskSpace.FreeSpaceTooLow=El espacio en disco es muy bajo, sólo quedan {0}GB.
+DiskSpaceMonitorDescriptor.DiskSpace.FreeSpaceTooLow=El espacio en disco es muy bajo, sólo quedan {0}.
diff --git a/core/src/main/resources/hudson/node_monitors/Messages_fr.properties b/core/src/main/resources/hudson/node_monitors/Messages_fr.properties
index d8c2f6b458..df06f7fa0b 100644
--- a/core/src/main/resources/hudson/node_monitors/Messages_fr.properties
+++ b/core/src/main/resources/hudson/node_monitors/Messages_fr.properties
@@ -28,4 +28,4 @@ ResponseTimeMonitor.DisplayName=Temps de réponse
ResponseTimeMonitor.MarkedOffline={0} est marqué comme déconnecté temporairement, parce qu''il ne répond pas
ResponseTimeMonitor.TimeOut=Time out du dernier essai {0}
SwapSpaceMonitor.DisplayName=Espace de swap disponible
-DiskSpaceMonitorDescriptor.DiskSpace.FreeSpaceTooLow=Espace disque insuffisant. Seulement {0} GB restant sur {1}
+DiskSpaceMonitorDescriptor.DiskSpace.FreeSpaceTooLow=Espace disque insuffisant. Seulement {0} restant sur {1}
diff --git a/core/src/main/resources/hudson/node_monitors/Messages_it.properties b/core/src/main/resources/hudson/node_monitors/Messages_it.properties
index 9a247da8b2..be608c38ab 100644
--- a/core/src/main/resources/hudson/node_monitors/Messages_it.properties
+++ b/core/src/main/resources/hudson/node_monitors/Messages_it.properties
@@ -24,9 +24,9 @@
AbstractNodeMonitorDescriptor.NoDataYet=Non ancora
ArchitectureMonitor.DisplayName=Architettura
ClockMonitor.DisplayName=Differenza di orario
-DiskSpaceMonitorDescriptor.DiskSpace.FreeSpace={0} GB rimanenti su {1}.
+DiskSpaceMonitorDescriptor.DiskSpace.FreeSpace={0} rimanenti su {1}.
DiskSpaceMonitorDescriptor.DiskSpace.FreeSpaceTooLow=Lo spazio su disco \
- disponibile è troppo basso. Su {1} rimangono solo {0} GB.
+ disponibile è troppo basso. Su {1} rimangono solo {0}.
DiskSpaceMonitor.DisplayName=Spazio su disco libero
DiskSpaceMonitor.MarkedOffline=Metto temporaneamente {0} non in linea per \
mancanza di spazio su disco
diff --git a/core/src/main/resources/hudson/node_monitors/Messages_ja.properties b/core/src/main/resources/hudson/node_monitors/Messages_ja.properties
index 51d0e5287f..0c7f9114ed 100644
--- a/core/src/main/resources/hudson/node_monitors/Messages_ja.properties
+++ b/core/src/main/resources/hudson/node_monitors/Messages_ja.properties
@@ -31,4 +31,4 @@ ResponseTimeMonitor.TimeOut=タイムアウト(直近 {0}回)
SwapSpaceMonitor.DisplayName=空きスワップ容量
TemporarySpaceMonitor.DisplayName=空きテンポラリ容量
AbstractNodeMonitorDescriptor.NoDataYet=データ未取得
-DiskSpaceMonitorDescriptor.DiskSpace.FreeSpaceTooLow=ディスク容量が少なすぎます。残り{0}GBです。
+DiskSpaceMonitorDescriptor.DiskSpace.FreeSpaceTooLow=ディスク容量が少なすぎます。残り{0}です。
diff --git a/core/src/main/resources/hudson/node_monitors/Messages_nl.properties b/core/src/main/resources/hudson/node_monitors/Messages_nl.properties
index 4a0fecb3a3..bdffd29a2a 100644
--- a/core/src/main/resources/hudson/node_monitors/Messages_nl.properties
+++ b/core/src/main/resources/hudson/node_monitors/Messages_nl.properties
@@ -23,4 +23,4 @@
ArchitectureMonitor.DisplayName=Architectuur
ClockMonitor.DisplayName=Tijdsverschil
DiskSpaceMonitor.DisplayName=Beschikbare schijfruimte
-DiskSpaceMonitorDescriptor.DiskSpace.FreeSpaceTooLow=Er is te weinig vrije schijfruimte, nog maar {0} GB over.
+DiskSpaceMonitorDescriptor.DiskSpace.FreeSpaceTooLow=Er is te weinig vrije schijfruimte, nog maar {0} over.
diff --git a/core/src/main/resources/hudson/node_monitors/Messages_pt_BR.properties b/core/src/main/resources/hudson/node_monitors/Messages_pt_BR.properties
index 1d0ce852ed..bc6f788641 100644
--- a/core/src/main/resources/hudson/node_monitors/Messages_pt_BR.properties
+++ b/core/src/main/resources/hudson/node_monitors/Messages_pt_BR.properties
@@ -31,6 +31,6 @@ SwapSpaceMonitor.DisplayName=Espaço de troca livre
ResponseTimeMonitor.MarkedOffline= Indisponível temporariamente por que não está respondendo
AbstractNodeMonitorDescriptor.NoDataYet=Nada ainda
DiskSpaceMonitor.MarkedOnline=Retornando {0} como ativo pois há espaço em disco suficiente novamente
-DiskSpaceMonitorDescriptor.DiskSpace.FreeSpaceTooLow=Pouco espaço em disco. Somente {0}GB disponível em {1}.
+DiskSpaceMonitorDescriptor.DiskSpace.FreeSpaceTooLow=Pouco espaço em disco. Somente {0} disponível em {1}.
MonitorMarkedNodeOffline.DisplayName=Nó marcado como fora de serviço devido a verificação de saúde
-DiskSpaceMonitorDescriptor.DiskSpace.FreeSpace={0}GB restantes em {1}.
+DiskSpaceMonitorDescriptor.DiskSpace.FreeSpace={0} restantes em {1}.
diff --git a/core/src/main/resources/hudson/node_monitors/Messages_ru.properties b/core/src/main/resources/hudson/node_monitors/Messages_ru.properties
index f6f714f97d..ad3e610e37 100644
--- a/core/src/main/resources/hudson/node_monitors/Messages_ru.properties
+++ b/core/src/main/resources/hudson/node_monitors/Messages_ru.properties
@@ -31,6 +31,6 @@ ResponseTimeMonitor.TimeOut=Последние {0} попыток заверши
SwapSpaceMonitor.DisplayName=Свободное пространство подкачки
TemporarySpaceMonitor.DisplayName=Свободное временное пространство
AbstractNodeMonitorDescriptor.NoDataYet=Ещё нет
-DiskSpaceMonitorDescriptor.DiskSpace.FreeSpaceTooLow=Слишком мало дискового пространства. На {1} осталось всего {0} ГБ.
-DiskSpaceMonitorDescriptor.DiskSpace.FreeSpace=На {1} осталось {0} ГБ.
+DiskSpaceMonitorDescriptor.DiskSpace.FreeSpaceTooLow=Слишком мало дискового пространства. На {1} осталось всего {0}.
+DiskSpaceMonitorDescriptor.DiskSpace.FreeSpace=На {1} осталось {0}.
MonitorMarkedNodeOffline.DisplayName=Узлы, помеченные как отключённые проверками состояния
diff --git a/core/src/main/resources/hudson/node_monitors/Messages_sr.properties b/core/src/main/resources/hudson/node_monitors/Messages_sr.properties
index f65bf82f14..20175c5794 100644
--- a/core/src/main/resources/hudson/node_monitors/Messages_sr.properties
+++ b/core/src/main/resources/hudson/node_monitors/Messages_sr.properties
@@ -11,4 +11,4 @@ ResponseTimeMonitor.TimeOut=Изсткло време за последњи по
SwapSpaceMonitor.DisplayName=Слободног простора за заменом простору
TemporarySpaceMonitor.DisplayName=Слободног простора за привременом простору
AbstractNodeMonitorDescriptor.NoDataYet=Нема података
-DiskSpaceMonitorDescriptor.DiskSpace.FreeSpaceTooLow=Нема довољно простора на диску. {1} остаје само {0}GB.
+DiskSpaceMonitorDescriptor.DiskSpace.FreeSpaceTooLow=Нема довољно простора на диску. {1} остаје само {0}.
diff --git a/core/src/main/resources/hudson/node_monitors/Messages_sv_SE.properties b/core/src/main/resources/hudson/node_monitors/Messages_sv_SE.properties
index 2a381f215c..866e0da49d 100644
--- a/core/src/main/resources/hudson/node_monitors/Messages_sv_SE.properties
+++ b/core/src/main/resources/hudson/node_monitors/Messages_sv_SE.properties
@@ -19,5 +19,4 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-
-DiskSpaceMonitorDescriptor.DiskSpace.FreeSpaceTooLow=Diskutrymme lågt. Enbart {0}GB kvar.
+DiskSpaceMonitorDescriptor.DiskSpace.FreeSpaceTooLow=Diskutrymme lågt. Enbart {0} kvar.
diff --git a/core/src/main/resources/hudson/node_monitors/Messages_zh_TW.properties b/core/src/main/resources/hudson/node_monitors/Messages_zh_TW.properties
index 9b4a3dea59..48558c7728 100644
--- a/core/src/main/resources/hudson/node_monitors/Messages_zh_TW.properties
+++ b/core/src/main/resources/hudson/node_monitors/Messages_zh_TW.properties
@@ -30,4 +30,4 @@ ResponseTimeMonitor.MarkedOffline={0} 沒有回應,將其離線
ResponseTimeMonitor.TimeOut=最近 {0} 次連線都逾時
SwapSpaceMonitor.DisplayName=可用 Swap 空間
TemporarySpaceMonitor.DisplayName=可用暫存空間
-DiskSpaceMonitorDescriptor.DiskSpace.FreeSpaceTooLow=磁碟空間太少。{1} 上只剩 {0}GB。
+DiskSpaceMonitorDescriptor.DiskSpace.FreeSpaceTooLow=磁碟空間太少。{1} 上只剩 {0}。
diff --git a/core/src/main/resources/hudson/node_monitors/TemporarySpaceMonitor/column.jelly b/core/src/main/resources/hudson/node_monitors/TemporarySpaceMonitor/column.jelly
index 5c1a410d1b..8655fc2aad 100644
--- a/core/src/main/resources/hudson/node_monitors/TemporarySpaceMonitor/column.jelly
+++ b/core/src/main/resources/hudson/node_monitors/TemporarySpaceMonitor/column.jelly
@@ -29,7 +29,19 @@ THE SOFTWARE.
N/A |
- |
+
+
+
+ ${data.toHtml()}
+
+
+ ${data.toHtml()}
+
+
+ ${data.toHtml()}
+
+
+ |
diff --git a/core/src/main/resources/hudson/node_monitors/TemporarySpaceMonitor/help.html b/core/src/main/resources/hudson/node_monitors/TemporarySpaceMonitor/help.html
index ea237d75ae..2acf9a6f12 100644
--- a/core/src/main/resources/hudson/node_monitors/TemporarySpaceMonitor/help.html
+++ b/core/src/main/resources/hudson/node_monitors/TemporarySpaceMonitor/help.html
@@ -1,6 +1,6 @@
This monitors the available disk space of the temporary directory, and if it
- gets below a certain threshold the node will be made offline.
+ gets below a certain threshold the agent will be marked temporarily offline.
Java tools and tests/builds often create files in the temporary directory,
diff --git a/core/src/test/java/hudson/FunctionsTest.java b/core/src/test/java/hudson/FunctionsTest.java
index 0fe72c16de..95d5def0bb 100644
--- a/core/src/test/java/hudson/FunctionsTest.java
+++ b/core/src/test/java/hudson/FunctionsTest.java
@@ -321,12 +321,13 @@ public class FunctionsTest {
Locale.setDefault(Locale.ENGLISH);
assertEquals("0 B", Functions.humanReadableByteSize(0));
assertEquals("1023 B", Functions.humanReadableByteSize(1023));
- assertEquals("1.00 KB", Functions.humanReadableByteSize(1024));
- assertEquals("1.50 KB", Functions.humanReadableByteSize(1536));
- assertEquals("20.00 KB", Functions.humanReadableByteSize(20480));
- assertEquals("1023.00 KB", Functions.humanReadableByteSize(1047552));
- assertEquals("1.00 MB", Functions.humanReadableByteSize(1048576));
- assertEquals("1.50 GB", Functions.humanReadableByteSize(1610612700));
+ assertEquals("1.00 KiB", Functions.humanReadableByteSize(1024));
+ assertEquals("1.50 KiB", Functions.humanReadableByteSize(1536));
+ assertEquals("20.00 KiB", Functions.humanReadableByteSize(20480));
+ assertEquals("1023.00 KiB", Functions.humanReadableByteSize(1047552));
+ assertEquals("1.00 MiB", Functions.humanReadableByteSize(1048576));
+ assertEquals("1.50 GiB", Functions.humanReadableByteSize(1610612700));
+ assertEquals("1.50 TiB", Functions.humanReadableByteSize(1649267441664L));
} finally {
Locale.setDefault(defaultLocale);
}
diff --git a/test/src/test/java/hudson/model/ComputerSetTest.java b/test/src/test/java/hudson/model/ComputerSetTest.java
index cff8892c6f..f40cf3e00c 100644
--- a/test/src/test/java/hudson/model/ComputerSetTest.java
+++ b/test/src/test/java/hudson/model/ComputerSetTest.java
@@ -130,7 +130,7 @@ public class ComputerSetTest {
assertEquals(HttpURLConnection.HTTP_OK, page.getWebResponse().getStatusCode());
responseContent = page.getWebResponse().getContentAsString();
// the "Node Monitoring" link in the app bar is visible
- assertThat(responseContent, containsString("Node Monitoring"));
+ assertThat(responseContent, containsString("Configure Monitors"));
page = wc.goTo("computer/configure");
assertEquals(HttpURLConnection.HTTP_OK, page.getWebResponse().getStatusCode());
// and the save button is visible
diff --git a/test/src/test/java/hudson/node_monitors/DiskSpaceMonitorDescriptorTest.java b/test/src/test/java/hudson/node_monitors/DiskSpaceMonitorDescriptorTest.java
index e897a8f300..e662f19094 100644
--- a/test/src/test/java/hudson/node_monitors/DiskSpaceMonitorDescriptorTest.java
+++ b/test/src/test/java/hudson/node_monitors/DiskSpaceMonitorDescriptorTest.java
@@ -45,7 +45,9 @@ public class DiskSpaceMonitorDescriptorTest {
assertEquals(1024, DiskSpace.parse("1KB").size);
assertEquals(1024, DiskSpace.parse("1K").size);
assertEquals(1024, DiskSpace.parse("1kb").size);
+ assertEquals(1024, DiskSpace.parse("1kib").size);
assertEquals(1024 * 1024, DiskSpace.parse("1MB").size);
+ assertEquals(1024 * 1024, DiskSpace.parse("1MIB").size);
assertEquals(1024 * 1024 * 1024, DiskSpace.parse("1GB").size);
assertEquals(512 * 1024 * 1024, DiskSpace.parse("0.5GB").size);
}
@@ -55,8 +57,10 @@ public class DiskSpaceMonitorDescriptorTest {
@Issue("JENKINS-59383")
public void string() {
DiskSpace du = new DiskSpace("/tmp", 123 * 1024 * 1024);
- assertEquals("0.123GB left on /tmp.", du.toString());
- du.setTriggered(true);
- assertEquals("Disk space is too low. Only 0.123GB left on /tmp.", du.toString());
+ du.setTotalSize(300 * 1024 * 1024);
+ du.setThreshold(100 * 1024 * 1024);
+ assertEquals("123.00 MiB out of 300.00 MiB left on /tmp.", du.toString());
+ du.setThreshold(200 * 1024 * 1024);
+ assertEquals("Disk space is below threshold of 200.00 MiB. Only 123.00 MiB out of 300.00 MiB left on /tmp.", du.toString());
}
}