!86 小数点计算

Merge pull request !86 from Arno/dyc
This commit is contained in:
Arno 2019-04-08 16:52:30 +08:00
commit ab888de8a1
2 changed files with 6 additions and 2 deletions

View File

@ -185,9 +185,13 @@ public class NginxController extends BaseController {
addNgxParam(sever, "listen " + port);
addNgxParam(sever, "server_name " + domain);
if (StrUtil.isNotEmpty(cert)) {
addNgxParam(sever, "ssl on");
addNgxParam(sever, "ssl_certificate " + cert);
addNgxParam(sever, "ssl_certificate_key " + key);
addNgxParam(sever, "ssl_prefer_server_ciphers on");
addNgxParam(sever, "ssl_session_cache shared:SSL:1m");
addNgxParam(sever, "ssl_session_timeout 5m");
addNgxParam(sever, "ssl_ciphers HIGH:!aNULL:!MD5");
if ("true".equals(convert)) {
NgxBlock httpSever = new NgxBlock();
httpSever.addValue("server");

View File

@ -269,9 +269,9 @@
value = value / 1024;
suffix = " GB";
}
value = value.toFixed(2);
value = Math.round(value * 100) / 100;
} else {
value = value.toFixed(4);
value = Math.round(value * 10000) / 10000;
}
return params.seriesName + '<br/>' + params.name + " : " + value + suffix + "(" + params.percent + "%)";
}