Mercurial > farol > farol
annotate 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 |
rev | line source |
---|---|
0 | 1 {# |
2 # Description: | |
3 # Web Template used in Farol Design | |
4 # | |
5 # Authors: | |
6 # Benoît Allard <benoit.allard@greenbone.net> | |
7 # | |
8 # Copyright: | |
9 # Copyright (C) 2014 Greenbone Networks GmbH | |
10 # | |
11 # This program is free software; you can redistribute it and/or | |
12 # modify it under the terms of the GNU General Public License | |
13 # as published by the Free Software Foundation; either version 2 | |
14 # of the License, or (at your option) any later version. | |
15 # | |
16 # This program is distributed in the hope that it will be useful, | |
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 # GNU General Public License for more details. | |
20 # | |
21 # You should have received a copy of the GNU General Public License | |
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. | |
24 -#} | |
25 | |
26 {% extends "base.j2" %} | |
163
1d63a532ccce
Add possibility to create product Tree from the cpe itself.
Benoît Allard <benoit.allard@greenbone.net>
parents:
46
diff
changeset
|
27 {% from "macros.j2" import textinput, selectinput2, examples, checkbox %} |
0 | 28 {% block title %}Edit the product{% endblock %} |
29 | |
30 {% set active = 'product' %} | |
31 | |
32 {% block content %} | |
46
086e35c4aee7
Add description fields for edit_product and edit_branch
Benoît Allard <benoit.allard@greenbone.net>
parents:
45
diff
changeset
|
33 <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"> |
0 | 34 |
46
086e35c4aee7
Add description fields for edit_product and edit_branch
Benoît Allard <benoit.allard@greenbone.net>
parents:
45
diff
changeset
|
35 {% call textinput('name', "Product Name", value=product._name, required=True) %} |
086e35c4aee7
Add description fields for edit_product and edit_branch
Benoît Allard <benoit.allard@greenbone.net>
parents:
45
diff
changeset
|
36 <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> |
086e35c4aee7
Add description fields for edit_product and edit_branch
Benoît Allard <benoit.allard@greenbone.net>
parents:
45
diff
changeset
|
37 {{ examples(['Microsoft Host Integration Server 2006 Service Pack 1', 'Microsoft Office 2008 for Mac 12.3.1 Update']) }} |
086e35c4aee7
Add description fields for edit_product and edit_branch
Benoît Allard <benoit.allard@greenbone.net>
parents:
45
diff
changeset
|
38 {% endcall %} |
086e35c4aee7
Add description fields for edit_product and edit_branch
Benoît Allard <benoit.allard@greenbone.net>
parents:
45
diff
changeset
|
39 {% call textinput('productid', "ProductID", placeholder="1234", value=product._productid, required=True) %} |
086e35c4aee7
Add description fields for edit_product and edit_branch
Benoît Allard <benoit.allard@greenbone.net>
parents:
45
diff
changeset
|
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> |
086e35c4aee7
Add description fields for edit_product and edit_branch
Benoît Allard <benoit.allard@greenbone.net>
parents:
45
diff
changeset
|
41 {{ examples(['CVRFPID-0004']) }} |
086e35c4aee7
Add description fields for edit_product and edit_branch
Benoît Allard <benoit.allard@greenbone.net>
parents:
45
diff
changeset
|
42 {% endcall %} |
163
1d63a532ccce
Add possibility to create product Tree from the cpe itself.
Benoît Allard <benoit.allard@greenbone.net>
parents:
46
diff
changeset
|
43 {% call textinput('cpe', "CPE", placeholder="cpe:...", value=product._cpe) %} |
46
086e35c4aee7
Add description fields for edit_product and edit_branch
Benoît Allard <benoit.allard@greenbone.net>
parents:
45
diff
changeset
|
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> |
086e35c4aee7
Add description fields for edit_product and edit_branch
Benoît Allard <benoit.allard@greenbone.net>
parents:
45
diff
changeset
|
45 {% endcall %} |
0 | 46 <hr> |
47 {{ selectinput2('parent_branch', "Parent Branch", orphaned_leaves , product.getParentPath()) }} | |
163
1d63a532ccce
Add possibility to create product Tree from the cpe itself.
Benoît Allard <benoit.allard@greenbone.net>
parents:
46
diff
changeset
|
48 <p class="text-center"><em>-- or --</em></p> |
0 | 49 {{ selectinput2('parent_relationship', "Parent relationship", orphaned_relationships, current_rel) }} |
163
1d63a532ccce
Add possibility to create product Tree from the cpe itself.
Benoît Allard <benoit.allard@greenbone.net>
parents:
46
diff
changeset
|
50 <p class="text-center"><em>-- or --</em></p> |
1d63a532ccce
Add possibility to create product Tree from the cpe itself.
Benoît Allard <benoit.allard@greenbone.net>
parents:
46
diff
changeset
|
51 {% if action == "Add" %} |
1d63a532ccce
Add possibility to create product Tree from the cpe itself.
Benoît Allard <benoit.allard@greenbone.net>
parents:
46
diff
changeset
|
52 {{ checkbox('from_cpe', "Create branches/relation from CPE Value") }} |
1d63a532ccce
Add possibility to create product Tree from the cpe itself.
Benoît Allard <benoit.allard@greenbone.net>
parents:
46
diff
changeset
|
53 {% endif %} |
0 | 54 |
55 <button class="btn btn-primary" type="submit">{{ action }}</button> | |
45
7c4d001839e7
Move the Display of the ProductTree to its own page
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
56 <a class="btn btn-danger" href="{{ url_for('.view') }}">Cancel</a> |
0 | 57 </form> |
58 {% endblock %} |