[hostinfo] Add host RAM to GS
This commit is contained in:
parent
22a9fb89e8
commit
2b8d04ffc1
@ -22,6 +22,7 @@
|
|||||||
#include "JobQueue.h"
|
#include "JobQueue.h"
|
||||||
#include "utils/CalamaresUtilsSystem.h"
|
#include "utils/CalamaresUtilsSystem.h"
|
||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
|
#include "utils/Units.h"
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
@ -155,6 +156,12 @@ HostInfoJob::exec()
|
|||||||
gs->insert( "hostOSName", hostOSName() );
|
gs->insert( "hostOSName", hostOSName() );
|
||||||
gs->insert( "hostCPU", hostCPU() );
|
gs->insert( "hostCPU", hostCPU() );
|
||||||
|
|
||||||
|
auto ram = CalamaresUtils::BytesToMiB( CalamaresUtils::System::instance()->getTotalMemoryB().first );
|
||||||
|
if ( ram )
|
||||||
|
{
|
||||||
|
gs->insert( "hostRAMMiB", ram );
|
||||||
|
}
|
||||||
|
|
||||||
return Calamares::JobResult::ok();
|
return Calamares::JobResult::ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user