1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-23 15:29:42 +02:00

feat(notifications): replace gritter with toastr (#793)

This commit is contained in:
Anthony Lapenna 2017-04-12 20:47:22 +01:00 committed by GitHub
parent 8e8b0578b2
commit f15cf3e8be
38 changed files with 277 additions and 728 deletions

View file

@ -1,6 +1,6 @@
angular.module('endpoint', [])
.controller('EndpointController', ['$scope', '$state', '$stateParams', '$filter', 'EndpointService', 'Messages',
function ($scope, $state, $stateParams, $filter, EndpointService, Messages) {
.controller('EndpointController', ['$scope', '$state', '$stateParams', '$filter', 'EndpointService', 'Notifications',
function ($scope, $state, $stateParams, $filter, EndpointService, Notifications) {
if (!$scope.applicationState.application.endpointManagement) {
$state.go('endpoints');
@ -31,7 +31,7 @@ function ($scope, $state, $stateParams, $filter, EndpointService, Messages) {
EndpointService.updateEndpoint(ID, endpointParams)
.then(function success(data) {
Messages.send("Endpoint updated", $scope.endpoint.Name);
Notifications.success("Endpoint updated", $scope.endpoint.Name);
$state.go('endpoints');
}, function error(err) {
$scope.state.error = err.msg;
@ -58,7 +58,7 @@ function ($scope, $state, $stateParams, $filter, EndpointService, Messages) {
$scope.formValues.TLSKey = data.TLSKey;
}, function error(err) {
$('#loadingViewSpinner').hide();
Messages.error("Failure", err, "Unable to retrieve endpoint details");
Notifications.error("Failure", err, "Unable to retrieve endpoint details");
});
}