Sha256: b89729ef248c432955c92f1466cf63e1eaa0a39f1522c2ab79defae20ef75c21
Contents?: true
Size: 1.08 KB
Versions: 10
Compression:
Stored size: 1.08 KB
Contents
!(angular => { 'use strict'; class QueryHandler { constructor($location, AlertFlash, $q) { this._alertFlash = AlertFlash; this._$location = $location; this._$q = $q; } success(action, schedule, query) { let _action = action || 'action'; let _schedule = _.exists(schedule) ? schedule : false; this._alertFlash.emitSuccess('Query "' + query.title + '" ' + _action + 'd!', _schedule); return query; } handleReplExit(error) { if(error === 'QueryReplExit') { // consume the error this._alertFlash.emitInfo('Exited editing REPL without saving', false); } else { return this._$q.reject(error); } } navigateToLatestVersion(query) { this._$location.path('/queries/' + query.id + '/query_versions/' + query.version.id); return query; } navigateToIndex() { this._$location.path('/queries'); } } QueryHandler.$inject = ['$location', 'AlertFlash', '$q']; angular.module('alephServices.queryHandler', []).service('QueryHandler', QueryHandler); }(angular));
Version data entries
10 entries across 5 versions & 1 rubygems