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
36d3dd60
authored
Jun 12, 2017
by
Belákovics Ádám
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extended computedata
parent
d38abdf8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
computedata.h
+8
-0
controller.cpp
+10
-0
No files found.
computedata.h
View file @
36d3dd60
...
...
@@ -5,15 +5,23 @@
struct
ComputeData
{
std
::
string
name
;
std
::
string
state
;
std
::
string
stateMessage
;
double
memory
;
int
cpu
;
int
cores
;
std
::
string
architecture
;
std
::
string
hostname
;
int
port
;
std
::
string
protocol
;
std
::
string
username
;
std
::
string
password
;
std
::
string
connString
;
std
::
string
leaseSuspend
;
std
::
string
leaseRemoved
;
};
#endif // COMPUTEDATA
...
...
controller.cpp
View file @
36d3dd60
...
...
@@ -84,14 +84,24 @@ std::string Controller::getState(std::string id){
ComputeData
Controller
::
getDataByID
(
std
::
string
id
){
ComputeData
data
;
data
.
name
=
allCompute
.
at
(
std
::
stoi
(
id
))
->
getHostname
();
data
.
state
=
allCompute
.
at
(
std
::
stoi
(
id
))
->
getState
();
data
.
stateMessage
=
allCompute
.
at
(
std
::
stoi
(
id
))
->
getStateMessage
();
data
.
architecture
=
allCompute
.
at
(
std
::
stoi
(
id
))
->
getArchitecture
();
data
.
memory
=
allCompute
.
at
(
std
::
stoi
(
id
))
->
getMemory
();
data
.
cpu
=
allCompute
.
at
(
std
::
stoi
(
id
))
->
getCpuShare
();
data
.
cores
=
allCompute
.
at
(
std
::
stoi
(
id
))
->
getCores
();
data
.
hostname
=
allCompute
.
at
(
std
::
stoi
(
id
))
->
getCredentialHost
();
data
.
port
=
allCompute
.
at
(
std
::
stoi
(
id
))
->
getCredentialPort
();
data
.
protocol
=
allCompute
.
at
(
std
::
stoi
(
id
))
->
getCredentialProtocol
();
data
.
username
=
allCompute
.
at
(
std
::
stoi
(
id
))
->
getCredentialUsername
();
data
.
password
=
allCompute
.
at
(
std
::
stoi
(
id
))
->
getCredentialPassword
();
data
.
connString
=
allCompute
.
at
(
std
::
stoi
(
id
))
->
getCredentialCommand
();
data
.
leaseRemoved
=
allCompute
.
at
(
std
::
stoi
(
id
))
->
getLeasetimeRemove
();
data
.
leaseSuspend
=
allCompute
.
at
(
std
::
stoi
(
id
))
->
getLeasetimeSuspend
();
return
data
;
}
...
...
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