FIX: discourse client should know about Logster (simpler approach) (#7237)
* Revert "FIX: discourse client should know about Logster (#7232)"
This reverts commit bfcbc4d2d6
.
* FIX: discourse client should know about Logster (simpler approach)
This commit is contained in:
parent
3f9e7eb326
commit
67b96ad2ff
|
@ -22,7 +22,8 @@ const SERVER_SIDE_ONLY = [
|
|||
/^\/wizard/,
|
||||
/\.rss$/,
|
||||
/\.json$/,
|
||||
/^\/admin\/upgrade$/
|
||||
/^\/admin\/upgrade$/,
|
||||
/^\/logs($|\/)/
|
||||
];
|
||||
|
||||
export function rewritePath(path) {
|
||||
|
|
|
@ -3,10 +3,6 @@ export default function() {
|
|||
this.route("exception", { path: "/exception" });
|
||||
this.route("exception-unknown", { path: "/404" });
|
||||
|
||||
this.route("logster", { path: "/logs" }, function() {
|
||||
this.route("logster-routes", { path: "*path" });
|
||||
});
|
||||
|
||||
this.route("about", { path: "/about", resetNamespace: true });
|
||||
|
||||
this.route("post", { path: "/p/:id" });
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
import getURL from "discourse-common/lib/get-url";
|
||||
import { getOwner } from "discourse-common/lib/get-owner";
|
||||
|
||||
export default Discourse.Route.extend({
|
||||
beforeModel(transition) {
|
||||
const router = getOwner(this).lookup("router:main");
|
||||
const currentURL = router.get("currentURL");
|
||||
transition.abort();
|
||||
|
||||
// hack due to Ember bug https://github.com/emberjs/ember.js/issues/5210
|
||||
// aborting the transition should revert the address bar to the
|
||||
// previous route's url, otherwise we will end up with a broken
|
||||
// back button
|
||||
// workaround is to update the address bar ourselves
|
||||
router.location.setURL(router.url);
|
||||
window.location.href = getURL(currentURL);
|
||||
}
|
||||
});
|
Loading…
Reference in New Issue