aleph_analytics 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/angular/controllers/query/query_repl_controller.js.es6 +1 -1
- data/app/assets/javascripts/angular/directives/query/query_details_directive.js.es6 +18 -2
- data/app/assets/javascripts/angular/services/model/model_base.js.es6 +6 -0
- data/app/assets/stylesheets/queries.css.sass +3 -0
- data/app/views/queries/_query_details.html.haml +8 -1
- data/lib/aws_s3.rb +3 -1
- data/lib/pagination_search/hash_paginate.rb +3 -2
- data/lib/pagination_search/search_conditions.rb +1 -1
- data/public/assets/{.sprockets-manifest-f2e907b8dd5ccd1b5394fc3d2f4c2f5b.json → .sprockets-manifest-db701e8ddeb121fb438905e98c289832.json} +1 -1
- data/public/assets/angular/controllers/query/{query_repl_controller.js-0448a8eed79f78efe189d454626a714f.es6 → query_repl_controller.js-0afdd52039f0b9d6109c2acd45cc8307.es6} +1 -1
- data/public/assets/angular/directives/query/{query_details_directive.js-0f6ac0f0515854a026ec6582e07e76b8.es6 → query_details_directive.js-9ed5b4d1ee4b86889d0de38bc93bac26.es6} +18 -2
- data/public/assets/angular/services/model/{model_base.js-9fd807dfdf4f26afe60d8e282ca08e6c.es6 → model_base.js-da583bf2f97001d609a540f7767174ed.es6} +6 -0
- data/public/assets/{application-dfbb8b5c9f13286f32601250c5aef5e8.css → application-18bf9378371fb83c5d7714ee63887d6d.css} +1 -1
- data/public/assets/{application-119e0de54b9da9bf755ed98f87f1fab2.js → application-2d39a2a295cb3e0266f72956b3a62534.js} +4 -4
- metadata +8 -8
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
class QueryDetailsController {
|
5
5
|
constructor(QueryHandler, QueryTab, TagResource, defaultDateFormat, DefaultAceConfigurator, OpenReplService,
|
6
|
-
RoleModel) {
|
6
|
+
RoleModel, Query) {
|
7
7
|
this._handler = QueryHandler;
|
8
8
|
this._repl = OpenReplService;
|
9
9
|
this._tags = TagResource;
|
@@ -11,6 +11,7 @@
|
|
11
11
|
this._tabs = QueryTab;
|
12
12
|
this.dateFormat = defaultDateFormat;
|
13
13
|
this.aceLoaded = editor => new DefaultAceConfigurator(editor).readOnlyConfig();
|
14
|
+
this._Query = Query;
|
14
15
|
|
15
16
|
RoleModel.initCollection();
|
16
17
|
this._closeCommentDialog();
|
@@ -35,6 +36,15 @@
|
|
35
36
|
this.resultRunner.run().then(this._tabs.navigateToTab.bind(this._tabs, 'results'));
|
36
37
|
}
|
37
38
|
|
39
|
+
cloneQuery() {
|
40
|
+
let clone = this.query.clone();
|
41
|
+
clone._item.title = "Copy of " + clone._item.title;
|
42
|
+
|
43
|
+
clone.save()
|
44
|
+
.then(this._internalizeQueryItem.bind(this))
|
45
|
+
.then(this._handler.navigateToLatestVersion.bind(this._handler));
|
46
|
+
}
|
47
|
+
|
38
48
|
deleteQuery() {
|
39
49
|
this.query.destroy().then(this._handler.navigateToIndex.bind(this._handler));
|
40
50
|
}
|
@@ -60,10 +70,16 @@
|
|
60
70
|
this.form.$setPristine();
|
61
71
|
return query;
|
62
72
|
}
|
73
|
+
|
74
|
+
_internalizeQueryItem(queryItem) {
|
75
|
+
let query = new this._Query;
|
76
|
+
query.internalize(queryItem);
|
77
|
+
return query;
|
78
|
+
}
|
63
79
|
}
|
64
80
|
|
65
81
|
QueryDetailsController.$inject = ['QueryHandler', 'QueryTab', 'TagResource', 'defaultDateFormat',
|
66
|
-
'DefaultAceConfigurator', 'OpenReplService', 'RoleModel'];
|
82
|
+
'DefaultAceConfigurator', 'OpenReplService', 'RoleModel', 'Query'];
|
67
83
|
|
68
84
|
function queryDetailsComponent() {
|
69
85
|
return {
|
@@ -37,6 +37,12 @@
|
|
37
37
|
return this._resource.destroy({ id: this.item.id }).$promise.then(item => item);
|
38
38
|
}
|
39
39
|
|
40
|
+
clone() {
|
41
|
+
let clone = angular.copy(this);
|
42
|
+
clone._item.id = undefined;
|
43
|
+
return clone;
|
44
|
+
}
|
45
|
+
|
40
46
|
fetch(params) {
|
41
47
|
return this._resource.show(params).$promise.then(i => {
|
42
48
|
this.item = i;
|