test
This commit is contained in:
parent
efbd08263c
commit
bb8b3dd140
2 changed files with 3 additions and 3 deletions
|
@ -17,7 +17,6 @@ mainApp.controller('homeCtrl', [ '$scope', 'Compute', '$rootScope', function ($s
|
||||||
$scope.raiseShowMachineDetailsEvent=function(){
|
$scope.raiseShowMachineDetailsEvent=function(){
|
||||||
var callback=function(){
|
var callback=function(){
|
||||||
var data=Compute.getData();
|
var data=Compute.getData();
|
||||||
console.log(data.machines[Object.keys(data.machines)[0]]);
|
|
||||||
$rootScope.$broadcast("showMachineDetailsEvent", data.machines[Object.keys(data.machines)[0]]);
|
$rootScope.$broadcast("showMachineDetailsEvent", data.machines[Object.keys(data.machines)[0]]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,11 +14,12 @@ mainApp.factory('Compute',[ '$http', 'Identity', function($http, Identity){
|
||||||
var requestParserResult={};
|
var requestParserResult={};
|
||||||
requestParserResult.status=1;
|
requestParserResult.status=1;
|
||||||
requestParserResult.failReason=null;
|
requestParserResult.failReason=null;
|
||||||
|
console.log(response.data.Images[Object.keys(response.data.Images)[0]])
|
||||||
if (typeof response.data.Servers !== 'undefined') {
|
if (typeof response.data.Servers !== 'undefined') {
|
||||||
// Set status code
|
// Set status code
|
||||||
requestParserResult.status=0;
|
requestParserResult.status=0;
|
||||||
data.machines=response.data.Servers;
|
data.machines=response.data.Servers;
|
||||||
|
|
||||||
}
|
}
|
||||||
else if(failedToSendRequest){
|
else if(failedToSendRequest){
|
||||||
requestParserResult.failReason="Failed to send request";
|
requestParserResult.failReason="Failed to send request";
|
||||||
|
@ -39,7 +40,7 @@ mainApp.factory('Compute',[ '$http', 'Identity', function($http, Identity){
|
||||||
var params={
|
var params={
|
||||||
"token" : Identity.getToken(),
|
"token" : Identity.getToken(),
|
||||||
"task" : "compute",
|
"task" : "compute",
|
||||||
"action":"listServers"
|
"action":"listImages"
|
||||||
};
|
};
|
||||||
|
|
||||||
var result=$http.post('../server/index.php',
|
var result=$http.post('../server/index.php',
|
||||||
|
|
Loading…
Add table
Reference in a new issue