Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
user-client
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d38abdf8
authored
Jun 12, 2017
by
Belákovics Ádám
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VMinfo grid modifications
parent
9309055b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
0 deletions
+5
-0
computedata.h
+2
-0
controller.cpp
+1
-0
mainwindow.cpp
+2
-0
mainwindow.ui
+0
-0
No files found.
computedata.h
View file @
d38abdf8
...
@@ -3,6 +3,8 @@
...
@@ -3,6 +3,8 @@
struct
ComputeData
{
struct
ComputeData
{
std
::
string
name
;
double
memory
;
double
memory
;
int
cpu
;
int
cpu
;
int
cores
;
int
cores
;
...
...
controller.cpp
View file @
d38abdf8
...
@@ -83,6 +83,7 @@ std::string Controller::getState(std::string id){
...
@@ -83,6 +83,7 @@ std::string Controller::getState(std::string id){
*/
*/
ComputeData
Controller
::
getDataByID
(
std
::
string
id
){
ComputeData
Controller
::
getDataByID
(
std
::
string
id
){
ComputeData
data
;
ComputeData
data
;
data
.
name
=
allCompute
.
at
(
std
::
stoi
(
id
))
->
getHostname
();
data
.
memory
=
allCompute
.
at
(
std
::
stoi
(
id
))
->
getMemory
();
data
.
memory
=
allCompute
.
at
(
std
::
stoi
(
id
))
->
getMemory
();
data
.
cpu
=
allCompute
.
at
(
std
::
stoi
(
id
))
->
getCpuShare
();
data
.
cpu
=
allCompute
.
at
(
std
::
stoi
(
id
))
->
getCpuShare
();
data
.
cores
=
allCompute
.
at
(
std
::
stoi
(
id
))
->
getCores
();
data
.
cores
=
allCompute
.
at
(
std
::
stoi
(
id
))
->
getCores
();
...
...
mainwindow.cpp
View file @
d38abdf8
...
@@ -72,6 +72,7 @@ void MainWindow::loadVMData(std::string id){
...
@@ -72,6 +72,7 @@ void MainWindow::loadVMData(std::string id){
ui
->
lStatus
->
setText
(
myController
.
getState
(
id
).
c_str
());
ui
->
lStatus
->
setText
(
myController
.
getState
(
id
).
c_str
());
ComputeData
data
=
myController
.
getDataByID
(
id
.
c_str
());
ComputeData
data
=
myController
.
getDataByID
(
id
.
c_str
());
currentSelectedVM
=
data
;
currentSelectedVM
=
data
;
ui
->
lVMName
->
setText
(
data
.
name
.
c_str
());
ui
->
lCPU
->
setText
(
std
::
to_string
(
data
.
cpu
).
c_str
());
ui
->
lCPU
->
setText
(
std
::
to_string
(
data
.
cpu
).
c_str
());
ui
->
lMemory
->
setText
(
std
::
to_string
(
data
.
memory
).
c_str
());
ui
->
lMemory
->
setText
(
std
::
to_string
(
data
.
memory
).
c_str
());
ui
->
lCores
->
setText
(
std
::
to_string
(
data
.
cores
).
c_str
());
ui
->
lCores
->
setText
(
std
::
to_string
(
data
.
cores
).
c_str
());
...
@@ -178,6 +179,7 @@ void MainWindow::on_bRefresh_clicked()
...
@@ -178,6 +179,7 @@ void MainWindow::on_bRefresh_clicked()
void
MainWindow
::
on_bNewVM_clicked
()
void
MainWindow
::
on_bNewVM_clicked
()
{
{
VMChooserDialog
*
v
=
new
VMChooserDialog
(
this
);
VMChooserDialog
*
v
=
new
VMChooserDialog
(
this
);
v
->
setWindowTitle
(
"New Virtual Machine"
);
v
->
set_templates
(
getTemplates
(
myController
.
session
));
v
->
set_templates
(
getTemplates
(
myController
.
session
));
connect
(
v
,
SIGNAL
(
send_chosen_template
(
Template
)),
this
,
SLOT
(
receive_chosen_template
(
Template
)));
connect
(
v
,
SIGNAL
(
send_chosen_template
(
Template
)),
this
,
SLOT
(
receive_chosen_template
(
Template
)));
v
->
exec
();
v
->
exec
();
...
...
mainwindow.ui
View file @
d38abdf8
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment