Skip to content
Snippets Groups Projects
Commit db18c256 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Merge branch 'master' into '875-django-setup-very-slow'

# Conflicts:
#   CHANGELOG.rst
parents 03cbeabf 944ee081
No related branches found
No related tags found
1 merge request!1277Improve logging
Pipeline #135411 passed with warnings
......@@ -15,9 +15,12 @@ Fixed
* Notifications were not properly shown in the frontend.
* [Dev] Log levels were not correctly propagated to all loggers
* [Dev] Log format did not contain all essential information
* When navigating from legacy to legacy page, the latter would reload once for no reason.
* The oauth authorization page was not accessible when the service worker was active.
* [Docker] Clear obsolete bundle parts when adding apps using ONBUILD
`3.1.1` - 2023-07-01
--------------------
`3.1.1`_ - 2023-07-01
---------------------
Fixed
~~~~~
......@@ -172,13 +175,13 @@ Changed
* Show languages in local language
* Rewrite of frontend (base template) using Vuetify
* Frontend bundling migrated from Webpack to Vite (cf. installation docs)
* [Dev] The runuwsgi dev server now starts a Vite dev server with HMR in the
background
* Frontend bundling migrated from Webpack to Vite (cf. installation docs)
* [Dev] The runuwsgi dev server now starts a Vite dev server with HMR in the
background
* OIDC scope "profile" now exposes the avatar instead of the official photo
* Based on Django 4.0
* Use built-in Redis cache backend
* Introduce PBKDF2-SHA1 password hashing
* Use built-in Redis cache backend
* Introduce PBKDF2-SHA1 password hashing
* Persistent database connections are now health-checked as to not fail
requests
* [Dev] The undocumented field `check` on `DataCheckResult` was renamed to `data_check`
......@@ -204,8 +207,8 @@ Removed
* iCal feed URLs for birthdays (will be reintroduced later)
* [Dev] Django debug toolbar
* It caused major performance issues and is not useful with the new
frontend anymore
* It caused major performance issues and is not useful with the new
frontend anymore
`2.12.3`_ - 2023-03-07
----------------------
......@@ -356,9 +359,7 @@ Fixed
* The menu button used to be displayed twice on smaller screens.
* The icons were loaded from external servers instead from local server.
* Weekdays were not translated if system locales were missing
* Added locales-all to base image and note to docs
* Added locales-all to base image and note to docs
* The icons in the account menu were still the old ones.
* Due to a merge error, the once removed account menu in the sidenav appeared again.
* Scheduled notifications were shown on dashboard before time.
......@@ -562,11 +563,9 @@ Changed
* Configuration files are now deep merged by default
* Improvements for shell_plus module loading
* core.Group model now takes precedence over auth.Group
* Name collisions are resolved by prefixing with the app label
* Apps can extend SHELL_PLUS_APP_PREFIXES and SHELL_PLUS_DONT_LOAD
* core.Group model now takes precedence over auth.Group
* Name collisions are resolved by prefixing with the app label
* Apps can extend SHELL_PLUS_APP_PREFIXES and SHELL_PLUS_DONT_LOAD
* [Docker] Base image now contains curl, grep, less, sed, and pspg
* Views raising a 404 error can now customise the message that is displayed on the error page
* OpenID Connect is enabled by default now, without RSA support
......
......@@ -126,7 +126,7 @@ ONBUILD RUN set -e; \
eatmydata pip install $APPS; \
fi; \
eatmydata aleksis-admin vite build; \
eatmydata aleksis-admin collectstatic --no-input; \
eatmydata aleksis-admin collectstatic --no-input --clear; \
rm -rf /usr/local/share/.cache; \
eatmydata apt-get remove --purge -y yarnpkg $BUILD_DEPS; \
eatmydata apt-get autoremove --purge -y; \
......
......@@ -21,10 +21,9 @@
</message-box>
<iframe
v-else
:src="'/django' + $route.path + queryString"
:src="iFrameSrc"
:height="iFrameHeight + 'px'"
class="iframe-fullsize"
@load="load"
ref="contentIFrame"
></iframe>
</template>
......@@ -41,6 +40,7 @@ export default {
data: function () {
return {
iFrameHeight: 0,
iFrameSrc: undefined,
};
},
computed: {
......@@ -53,13 +53,16 @@ export default {
},
},
methods: {
getIFrameURL() {
const location = this.$refs.contentIFrame.contentWindow.location;
const url = new URL(location);
return url;
},
/** Handle iframe data after inner page loaded */
load() {
// Write new location of iframe back to Vue Router
const location = this.$refs.contentIFrame.contentWindow.location;
const url = new URL(location);
const path = url.pathname.replace(/^\/django/, "");
const pathWithQueryString = path + encodeURI(url.search);
const path = this.getIFrameURL().pathname.replace(/^\/django/, "");
const pathWithQueryString = path + encodeURI(this.getIFrameURL().search);
const routePath =
path.charAt(path.length - 1) === "/" &&
this.$route.path.charAt(path.length - 1) !== "/"
......@@ -103,15 +106,36 @@ export default {
},
},
watch: {
$route() {
$route(newRoute) {
// Show loading animation once route changes
this.$root.contentLoading = true;
// Only reload iFrame content when navigation comes from outsite the iFrame
const path = this.getIFrameURL().pathname.replace(/^\/django/, "");
const routePath =
path.charAt(path.length - 1) === "/" &&
newRoute.path.charAt(path.length - 1) !== "/"
? newRoute.path + "/"
: newRoute.path;
if (path !== routePath) {
this.$refs.contentIFrame.contentWindow.location =
"/django" + this.$route.path + this.queryString;
} else {
this.$root.contentLoading = false;
}
// Scroll to top only when route changes to not affect form submits etc.
// A small duration to avoid flashing of the UI
this.$vuetify.goTo(0, { duration: 10 });
},
},
mounted() {
this.$refs.contentIFrame.addEventListener("load", (e) => {
this.load();
});
this.iFrameSrc = "/django" + this.$route.path + this.queryString;
},
name: "LegacyBaseTemplate",
};
</script>
......
......@@ -201,7 +201,9 @@ export default defineConfig({
navigateFallback: "/",
directoryIndex: null,
navigateFallbackAllowlist: [
new RegExp("^/(?!(django|admin|graphql|__icons__))[^.]*$"),
new RegExp(
"^/(?!(django|admin|graphql|__icons__|oauth/authorize))[^.]*$"
),
],
additionalManifestEntries: [
{ url: "/", revision: crypto.randomUUID() },
......@@ -215,7 +217,7 @@ export default defineConfig({
runtimeCaching: [
{
urlPattern: new RegExp(
"^/(?!(django|admin|graphql|__icons__))[^.]*$"
"^/(?!(django|admin|graphql|__icons__|oauth/authorize))[^.]*$"
),
handler: "CacheFirst",
},
......
......@@ -147,7 +147,7 @@ After that, you can install the aleksis meta-package, or only `aleksis-core`:
.. code-block:: shell
pip3 install --break-system-packages aleksis
aleksis-admin vite build
aleksis-admin collectstatic
aleksis-admin collectstatic --clear
aleksis-admin migrate
aleksis-admin createinitialrevisions
......
......@@ -91,7 +91,7 @@ All three steps can be done with the ``poetry shell`` command and
ALEKSIS_maintenance__debug=true ALEKSIS_database__password=aleksis poetry shell
poetry run aleksis-admin vite build
poetry run aleksis-admin collectstatic
poetry run aleksis-admin collectstatic --clear
poetry run aleksis-admin compilemessages
poetry run aleksis-admin migrate
poetry run aleksis-admin createinitialrevisions
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment