Commit 90e416ed by Belákovics Ádám

Added all info display from lib about VM

parent 36d3dd60
......@@ -73,12 +73,22 @@ void MainWindow::loadVMData(std::string id){
ComputeData data = myController.getDataByID(id.c_str());
currentSelectedVM = data;
ui->lVMName->setText(data.name.c_str());
//--- for displaying initial hint
QFont font = ui->lVMName->font();
font.setPointSize(20);
font.setBold(false);
ui->lVMName->setFont(font);
//---
ui->lArch->setText(data.architecture.c_str());
ui->lCPU->setText(std::to_string(data.cpu).c_str());
ui->lMemory->setText(std::to_string(data.memory).c_str());
ui->lCores->setText(std::to_string(data.cores).c_str());
ui->lHostname->setText((data.hostname + ":" + std::to_string(data.port)).c_str());
ui->lProtocol->setText(data.protocol.c_str());
ui->lUsernameVM->setText(data.username.c_str());
ui->lPasswordVM->setText(data.password.c_str());
ui->lSuspended->setText(data.leaseSuspend.c_str());
ui->lRemoved->setText(data.leaseRemoved.c_str());
}
......
......@@ -432,7 +432,69 @@
</property>
</widget>
</item>
<item row="0" column="2" rowspan="2">
<item row="2" column="2">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0" rowspan="4">
<widget class="QListWidget" name="listWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>108</red>
<green>112</green>
<blue>115</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>108</red>
<green>112</green>
<blue>115</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
</widget>
</item>
<item row="0" column="2">
<layout class="QGridLayout" name="glVMTab">
<item row="0" column="0">
<layout class="QGridLayout" name="glVMinfo">
<item row="1" column="1" colspan="2">
<widget class="Line" name="line">
......@@ -479,7 +541,7 @@
</widget>
</item>
<item row="0" column="3">
<widget class="QGroupBox" name="groupBox_2">
<widget class="QGroupBox" name="gbStatus">
<property name="title">
<string/>
</property>
......@@ -516,19 +578,55 @@
</widget>
</item>
<item row="4" column="1">
<widget class="QGroupBox" name="groupBox_4">
<widget class="QGroupBox" name="gbLease">
<property name="title">
<string>Lease</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="1">
<widget class="QLabel" name="lSuspended">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="lSuspendedTag">
<property name="text">
<string>Suspended:</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="lRemovedTag">
<property name="text">
<string>Removed:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="lRemoved">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="1" colspan="3">
<widget class="QGroupBox" name="groupBox_3">
<widget class="QGroupBox" name="gbCredentials">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Credentials</string>
</property>
<layout class="QGridLayout" name="gridLayout_8">
<item row="2" column="1">
<item row="3" column="1">
<widget class="QLineEdit" name="lPasswordVM">
<property name="palette">
<palette>
......@@ -582,21 +680,21 @@
</property>
</widget>
</item>
<item row="2" column="2">
<item row="3" column="2">
<widget class="QPushButton" name="bShowPassword">
<property name="text">
<string>Show</string>
</property>
</widget>
</item>
<item row="1" column="0">
<item row="2" column="0">
<widget class="QLabel" name="lUsernameTag">
<property name="text">
<string>Username:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<item row="2" column="1">
<widget class="QLabel" name="lUsernameVM">
<property name="text">
<string/>
......@@ -610,43 +708,71 @@
</property>
</widget>
</item>
<item row="2" column="0">
<item row="3" column="0">
<widget class="QLabel" name="lPasswordTag">
<property name="text">
<string>Password:</string>
</property>
</widget>
</item>
<item row="2" column="3">
<item row="3" column="3">
<widget class="QPushButton" name="bConnect">
<property name="text">
<string>Connect</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="lProtocolTag">
<property name="text">
<string>Protocol:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="lProtocol">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="4" column="2" colspan="2">
<widget class="QGroupBox" name="groupBox">
<widget class="QGroupBox" name="gbResources">
<property name="title">
<string>Hardware</string>
<string>Resources</string>
</property>
<layout class="QGridLayout" name="gridLayout_7">
<item row="4" column="0">
<item row="5" column="0">
<widget class="QLabel" name="lCoresTag">
<property name="text">
<string>Cores:</string>
</property>
</widget>
</item>
<item row="2" column="0">
<item row="3" column="0">
<widget class="QLabel" name="lCPUTag">
<property name="text">
<string>CPU:</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="lCores">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="lMemory">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="lMemoryTag">
<property name="text">
......@@ -654,22 +780,22 @@
</property>
</widget>
</item>
<item row="2" column="1">
<item row="3" column="1">
<widget class="QLabel" name="lCPU">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="lMemory">
<item row="1" column="0">
<widget class="QLabel" name="lArchTag">
<property name="text">
<string/>
<string>Architecture:</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="lCores">
<item row="1" column="1">
<widget class="QLabel" name="lArch">
<property name="text">
<string/>
</property>
......@@ -695,75 +821,19 @@
<property name="font">
<font>
<family>Sans Serif</family>
<pointsize>20</pointsize>
<pointsize>11</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string/>
<string>Choose a virtual machine from the list for additional information.</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="2">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0" rowspan="4">
<widget class="QListWidget" name="listWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>108</red>
<green>112</green>
<blue>115</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>108</red>
<green>112</green>
<blue>115</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
</widget>
</layout>
</item>
</layout>
</widget>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment