The Horizon midcycle was held in San Jose, California from July 12-14, 2016. Thanks Rob and Cisco for hosting us! We had about a dozen Horizon contributors in attendance from 7 different companies (Cisco, HP, IBM, Intel, Mirantis, Rackspace, Symantec). We covered a lot of ground in three days, starting with the most important topic: a Horizon mascot/ logo. 🙂 Vampire cats, unicorns, superheros, and various memes were suggested. But onto serious business, here’s an update on what we covered for Newton.
Writing a form template can be a pain, not to mention how messy, bloated, and inconsistent it can get. You need to redefine every form field and its attributes. Luckily, there is an Angular solution called Schema Form which allows you to generate Bootstrap 3 supported form markup via a JSON schema. This will work with Horizon’s custom form validation and theming too. A first pass at it is in review with the Create Network form.
For more information, http://schemaform.io/.
Resource Type Registry
We have a resource type registration system that collects all the implementation details needed for creating a user interface, including display and behavior related to that resource type. You can retrieve these details from wherever you need – tables, detail views, forms, modals, and etc. It is created and accessed via the HEAT type name, for example: “OS::Cinder::Volume”, which is associated with a service API call.
The things returned by this singleton instance are:
- information about properties, for example labels and formatters for table column headers
Those marked with an asterisk (*) are also extensible, allowing you to add, remove, replace existing items.
With this information, you can build out different types of UI.
The inline code documentation is comprehensive with thorough examples. We continue to add and improve the registry. It has made the creation of panels very simple. One concern that was brought up at the midcycle was that these layers of abstraction make it difficult for users to figure out what the problem is. For example, if one of your row actions is not working, where do you start to debug it? We will address this with more documentation about how the framework components work together. For example, diving into the dependency chain of:
Images table has been converted to use the registry. Please take a look at that as the most up-to-date reference. Several others are in the review pipeline.
So a summary of what needs to be done with the registry are:
- High level documentation
- High level functional tests
- Stability of Angular framework
On a related note, this is the most comprehensive NG panel in tree. We focused on this one to help us establish patterns before developing other panels. Some more issues to tackle include handling asynchronous table events via polling and supporting multiple files direct upload (with CORS).
The quota usage was originally “manually” calculated in Horizon because there were no specific service API endpoints. It was very inefficient and sometimes did not align with the backend. However, cinderclient and novaclient now support it. Neutronclient does not yet. Consequently, we can improve how we fetch quota calls. There is a patch that will get the quota calls at the same time as getting the table data to improve the table render performance.
Continuing to theme elements (spinner, number spinner, legacy workflow). The current default styling will be moved to a separate repo and called “OpenStack Theme”. New default will be vanilla Bootstrap.
Glance V2 Support
This is a work-in-progress which has encountered regression issues in the Glance API. For example, V2 no longer supports creating an image from a URL. This feature can still be enabled within Glance, but it is not discoverable outside. If it is made discoverable, Horizon can add a configuration to local_settings.py to enable this feature.
We are adding more filtering. From the user’s perspective it works seamlessly whether it is client-side or server-side filtering.
Upgrading xstatic Packages
In the progress of upgrading Angular, Bootstrap UI.
How to Support Microversions [new]
Microversioning is used to add REST API changes to fix bugs and add new features after a major version has been released. These are often times backward incompatible. We have crude support for it in Horizon right now using if checks (in the case of unlock/ lock instances available in Nova 2.9). However, we do not have a general way to resolve this problem of enabling/ disabling the UI based on whether or not the feature is supported by the API.
Deprecation Policy [new]
We have enabled NG Launch Instance wizard and NG Swift panel as default. However, the legacy code is still in tree. We will put out a release note to let developers know that we intend to remove this panel in n cycles. We still need to discuss how many cycles this will be (to give people a chance to migrate over if they choose to do so) and whether or not we will put the legacy code into a deprecated panel plugin before we phase out.
On a side note, currently removing the legacy Launch Instance code will break integration tests. We need to clean up/ rewrite the tests.
Adding a utility library [new]
Considering adding Underscore or Lodash.
Error Messaging [ongoing]
Error messaging has always been a contentious topic in Horizon. The underlying problem is that there are no standards across APIs. So what we are left to do is either show vague, not-so-useful messages (“Volume could not be created”) or having to parse the error message with hardcoded keywords and then displaying a user-friendly message. We cannot return whatever the API gives us because that could contain sensitive content.
To alleviate the issue, we can do better validation on the client-side so we don’t need to make an API call and/ or let the user know at which step it errored out (“was not able to reach service”).
Dashboard Panel Organization [ongoing]
Currently, Horizon is split into Project and Admin and organized as “lists.” Usability studies and operator feedback informs us that it leads to a confusing navigation for new users, where they may dig into the contents of one panel, but they have to switch to another context to run an action. We are working with the OpenStack UX team to figure out what is the best way to improve navigation.
OSProfiler [in review]
NG Developers Panel [in review]
These are two new panels which are in development and in Horizon’s roadmap. They will assist developers implementing new panels and/ or tracing what API calls are being made.
So that is our 3-day midcycle in a nutshell. Feel free to visit our IRC channel @ #openstack-horizon if you have any questions.
Farewell for now, catch us in Barcelona in the fall!