Mercurial > farol
changeset 46:086e35c4aee7
Add description fields for edit_product and edit_branch
author | Benoît Allard <benoit.allard@greenbone.net> |
---|---|
date | Tue, 07 Oct 2014 14:07:57 +0200 |
parents | 7c4d001839e7 |
children | 309330b215d3 |
files | farol/templates/producttree/edit_branch.j2 farol/templates/producttree/edit_product.j2 |
diffstat | 2 files changed, 31 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/farol/templates/producttree/edit_branch.j2 Tue Oct 07 13:01:10 2014 +0200 +++ b/farol/templates/producttree/edit_branch.j2 Tue Oct 07 14:07:57 2014 +0200 @@ -30,8 +30,24 @@ {% block content %} <form role="form" method="POST"> -{{ selectinput('type', "Type", types, branch._type) }} -{{ textinput('name', "Name", value=branch._name, required=True) }} +{% call selectinput('type', "Type", types, branch._type) %} +<p>Branch <em>Types</em>:</p> +<dl class="dl-horizontal"> + <dt>Vendor:</dt><dd>The name of the vendor or manufacturer that makes the product</dd> + <dt>Product Family:</dt><dd>The product family that the product falls into</dd> + <dt>Product Name:</dt><dd>The name of the product</dd> + <dt>Product Version:</dt><dd>The product version, can be numeric or some other descriptor</dd> + <dt>Patch Level:</dt><dd>The patch level of the product</dd> + <dt>Service Pack:</dt><dd>The service pack of the product</dd> + <dt>Architecture:</dt><dd>The architecture for which the product is intended</dd> + <dt>Language:</dt><dd>The language of the product</dd> + <dt>Legacy:</dt><dd>A nonspecific legacy entry</dd> + <dt>Specification:</dt><dd>A specification such as a standard, best common practice, etc.</dd> +</dl> +{% endcall %} +{% call textinput('name', "Name", value=branch._name, required=True) %} +<p><em>Name</em> will contain the canonical descriptor or “friendly name” of the branch.</p> +{% endcall %} {{ selectinput2('parent', "Path to Parent Branch", branches, branch.getParentPath()) }} <button class="btn btn-primary" type="submit">{{ action or 'Update' }}</button>
--- a/farol/templates/producttree/edit_product.j2 Tue Oct 07 13:01:10 2014 +0200 +++ b/farol/templates/producttree/edit_product.j2 Tue Oct 07 14:07:57 2014 +0200 @@ -24,17 +24,25 @@ -#} {% extends "base.j2" %} -{% from "macros.j2" import textinput, selectinput2 %} +{% from "macros.j2" import textinput, selectinput2, examples %} {% block title %}Edit the product{% endblock %} {% set active = 'product' %} {% block content %} -<form role="form" method="POST"> +<p>The <strong>Full Product Name</strong> elements define the endpoints of the <strong>Product Tree</strong> and occur directly at the root level, at the branch level, or as the result of a relationship between two products.</p><form role="form" method="POST"> -{{ textinput('name', "Product Name", value=product._name, required=True) }} -{{ textinput('productid', "ProductID", placeholder="1234", value=product._productid, required=True) }} -{{ textinput('cpe', "CPE", placeholder="cpe:/a:...", value=product._cpe) }} +{% call textinput('name', "Product Name", value=product._name, required=True) %} +<p>The value of a <strong>Full Product Name</strong> element should be the product’s full canonical name, including version number and other attributes, as it would be used in a human-friendly document.</p> +{{ examples(['Microsoft Host Integration Server 2006 Service Pack 1', 'Microsoft Office 2008 for Mac 12.3.1 Update']) }} +{% endcall %} +{% call textinput('productid', "ProductID", placeholder="1234", value=product._productid, required=True) %} +<p>The <em>Product ID</em> attribute is required to identify a <strong>Full Product Name</strong> so that it can be referred to from other parts in the document. There is no predefined or required format for the <em>Product ID</em> as long as it uniquely identifies a product in the context of the current document. Examples include incremental integers or Globally Unique Identifiers (GUIDs).</p> +{{ examples(['CVRFPID-0004']) }} +{% endcall %} +{% call textinput('cpe', "CPE", placeholder="cpe:/a:...", value=product._cpe) %} +<p>The Common Platform Enumeration (<em>CPE</em>) attribute refers to a method for naming platforms. The structure for CPE is described at http://cpe.mitre.org. The <em>CPE</em> can be either an integer (if MITRE has an entry for the platform in question) or a candidate string from the vendor if no MITRE entry yet exists.</p> +{% endcall %} <hr> {{ selectinput2('parent_branch', "Parent Branch", orphaned_leaves , product.getParentPath()) }} {{ selectinput2('parent_relationship', "Parent relationship", orphaned_relationships, current_rel) }}