Read versions of JSON files installed on PSA (DC!).
If version is available, use as blob-value to be visible in ISMAS.
This commit is contained in:
parent
5876c50a32
commit
cafd16a744
@ -1345,20 +1345,36 @@ PSAInstalled Worker::getPSAInstalled() {
|
||||
psaInstalled.pluginVersion.prmCalculatePriceConfigUi = m_pluginVersionPrmCalcConfig;
|
||||
psaInstalled.pluginVersion.tcpZVT = m_pluginVersionTcpZvt;
|
||||
|
||||
// key: conf-json-filename; value: installed version on DC
|
||||
QMap<QString, QString> map;
|
||||
if (m_update) {
|
||||
map = m_update->getInstalledJsonVersions();
|
||||
}
|
||||
|
||||
psaInstalled.cash.name = "DC2C_cash.json";
|
||||
absPathName = QDir::cleanPath(printSysDir + QDir::separator() + psaInstalled.cash.name);
|
||||
|
||||
psaInstalled.cash.blob = m_gc.gitBlob(absPathName);
|
||||
psaInstalled.cash.size = getFileSize(absPathName);
|
||||
if (map.contains("DC2C_cash.json")) {
|
||||
psaInstalled.cash.blob = map.value("DC2C_cash.json", "inst.vers.not.avail");
|
||||
}
|
||||
|
||||
psaInstalled.conf.name = "DC2C_conf.json";
|
||||
absPathName = QDir::cleanPath(printSysDir + QDir::separator() + psaInstalled.conf.name);
|
||||
psaInstalled.conf.blob = m_gc.gitBlob(absPathName);
|
||||
psaInstalled.conf.size = getFileSize(absPathName);
|
||||
if (map.contains("DC2C_conf.json")) {
|
||||
psaInstalled.conf.blob = map.value("DC2C_conf.json", "inst.vers.not.avail");
|
||||
}
|
||||
|
||||
psaInstalled.device.name = "DC2C_device.json";
|
||||
absPathName = QDir::cleanPath(printSysDir + QDir::separator() + psaInstalled.device.name);
|
||||
psaInstalled.device.blob = m_gc.gitBlob(absPathName);
|
||||
psaInstalled.device.size = getFileSize(absPathName);
|
||||
if (map.contains("DC2C_device.json")) {
|
||||
psaInstalled.device.blob = map.value("DC2C_device.json", "inst.vers.not.avail");
|
||||
}
|
||||
|
||||
for (int i=0; i < 32; ++i) {
|
||||
QString const &n = QString("%1").arg(i+1).rightJustified(2, '0');
|
||||
@ -1366,6 +1382,9 @@ PSAInstalled Worker::getPSAInstalled() {
|
||||
absPathName = QDir::cleanPath(printSysDir + QDir::separator() + psaInstalled.print[i].name);
|
||||
psaInstalled.print[i].blob = m_gc.gitBlob(absPathName);
|
||||
psaInstalled.print[i].size = getFileSize(absPathName);
|
||||
if (map.contains(psaInstalled.print[i].name)) {
|
||||
psaInstalled.print[i].blob = map.value(psaInstalled.print[i].name, "inst.vers.not.avail");
|
||||
}
|
||||
}
|
||||
|
||||
return psaInstalled;
|
||||
|
Loading…
Reference in New Issue
Block a user