Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onCancel: function(){
// nothing to do...
angular.noop();
}
});
deleteSelectedPhonebookContact() {
const contacts = this.getSelection();
const queries = contacts.map(contact => this.api.sms.phonebookContact.delete({
serviceName: this.$stateParams.serviceName,
bookKey: get(this.phonebooks.current, 'bookKey'),
id: contact.id,
}).$promise);
this.phonebookContact.isDeleting = true;
queries.push(this.$timeout(angular.noop, 500)); // avoid clipping
this.TucToast.info(this.$translate.instant('sms_phonebooks_phonebook_contact_selected_delete_info'));
return this.$q.all(queries).then(() => {
this.phonebookContact.selected = {};
return this.refresh();
}).catch((err) => {
this.TucToast.error(this.$translate.instant('sms_phonebooks_phonebook_contact_selected_delete_ko', { error: get(err, 'data.message') }));
return this.$q.reject(err);
}).finally(() => {
this.phonebookContact.isDeleting = false;
});
}
changePassword() {
this.loading.changePasswordUser = true;
return this.$q
.all([
this.api.sms.users.edit(
{
serviceName: this.$stateParams.serviceName,
login: this.user.login,
},
pick(this.model.user, this.attributes),
).$promise,
this.$timeout(angular.noop, 1000),
])
.then(() => {
this.loading.changePasswordUser = false;
this.changed = true;
return this.$timeout(() => this.close(), 1000);
})
.catch((error) =>
this.cancel({
type: 'API',
msg: error,
}),
);
}
$onInit() {
this.filter = { ordering: '-ended', text: '' };
this.CollaborativeExam.listStudentParticipations().then((participations: Participation[]) => {
this.originals = Array.from(participations);
this.participations = Array.from(participations);
}).catch(angular.noop);
}
controller: function controller() {
const vm = this;
vm.toggled = vm.toggled || angular.noop;
vm.onChange = vm.onChange || angular.noop;
vm.required = vm.required || false;
const selectedNotInClusterList = () => {
return !(
angular.isArray(vm.clusters) &&
vm.clusters.length &&
vm.clusters.some(cluster => cluster === vm.model)
);
};
const modelIsSet = () => {
return vm.model !== undefined || vm.model !== null || vm.model.trim() !== '';
};
vm.clusterChanged = function() {
vm.onChange({ clusterName: vm.model });
describe('Service', () => {
let settings = {
"url": "http://connection.com/url",
"login": "login",
"password": "password",
"class": angular.noop,
"debug": true,
"vhost": "vhost",
"timeOut" : 5000,
"heartbeat": {
"outgoing": 1,
"incoming": 2
},
"autoConnect" : true
};
let Stomp = { client : x => x, over : x => x},
$q = { defer : x => x, reject : x => x },
promise = { then : func => func() },
defered = { promise : promise, resolve : angular.noop, reject : angular.noop},
aConnection = { unsubscribe : angular.noop },
stompClient = { connect : x => x, heartbeat : {}, subscribe : () => aConnection, send : angular.noop, disconnect : func => func() },
update() {
this.phonecontactForm.isUpdating = true;
return this.$q
.all([
this.api.sms.phonebooks.phonebookContact.update(
{
serviceName: this.$stateParams.serviceName,
bookKey: get(this.phonebook, 'bookKey'),
id: get(this.contact, 'id'),
},
this.TucPhonebookcontact.getContactData(this.phonecontactForm),
).$promise,
this.$timeout(angular.noop, 1000),
])
.then(() => {
this.phonecontactForm.isUpdating = false;
this.phonecontactForm.hasBeenUpdated = true;
return this.$timeout(() => this.close(), 1500);
})
.catch((error) =>
this.cancel({
type: 'API',
msg: error,
}),
);
}
.config(function(deploymentStrategyConfigProvider) {
if (SETTINGS.feature.pipelines !== false) {
deploymentStrategyConfigProvider.registerStrategy({
label: 'Custom',
description: 'Runs a custom deployment strategy',
key: 'custom',
providers: ['aws', 'gce', 'titus', 'kubernetes', 'appengine'],
additionalFields: [],
additionalFieldsTemplateUrl: require('./additionalFields.html'),
initializationMethod: angular.noop,
});
}
});
.directive('awsResizeCapacity', function () {
return {
restrict: 'E',
templateUrl: require('./resizeCapacity.directive.html'),
scope: {},
bindToController: {
command: '=',
currentSize: '='
},
controllerAs: 'vm',
controller: angular.noop,
};
});
return {
restrict: 'E',
templateUrl: require('./capacityFooter.directive.html'),
scope: {},
bindToController: {
command: '=',
wizard: '=',
form: '=',
taskMonitor: '=',
cancel: '&',
isValid: '&',
showSubmitButton: '&',
submit: '&'
},
controllerAs: 'vm',
controller: angular.noop,
};
});