angular.module('app.gbp').controller('AddEndpointController', AddEndpointController);
- AddEndpointController.$inject = ['$filter', '$mdDialog', '$scope', 'EndpointService', 'endpoint', 'ForwardingService', 'TenantService'];
+ AddEndpointController.$inject = ['$state', '$filter', '$mdDialog', '$scope', 'EndpointService', 'endpoint', 'ForwardingService'];
/* @ngInject */
- function AddEndpointController($filter, $mdDialog, $scope, EndpointService, endpoint, ForwardingService, TenantService) {
+ function AddEndpointController($state, $filter, $mdDialog, $scope, EndpointService, endpoint, ForwardingService) {
/* properties */
$scope.endpoint = endpoint ? endpoint : EndpointService.createObject();
function closeDialog(){
$mdDialog.cancel();
- $scope.getEndpointsList();
+ if($state.current.name == 'main.gbp.index.endpoints')
+ $scope.getEndpointsList();
}
function save() {
}
$scope.endpoint.post(function () {
$scope.closeDialog();
+ $scope.broadcastFromRoot('endpointChanged');
}, function () {
} );
}
function createFilterFor(query) {
return function filterFn(epg) {
- return (epg.indexOf(query) === 0);
+ return (epg.toLowerCase().indexOf(query.toLowerCase()) === 0);
};
}