Correct machine details bug
This commit is contained in:
parent
cc6f0008e3
commit
b0f5474306
4 changed files with 6 additions and 6 deletions
|
@ -5,7 +5,6 @@
|
||||||
*/
|
*/
|
||||||
mainApp.controller('homeCtrl', [ '$scope', 'Compute', '$rootScope', 'Loading','Identity', 'Image', function ($scope, Compute, $rootScope, Loading, Identity, Image)
|
mainApp.controller('homeCtrl', [ '$scope', 'Compute', '$rootScope', 'Loading','Identity', 'Image', function ($scope, Compute, $rootScope, Loading, Identity, Image)
|
||||||
{
|
{
|
||||||
console.log("test");
|
|
||||||
// Function to call after pull all data about machines
|
// Function to call after pull all data about machines
|
||||||
var callMeAfterPullData=function(data){
|
var callMeAfterPullData=function(data){
|
||||||
//$scope.machines=Compute.getData().machines;
|
//$scope.machines=Compute.getData().machines;
|
||||||
|
@ -51,7 +50,6 @@ mainApp.controller('homeCtrl', [ '$scope', 'Compute', '$rootScope', 'Loading','I
|
||||||
tryToRetrieveData();
|
tryToRetrieveData();
|
||||||
|
|
||||||
var displayMachine = function(){
|
var displayMachine = function(){
|
||||||
console.log("test");
|
|
||||||
var machineNames = [];
|
var machineNames = [];
|
||||||
var i = 0;
|
var i = 0;
|
||||||
$.each(Compute.getData().machines, function(){
|
$.each(Compute.getData().machines, function(){
|
||||||
|
@ -158,7 +156,7 @@ mainApp.controller('homeCtrl', [ '$scope', 'Compute', '$rootScope', 'Loading','I
|
||||||
var width = 130;
|
var width = 130;
|
||||||
var height = 80;
|
var height = 80;
|
||||||
var data = Compute.getData();
|
var data = Compute.getData();
|
||||||
console.log(data.machines[vm[1]]);
|
//console.log(data.machines[vm[1]]);
|
||||||
if(data.machines[vm[1]].status == "ACTIVE"){
|
if(data.machines[vm[1]].status == "ACTIVE"){
|
||||||
return new joint.shapes.org.Member({
|
return new joint.shapes.org.Member({
|
||||||
id: vm[1],
|
id: vm[1],
|
||||||
|
|
|
@ -14,6 +14,7 @@ mainApp.controller('machineDetailsCtrl', ['$scope', 'Compute', '$rootScope', '$t
|
||||||
// When we need to show details of machine
|
// When we need to show details of machine
|
||||||
$scope.$on('showMachineDetailsEvent', function (eventName, machine, axioms) {
|
$scope.$on('showMachineDetailsEvent', function (eventName, machine, axioms) {
|
||||||
$scope.machine = machine;
|
$scope.machine = machine;
|
||||||
|
// console.log(machine.flavor)
|
||||||
$scope.axioms = axioms;
|
$scope.axioms = axioms;
|
||||||
$('#machineDetailsModal').modal({backdrop: false, keyboard: true});
|
$('#machineDetailsModal').modal({backdrop: false, keyboard: true});
|
||||||
});
|
});
|
||||||
|
|
|
@ -40,8 +40,9 @@ mainApp.factory('Compute', ['$http', 'Identity', function ($http, Identity) {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve machine list
|
* Retrieve machine list
|
||||||
* @param {callback} function to call after request complete
|
* @param {type} callback function to call after request complete
|
||||||
|
* @returns {undefined}
|
||||||
*/
|
*/
|
||||||
var pullMachines = function (callback) {
|
var pullMachines = function (callback) {
|
||||||
// Send listServers request
|
// Send listServers request
|
||||||
|
|
|
@ -65,9 +65,9 @@ class compute implements Core
|
||||||
$servers = Array();
|
$servers = Array();
|
||||||
foreach($serverList as $server){
|
foreach($serverList as $server){
|
||||||
$servers[$server->id] = Array();
|
$servers[$server->id] = Array();
|
||||||
|
$server->retrieve();
|
||||||
$server->flavor->retrieve();
|
$server->flavor->retrieve();
|
||||||
$server->image->retrieve();
|
$server->image->retrieve();
|
||||||
$server->retrieve();
|
|
||||||
$servers[$server->id]["id"] = $server->id;
|
$servers[$server->id]["id"] = $server->id;
|
||||||
$servers[$server->id]["name"] = $server->name;
|
$servers[$server->id]["name"] = $server->name;
|
||||||
$servers[$server->id]["image"] = $server->image;
|
$servers[$server->id]["image"] = $server->image;
|
||||||
|
|
Loading…
Add table
Reference in a new issue