From 4e98903ccae3363090de8fefb463b64a943b8f9f Mon Sep 17 00:00:00 2001 From: thuva4 Date: Thu, 7 Dec 2017 09:47:08 +0530 Subject: Redesign the projects page & project page redesign the projects page like pods page included the delete, filter, create, edit, batch delete in the projects page. Unify the update modal for projects page and project page. Fix authenticate - fault opertaions Change-Id: If4ea50ada11941c5d9199d898476837020c02241 Signed-off-by: thuva4 --- testapi/opnfv_testapi/ui/app.js | 10 +- .../components/projects/modals/projectModal.html | 39 ++++ .../ui/components/projects/project/project.html | 37 ++- .../projects/project/projectController.js | 107 +++------ .../components/projects/project/updateModal.html | 26 --- .../ui/components/projects/projects.html | 128 +++++----- .../ui/components/projects/projectsController.js | 257 +++++++++++++++++---- testapi/opnfv_testapi/ui/config.json | 3 +- .../ui/shared/alerts/confirmModalFactory.js | 1 - 9 files changed, 378 insertions(+), 230 deletions(-) create mode 100644 testapi/opnfv_testapi/ui/components/projects/modals/projectModal.html delete mode 100644 testapi/opnfv_testapi/ui/components/projects/project/updateModal.html diff --git a/testapi/opnfv_testapi/ui/app.js b/testapi/opnfv_testapi/ui/app.js index 28e5810..8c85686 100644 --- a/testapi/opnfv_testapi/ui/app.js +++ b/testapi/opnfv_testapi/ui/app.js @@ -124,14 +124,14 @@ .run(setup); setup.$inject = [ - '$http', '$rootScope', '$window', '$state', 'testapiApiUrl' + '$http', '$rootScope', '$window', '$state', 'testapiApiUrl', "authenticate" ]; /** * Set up the app with injections into $rootscope. This is mainly for auth * functions. */ - function setup($http, $rootScope, $window, $state, testapiApiUrl) { + function setup($http, $rootScope, $window, $state, testapiApiUrl, authenticate) { $rootScope.auth = {}; $rootScope.auth.doSignIn = doSignIn; @@ -165,7 +165,11 @@ success(function (data) { $rootScope.auth.currentUser = data; $rootScope.auth.isAuthenticated = true; - $rootScope.auth.projectNames = $rootScope.auth.doSubmitterCheck(data.groups); + if(authenticate){ + $rootScope.auth.projectNames = $rootScope.auth.doSubmitterCheck(data.groups); + }else{ + $rootScope.auth.projectNames = ["anonymous"] + } }). error(function () { $rootScope.auth.currentUser = null; diff --git a/testapi/opnfv_testapi/ui/components/projects/modals/projectModal.html b/testapi/opnfv_testapi/ui/components/projects/modals/projectModal.html new file mode 100644 index 0000000..ca00f80 --- /dev/null +++ b/testapi/opnfv_testapi/ui/components/projects/modals/projectModal.html @@ -0,0 +1,39 @@ +
+ + +
\ No newline at end of file diff --git a/testapi/opnfv_testapi/ui/components/projects/project/project.html b/testapi/opnfv_testapi/ui/components/projects/project/project.html index 9d46364..82dc0ec 100644 --- a/testapi/opnfv_testapi/ui/components/projects/project/project.html +++ b/testapi/opnfv_testapi/ui/components/projects/project/project.html @@ -1,25 +1,44 @@ -
- +Project +
+
+
- - - + + + + + + + + + + + + + + + + + + + + -
Name {{ctrl.data.name}}
Description {{ctrl.data.description}}
Creation date {{ctrl.data.creation_date}}
Id :{{ctrl.data._id}}
Name :{{ctrl.data.name}}
Owner :{{ctrl.data.owner}}
Created at :{{ctrl.data['creation_date']}}
Description :{{ctrl.data.description}}
+ +
-
-