Fix doc build warnings and errors
This change addresses the warnings and errors that are displayed when the docs are built, including: * Add reference to previously unreferenced workflow_extend in index file * Remove reference to a _static directory that doesn't exist * Fix formatting issues within the workflow_extend document Comments in the bug report discuss the need for warnings to be treated as errors, but this does not seem to be possible using the setup.py build_sphinx command. Change-Id: Iccccb9d104df9847ecd8a52aa73a7aa450bb5f34 Partial-Bug: #1411719
This commit is contained in:
parent
fc06637e4a
commit
dbd907643f
@ -274,7 +274,7 @@ html_theme_options = {
|
|||||||
# Add any paths that contain custom static files (such as style sheets) here,
|
# Add any paths that contain custom static files (such as style sheets) here,
|
||||||
# relative to this directory. They are copied after the builtin static files,
|
# relative to this directory. They are copied after the builtin static files,
|
||||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||||
html_static_path = ['_static']
|
html_static_path = []
|
||||||
|
|
||||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||||
# using the given strftime format.
|
# using the given strftime format.
|
||||||
|
@ -76,6 +76,8 @@ Detailed tutorials to help you get started.
|
|||||||
tutorials/plugin
|
tutorials/plugin
|
||||||
tutorials/dashboard
|
tutorials/dashboard
|
||||||
tutorials/table_actions
|
tutorials/table_actions
|
||||||
|
tutorials/workflow_extend
|
||||||
|
|
||||||
|
|
||||||
Topic Guides
|
Topic Guides
|
||||||
------------
|
------------
|
||||||
|
@ -8,7 +8,7 @@ custom data handling logic. Refer to inline documentation on what those
|
|||||||
properties and methods are.
|
properties and methods are.
|
||||||
|
|
||||||
We highly recommend that you complete the
|
We highly recommend that you complete the
|
||||||
:doc:``plugin tutorial </tutorials/plugin>`` if you have not done so already.
|
:doc:`plugin tutorial </tutorials/plugin>` if you have not done so already.
|
||||||
If you do not know how to package and install a plugin, the rest of this
|
If you do not know how to package and install a plugin, the rest of this
|
||||||
tutorial will not make sense! In this tutorial, we will examine an existing
|
tutorial will not make sense! In this tutorial, we will examine an existing
|
||||||
workflow and how we can extend it as a plugin.
|
workflow and how we can extend it as a plugin.
|
||||||
@ -27,6 +27,8 @@ Remember that the goal of this tutorial is to inject our custom step into an
|
|||||||
**existing** workflow. All of the files we are interested in reside in the
|
**existing** workflow. All of the files we are interested in reside in the
|
||||||
``static`` folder.
|
``static`` folder.
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
myplugin
|
myplugin
|
||||||
│
|
│
|
||||||
├── enabled
|
├── enabled
|
||||||
@ -55,31 +57,32 @@ to do is inject it as a dependency and then use the methods provided in the
|
|||||||
extensible service to override or modify steps. In this example, we are going to
|
extensible service to override or modify steps. In this example, we are going to
|
||||||
prepend our custom step so that it will show up as the first step in the wizard.
|
prepend our custom step so that it will show up as the first step in the wizard.
|
||||||
|
|
||||||
::
|
.. code-block:: javascript
|
||||||
(function () {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
angular
|
(function () {
|
||||||
.module('horizon.app.core.images')
|
'use strict';
|
||||||
.run(myPlugin);
|
|
||||||
|
|
||||||
myPlugin.$inject = [
|
angular
|
||||||
'horizon.app.core.images.basePath',
|
.module('horizon.app.core.images')
|
||||||
'horizon.app.core.images.workflows.create-volume.service'
|
.run(myPlugin);
|
||||||
];
|
|
||||||
|
|
||||||
function myPlugin(basePath, workflow) {
|
myPlugin.$inject = [
|
||||||
var customStep = {
|
'horizon.app.core.images.basePath',
|
||||||
id: 'mypluginstep',
|
'horizon.app.core.images.workflows.create-volume.service'
|
||||||
title: gettext('My Step'),
|
];
|
||||||
templateUrl: basePath + 'steps/mystep/mystep.html',
|
|
||||||
helpUrl: basePath + 'steps/mystep/mystep.help.html',
|
|
||||||
formName: 'myStepForm'
|
|
||||||
};
|
|
||||||
workflow.prepend(customStep);
|
|
||||||
}
|
|
||||||
|
|
||||||
})();
|
function myPlugin(basePath, workflow) {
|
||||||
|
var customStep = {
|
||||||
|
id: 'mypluginstep',
|
||||||
|
title: gettext('My Step'),
|
||||||
|
templateUrl: basePath + 'steps/mystep/mystep.html',
|
||||||
|
helpUrl: basePath + 'steps/mystep/mystep.help.html',
|
||||||
|
formName: 'myStepForm'
|
||||||
|
};
|
||||||
|
workflow.prepend(customStep);
|
||||||
|
}
|
||||||
|
|
||||||
|
})();
|
||||||
|
|
||||||
.. Note ::
|
.. Note ::
|
||||||
|
|
||||||
@ -104,7 +107,8 @@ In this example, we are listening for events generated by the wizard and the
|
|||||||
user panel. We also emit a custom event that other controllers can register to
|
user panel. We also emit a custom event that other controllers can register to
|
||||||
when favorite color changes.
|
when favorite color changes.
|
||||||
|
|
||||||
::
|
.. code-block:: javascript
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@ -171,7 +175,8 @@ simple example of a step that asks for your favorite color. The most important
|
|||||||
thing to note here is the reference to our controller via the ``ng-controller``
|
thing to note here is the reference to our controller via the ``ng-controller``
|
||||||
directive. This is essentially the link to our controller.
|
directive. This is essentially the link to our controller.
|
||||||
|
|
||||||
::
|
.. code-block:: html
|
||||||
|
|
||||||
<div ng-controller="horizon.app.core.images.steps.myStepController as ctrl">
|
<div ng-controller="horizon.app.core.images.steps.myStepController as ctrl">
|
||||||
<h1 translate>Blue Plugin</h1>
|
<h1 translate>Blue Plugin</h1>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
@ -199,4 +204,4 @@ Testing
|
|||||||
|
|
||||||
Now that we have completed our plugin, lets package it and test that it works.
|
Now that we have completed our plugin, lets package it and test that it works.
|
||||||
If you need a refresher, take a look at the installation section in
|
If you need a refresher, take a look at the installation section in
|
||||||
:doc:`Plugin Tutorial </tutorial/plugin>`.
|
:doc:`Plugin Tutorial </tutorials/plugin>`.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user