Navigation Menu

Skip to content

Commit

Permalink
Judicious replacement of .() with Core.() coupled with angular upgrad…
Browse files Browse the repository at this point in the history
…e appears to fix #379
  • Loading branch information
gashcrumb committed Jul 12, 2013
1 parent c16d2c4 commit 335768c
Show file tree
Hide file tree
Showing 66 changed files with 109 additions and 109 deletions.
4 changes: 2 additions & 2 deletions hawtio-web/src/main/webapp/app/activemq/js/destination.ts
Expand Up @@ -13,7 +13,7 @@ module ActiveMQ {
function operationSuccess() {
$scope.destinationName = "";
$scope.workspace.operationCounter += 1;
$scope.$apply();
Core.$apply($scope);
notification("success", $scope.message);
$scope.workspace.loadTree();
}
Expand All @@ -22,7 +22,7 @@ module ActiveMQ {
// lets set the selection to the parent
workspace.removeAndSelectParentNode();
$scope.workspace.operationCounter += 1;
$scope.$apply();
Core.$apply($scope);
notification("success", $scope.message);
$scope.workspace.loadTree();
}
Expand Down
4 changes: 2 additions & 2 deletions hawtio-web/src/main/webapp/app/activemq/js/graph.ts
Expand Up @@ -102,7 +102,7 @@ module ActiveMQ {
}

Core.d3ForceGraph($scope, $scope.nodes, $scope.links, $element);
$scope.$apply();
Core.$apply($scope);
};

var populateNetworks = function (response) {
Expand All @@ -118,7 +118,7 @@ module ActiveMQ {
}

Core.d3ForceGraph($scope, $scope.nodes, $scope.links, $element);
$scope.$apply();
Core.$apply($scope);
};

$scope.updateGraph = () => {
Expand Down
Expand Up @@ -29,7 +29,7 @@ module Camel {
$scope.invokeSelectedMBeans("remove()", () => {
// force a reload of the tree
$scope.workspace.operationCounter += 1;
$scope.$apply();
Core.$apply($scope);
});
};

Expand Down
4 changes: 2 additions & 2 deletions hawtio-web/src/main/webapp/app/camel/js/endpoint.ts
Expand Up @@ -58,7 +58,7 @@ module Camel {
function operationSuccess() {
$scope.endpointName = "";
$scope.workspace.operationCounter += 1;
$scope.$apply();
Core.$apply($scope);
notification("success", $scope.message);
}

Expand All @@ -71,7 +71,7 @@ module Camel {
}
}
$scope.workspace.operationCounter += 1;
$scope.$apply();
Core.$apply($scope);
notification("success", $scope.message);
}
}
Expand Down
2 changes: 1 addition & 1 deletion hawtio-web/src/main/webapp/app/camel/js/source.ts
Expand Up @@ -48,7 +48,7 @@ module Camel {
}
}
$scope.source = data;
$scope.$apply();
Core.$apply($scope);
};

var saveWorked = () => {
Expand Down
2 changes: 1 addition & 1 deletion hawtio-web/src/main/webapp/app/camel/js/trace.ts
Expand Up @@ -140,7 +140,7 @@ module Camel {

function tracingChanged(response) {
reloadTracingFlag();
$scope.$apply();
Core.$apply($scope);
}

function setTracing(flag:Boolean) {
Expand Down
4 changes: 2 additions & 2 deletions hawtio-web/src/main/webapp/app/core/js/help.ts
Expand Up @@ -47,11 +47,11 @@ module Core {
if (angular.isDefined(data)) {
$scope.html = marked(data);
}
$scope.$apply();
Core.$apply($scope);
},
error: function(jqXHR, textStatus, errorThrown) {
$scope.html = "Unable to download help data for " + $scope.topic;
$scope.$apply();
Core.$apply($scope);
}
})
}
Expand Down
6 changes: 3 additions & 3 deletions hawtio-web/src/main/webapp/app/dashboard/js/dashboard.ts
Expand Up @@ -71,7 +71,7 @@ module Dashboard {
w.html($compile(div.contents())(scope));

makeResizable();
$scope.$apply();
Core.$apply($scope);

setTimeout(function() {
savefunc(widget);
Expand Down Expand Up @@ -101,7 +101,7 @@ module Dashboard {
} else {
$location.path("/dashboard/edit?tab=dashboard");
}
//$scope.$apply();
//Core.$apply($scope);
});
}
}
Expand Down Expand Up @@ -182,7 +182,7 @@ module Dashboard {
getGridster().enable();

if (!$scope.$$phase) {
$scope.$apply();
Core.$apply($scope);
}
}

Expand Down
6 changes: 3 additions & 3 deletions hawtio-web/src/main/webapp/app/fabric/js/assignProfiles.ts
Expand Up @@ -88,7 +88,7 @@ module Fabric {
});
$scope.version = setSelect($scope.version, $scope.versions);

$scope.$apply();
Core.$apply($scope);
}
break;

Expand All @@ -103,7 +103,7 @@ module Fabric {
});
});

$scope.$apply();
Core.$apply($scope);
}
break;

Expand All @@ -118,7 +118,7 @@ module Fabric {
});
});

$scope.$apply();
Core.$apply($scope);
}

break;
Expand Down
4 changes: 2 additions & 2 deletions hawtio-web/src/main/webapp/app/fabric/js/container.ts
Expand Up @@ -56,10 +56,10 @@ module Fabric {

$scope.updateContainerProperty = (propertyName, row) => {
setContainerProperty(jolokia, row.id, propertyName, row[propertyName], () => { $
$scope.$apply();
Core.$apply($scope);
}, (response) => {
notification('error', 'Failed to set container property due to : ' + response.error);
$scope.$apply();
Core.$apply($scope);
});
}

Expand Down
2 changes: 1 addition & 1 deletion hawtio-web/src/main/webapp/app/fabric/js/containers.ts
Expand Up @@ -297,7 +297,7 @@ module Fabric {
$scope.profiles = activeProfilesForVersion($scope.version.id, $scope.containers);
$scope.profile = setSelect($scope.profile, $scope.profiles);

$scope.$apply();
Core.$apply($scope);
}
}

Expand Down
4 changes: 2 additions & 2 deletions hawtio-web/src/main/webapp/app/fabric/js/createContainer.ts
Expand Up @@ -183,11 +183,11 @@ module Fabric {
if (!error) {
notification('success', "Successfully created containers");
}
$scope.$apply();
Core.$apply($scope);
},
error: (response) => {
notification('error', "Error creating containers: " + response.error);
$scope.$apply();
Core.$apply($scope);
}
});

Expand Down
6 changes: 3 additions & 3 deletions hawtio-web/src/main/webapp/app/fabric/js/editFeatures.ts
Expand Up @@ -137,7 +137,7 @@ module Fabric {
$scope.responseJson = responseJson;
$scope.features = Object.clone(response.value.featureDefinitions, true);
$scope.repositories = Object.clone(response.value.repositoryDefinitions, true);
$scope.$apply();
Core.$apply($scope);
}
};

Expand Down Expand Up @@ -213,10 +213,10 @@ module Fabric {

saveConfigFile(jolokia, $scope.versionId, $scope.profileId, 'org.fusesource.fabric.agent.properties', configFile.encodeBase64(), () => {
notification('success', "Updated feature definitions...");
$scope.$apply();
Core.$apply($scope);
}, (response) => {
notification('error', "Failed to save feature definitions due to " + response.error);
$scope.$apply();
Core.$apply($scope);
});
};

Expand Down
10 changes: 5 additions & 5 deletions hawtio-web/src/main/webapp/app/fabric/js/fabricView.ts
Expand Up @@ -186,10 +186,10 @@ module Fabric {
notification('success', "Created profile " + $scope.newProfileName);
$scope.profileIdFilter = $scope.newProfileName;
$scope.newProfileName = "";
$scope.$apply();
Core.$apply($scope);
}, function(response) {
notification('error', "Failed to create profile " + $scope.newProfileName + " due to " + response.error);
$scope.$apply();
Core.$apply($scope);
});
};

Expand All @@ -201,7 +201,7 @@ module Fabric {
var success = function (response) {
notification('success', "Created version " + response.value.id);
$scope.newVersionName = '';
$scope.$apply();
Core.$apply($scope);
};

var error = function (response) {
Expand All @@ -228,10 +228,10 @@ module Fabric {
deleteVersion(jolokia, $scope.activeVersionId, function() {
notification('success', "Deleted version " + $scope.version.id);
$scope.activeVersionId = '';
$scope.$apply();
Core.$apply($scope);
}, function(response) {
notification('error', "Failed to delete version " + $scope.version.id + " due to " + response.error);
$scope.$apply();
Core.$apply($scope);
});
};

Expand Down
4 changes: 2 additions & 2 deletions hawtio-web/src/main/webapp/app/fabric/js/migrateContainers.ts
Expand Up @@ -51,7 +51,7 @@ module Fabric {
if (response.request.operation === 'versions()') {
if (!Object.equal($scope.versions, response.value)) {
$scope.versions = response.value;
$scope.$apply();
Core.$apply($scope);
}
}

Expand All @@ -66,7 +66,7 @@ module Fabric {
id: container
});
});
$scope.$apply();
Core.$apply($scope);
}
}
};
Expand Down
4 changes: 2 additions & 2 deletions hawtio-web/src/main/webapp/app/fabric/js/patching.ts
Expand Up @@ -32,10 +32,10 @@ module Fabric {
() => {
notification('success', "Successfully applied " + message);
$location.url("/fabric/view");
$scope.$apply();
Core.$apply($scope);
}, (response) => {
notification('error', "Failed to apply " + message + " due to " + response.error);
$scope.$apply();
Core.$apply($scope);
});


Expand Down
2 changes: 1 addition & 1 deletion hawtio-web/src/main/webapp/app/fabric/js/pid.ts
Expand Up @@ -61,7 +61,7 @@ module Fabric {
$scope.response = response.value;
$scope.data = $scope.response.decodeBase64();
$scope.mode = $scope.getMode();
$scope.$apply();
Core.$apply($scope);
}
}

Expand Down
12 changes: 6 additions & 6 deletions hawtio-web/src/main/webapp/app/fabric/js/profile.ts
Expand Up @@ -31,11 +31,11 @@ module Fabric {
deleteConfigFile(jolokia, $scope.versionId, $scope.profileId, $scope.markedForDeletion, () => {
notification('success', 'Deleted file ' + $scope.markedForDeletion);
$scope.markedForDeletion = '';
$scope.$apply();
Core.$apply($scope);
}, (response) => {
notification('error', 'Failed to delete file ' + $scope.markedForDeletion + ' due to ' + response.error);
$scope.markedForDeletion = '';
$scope.$apply();
Core.$apply($scope);
});
};

Expand All @@ -56,17 +56,17 @@ module Fabric {
copyProfile(jolokia, $scope.versionId, $scope.profileId, $scope.newProfileName, true, () => {
notification('success', 'Created new profile ' + $scope.newProfileName);
$location.url("/fabric/profile/" + $scope.versionId + "/" + $scope.newProfileName);
$scope.$apply();
Core.$apply($scope);
}, (response) => {
notification('error', 'Failed to create new profile ' + $scope.newProfileName + ' due to ' + response.error);
$scope.$apply();
Core.$apply($scope);
});
}

function render(response) {
if (!Object.equal($scope.row, response.value)) {
$scope.row = response.value
$scope.$apply();
$scope.row = response.value;
Core.$apply($scope);
}
}
}
Expand Down
Expand Up @@ -49,7 +49,7 @@ module Fabric {
$scope.profiles = $scope.profiles.exclude((p) => { return $scope.includedProfiles.none((e) => { return e === p.id; })});
}

$scope.$apply();
Core.$apply($scope);
}
}

Expand Down
12 changes: 6 additions & 6 deletions hawtio-web/src/main/webapp/app/fabric/js/profiles.ts
Expand Up @@ -178,7 +178,7 @@ module Fabric {
createProfile(jolokia, $scope.version.id, $scope.newProfileName, parents, function() {
notification('success', "Created profile " + $scope.newProfileName);
$scope.newProfileName = "";
$scope.$apply();
Core.$apply($scope);
}, function(response) {
notification('error', "Failed to create profile " + $scope.newProfileName + " due to " + response.error);
});
Expand All @@ -191,7 +191,7 @@ module Fabric {
notification('success', "Created version " + response.value.id);
$scope.newVersionName = '';
$scope.version = response.value;
$scope.$apply();
Core.$apply($scope);
};

var error = function (response) {
Expand All @@ -218,11 +218,11 @@ module Fabric {
deleteVersion(jolokia, $scope.version.id, function() {
notification('success', "Deleted version " + $scope.version.id);
$scope.version = $scope.defaultVersion;
$scope.$apply();
Core.$apply($scope);
}, function(response) {
notification('error', "Failed to delete version " + $scope.version.id + " due to " + response.error);
$scope.version = $scope.defaultVersion;
$scope.$apply();
Core.$apply($scope);
});
};

Expand Down Expand Up @@ -267,7 +267,7 @@ module Fabric {
});
$scope.version = setSelect($scope.version, $scope.versions);

$scope.$apply();
Core.$apply($scope);
}

} else {
Expand All @@ -288,7 +288,7 @@ module Fabric {
});

$scope.profiles = filterActive($scope.profiles);
$scope.$apply();
Core.$apply($scope);
}
}
}
Expand Down
Expand Up @@ -36,7 +36,7 @@ module Fabric {
if ($scope.responseJson !== responseJson) {
$scope.responseJson = responseJson;
$scope.versions = response.value;
$scope.$apply();
Core.$apply($scope);
}
}

Expand Down

1 comment on commit 335768c

@gashcrumb
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoops, forgot to escape my $'s in the commit message :-)

Please sign in to comment.