From becf86a8f1b1a9f294b9ba51236044ba2fa9e946 Mon Sep 17 00:00:00 2001 From: Memo Garcia Date: Fri, 31 Jul 2015 01:48:49 +0100 Subject: [PATCH] Add freezer dashboard documentation to html files Visual clues for Actions, Jobs and Sessions windows Change-Id: Ide863c5eff253f181fa77fc5c9334baeb4fb914d --- freezer_ui/backups/templates/backups/index.html | 4 ++-- freezer_ui/jobs/tables.py | 4 ++-- freezer_ui/jobs/templates/jobs/_action.html | 9 +++++++++ freezer_ui/jobs/templates/jobs/_advanced.html | 5 +++++ freezer_ui/jobs/templates/jobs/_info.html | 11 +++++++++++ freezer_ui/jobs/templates/jobs/_rules.html | 11 +++++++++++ freezer_ui/jobs/templates/jobs/_snapshot.html | 6 ++++++ freezer_ui/jobs/templates/jobs/browser.html | 4 ++-- freezer_ui/jobs/workflows/action.py | 2 ++ freezer_ui/jobs/workflows/configure.py | 2 ++ freezer_ui/sessions/templates/sessions/_info.html | 12 ++++++++++++ freezer_ui/sessions/templates/sessions/browser.html | 4 ++-- freezer_ui/sessions/workflows/create_session.py | 2 ++ .../static/freezer/js/freezer.actions.action.js | 9 --------- 14 files changed, 68 insertions(+), 17 deletions(-) create mode 100644 freezer_ui/jobs/templates/jobs/_info.html create mode 100644 freezer_ui/jobs/templates/jobs/_rules.html create mode 100644 freezer_ui/sessions/templates/sessions/_info.html diff --git a/freezer_ui/backups/templates/backups/index.html b/freezer_ui/backups/templates/backups/index.html index bb2d9e4..70795c7 100644 --- a/freezer_ui/backups/templates/backups/index.html +++ b/freezer_ui/backups/templates/backups/index.html @@ -6,10 +6,10 @@ {% endblock %} {% load i18n %} -{% block title %}{% trans "Backup History" %}{% endblock %} +{% block title %}{% trans "Backups" %}{% endblock %} {% block page_header %} - {% include "horizon/common/_page_header.html" with title=_("Backup History") %} + {% include "horizon/common/_page_header.html" with title=_("Backups") %} {% endblock page_header %} {% block main %} diff --git a/freezer_ui/jobs/tables.py b/freezer_ui/jobs/tables.py index 33ec6db..c58d4d6 100644 --- a/freezer_ui/jobs/tables.py +++ b/freezer_ui/jobs/tables.py @@ -154,7 +154,7 @@ class JobsTable(tables.DataTable): verbose_name=_("Job Name")) result = tables.Column("result", - verbose_name=_("Last Result")) + verbose_name=_("Job Result")) def get_object_id(self, backup_config): return backup_config.id @@ -225,7 +225,7 @@ class ObjectFilterAction(tables.FilterAction): class ActionsTable(tables.DataTable): action_name = tables.Column('action', - verbose_name=_("Action")) + verbose_name=_("Action Type")) backup_name = tables.Column('backup_name', verbose_name=_("Action Name")) diff --git a/freezer_ui/jobs/templates/jobs/_action.html b/freezer_ui/jobs/templates/jobs/_action.html index 3fce807..6c919a3 100644 --- a/freezer_ui/jobs/templates/jobs/_action.html +++ b/freezer_ui/jobs/templates/jobs/_action.html @@ -1,6 +1,15 @@ {% load i18n horizon humanize %} {% block help_message %} + +

{% blocktrans %}Action{% endblocktrans %}

+ +

{% blocktrans %}Specify the details for this action.{% endblocktrans %}

+ +

{% blocktrans %}An action is the simplest execution within a job, it could be a backup or a restore + and it contains rules that the action must follow (max retries, interval between intervals, etc) + .{% endblocktrans %}

+ {% endblock %} diff --git a/freezer_ui/jobs/templates/jobs/_advanced.html b/freezer_ui/jobs/templates/jobs/_advanced.html index f34edd6..e6d98e7 100644 --- a/freezer_ui/jobs/templates/jobs/_advanced.html +++ b/freezer_ui/jobs/templates/jobs/_advanced.html @@ -1,6 +1,11 @@ {% load i18n horizon humanize %} {% block help_message %} + +

{% blocktrans %}Advanced configuration{% endblocktrans %}

+ +

{% blocktrans %}Define extra information for the action to execute in the client.{% endblocktrans %}

+ {% endblock %} \ No newline at end of file diff --git a/freezer_ui/jobs/templates/jobs/_info.html b/freezer_ui/jobs/templates/jobs/_info.html new file mode 100644 index 0000000..773dd46 --- /dev/null +++ b/freezer_ui/jobs/templates/jobs/_info.html @@ -0,0 +1,11 @@ +{% load i18n horizon humanize %} + +{% block help_message %} +

{% blocktrans %}Job{% endblocktrans %}

+ +

{% blocktrans %}Specify the details for creating a job.{% endblocktrans %}

+ +

{% blocktrans %}A job defines an ordered list of actions to be executed in a client with scheduling information.{% endblocktrans %}

+ + +{% endblock %} \ No newline at end of file diff --git a/freezer_ui/jobs/templates/jobs/_rules.html b/freezer_ui/jobs/templates/jobs/_rules.html new file mode 100644 index 0000000..7a3f2b5 --- /dev/null +++ b/freezer_ui/jobs/templates/jobs/_rules.html @@ -0,0 +1,11 @@ +{% load i18n horizon humanize %} + +{% block help_message %} + +

{% blocktrans %}Rules{% endblocktrans %}

+ +

{% blocktrans %}Define rules for this action, from how many times it will retry the action, the interval + between interval and whether or not the action is mandatory. {% endblocktrans %}

+ +{% endblock %} + diff --git a/freezer_ui/jobs/templates/jobs/_snapshot.html b/freezer_ui/jobs/templates/jobs/_snapshot.html index 5b83b07..1761158 100644 --- a/freezer_ui/jobs/templates/jobs/_snapshot.html +++ b/freezer_ui/jobs/templates/jobs/_snapshot.html @@ -1,6 +1,12 @@ {% load i18n horizon humanize %} {% block help_message %} + +

{% blocktrans %}Action{% endblocktrans %}

+ +

{% blocktrans %}Specify weather this action should execute a snapshot on the client file system. + In Linux and it's distros it will use LVM and in Windows it will use Volume Shadow Copy{% endblocktrans %}

+ {% endblock %} \ No newline at end of file diff --git a/freezer_ui/jobs/templates/jobs/browser.html b/freezer_ui/jobs/templates/jobs/browser.html index 2f4b58e..61646d3 100644 --- a/freezer_ui/jobs/templates/jobs/browser.html +++ b/freezer_ui/jobs/templates/jobs/browser.html @@ -1,9 +1,9 @@ {% extends 'base.html' %} {% load i18n %} -{% block title %}{% trans "Job Configurations" %}{% endblock %} +{% block title %}{% trans "Jobs" %}{% endblock %} {% block page_header %} - {% include "horizon/common/_page_header.html" with title=_("Job Configurations") %} + {% include "horizon/common/_page_header.html" with title=_("Jobs") %} {% endblock page_header %} {% block main %} diff --git a/freezer_ui/jobs/workflows/action.py b/freezer_ui/jobs/workflows/action.py index 6641fa9..d32659c 100644 --- a/freezer_ui/jobs/workflows/action.py +++ b/freezer_ui/jobs/workflows/action.py @@ -565,6 +565,8 @@ class RulesConfigurationAction(workflows.Action): class Meta(object): name = _("Rules") + help_text_template = "freezer_ui/jobs" \ + "/_rules.html" class RulesConfiguration(workflows.Step): diff --git a/freezer_ui/jobs/workflows/configure.py b/freezer_ui/jobs/workflows/configure.py index 554982d..0502e16 100644 --- a/freezer_ui/jobs/workflows/configure.py +++ b/freezer_ui/jobs/workflows/configure.py @@ -166,6 +166,8 @@ class InfoConfigurationAction(workflows.Action): class Meta(object): name = _("Job Info") slug = "info" + help_text_template = "freezer_ui/jobs" \ + "/_info.html" class InfoConfiguration(workflows.Step): diff --git a/freezer_ui/sessions/templates/sessions/_info.html b/freezer_ui/sessions/templates/sessions/_info.html new file mode 100644 index 0000000..26bd441 --- /dev/null +++ b/freezer_ui/sessions/templates/sessions/_info.html @@ -0,0 +1,12 @@ +{% load i18n horizon humanize %} + +{% block help_message %} +

{% blocktrans %}Session{% endblocktrans %}

+ +

{% blocktrans %}Specify the name for this session.{% endblocktrans %}

+ +

{% blocktrans %}A session is a collection of jobs which share scheduling information and will coordinate one + or more clients.{% endblocktrans %}

+ + +{% endblock %} \ No newline at end of file diff --git a/freezer_ui/sessions/templates/sessions/browser.html b/freezer_ui/sessions/templates/sessions/browser.html index d1e7818..38c20f5 100644 --- a/freezer_ui/sessions/templates/sessions/browser.html +++ b/freezer_ui/sessions/templates/sessions/browser.html @@ -1,9 +1,9 @@ {% extends 'base.html' %} {% load i18n %} -{% block title %}{% trans "Session Configurations" %}{% endblock %} +{% block title %}{% trans "Sessions" %}{% endblock %} {% block page_header %} - {% include "horizon/common/_page_header.html" with title=_("Session Configurations") %} + {% include "horizon/common/_page_header.html" with title=_("Sessions") %} {% endblock page_header %} {% block main %} diff --git a/freezer_ui/sessions/workflows/create_session.py b/freezer_ui/sessions/workflows/create_session.py index 7e9edb8..07adaac 100644 --- a/freezer_ui/sessions/workflows/create_session.py +++ b/freezer_ui/sessions/workflows/create_session.py @@ -34,6 +34,8 @@ class SessionConfigurationAction(workflows.Action): class Meta: name = _("Session Information") slug = "sessions" + help_text_template = "freezer_ui/sessions" \ + "/_info.html" class SessionConfiguration(workflows.Step): diff --git a/freezer_ui/static/freezer/js/freezer.actions.action.js b/freezer_ui/static/freezer/js/freezer.actions.action.js index 3086eb0..28294b4 100644 --- a/freezer_ui/static/freezer/js/freezer.actions.action.js +++ b/freezer_ui/static/freezer/js/freezer.actions.action.js @@ -104,18 +104,15 @@ $("#id_storage").change(function() { if ($("#id_storage").val() == 'swift') { hideEverything(); showBackupOptions(); - $("#id_mode").closest(".form-group").hide(); } else if ($("#id_storage").val() == 'ssh') { hideEverything(); showBackupOptions(); - $("#id_mode").closest(".form-group").hide(); showSSHOptions(); } else if ($("#id_storage").val() == 'local') { hideEverything(); showBackupOptions(); - $("#id_mode").closest(".form-group").hide(); } else { hideEverything(); @@ -128,40 +125,34 @@ $("#id_mode").change(function() { if ($("#id_mode").val() == 'fs') { hideEverything(); showBackupOptions(); - $("#id_advanced_configuration").closest(".form-group").show(); } else if ($("#id_mode").val() == 'mysql') { hideEverything(); showBackupOptions(); $("#id_mysql_conf").closest(".form-group").show(); $("#id_sql_server_conf").closest(".form-group").hide(); - $("#id_advanced_configuration").closest(".form-group").show(); } else if ($("#id_mode").val() == 'mssql') { hideEverything(); showBackupOptions(); $("#id_sql_server_conf").closest(".form-group").show(); $("#id_mysql_conf").closest(".form-group").hide(); - $("#id_advanced_configuration").closest(".form-group").show(); } else if ($("#id_mode").val() == 'mongo') { hideEverything(); showBackupOptions(); $("#id_sql_server_conf").closest(".form-group").hide(); $("#id_mysql_conf").closest(".form-group").hide(); - $("#id_advanced_configuration").closest(".form-group").show(); } else if ($("#id_mode").val() == 'cinder') { hideEverything(); showCinderOptions(); $("#id_cinder_vol_id").closest(".form-group").show().addClass("required"); - $("#id_advanced_configuration").closest(".form-group").show(); } else if ($("#id_mode").val() == 'nova') { hideEverything(); showNovaOptions(); $("#id_nova_inst_id").closest(".form-group").show().addClass("required"); - $("#id_advanced_configuration").closest(".form-group").show(); } else {