이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 5. Customizing the Dashboard
The look and feel of the OpenStack dashboard can be customized using the settings defined in /openstack-dashboard/openstack_dashboard/local/local_settings.py. You can customize the following elements of the dashboard:
- HTML title
- Site branding link
- Help URL
In addition, you can create a custom theme and further customize the look and feel of the dashboard, including the following components:
- Logo
- Site colors
- Stylesheets
The OpenStack dashboard installs a default theme. If you do not want to use this theme, remove it using the following commands:
cd /usr/share/openstack-dashboard/openstack_dashboard/enabled cp _99_customization.py _999_remove_theme.py echo "DISABLED = True" >> _999_remove_theme.py systemctl restart httpd
# cd /usr/share/openstack-dashboard/openstack_dashboard/enabled
# cp _99_customization.py _999_remove_theme.py
# echo "DISABLED = True" >> _999_remove_theme.py
# systemctl restart httpd
For a director deployment, you will need to log in to each controller node as heat-admin to make the changes.
5.1. Logo, Site Colors, and Stylesheets 링크 복사링크가 클립보드에 복사되었습니다!
-
Copy the entire RCUE theme directory
/usr/share/openstack-dashboard/openstack_dashboard/themes/rcueto a new location, for example/usr/share/openstack-dashboard/openstack_dashboard/themes/mytheme. Create a new file
/etc/openstack-dashboard/local_settings.d/_12_mytheme_theme.pyand add the following line:AVAILABLE_THEMES = [('mytheme', 'My Custom Theme', 'themes/mytheme')]AVAILABLE_THEMES = [('mytheme', 'My Custom Theme', 'themes/mytheme')]Copy to Clipboard Copied! Toggle word wrap Toggle overflow Change all paths inside
/usr/share/openstack-dashboard/openstack_dashboard/themes/mytheme/static/replacingrcuewith the newmythemename.To change a theme's colors, graphics, fonts, among others, edit the files in `/usr/share/openstack-dashboard/openstack_dashboard/themes/mytheme`.
To change a theme's colors, graphics, fonts, among others, edit the files in `/usr/share/openstack-dashboard/openstack_dashboard/themes/mytheme`.Copy to Clipboard Copied! Toggle word wrap Toggle overflow If you deployed OpenStack with High Availability, restart the httpd service using pacemaker:
pcs resource restart httpd-clone
# pcs resource restart httpd-cloneCopy to Clipboard Copied! Toggle word wrap Toggle overflow Otherwise, run:
systemctl restart httpd
# systemctl restart httpdCopy to Clipboard Copied! Toggle word wrap Toggle overflow
To view your changes, reload your dashboard.
5.2. HTML Title 링크 복사링크가 클립보드에 복사되었습니다!
To set the HTML title that appears at the top of the browser window, add the following line to
local_settings.py.SITE_BRANDING = "Example, Inc. Cloud"
SITE_BRANDING = "Example, Inc. Cloud"Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Restart the httpd server.
5.3. Site Branding Link 링크 복사링크가 클립보드에 복사되었습니다!
The logo also acts as a hyperlink, redirecting to
horizon:user_homeby default. To change this, add the following attribute with the desired URL target tolocal_settings.py.SITE_BRANDING_LINK = "http://example.com"
SITE_BRANDING_LINK = "http://example.com"Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Restart the httpd server.
5.4. Help URL 링크 복사링크가 클립보드에 복사되었습니다!
By default the help URL points to https://access.redhat.com/documentation/en/red-hat-openstack-platform. You can change the help URL by editing the following attribute to the URL of your choice in
local_settings.py:'help_url': "http://openstack.example.com",
'help_url': "http://openstack.example.com",Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Restart the httpd server.