fix: Change disk info path and fix disk info alarm value calculate.
This commit is contained in:
@@ -298,7 +298,7 @@ void GeneralForm::updateStorageSize()
|
||||
{
|
||||
mDiskIcon->setMaxValue(mDiskSize);
|
||||
double aValue = JsonObject::Instance()->storageAlarmSize().toDouble();
|
||||
mDiskIcon->setAlarmValue(aValue);
|
||||
mDiskIcon->setAlarmValue(mDiskSize * aValue / 100);
|
||||
mDiskSizeLabel->setText(tr("Total:\t%1G").arg(mDiskSize));
|
||||
}
|
||||
else
|
||||
|
||||
@@ -40,7 +40,7 @@ QString cmdHelper::getDCMTKVersion()
|
||||
bool cmdHelper::getDiskSize(double& size)
|
||||
{
|
||||
std::string str;
|
||||
if (cmdHelper::Instance()->exec2("df /home/usct/data -h", str))
|
||||
if (cmdHelper::Instance()->exec2("df /mnt/data -h -BG", str))
|
||||
{
|
||||
QString qstr = QString::fromStdString(str);
|
||||
QStringList strList = qstr.split('\n');
|
||||
@@ -58,7 +58,7 @@ bool cmdHelper::getDiskSize(double& size)
|
||||
bool cmdHelper::getDiskUsed(double& used)
|
||||
{
|
||||
std::string str;
|
||||
if (cmdHelper::Instance()->exec2("df /home/usct/data -h", str))
|
||||
if (cmdHelper::Instance()->exec2("df /mnt/data -h -BG", str))
|
||||
{
|
||||
QString qstr = QString::fromStdString(str);
|
||||
QStringList strList = qstr.split('\n');
|
||||
|
||||
Reference in New Issue
Block a user