Mercurial > farol > farol
annotate farol/producttree.py @ 85:b6a48669edb8
Don't create a branch only to have empty name
author | Benoît Allard <benoit.allard@greenbone.net> |
---|---|
date | Thu, 09 Oct 2014 14:50:05 +0200 |
parents | cc836f9e869e |
children | 2d41121ec991 |
rev | line source |
---|---|
0 | 1 # -*- encoding: utf-8 -*- |
2 # Description: | |
3 # Web stuff about the ProductTree | |
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 Web-stuff about the producttree | |
27 """ | |
28 | |
29 from functools import wraps | |
30 | |
31 from flask import Blueprint, render_template, redirect, url_for, abort, request, flash | |
32 | |
33 from farolluz.cvrf import (CVRFProductBranch, CVRFFullProductName, | |
34 CVRFRelationship, CVRFGroup) | |
35 from .session import document_required, get_current | |
36 | |
37 producttree = Blueprint('producttree', __name__) | |
38 | |
39 def producttree_required(f): | |
40 @wraps(f) | |
41 def decorated_function(*args, **kwargs): | |
42 if get_current()._producttree is None: | |
43 flash('Operation invalid without producttree', 'warning') | |
22
dbfe89e3c6fe
Fix producttree urls
Benoît Allard <benoit.allard@greenbone.net>
parents:
0
diff
changeset
|
44 return redirect(url_for('document.view')) |
0 | 45 return f(*args, **kwargs) |
46 return decorated_function | |
47 | |
48 @producttree.route('/create', methods=['POST']) | |
49 @document_required | |
50 def create(): | |
51 get_current().createProductTree() | |
45
7c4d001839e7
Move the Display of the ProductTree to its own page
Benoît Allard <benoit.allard@greenbone.net>
parents:
22
diff
changeset
|
52 return redirect(url_for('.view')) |
0 | 53 |
45
7c4d001839e7
Move the Display of the ProductTree to its own page
Benoît Allard <benoit.allard@greenbone.net>
parents:
22
diff
changeset
|
54 @producttree.route('/') |
7c4d001839e7
Move the Display of the ProductTree to its own page
Benoît Allard <benoit.allard@greenbone.net>
parents:
22
diff
changeset
|
55 @document_required |
7c4d001839e7
Move the Display of the ProductTree to its own page
Benoît Allard <benoit.allard@greenbone.net>
parents:
22
diff
changeset
|
56 @producttree_required |
7c4d001839e7
Move the Display of the ProductTree to its own page
Benoît Allard <benoit.allard@greenbone.net>
parents:
22
diff
changeset
|
57 def view(): |
7c4d001839e7
Move the Display of the ProductTree to its own page
Benoît Allard <benoit.allard@greenbone.net>
parents:
22
diff
changeset
|
58 return render_template('producttree/view.j2', |
7c4d001839e7
Move the Display of the ProductTree to its own page
Benoît Allard <benoit.allard@greenbone.net>
parents:
22
diff
changeset
|
59 producttree=get_current()._producttree) |
0 | 60 |
61 @producttree.route('/branch/<path:path>/edit', methods=['GET', 'POST']) | |
62 @document_required | |
63 @producttree_required | |
64 def edit_branch(path): | |
65 path = [int(p) for p in path.split('/')] | |
66 cvrf = get_current() | |
67 ptree = cvrf._producttree | |
78
264d4579f6bf
More input validation
Benoît Allard <benoit.allard@greenbone.net>
parents:
62
diff
changeset
|
68 try: branch = cvrf._producttree.getBranch(path) |
264d4579f6bf
More input validation
Benoît Allard <benoit.allard@greenbone.net>
parents:
62
diff
changeset
|
69 except (ValueError, IndexError): abort(404) |
0 | 70 if request.method != 'POST': |
71 branches = [('', '')] + [(b.getName(), b.getPath(True)) for b in ptree.getNotTerminalBranches(branch)] | |
85
b6a48669edb8
Don't create a branch only to have empty name
Benoît Allard <benoit.allard@greenbone.net>
parents:
84
diff
changeset
|
72 return render_template('producttree/edit_branch.j2', |
b6a48669edb8
Don't create a branch only to have empty name
Benoît Allard <benoit.allard@greenbone.net>
parents:
84
diff
changeset
|
73 _type=branch._type, name=branch._name, parentpath=branch.getParentPath(), |
b6a48669edb8
Don't create a branch only to have empty name
Benoît Allard <benoit.allard@greenbone.net>
parents:
84
diff
changeset
|
74 branches=branches, types=branch.TYPES) |
0 | 75 |
76 pbranch = ptree | |
77 if request.form['parent']: | |
78
264d4579f6bf
More input validation
Benoît Allard <benoit.allard@greenbone.net>
parents:
62
diff
changeset
|
78 try: pbranch = ptree.getBranch([int(p) for p in request.form['parent'].split('/')]) |
264d4579f6bf
More input validation
Benoît Allard <benoit.allard@greenbone.net>
parents:
62
diff
changeset
|
79 except (ValueError, IndexError): abort(404) |
0 | 80 |
81 if pbranch is not branch.getParent(): | |
82 # We have to 're-link' the element ... | |
83 # 1. unlink | |
84 branch.unlink() | |
85 # 2. set the new parent | |
82
d6fa288e92a7
Update to latest farolluz (unlink/link)
Benoît Allard <benoit.allard@greenbone.net>
parents:
80
diff
changeset
|
86 branch.link(pbranch) |
0 | 87 |
88 branch._type = request.form['type'] | |
89 branch._name = request.form['name'] | |
45
7c4d001839e7
Move the Display of the ProductTree to its own page
Benoît Allard <benoit.allard@greenbone.net>
parents:
22
diff
changeset
|
90 return redirect(url_for('.view')) |
0 | 91 |
92 @producttree.route('/branch/add', methods=['GET', 'POST']) | |
93 @document_required | |
94 @producttree_required | |
95 def add_branch(): | |
96 cvrf = get_current() | |
97 ptree = cvrf._producttree | |
98 if request.method != 'POST': | |
99 branches = [('', '')] + [(b.getName(), b.getPath(True)) for b in ptree.getNotTerminalBranches()] | |
85
b6a48669edb8
Don't create a branch only to have empty name
Benoît Allard <benoit.allard@greenbone.net>
parents:
84
diff
changeset
|
100 return render_template('producttree/edit_branch.j2', |
b6a48669edb8
Don't create a branch only to have empty name
Benoît Allard <benoit.allard@greenbone.net>
parents:
84
diff
changeset
|
101 action='Add', |
b6a48669edb8
Don't create a branch only to have empty name
Benoît Allard <benoit.allard@greenbone.net>
parents:
84
diff
changeset
|
102 branches=branches, types=CVRFProductBranch.TYPES) |
0 | 103 |
104 pbranch = ptree | |
105 if request.form['parent']: | |
78
264d4579f6bf
More input validation
Benoît Allard <benoit.allard@greenbone.net>
parents:
62
diff
changeset
|
106 try: pbranch = ptree.getBranch([int(p) for p in request.form['parent'].split('/')]) |
264d4579f6bf
More input validation
Benoît Allard <benoit.allard@greenbone.net>
parents:
62
diff
changeset
|
107 except (ValueError, IndexError): abort(404) |
0 | 108 branch = CVRFProductBranch(request.form['type'], request.form['name'], pbranch) |
45
7c4d001839e7
Move the Display of the ProductTree to its own page
Benoît Allard <benoit.allard@greenbone.net>
parents:
22
diff
changeset
|
109 return redirect(url_for('.view')) |
0 | 110 |
80
c00f20bd90ba
Allow deletion of (orphaned) Branches
Benoît Allard <benoit.allard@greenbone.net>
parents:
78
diff
changeset
|
111 @producttree.route('/branch/<path:path>/del', methods=['POST']) |
c00f20bd90ba
Allow deletion of (orphaned) Branches
Benoît Allard <benoit.allard@greenbone.net>
parents:
78
diff
changeset
|
112 @document_required |
c00f20bd90ba
Allow deletion of (orphaned) Branches
Benoît Allard <benoit.allard@greenbone.net>
parents:
78
diff
changeset
|
113 @producttree_required |
c00f20bd90ba
Allow deletion of (orphaned) Branches
Benoît Allard <benoit.allard@greenbone.net>
parents:
78
diff
changeset
|
114 def del_branch(path): |
c00f20bd90ba
Allow deletion of (orphaned) Branches
Benoît Allard <benoit.allard@greenbone.net>
parents:
78
diff
changeset
|
115 path = [int(p) for p in path.split('/')] |
c00f20bd90ba
Allow deletion of (orphaned) Branches
Benoît Allard <benoit.allard@greenbone.net>
parents:
78
diff
changeset
|
116 cvrf = get_current() |
c00f20bd90ba
Allow deletion of (orphaned) Branches
Benoît Allard <benoit.allard@greenbone.net>
parents:
78
diff
changeset
|
117 ptree = cvrf._producttree |
c00f20bd90ba
Allow deletion of (orphaned) Branches
Benoît Allard <benoit.allard@greenbone.net>
parents:
78
diff
changeset
|
118 try: branch = cvrf._producttree.getBranch(path) |
c00f20bd90ba
Allow deletion of (orphaned) Branches
Benoît Allard <benoit.allard@greenbone.net>
parents:
78
diff
changeset
|
119 except (ValueError, IndexError): |
c00f20bd90ba
Allow deletion of (orphaned) Branches
Benoît Allard <benoit.allard@greenbone.net>
parents:
78
diff
changeset
|
120 flash('Cannot find Branch', 'danger') |
c00f20bd90ba
Allow deletion of (orphaned) Branches
Benoît Allard <benoit.allard@greenbone.net>
parents:
78
diff
changeset
|
121 abort(404) |
c00f20bd90ba
Allow deletion of (orphaned) Branches
Benoît Allard <benoit.allard@greenbone.net>
parents:
78
diff
changeset
|
122 if branch._childs: |
c00f20bd90ba
Allow deletion of (orphaned) Branches
Benoît Allard <benoit.allard@greenbone.net>
parents:
78
diff
changeset
|
123 flash('Cannot delete a branch with childs', 'danger') |
c00f20bd90ba
Allow deletion of (orphaned) Branches
Benoît Allard <benoit.allard@greenbone.net>
parents:
78
diff
changeset
|
124 abort(403) |
c00f20bd90ba
Allow deletion of (orphaned) Branches
Benoît Allard <benoit.allard@greenbone.net>
parents:
78
diff
changeset
|
125 branch.unlink() |
c00f20bd90ba
Allow deletion of (orphaned) Branches
Benoît Allard <benoit.allard@greenbone.net>
parents:
78
diff
changeset
|
126 del branch |
c00f20bd90ba
Allow deletion of (orphaned) Branches
Benoît Allard <benoit.allard@greenbone.net>
parents:
78
diff
changeset
|
127 return redirect(url_for('.view')) |
c00f20bd90ba
Allow deletion of (orphaned) Branches
Benoît Allard <benoit.allard@greenbone.net>
parents:
78
diff
changeset
|
128 |
c00f20bd90ba
Allow deletion of (orphaned) Branches
Benoît Allard <benoit.allard@greenbone.net>
parents:
78
diff
changeset
|
129 |
0 | 130 @producttree.route('/product/<productid>') |
131 @document_required | |
132 @producttree_required | |
133 def view_product(productid): | |
134 cvrf = get_current() | |
135 try: | |
136 product = cvrf.getProductForID(productid) | |
137 except IndexError: | |
138 abort(404) | |
139 return render_template('producttree/view_product.j2', product=product, cvrf=cvrf) | |
140 | |
141 @producttree.route('/product/<productid>/edit', methods=['GET', 'POST']) | |
142 @document_required | |
143 @producttree_required | |
144 def edit_product(productid): | |
145 cvrf = get_current() | |
146 ptree = cvrf._producttree | |
147 try: | |
148 product = cvrf.getProductForID(productid) | |
149 except KeyError: | |
150 abort(404) | |
151 | |
152 if request.method != 'POST': | |
153 current_rel = '' | |
154 if product.isRelationship(): | |
155 current_rel = str(ptree._relationships.index(product.getCurrentRelationship())) | |
156 leaves = [('', '')] + [(b.getName(), b.getPath(True)) for b in ptree.getOrphanedBranches(product)] | |
157 rels = [('', '')] + [(ptree.getNameOfRelationship(r), str(i)) for i, r in ptree.getOrphanedRelationships(product)] | |
158 return render_template('producttree/edit_product.j2', product=product, action='Update', orphaned_leaves=leaves, orphaned_relationships=rels, current_rel=current_rel) | |
159 | |
160 if request.form['parent_branch'] and request.form['parent_relationship']: | |
161 flash('Cannot set a parent branch and parent relationship', 'danger') | |
162 return redirect(url_for('.edit_product', productid=productid)) | |
163 | |
164 oldp = product._parent | |
165 if request.form['parent_branch']: | |
78
264d4579f6bf
More input validation
Benoît Allard <benoit.allard@greenbone.net>
parents:
62
diff
changeset
|
166 try: pbranch = ptree.getBranch([int(p) for p in request.form['parent_branch'].split('/')]) |
264d4579f6bf
More input validation
Benoît Allard <benoit.allard@greenbone.net>
parents:
62
diff
changeset
|
167 except (ValueError, IndexError): abort(404) |
0 | 168 if pbranch is not oldp: |
169 # Gonna be funny, needs re-link | |
170 product.unlink() | |
82
d6fa288e92a7
Update to latest farolluz (unlink/link)
Benoît Allard <benoit.allard@greenbone.net>
parents:
80
diff
changeset
|
171 # And Link again |
d6fa288e92a7
Update to latest farolluz (unlink/link)
Benoît Allard <benoit.allard@greenbone.net>
parents:
80
diff
changeset
|
172 product.link(pbranch) |
0 | 173 elif request.form['parent_relationship']: |
174 prel = ptree._relationships[int(request.form['parent_relationship'])] | |
175 if prel is not oldp: | |
82
d6fa288e92a7
Update to latest farolluz (unlink/link)
Benoît Allard <benoit.allard@greenbone.net>
parents:
80
diff
changeset
|
176 # Unlink |
0 | 177 product.unlink() |
82
d6fa288e92a7
Update to latest farolluz (unlink/link)
Benoît Allard <benoit.allard@greenbone.net>
parents:
80
diff
changeset
|
178 # Link again |
d6fa288e92a7
Update to latest farolluz (unlink/link)
Benoît Allard <benoit.allard@greenbone.net>
parents:
80
diff
changeset
|
179 product.link(prel) |
0 | 180 else: |
181 if ptree is not oldp: | |
82
d6fa288e92a7
Update to latest farolluz (unlink/link)
Benoît Allard <benoit.allard@greenbone.net>
parents:
80
diff
changeset
|
182 # Unlink |
0 | 183 product.unlink() |
82
d6fa288e92a7
Update to latest farolluz (unlink/link)
Benoît Allard <benoit.allard@greenbone.net>
parents:
80
diff
changeset
|
184 # Link again |
d6fa288e92a7
Update to latest farolluz (unlink/link)
Benoît Allard <benoit.allard@greenbone.net>
parents:
80
diff
changeset
|
185 product.link(ptree) |
0 | 186 |
187 product._productid = request.form['productid'] | |
188 product._name = request.form['name'] | |
189 product._cpe = request.form['cpe'] or None | |
45
7c4d001839e7
Move the Display of the ProductTree to its own page
Benoît Allard <benoit.allard@greenbone.net>
parents:
22
diff
changeset
|
190 return redirect(url_for('.view')) |
0 | 191 |
192 @producttree.route('/product/add', methods=['GET', 'POST']) | |
193 @document_required | |
194 @producttree_required | |
195 def add_product(): | |
196 cvrf = get_current() | |
197 ptree = cvrf._producttree | |
198 | |
199 if request.method != 'POST': | |
200 product=CVRFFullProductName('', '', ptree) | |
201 leaves = [('', '')] + [(b.getName(), b.getPath(True)) for b in ptree.getOrphanedBranches()] | |
202 rels = [('', '')] + [(ptree.getNameOfRelationship(r), str(i)) for i, r in ptree.getOrphanedRelationships()] | |
203 return render_template('producttree/edit_product.j2', product=product, action='Add', orphaned_leaves=leaves, orphaned_relationships=rels, current_rel='') | |
204 | |
205 if request.form['parent_branch'] and request.form['parent_relationship']: | |
206 flash('Cannot set a parent branch and parent relationship', 'danger') | |
62
ce49bd1512dd
Make pyflafes a happier
Benoît Allard <benoit.allard@greenbone.net>
parents:
45
diff
changeset
|
207 return redirect(url_for('.add_product')) |
0 | 208 |
209 parent = ptree | |
210 if request.form['parent_branch']: | |
83
2ecf13200e87
Fix issue from a previous commit
Benoît Allard <benoit.allard@greenbone.net>
parents:
82
diff
changeset
|
211 try: parent = ptree.getBranch([int(p) for p in request.form['parent_branch'].split('/')]) |
78
264d4579f6bf
More input validation
Benoît Allard <benoit.allard@greenbone.net>
parents:
62
diff
changeset
|
212 except (ValueError, IndexError): abort(404) |
0 | 213 elif request.form['parent_relationship']: |
214 parent = ptree._relationships[int(request.form['parent_relationship'])] | |
215 | |
216 product = CVRFFullProductName(request.form['productid'], request.form['name'], parent, request.form['cpe'] or None) | |
217 ptree.addProduct(product) | |
45
7c4d001839e7
Move the Display of the ProductTree to its own page
Benoît Allard <benoit.allard@greenbone.net>
parents:
22
diff
changeset
|
218 return redirect(url_for('.view')) |
0 | 219 |
84
cc836f9e869e
Allow deletion of Products
Benoît Allard <benoit.allard@greenbone.net>
parents:
83
diff
changeset
|
220 @producttree.route('/product/<productid>/del', methods=['POST']) |
cc836f9e869e
Allow deletion of Products
Benoît Allard <benoit.allard@greenbone.net>
parents:
83
diff
changeset
|
221 @document_required |
cc836f9e869e
Allow deletion of Products
Benoît Allard <benoit.allard@greenbone.net>
parents:
83
diff
changeset
|
222 @producttree_required |
cc836f9e869e
Allow deletion of Products
Benoît Allard <benoit.allard@greenbone.net>
parents:
83
diff
changeset
|
223 def del_product(productid): |
cc836f9e869e
Allow deletion of Products
Benoît Allard <benoit.allard@greenbone.net>
parents:
83
diff
changeset
|
224 cvrf = get_current() |
cc836f9e869e
Allow deletion of Products
Benoît Allard <benoit.allard@greenbone.net>
parents:
83
diff
changeset
|
225 ptree = cvrf._producttree |
cc836f9e869e
Allow deletion of Products
Benoît Allard <benoit.allard@greenbone.net>
parents:
83
diff
changeset
|
226 try: |
cc836f9e869e
Allow deletion of Products
Benoît Allard <benoit.allard@greenbone.net>
parents:
83
diff
changeset
|
227 product = cvrf.getProductForID(productid) |
cc836f9e869e
Allow deletion of Products
Benoît Allard <benoit.allard@greenbone.net>
parents:
83
diff
changeset
|
228 except KeyError: |
cc836f9e869e
Allow deletion of Products
Benoît Allard <benoit.allard@greenbone.net>
parents:
83
diff
changeset
|
229 abort(404) |
cc836f9e869e
Allow deletion of Products
Benoît Allard <benoit.allard@greenbone.net>
parents:
83
diff
changeset
|
230 product.unlink() |
cc836f9e869e
Allow deletion of Products
Benoît Allard <benoit.allard@greenbone.net>
parents:
83
diff
changeset
|
231 ptree._products.remove(product) |
cc836f9e869e
Allow deletion of Products
Benoît Allard <benoit.allard@greenbone.net>
parents:
83
diff
changeset
|
232 del product |
cc836f9e869e
Allow deletion of Products
Benoît Allard <benoit.allard@greenbone.net>
parents:
83
diff
changeset
|
233 return redirect(url_for('.view')) |
cc836f9e869e
Allow deletion of Products
Benoît Allard <benoit.allard@greenbone.net>
parents:
83
diff
changeset
|
234 |
cc836f9e869e
Allow deletion of Products
Benoît Allard <benoit.allard@greenbone.net>
parents:
83
diff
changeset
|
235 |
0 | 236 @producttree.route('/relationship/<int:index>/edit', methods=['GET', 'POST']) |
237 @document_required | |
238 @producttree_required | |
239 def edit_relationship(index): | |
240 cvrf = get_current() | |
241 ptree = cvrf._producttree | |
242 try: | |
243 rel = ptree._relationships[index] | |
244 except IndexError: | |
245 abort(404) | |
246 | |
247 if request.method != 'POST': | |
248 return render_template('producttree/edit_relationship.j2', productreference=rel._productreference, relationtype=rel._relationtype, relatestoproductreference=rel._relatestoproductreference, types=rel.TYPES) | |
249 | |
250 rel._productreference = request.form['productreference'] | |
251 rel._relationtype = request.form['relationtype'] | |
252 rel._relatestoproductreference = request.form['relatestoproductreference'] | |
45
7c4d001839e7
Move the Display of the ProductTree to its own page
Benoît Allard <benoit.allard@greenbone.net>
parents:
22
diff
changeset
|
253 return redirect(url_for('.view')) |
0 | 254 |
255 @producttree.route('/relationship/add', methods=['GET', 'POST']) | |
256 @document_required | |
257 @producttree_required | |
258 def add_relationship(): | |
259 cvrf = get_current() | |
260 ptree = cvrf._producttree | |
261 if len(ptree._products) < 2: | |
262 flash('You need to have at least two products to create a relationship', 'warning') | |
263 return redirect(url_for('.add_product')) | |
264 | |
265 if request.method != 'POST': | |
266 return render_template('producttree/edit_relationship.j2', action='Add', types=CVRFRelationship.TYPES) | |
267 | |
268 prodid1 = request.form['productreference'] | |
269 prodid2 = request.form['relatestoproductreference'] | |
270 | |
271 if prodid1 == prodid2: | |
272 flash('You cannot create a relationship with the same product twice', 'danger') | |
273 return redirect(url_for('.add_relationship')) | |
274 | |
275 rel = CVRFRelationship(prodid1, request.form['relationtype'], prodid2) | |
276 ptree.addRelationship(rel) | |
45
7c4d001839e7
Move the Display of the ProductTree to its own page
Benoît Allard <benoit.allard@greenbone.net>
parents:
22
diff
changeset
|
277 return redirect(url_for('.view')) |
0 | 278 |
279 @producttree.route('/group/<groupid>/edit', methods=['GET', 'POST']) | |
280 @document_required | |
281 @producttree_required | |
282 def edit_group(groupid): | |
283 try: | |
284 group = get_current().getGroupForID(groupid) | |
285 except KeyError: | |
286 abort(404) | |
287 if request.method != 'POST': | |
288 return render_template('producttree/edit_group.j2', groupid=group._groupid, description=group._description, productids=group._productids) | |
289 | |
290 group._groupid = request.form['groupid'] | |
291 group.setDescription(request.form['description'] or None) | |
292 group._productids = [] | |
293 for productid in request.form.getlist('products'): | |
294 group.addProductID(productid) | |
45
7c4d001839e7
Move the Display of the ProductTree to its own page
Benoît Allard <benoit.allard@greenbone.net>
parents:
22
diff
changeset
|
295 return redirect(url_for('.view')) |
0 | 296 |
297 @producttree.route('/group/add', methods=['GET', 'POST']) | |
298 @document_required | |
299 @producttree_required | |
300 def add_group(): | |
301 if request.method != 'POST': | |
302 return render_template('producttree/edit_group.j2', action='Add') | |
303 | |
304 group = CVRFGroup(request.form['groupid']) | |
305 group.setDescription(request.form['description'] or None) | |
306 for productid in request.form.getlist('products'): | |
307 group.addProductID(productid) | |
308 get_current()._producttree.addGroup(group) | |
45
7c4d001839e7
Move the Display of the ProductTree to its own page
Benoît Allard <benoit.allard@greenbone.net>
parents:
22
diff
changeset
|
309 return redirect(url_for('.view')) |