app/assets/javascripts/angular/directives/result/results_directive.js.es6 in aleph_analytics-0.0.4 vs app/assets/javascripts/angular/directives/result/results_directive.js.es6 in aleph_analytics-0.0.5
- old
+ new
@@ -1,12 +1,29 @@
!(angular => {
'use strict';
class ResultsController {
+
+ constructor(AlertFlash) {
+ this._alertFlash = AlertFlash;
+ this._hostname = angular.copy(location.host);
+ }
+
runQuery() {
this.resultRunner.run();
}
+
+ generateResultLink(result) {
+ return this._hostname + '/results/query/' + this.query.item.id +
+ '/query_version/' + this.query.item.version.id + '/result/' + result.item.id;
+ }
+
+ alertCopied() {
+ this._alertFlash.emitSuccess('Result link copied to clipboard!');
+ }
}
+
+ ResultsController.$inject = ['AlertFlash'];
function resultsComponent() {
return {
restrict: 'E',
scope: {