Migrate away from `Discourse.getURL`

Migrate away from Discourse.getURL

docker_manager’s implementation of getURL doesn’t use the core Discourse method so this might seem a little pointless, but it greatly helps in our ability to grep the plugins so it’s worth doing.

diff --git a/assets/docker-manager-app.js b/assets/docker-manager-app.js
index 93b6819..6471475 100644
--- a/assets/docker-manager-app.js
+++ b/assets/docker-manager-app.js
@@ -7,13 +7,13 @@ var t=Ember.Component.extend({classNameBindings:[":progress",":progress-striped"
 return e>0?(e>100&&(e=100),("width: "+this.get("percent")+"%").htmlSafe()):"".htmlSafe()})})
 e.default=t}),define("manager-client/components/repo-status",["exports","manager-client/discourse"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
 var n=Ember.Component.extend({router:Ember.inject.service(),tagName:"tr",upgradeDisabled:Ember.computed("upgradingRepo","repo","managerRepo","managerRepo.upToDate",function(){if(!this.get("upgradingRepo")){var e=this.get("managerRepo")
-return!!e&&(!e.get("upToDate")&&e!==this.get("repo"))}return!0}),officialRepoImageSrc:Ember.computed("repo.official",function(){if(this.get("repo.official"))return t.default.getURL("/plugins/docker_manager/images/font-awesome-check-circle.png")}),actions:{upgrade:function(){this.get("router").transitionTo("upgrade",this.get("repo"))}}})
+return!!e&&(!e.get("upToDate")&&e!==this.get("repo"))}return!0}),officialRepoImageSrc:Ember.computed("repo.official",function(){if(this.get("repo.official"))return t.default.getAppURL("/plugins/docker_manager/images/font-awesome-check-circle.png")}),actions:{upgrade:function(){this.get("router").transitionTo("upgrade",this.get("repo"))}}})
 e.default=n}),define("manager-client/components/x-console",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
 var t=Ember.Component.extend({classNameBindings:[":logs"],_outputChanged:Ember.observer("output",function(){Ember.run.scheduleOnce("afterRender",this,"_scrollBottom")}),_scrollBottom:function(){this.get("followOutput")&&this.$().scrollTop(this.$()[0].scrollHeight)},didInsertElement:function(){this._super.apply(this,arguments),this._scrollBottom()}})
 e.default=t}),define("manager-client/controllers/application",["exports","manager-client/discourse"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
 var n=Ember.Controller.extend({showBanner:Ember.computed("banner","bannerDismissed","banner.[]",function(){if(this.get("bannerDismissed"))return!1
 var e=this.get("banner")
-return e&&e.length>0}),appendBannerHtml:function(e){var t=this.get("banner")||[];-1===t.indexOf(e)&&t.pushObject(e),this.set("banner",t)},logoUrl:Ember.computed(function(){return t.default.getURL("/assets/images/docker-manager-aff8eaea0445c0488c19f8cfd14faa8c2b278924438f19048eacc175d7d134e4.png")}),returnToSiteUrl:Ember.computed(function(){return t.default.getURL("/")}),backupsUrl:Ember.computed(function(){return t.default.getURL("/admin/backups")}),actions:{dismiss:function(){this.set("bannerDismissed",!0)}}})
+return e&&e.length>0}),appendBannerHtml:function(e){var t=this.get("banner")||[];-1===t.indexOf(e)&&t.pushObject(e),this.set("banner",t)},logoUrl:Ember.computed(function(){return t.default.getAppURL("/assets/images/docker-manager-aff8eaea0445c0488c19f8cfd14faa8c2b278924438f19048eacc175d7d134e4.png")}),returnToSiteUrl:Ember.computed(function(){return t.default.getAppURL("/")}),backupsUrl:Ember.computed(function(){return t.default.getAppURL("/admin/backups")}),actions:{dismiss:function(){this.set("bannerDismissed",!0)}}})
 e.default=n}),define("manager-client/controllers/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
 var t=Ember.Controller.extend({managerRepo:null,upgrading:null,upgradeAllButtonDisabled:Ember.computed("managerRepo.upToDate","allUpToDate",function(){return!this.get("managerRepo.upToDate")||this.get("allUpToDate")}),allUpToDate:Ember.computed("model.@each.upToDate",function(){return this.get("model").every(function(e){return e.get("upToDate")})}),actions:{upgradeAllButton:function(){this.replaceRoute("upgrade","all")}}})
 e.default=t}),define("manager-client/controllers/processes",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
@@ -33,7 +33,7 @@ e.get("upgrading")||e.startUpgrade()},resetUpgrade:function(){var e=this
 bootbox.confirm("WARNING: You should only reset upgrades that have failed and are not running.\n\nThis will NOT cancel currently running builds and should only be used as a last resort.",function(n){if(n){if(e.get("multiUpgrade"))return t.default.resetAll(e.get("model").filter(function(e){return!e.get("upToDate")})).finally(function(){e.reset(),e.updateAttribute("upgrading",!1)})
 e.get("model")[0].resetUpgrade().then(function(){e.reset()})}})}}})
 e.default=n}),define("manager-client/discourse",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
-var t={getURL:function(e){var n
+var t={getAppURL:function(e){var n
 return this.hasOwnProperty("rootUrl")||(n=Em.$("#preloaded-data").data("preload"),Em.$.extend(t,n)),e&&("/"===e||/^\/[^\/]/.test(e))?-1!==e.indexOf(this.rootUrl)?e:("/"!==e[0]&&(e="/"+e),this.rootUrl+e):e}},n=t
 e.default=n}),define("manager-client/helpers/app-version",["exports","manager-client/config/environment","ember-cli-app-version/utils/regexp"],function(e,t,n){function r(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.default.APP.version,o=r.versionOnly||r.hideSha,i=r.shaOnly||r.hideVersion,l=null
 return o&&(r.showExtended&&(l=a.match(n.versionExtendedRegExp)),l||(l=a.match(n.versionRegExp))),i&&(l=a.match(n.shaRegExp)),l?l[0]:a}Object.defineProperty(e,"__esModule",{value:!0}),e.appVersion=r,e.default=void 0
@@ -59,7 +59,7 @@ e.default=o}),define("manager-client/initializers/container-debug-adapter",["exp
 var n={name:"container-debug-adapter",initialize:function(){var e=arguments[1]||arguments[0]
 e.register("container-debug-adapter:main",t.default),e.inject("container-debug-adapter:main","namespace","application:main")}}
 e.default=n}),define("manager-client/initializers/crsf-token",["exports","manager-client/discourse"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
-var n={name:"findCsrfToken",initialize:function(){return Em.$.ajax(t.default.getURL("/session/csrf")).then(function(e){var t=e.csrf
+var n={name:"findCsrfToken",initialize:function(){return Em.$.ajax(t.default.getAppURL("/session/csrf")).then(function(e){var t=e.csrf
 Em.$.ajaxPrefilter(function(e,n,r){e.crossDomain||r.setRequestHeader("X-CSRF-Token",t)})})}}
 e.default=n}),define("manager-client/initializers/ember-data",["exports","ember-data/setup-container","ember-data"],function(e,t,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
 var r={name:"ember-data",initialize:t.default}
@@ -72,25 +72,25 @@ n=self}var r,a=t.default.exportApplicationGlobal
 r="string"==typeof a?a:Ember.String.classify(t.default.modulePrefix),n[r]||(n[r]=e,e.reopen({willDestroy:function(){this._super.apply(this,arguments),delete n[r]}}))}}Object.defineProperty(e,"__esModule",{value:!0}),e.initialize=n,e.default=void 0
 var r={name:"export-application-global",initialize:n}
 e.default=r}),define("manager-client/initializers/message-bus",["exports","manager-client/discourse"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
-var n={name:"message-bus",initialize:function(){MessageBus.baseUrl=t.default.longPollingBaseUrl.replace(/\/$/,"")+"/","/"!==MessageBus.baseUrl?MessageBus.ajax=function(e){return e.headers=e.headers||{},e.headers["X-Shared-Session-Key"]=Em.$("meta[name=shared_session_key]").attr("content"),Em.$.ajax(e)}:MessageBus.baseUrl=t.default.getURL("/")}}
+var n={name:"message-bus",initialize:function(){MessageBus.baseUrl=t.default.longPollingBaseUrl.replace(/\/$/,"")+"/","/"!==MessageBus.baseUrl?MessageBus.ajax=function(e){return e.headers=e.headers||{},e.headers["X-Shared-Session-Key"]=Em.$("meta[name=shared_session_key]").attr("content"),Em.$.ajax(e)}:MessageBus.baseUrl=t.default.getAppURL("/")}}

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

GitHub sha: 4f856c3c