Skip to content
This repository has been archived by the owner on Aug 22, 2021. It is now read-only.

Commit

Permalink
partial fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbanerje committed Nov 10, 2012
1 parent bbaab78 commit f4045f5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions public/js/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ var App = function ($scope, $http) {
setError('The server is broken! Retry in a while');
break;
default:
setError('Error in contacting server!');
var str = 'Error in contacting server!';
if (data.error) {
var str = JSON.parse(data.error).messages[0].text
}
setError(str);
break;
}
};
Expand Down Expand Up @@ -374,7 +378,7 @@ var App = function ($scope, $http) {
$scope.deploy = function () { // Deploy the graph to a openshift broker
Busy.start();
for (var i in $scope.graph.vertices) {
if ($scope.graph.vertices[i].cartridges.length === 0) {
if ($scope.graph.vertices[i].cartridges && $scope.graph.vertices[i].cartridges.length === 0) {
setError('First add cartridges to all nodes');
Busy.stop();
return;
Expand Down

0 comments on commit f4045f5

Please sign in to comment.