From dbd907643f3845b14a576b0c383493b46b05be49 Mon Sep 17 00:00:00 2001 From: Kaitlin Farr Date: Tue, 17 May 2016 17:36:32 -0400 Subject: [PATCH] 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 --- doc/source/conf.py | 2 +- doc/source/index.rst | 2 + doc/source/tutorials/workflow_extend.rst | 55 +++++++++++++----------- 3 files changed, 33 insertions(+), 26 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 56c71aa0fe..d26dc310f2 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -274,7 +274,7 @@ html_theme_options = { # 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, # 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, # using the given strftime format. diff --git a/doc/source/index.rst b/doc/source/index.rst index a2b00f8dfd..3e983c6348 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -76,6 +76,8 @@ Detailed tutorials to help you get started. tutorials/plugin tutorials/dashboard tutorials/table_actions + tutorials/workflow_extend + Topic Guides ------------ diff --git a/doc/source/tutorials/workflow_extend.rst b/doc/source/tutorials/workflow_extend.rst index 3777a4af49..7a842936b3 100644 --- a/doc/source/tutorials/workflow_extend.rst +++ b/doc/source/tutorials/workflow_extend.rst @@ -8,7 +8,7 @@ custom data handling logic. Refer to inline documentation on what those properties and methods are. We highly recommend that you complete the -:doc:``plugin tutorial `` if you have not done so already. +:doc:`plugin tutorial ` if you have not done so already. 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 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 ``static`` folder. +:: + myplugin │ ├── 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 prepend our custom step so that it will show up as the first step in the wizard. -:: -(function () { - 'use strict'; +.. code-block:: javascript - angular - .module('horizon.app.core.images') - .run(myPlugin); + (function () { + 'use strict'; - myPlugin.$inject = [ - 'horizon.app.core.images.basePath', - 'horizon.app.core.images.workflows.create-volume.service' - ]; + angular + .module('horizon.app.core.images') + .run(myPlugin); - 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); - } + myPlugin.$inject = [ + 'horizon.app.core.images.basePath', + 'horizon.app.core.images.workflows.create-volume.service' + ]; -})(); + 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 :: @@ -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 when favorite color changes. -:: +.. code-block:: javascript + (function() { '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`` directive. This is essentially the link to our controller. -:: +.. code-block:: html +

Blue Plugin

@@ -199,4 +204,4 @@ Testing 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 -:doc:`Plugin Tutorial `. +:doc:`Plugin Tutorial `.