Commit d38abdf8 by Belákovics Ádám

VMinfo grid modifications

parent 9309055b
......@@ -3,6 +3,8 @@
struct ComputeData{
std::string name;
double memory;
int cpu;
int cores;
......
......@@ -83,6 +83,7 @@ std::string Controller::getState(std::string id){
*/
ComputeData Controller::getDataByID(std::string id){
ComputeData data;
data.name = allCompute.at(std::stoi(id))->getHostname();
data.memory = allCompute.at(std::stoi(id))->getMemory();
data.cpu = allCompute.at(std::stoi(id))->getCpuShare();
data.cores = allCompute.at(std::stoi(id))->getCores();
......
......@@ -72,6 +72,7 @@ void MainWindow::loadVMData(std::string id){
ui->lStatus->setText(myController.getState(id).c_str());
ComputeData data = myController.getDataByID(id.c_str());
currentSelectedVM = data;
ui->lVMName->setText(data.name.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());
......@@ -178,6 +179,7 @@ void MainWindow::on_bRefresh_clicked()
void MainWindow::on_bNewVM_clicked()
{
VMChooserDialog* v = new VMChooserDialog(this);
v->setWindowTitle("New Virtual Machine");
v->set_templates(getTemplates(myController.session));
connect(v, SIGNAL(send_chosen_template(Template)), this, SLOT(receive_chosen_template(Template)));
v->exec();
......
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