视频中tabs.py遗漏了一段代码,请以文件夹mydashbaord里的代码为准
mkdir openstack_dashboard/dashboards/mydashboard
./run_tests.sh -m startdash mydashboard \
--target openstack_dashboard/dashboards/mydashboard
mkdir openstack_dashboard/dashboards/mydashboard/mypanel
./run_tests.sh -m startpanel mypanel \
--dashboard=openstack_dashboard.dashboards.mydashboard \
--target=openstack_dashboard/dashboards/mydashboard/mypanel
mkdir openstack_dashboard/dashboards/testdashboard
./run_tests.sh -m startdash testdashboard \
--target openstack_dashboard/dashboards/testdashboard
mkdir openstack_dashboard/dashboards/testdashboard/testpanel
./run_tests.sh -m startpanel testpanel \
--dashboard=openstack_dashboard.dashboards.testdashboard \
--target=openstack_dashboard/dashboards/testdashboard/testpanel
/horizon/openstack_dashboard/enabled
cp _2000_admin.py _2001_mydashboard.py
stack@openstack:~/horizon$ cat openstack_dashboard/enabled/_2001_mydashboard.py
# The slug of the dashboard to be added to HORIZON['dashboards']. Required.
DASHBOARD = 'mydashboard'
# A list of applications to be added to INSTALLED_APPS.
ADD_INSTALLED_APPS = [
'openstack_dashboard.dashboards.mydashboard',
]
AUTO_DISCOVER_STATIC_FILES = True
http://my.oschina.net/ckanner/blog/193370?fromerr=EaOiBYJN
阅读(1166) | 评论(0) | 转发(0) |