"OpenStack" OpenStack Series 14 Dashboard Custom development

Source: Internet
Author: User

  1. Django Overview
    1. Reference: http://blog.javachen.com/2014/01/11/how-to-create-a-django-site.html

      http://djangobook.py3k.cn/2.0/chapter05/

    2. Django Design MVC Concept

    3. Web Work Flow

    4. Choose the Django Reason: MVC, admin management, Automation orm, everything is python.
    5. Django Project Development Approximate steps

    6. Usage overview
      1. Projects and apps, using the model feature must create an app

    7. You can use Pydev's own Django support for rapid development. Create new project, create new app, configure URLs, and achieve views. URL advanced usage, not generally used.

    8. Templates, static, and model are added incrementally. RESTful style web development. settings.py needs to be set correctly:

      Views can be directly rendered back:

    9. Rendering can take parameters

    10. POST request

    11. Django log processing: Configuring log

      Reference: http://davidbj.blog.51cto.com/4159484/1433741

  2. Horizon Custom Development
    1. Reference: Http://www.tuicool.com/articles/b2UVniF

      http://www.chenshake.com/secondary-development-of-openstack-dashboard/

      Http://www.open-open.com/lib/view/open1389792987430.html

    2. Brief introduction

      http://www.metacloud.com/openstack-horizon-controlling-cloud-using-django/

    3. Horizon defines the public reusable components, openstack_dashboard specific components for OpenStack, dashboards the main parts of the front-end page, containing the front-and back-end code for each pannel. Such as:

    4. Admin inside, two x pannelgroup

      And only admin is visible:

    5. Dashboard extension Pannel

      Reference: http://docs.openstack.org/developer/horizon/topics/tutorial.html

    6. Create Pannel

      Under the Cd/var/www/horizon directory:

      mkdir Openstack_dashboard/dashboards/admin/mypanel

      Register and automatically generate the relevant code structure:

      ./run_tests.sh-n-M StartPanel mypanel--dashboard=openstack_dashboard.dashboards.admin--target=openstack_ Dashboard/dashboards/admin/mypanel

    7. Register: Modify the openstack_dashboard/dashboards/admin/dashboard.py under Admin, add Mypannel:

    8. Restart httpd, refresh the page, Mypannel display in the page:

    9. horizon custom development can be consulted:

      http://docs.openstack.org/developer/horizon/py-modindex.html

      http://my.oschina.net/zhouxingxing/blog/90283

      http://www.cloudcraft.cn/add-your-panel-ui-to-horizon/

      modify index.html file:

       

    10. View can pass parameters to the front end through the context.

      According to the other modules, according to gourd painting scoop, seven changes to eight changed to be done.

    11. DataView implementation in Pannel

      Add tables--Modify views, reference tables--return tables data--front-Section rendering

      Specific code can refer to:

      https://github.com/yongluo2013/osf-openstack-training/blob/master/code/horizon/openstack_dashboard/dashboards/ Admin/documents/templates/documents/index.html

Appendix:

013.Dashboard Front-end page structure:

013. Standard Django Application Stack:

013. Enhanced Horizon Application Stack:

"OpenStack" OpenStack Series 14 Dashboard Custom development

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.