comparison farol/templates/producttree/edit_product.j2 @ 163:1d63a532ccce

Add possibility to create product Tree from the cpe itself.
author Benoît Allard <benoit.allard@greenbone.net>
date Tue, 30 Dec 2014 14:34:21 +0100
parents 086e35c4aee7
children
comparison
equal deleted inserted replaced
162:07210df10edd 163:1d63a532ccce
22 # along with this program; if not, write to the Free Software 22 # along with this program; if not, write to the Free Software
23 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 23 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
24 -#} 24 -#}
25 25
26 {% extends "base.j2" %} 26 {% extends "base.j2" %}
27 {% from "macros.j2" import textinput, selectinput2, examples %} 27 {% from "macros.j2" import textinput, selectinput2, examples, checkbox %}
28 {% block title %}Edit the product{% endblock %} 28 {% block title %}Edit the product{% endblock %}
29 29
30 {% set active = 'product' %} 30 {% set active = 'product' %}
31 31
32 {% block content %} 32 {% block content %}
38 {% endcall %} 38 {% endcall %}
39 {% call textinput('productid', "ProductID", placeholder="1234", value=product._productid, required=True) %} 39 {% call textinput('productid', "ProductID", placeholder="1234", value=product._productid, required=True) %}
40 <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> 40 <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>
41 {{ examples(['CVRFPID-0004']) }} 41 {{ examples(['CVRFPID-0004']) }}
42 {% endcall %} 42 {% endcall %}
43 {% call textinput('cpe', "CPE", placeholder="cpe:/a:...", value=product._cpe) %} 43 {% call textinput('cpe', "CPE", placeholder="cpe:...", value=product._cpe) %}
44 <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> 44 <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>
45 {% endcall %} 45 {% endcall %}
46 <hr> 46 <hr>
47 {{ selectinput2('parent_branch', "Parent Branch", orphaned_leaves , product.getParentPath()) }} 47 {{ selectinput2('parent_branch', "Parent Branch", orphaned_leaves , product.getParentPath()) }}
48 <p class="text-center"><em>-- or --</em></p>
48 {{ selectinput2('parent_relationship', "Parent relationship", orphaned_relationships, current_rel) }} 49 {{ selectinput2('parent_relationship', "Parent relationship", orphaned_relationships, current_rel) }}
50 <p class="text-center"><em>-- or --</em></p>
51 {% if action == "Add" %}
52 {{ checkbox('from_cpe', "Create branches/relation from CPE Value") }}
53 {% endif %}
49 54
50 <button class="btn btn-primary" type="submit">{{ action }}</button> 55 <button class="btn btn-primary" type="submit">{{ action }}</button>
51 <a class="btn btn-danger" href="{{ url_for('.view') }}">Cancel</a> 56 <a class="btn btn-danger" href="{{ url_for('.view') }}">Cancel</a>
52 </form> 57 </form>
53 {% endblock %} 58 {% endblock %}

http://farol.wald.intevation.org