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(){
|
||||
var callback=function(){
|
||||
var data=Compute.getData();
|
||||
console.log(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={};
|
||||
requestParserResult.status=1;
|
||||
requestParserResult.failReason=null;
|
||||
|
||||
console.log(response.data.Images[Object.keys(response.data.Images)[0]])
|
||||
if (typeof response.data.Servers !== 'undefined') {
|
||||
// Set status code
|
||||
requestParserResult.status=0;
|
||||
data.machines=response.data.Servers;
|
||||
|
||||
}
|
||||
else if(failedToSendRequest){
|
||||
requestParserResult.failReason="Failed to send request";
|
||||
|
@ -39,7 +40,7 @@ mainApp.factory('Compute',[ '$http', 'Identity', function($http, Identity){
|
|||
var params={
|
||||
"token" : Identity.getToken(),
|
||||
"task" : "compute",
|
||||
"action":"listServers"
|
||||
"action":"listImages"
|
||||
};
|
||||
|
||||
var result=$http.post('../server/index.php',
|
||||
|
|
Loading…
Add table
Reference in a new issue