diff options
author | grakiss <grakiss.wanglei@huawei.com> | 2017-10-19 23:50:18 -0400 |
---|---|---|
committer | grakiss <grakiss.wanglei@huawei.com> | 2017-10-19 23:50:18 -0400 |
commit | 3617b6958c4c44678d64c05e669b50e427fc45f8 (patch) | |
tree | 81691a81384000128056377f2a64d3d3fceaa589 /cvp/opnfv_testapi/resources | |
parent | 54bc0f28fd9b5ec6675401d6c3322b30e72e7d9c (diff) |
[web-cvp]Additional columns in ‘My Results’
JIRA: DOVETAIL-532
1. original filename
2. user editable label
Change-Id: I1566cecb3d8ceacc14167bb2fb7fa41508f293be
Signed-off-by: grakiss <grakiss.wanglei@huawei.com>
Diffstat (limited to 'cvp/opnfv_testapi/resources')
-rw-r--r-- | cvp/opnfv_testapi/resources/test_handlers.py | 2 | ||||
-rw-r--r-- | cvp/opnfv_testapi/resources/test_models.py | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/cvp/opnfv_testapi/resources/test_handlers.py b/cvp/opnfv_testapi/resources/test_handlers.py index 2cbfbf10..54fa11f8 100644 --- a/cvp/opnfv_testapi/resources/test_handlers.py +++ b/cvp/opnfv_testapi/resources/test_handlers.py @@ -189,7 +189,7 @@ class TestsGURHandler(GenericTestHandler): query = {'id': test_id} db_keys = ['id', ] curr_user = self.get_secure_cookie(auth_const.OPENID) - if item == "shared": + if item == "shared" or item == "label": query['owner'] = curr_user db_keys.append('owner') logging.debug("before _update 2") diff --git a/cvp/opnfv_testapi/resources/test_models.py b/cvp/opnfv_testapi/resources/test_models.py index 41fa6852..24b4d17b 100644 --- a/cvp/opnfv_testapi/resources/test_models.py +++ b/cvp/opnfv_testapi/resources/test_models.py @@ -53,7 +53,7 @@ class Test(models.ModelBase): """ def __init__(self, _id=None, owner=None, results=[], public="false", review="false", status="private", - shared=[], trust_indicator=None): + shared=[], filename="", label="", trust_indicator=None): self._id = _id self.owner = owner self.results = results @@ -62,6 +62,8 @@ class Test(models.ModelBase): self.upload_date = datetime.now() self.status = status self.shared = shared + self.filename = filename + self.label = label @swagger.model() |