FIX: ember 3 support

FIX: ember 3 support

diff --git a/assets/javascripts/discourse/components/query-result.js.es6 b/assets/javascripts/discourse/components/query-result.js.es6
index 6224e9d..22a22a0 100644
--- a/assets/javascripts/discourse/components/query-result.js.es6
+++ b/assets/javascripts/discourse/components/query-result.js.es6
@@ -60,7 +60,7 @@ const QueryResultComponent = Ember.Component.extend({
       }
     }
     return arr;
-  }.property("params.@each"),
+  }.property("params.[]"),
 
   columnDispNames: function() {
     if (!this.get("columns")) {
@@ -76,7 +76,7 @@ const QueryResultComponent = Ember.Component.extend({
       }
       return colName;
     });
-  }.property("content", "columns.@each"),
+  }.property("content", "columns.[]"),
 
   fallbackTemplate: function() {
     return getOwner(this).lookup("template:explorer/text.raw");
@@ -103,7 +103,7 @@ const QueryResultComponent = Ember.Component.extend({
 
       return { name: viewName, template };
     });
-  }.property("content", "columns.@each"),
+  }.property("content", "columns.[]"),
 
   transformedUserTable: function() {
     return transformedRelTable(this.get("content.relations.user"));
diff --git a/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 b/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6
index 84535e5..6b95755 100644
--- a/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6
+++ b/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6
@@ -44,7 +44,7 @@ export default Ember.Controller.extend({
 
   selectedItem: function() {
     const id = parseInt(this.get("selectedQueryId"));
-    const item = this.get("content").find(q => q.get("id") === id);
+    const item = this.get("model").find(q => q.get("id") === id);
     !isNaN(id)
       ? this.set("showRecentQueries", false)
       : this.set("showRecentQueries", true);
@@ -54,7 +54,7 @@ export default Ember.Controller.extend({
 
   othersDirty: function() {
     const selected = this.get("selectedItem");
-    return !!this.get("content").find(q => q !== selected && q.get("dirty"));
+    return !!this.get("model").find(q => q !== selected && q.get("dirty"));
   }.property("selectedItem", "selectedItem.dirty"),
 
   setEverEditing: function() {
diff --git a/assets/javascripts/discourse/routes/admin-plugins-explorer.js.es6 b/assets/javascripts/discourse/routes/admin-plugins-explorer.js.es6
index 45f95c9..def6331 100644
--- a/assets/javascripts/discourse/routes/admin-plugins-explorer.js.es6
+++ b/assets/javascripts/discourse/routes/admin-plugins-explorer.js.es6
@@ -27,6 +27,7 @@ export default Discourse.Route.extend({
   actions: {
     refreshModel: function() {
       this.refresh();
+      return false;
     }
   }
 });
diff --git a/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs b/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs
index ecb1379..c397e1b 100644
--- a/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs
+++ b/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs
@@ -1,19 +1,18 @@
 {{#explorer-container hideSchema=hideSchema everEditing=everEditing}}
-
   {{#if disallow}}
     <h1>{{i18n "explorer.admins_only"}}</h1>
   {{else}}
     {{#unless selectedQueryId}}
       <div class="query-list">
         {{text-field value=search placeholderKey="explorer.search_placeholder"}}
-        {{d-button action="showCreate" icon="plus" class="no-text btn-right"}}
-        {{d-button action="importQuery" label="explorer.import.label" icon="upload"}}
+        {{d-button action=(action "showCreate") icon="plus" class="no-text btn-right"}}
+        {{d-button action=(action "importQuery") label="explorer.import.label" icon="upload"}}
       </div>
 
       {{#if showCreate}}
         <div class="query-create">
           {{text-field value=newQueryName placeholderKey="explorer.create_placeholder"}}
-          {{d-button action="create" disabled=createDisabled label="explorer.create" icon="plus" class="btn-primary"}}
+          {{d-button action=(action "create") disabled=createDisabled label="explorer.create" icon="plus" class="btn-primary"}}
         </div>
       {{/if}}
 
@@ -25,13 +24,13 @@
       {{/if}}
     {{/unless}}
 
-    {{#if content.length}}
+    {{#if model.length}}
       {{#unless selectedItem.fake}}
         <div class="query-edit {{if editName "editing"}}">
           {{#if selectedItem}}
             {{#if editing}}
               <div class="name">
-                  {{d-button action="goHome" icon="chevron-left" class="previous"}}
+                  {{d-button action=(action "goHome") icon="chevron-left" class="previous"}}
                 <div class="name-text-field">
                   {{text-field value=selectedItem.name}}
                 </div>
@@ -41,7 +40,7 @@
               </div>
             {{else}}
               <div class="name">
-                {{d-button action="goHome" icon="chevron-left" class="previous"}}
+                {{d-button action=(action "goHome") icon="chevron-left" class="previous"}}
                 <h1>{{selectedItem.name}}
                   {{#unless editDisabled}}
                     <a {{action "editName" class="edit-query-name"}}>{{d-icon "pencil"}}</a>
@@ -77,23 +76,23 @@
 
             <div class="pull-left">
               {{#if everEditing}}
-                {{d-button action="save" label="explorer.save" disabled=saveDisabled class="btn-primary"}}
+                {{d-button action=(action "save") label="explorer.save" disabled=saveDisabled class="btn-primary"}}
               {{else}}
                 {{#unless editDisabled}}
-                  {{d-button action="editName" label="explorer.edit" icon="pencil" class="btn-primary"}}
+                  {{d-button action=(action "editName") label="explorer.edit" icon="pencil" class="btn-primary"}}
                 {{/unless}}
               {{/if}}
-              {{d-button action="download" label="explorer.export" disabled=runDisabled icon="download"}}
+              {{d-button action=(action "download") label="explorer.export" disabled=runDisabled icon="download"}}
             </div>
             <div class="pull-right">
               {{#if selectedItem.destroyed}}
-                {{d-button action="recover" class="" icon="undo" label="explorer.recover"}}
+                {{d-button action=(action "recover") class="" icon="undo" label="explorer.recover"}}
               {{else}}
                 {{#if everEditing}}
-                  {{d-button action="discard" class="btn-danger" icon="undo" label="explorer.undo" disabled=saveDisabled}}
+                  {{d-button action=(action "discard") class="btn-danger" icon="undo" label="explorer.undo" disabled=saveDisabled}}
                 {{/if}}
                 {{#unless editDisabled}}
-                  {{d-button action="destroy" class="btn-danger" icon="trash" label="explorer.delete"}}
+                  {{d-button action=(action "destroy") class="btn-danger" icon="trash" label="explorer.delete"}}
                 {{/unless}}
               {{/if}}
             </div>
@@ -117,10 +116,10 @@
             {{#if saveDisabled}}
               {{d-button label="explorer.run" disabled="true" class="btn-primary"}}
             {{else}}
-              {{d-button action="saverun" label="explorer.saverun"}}
+              {{d-button action=(action "saverun") label="explorer.saverun"}}
             {{/if}}
           {{else}}
-            {{d-button action="run" label="explorer.run" disabled=runDisabled class="btn-primary" type="submit"}}
+            {{d-button action=(action "run") label="explorer.run" disabled=runDisabled class="btn-primary" type="submit"}}
           {{/if}}
           <label class="query-plan">{{input type="checkbox" checked=explain name="explain"}} {{i18n "explorer.explain_label"}}</label>
         </form>
diff --git a/assets/javascripts/discourse/templates/components/explorer-schema.hbs b/assets/javascripts/discourse/templates/components/explorer-schema.hbs

[... diff too long, it was truncated ...]

GitHub sha: 2b6357f8