Home  >  Article  >  Web Front-end  >  openstack horizon CSS 离线 修改_html/css_WEB-ITnose

openstack horizon CSS 离线 修改_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:47:081330browse

Openstack horizon 的CSS主要保存在几个目录中,分别是horizon/static/dashboard/scss;horizon/openstack_dashboard/static/dashboard/css;和horizon/openstack_dashboard/static/dashboard/scss。

Horzion会对这几个目录中的的css进行压缩存放,然后使用。所以如果直接修改这几个文件夹中的css文件或像官网上写的修改horzion的css方法(如下)修改后的css,离线展示页面会遇到问题。以下给出解决办法。


按照官网上写的修改openstack horizon的页面css方法如下:

自定义一个css文件,如custom.css,如下,并保存到openstack_dashboard/static/dashboard/css中

然后修改openstack_dashboard/templates/_stylesheets.html文件添加如下一句

从启apache或运行manager.py后如果再其中的内容进行修改会报以下的错误


这正是由于horzion会对horizon/templates/horizon/_scripts.html;/openstack_dashboard/templates/_stylesheets.html和/horizon/templates/horizon/_conf.html三个文件做压缩存储的缘由,因此修改后本地访问会出现检测错误。

解决方法入下:

每次修改完成后执行命令一次 manage.py compress,让其重新压缩打包,然后重启apache就可以了。


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn