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

Commit

Permalink
fix concurrent angularjs apply when gisting cluster health
Browse files Browse the repository at this point in the history
  • Loading branch information
lmenezes committed Jan 11, 2014
1 parent b379028 commit 8259066
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 16 deletions.
10 changes: 3 additions & 7 deletions dist/kopf.js
Original file line number Diff line number Diff line change
Expand Up @@ -1132,14 +1132,10 @@ function ClusterHealthController($scope,$location,$timeout, AlertService) {
var data = JSON.stringify(gist, undefined, 4);
$.ajax({ type: 'POST', url: "https://api.github.com/gists", dataType: 'json', data: data, async: false})
.done(function(response) {
$scope.updateModel(function() {
$scope.modal.alert = new SuccessAlert("Cluster health information successfully shared", "Gist available at : " + response.html_url);
});
$scope.modal.alert = new SuccessAlert("Cluster health information successfully shared", "Gist available at : " + response.html_url);
})
.fail(function(response) {
$scope.updateModel(function() {
$scope.modal.alert = new ErrorAlert("Error while publishing Gist", responseText);
});
$scope.modal.alert = new ErrorAlert("Error while publishing Gist", responseText);
}
);
}
Expand Down Expand Up @@ -1549,7 +1545,7 @@ function CreateIndexController($scope, $location, $timeout, AlertService) {
}
function GlobalController($scope, $location, $timeout, $sce, ConfirmDialogService, AlertService, SettingsService) {
$scope.dialog = ConfirmDialogService;
$scope.version = "0.4.0";
$scope.version = "0.4.1";
$scope.username = null;
$scope.password = null;
$scope.alerts_service = AlertService;
Expand Down
2 changes: 1 addition & 1 deletion es-plugin.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
description=kopf - simple web administration tool for ElasticSearch
version=0.4.0
version=0.4.1
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "elasticsearch-kopf",
"version": "0.4.0",
"version": "0.4.1",
"description": "kopf - simple web administration tool for ElasticSearch",
"main": "index.html",
"scripts": {
Expand Down
8 changes: 2 additions & 6 deletions src/kopf/controllers/cluster_health.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,10 @@ function ClusterHealthController($scope,$location,$timeout, AlertService) {
var data = JSON.stringify(gist, undefined, 4);
$.ajax({ type: 'POST', url: "https://api.github.com/gists", dataType: 'json', data: data, async: false})
.done(function(response) {
$scope.updateModel(function() {
$scope.modal.alert = new SuccessAlert("Cluster health information successfully shared", "Gist available at : " + response.html_url);
});
$scope.modal.alert = new SuccessAlert("Cluster health information successfully shared", "Gist available at : " + response.html_url);
})
.fail(function(response) {
$scope.updateModel(function() {
$scope.modal.alert = new ErrorAlert("Error while publishing Gist", responseText);
});
$scope.modal.alert = new ErrorAlert("Error while publishing Gist", responseText);
}
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/kopf/controllers/global.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function GlobalController($scope, $location, $timeout, $sce, ConfirmDialogService, AlertService, SettingsService) {
$scope.dialog = ConfirmDialogService;
$scope.version = "0.4.0";
$scope.version = "0.4.1";
$scope.username = null;
$scope.password = null;
$scope.alerts_service = AlertService;
Expand Down

0 comments on commit 8259066

Please sign in to comment.