summaryrefslogtreecommitdiffstats
path: root/testapi/opnfv_testapi/ui/components/projects/project/projectController.js
diff options
context:
space:
mode:
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.