From: lombardofr Date: Fri, 21 Jun 2019 17:35:14 +0000 (+0200) Subject: improved role management X-Git-Tag: v6.0.2rc1^2~6^2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F94%2F7694%2F1;p=osm%2FLW-UI.git improved role management Change-Id: Iaf87385269b2195ba964a951939deca6be938013 Signed-off-by: lombardofr --- diff --git a/authosm/views.py b/authosm/views.py index f82f4dd..2cfe043 100644 --- a/authosm/views.py +++ b/authosm/views.py @@ -26,8 +26,7 @@ def user_login(request): error_message = '' if request.POST: - print request.POST.get('username') - print request.POST.get('password') + next_page = request.POST.get('next') next_page = urllib.unquote(next_page).decode('iso-8859-2') try: diff --git a/instancehandler/views.py b/instancehandler/views.py index edf0da1..cf88f99 100644 --- a/instancehandler/views.py +++ b/instancehandler/views.py @@ -167,7 +167,7 @@ def create(request, type=None): except Exception as e: return __response_handler(request, {'status': 400, 'code': 'BAD_REQUEST', 'detail': e.message} , url=None, status=400) result = client.ns_create(user.get_token(), ns_data) - print result + if result['error']: return __response_handler(request, result['data'], url=None, status=result['data']['status'] if 'status' in result['data'] else 500) diff --git a/projecthandler/osm_model.py b/projecthandler/osm_model.py index 1775797..718c08d 100644 --- a/projecthandler/osm_model.py +++ b/projecthandler/osm_model.py @@ -56,11 +56,10 @@ class OsmProject(object): client = Client() if type_descriptor == 'nsd': result = client.nsd_get(descriptor_id) - print result + elif type_descriptor == 'vnfd': result = client.vnfd_get(descriptor_id) - print result except Exception as e: log.exception(e) result = {} @@ -175,11 +174,11 @@ class OsmProject(object): else: return False result = yaml.load(result) - print result + except Exception as e: log.exception(e) result = False - print result + return result def get_add_element(self, request): @@ -215,7 +214,6 @@ class OsmProject(object): except Exception as e: log.exception(e) result = False - print result return result @staticmethod @@ -232,5 +230,4 @@ class OsmProject(object): except Exception as e: log.exception(e) result = False - print result return result \ No newline at end of file diff --git a/rolehandler/templates/modal/role_create.html b/rolehandler/templates/modal/role_create.html index 58d68ca..d8282a7 100644 --- a/rolehandler/templates/modal/role_create.html +++ b/rolehandler/templates/modal/role_create.html @@ -17,9 +17,22 @@ + + +
+
+
+ +
+
+
+
+ +
+ +
- -