ROR Enterprise: Dark theme, tenancy switching

Hey,

RoR Enterprise: 1.19.5
Kibana and Elasticsearch 7.6.1

We have users that have access to multiple Kibana tenancies.
Some of these tenancies have dark theme enabled and some have it disabled.
If you switch from one tenancy to another, Kibana does not seem to apply the the theme correctly.
If you do an empty cache and hard reload the theme is applied, so it’s some sort of caching issue.

Would this be something you could fix?

Thanks in advance!

Hi @ronald.vanboven,
Interesting, did not investigate it yet, but I have a few ideas. Will add an internal ticket and notify this thread when it’s done.

This fix is committed to develop branch, we will release soon 1.33.0 and it will be generally available

Hi,
We just rolled this out to production and then noticed the switching from Dark theme to light theme is 100% correct.

So users start in a context with dark theme and then switches over to a context where dark theme is disabled.

Several UI elements remain dark themed.
Ctrl + Shift + R in Chrome resolves this.

Could you please check this as well?

Strange! What ROR version do you have right now?

Ah right, while writing it I thought “Dont forget the versions”.

Kibana 7.14.0
RoR Ent 1.33.1
Elasticsearch 7.14.0

1 Like

I cannot reproduce this after the fix I introduced in 1.33.0 :frowning: @Dzuming can you?

me neither, the only thing I was able to reproduce is, when I switch the theme into a dark → save changes, but not reload a page, the chart changed colors.

1 Like

Can this be due to a reverse proxy “aggressively” caching?

I did some testing with going directly to kibana port, bypassing the apache reverse proxy in front of it and indeed there the issue does not occur.

So this is a problem on my side, I will check further. Case can be considered closed.

Apologies and thanks for checking!

1 Like

This would explain indeed :slight_smile: Let us know what was wrong and how you fixed it. This might be a common issue!

Hi. Ronald and I checked the issue, and we found a cause of the issue. We use the below configuration in our Apache reverse proxy (that is used in front of Kibana for loadbalancing and failover).

<IfModule mod_expires.c> ExpiresActive On ExpiresDefault A0 ExpiresByType image/jpg "access plus 7 days" ExpiresByType image/gif "access plus 7 days" ExpiresByType image/jpeg "access plus 7 days" ExpiresByType image/png "access plus 7 days" ExpiresByType text/js "access plus 7 days" ExpiresByType image/swf "access plus 7 days" ExpiresByType text/css "access plus 7 days" ExpiresByType application/javascript "access plus 7 days" ExpiresByType application/x-shockwave-flash "access plus 7 days" ExpiresByType application/vnd.ms-fontobject "access plus 7 days" ExpiresByType application/x-font-woff "access plus 7 days" ExpiresByType image/x-icon "access plus 7 days" ExpiresByType image/svg+xml "access plus 7 days" </IfModule>

This causes the issue because some files are cached for (in this case) 7 days. It seems that in some way files are used for both dark and light mode, but the content of those files just changes (we did not check it, but it seems that way). We will probably keep the caching to prevent unneeded load on Kibana. If anyone knows how to solve this issue with the caching enabled, we would love to hear about it. Maybe there’s something that can be done in RoR, but I assume there is not to much that can be done from the ‘server side’.

1 Like