summaryrefslogtreecommitdiffstats
path: root/testapi/opnfv_testapi/ui/components/projects/project/projectController.js
diff options
context:
space:
mode:
authorthuva4 <tharma.thuva@gmail.com>2017-12-23 09:26:12 +0530
committerthuva4 <tharma.thuva@gmail.com>2017-12-23 16:07:53 +0530
commit5df2ce54e5aaadfb5ade5a94d6b42392bf805cc8 (patch)
treeb6ab04967f3e4ab77c5f071780bde999d1d88034 /testapi/opnfv_testapi/ui/components/projects/project/projectController.js
parent4e98903ccae3363090de8fefb463b64a943b8f9f (diff)
Implement the CRUD operations for Test cases
Created the testcases, testcase pages Remove update, delete buttons in project page. add protractor tests for testcases page. change tabs to spaces Change-Id: Id7d381b13dca4f228bda24fa1abad7c465b5cef7 Signed-off-by: thuva4 <tharma.thuva@gmail.com>
Diffstat (limited to 'testapi/opnfv_testapi/ui/components/projects/project/projectController.js')
-rw-r--r--testapi/opnfv_testapi/ui/components/projects/project/projectController.js74
1 files changed, 0 insertions, 74 deletions
diff --git a/testapi/opnfv_testapi/ui/components/projects/project/projectController.js b/testapi/opnfv_testapi/ui/components/projects/project/projectController.js
index e8d7bd6..78b805d 100644
--- a/testapi/opnfv_testapi/ui/components/projects/project/projectController.js
+++ b/testapi/opnfv_testapi/ui/components/projects/project/projectController.js
@@ -36,80 +36,6 @@
ctrl.url = testapiApiUrl + '/projects/' + ctrl.name;
ctrl.loadDetails = loadDetails;
- ctrl.deleteProject = deleteProject;
- ctrl.openDeleteModal = openDeleteModal;
- ctrl.openUpdateModal = openUpdateModal;
- ctrl.updateProject = updateProject;
-
- /**
- * This will contact the TestAPI to update an existing project.
- */
- function updateProject(name,project) {
- ctrl.showError = false;
- ctrl.showSuccess = false;
- var projects_url = ctrl.url;
- var body = {
- name: project.name,
- description: project.description
- };
- ctrl.projectsRequest =
- $http.put(projects_url, body).success(function (data){
- ctrl.showSuccess = true ;
- ctrl.name = body.name;
- $state.go('project', {'name':ctrl.name}, {reload: true});
- })
- .catch(function (error) {
- ctrl.showError = true;
- ctrl.error = error.statusText
- });
-
-
- }
-
- /**
- * This will contact the TestAPI to delete an existing project.
- */
- function deleteProject() {
- ctrl.showError = false;
- ctrl.showSuccess = false;
- ctrl.projectsRequest =
- $http.delete(ctrl.url).success(function (data) {
- $state.go('projects', {'name':ctrl.name}, {reload: true});
- ctrl.showSuccess = true ;
- }).catch(function (error) {
- ctrl.showError = true;
- ctrl.error = error.statusText
- });
- }
-
- /**
- * This will open the modal that will show the delete confirm
- * message
- */
- function openDeleteModal() {
- confirmModal("Delete",ctrl.deleteProject);
- }
-
- /**
- * This will open the modal that will show the update
- * view
- */
- function openUpdateModal(){
- $uibModal.open({
- templateUrl: 'testapi-ui/components/projects/modals/projectModal.html',
- controller: 'ProjectModalCtrl as ProjectModalCtrl',
- size: 'md',
- resolve: {
- data: function () {
- return {
- text: "Update Project",
- successHandler: ctrl.updateProject,
- project : ctrl.data
- };
- }
- }
- });
- }
/**
* This will contact the TestAPI to get a listing of declared projects.