apache / apache/cloudstack

[4.22] Favicon only appears briefly, then disappears

オープン
#12,079 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
component:UI
主要言語
Java
スター
3.1k
フォーク
1.4k
平均マージ
6日 19時間
マージ済み PR(30日)
32

説明

### problem

When customizing the Primate UI’s favicon, it flashes for ~0.5 seconds during page load (while index.html is rendered) and then disappears as the SPA transitions to a white page before the login view fully loads. The favicon never reappears even though the icon file is valid and reachable.

The favicon 99% of the time:
Image

The favicon when it loads for 0.5 seconds:
Image

### versions

Environment

- Apache CloudStack version: 4.22.0.0
- OS: Ubuntu Noble (management server)
- Browser(s) tested: Chrome / Opera (same behavior)
- Deployment setup: Two management servers behind a VIP with HAProxy

### The steps to reproduce the bug

1. Replace default favicon:

> File: `/usr/share/cloudstack-management/webapp/cloud.ico`
> File: `/usr/share/cloudstack-management/webapp/assets/logo.svg`

2. Clear browser cache and reload the login page.
3. Observe favicon behavior during and after page load.

...

### What to do about it?

The Primate UI currently references two favicon sources:

- A hardcoded `` in `index.html`
- A configurable `"loginFavicon": "assets/logo.svg"` entry in `/etc/cloudstack/management/config.json`

This creates inconsistent behavior — the browser loads `cloud.ico` first (from `index.html`), then when the SPA initializes and renders based on `config.json`, the favicon reference isn’t updated or re-applied, causing it to disappear.

To fix this:

- Unify favicon handling so the UI consistently uses the favicon defined in `config.json` (similar to `appTitle` and `loginTitle`), and
- Remove or override the hardcoded `cloud.ico` link in `index.html` at runtime.

Alternatively, ensure the SPA explicitly re-sets the favicon after it mounts (e.g., by adding a small function that reads the `loginFavicon` key and updates `` dynamically).

This would let the favicon persist across page transitions and make it fully configurable, just like the logo and title.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、index.html にハードコードされた favicon リンクと /etc/cloudstack/management/config.json の loginFavicon エントリを比較し、次に、ログインページの初期化中に SPA が設定を適用するタイミングを追跡します。SPA の読み込み完了後およびページ遷移中も、デフォルトファイルを置き換えた後を含めて、設定された favicon が表示されたままになれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
frontend, web-dev
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。