-
Title
+
Editing ${tapSchemaName}
-
+
+
+
diff --git a/new/src/main/webapp/index.jsp b/new/src/main/webapp/index.jsp
index 8a01904dc460b41be3813c2716b5672c1c48ed25..190be3f3ac79e93dd2306ab8364e29b69f092644 100644
--- a/new/src/main/webapp/index.jsp
+++ b/new/src/main/webapp/index.jsp
@@ -1,88 +1,3 @@
-<%--
- Document : index
- Created on : Dec 28, 2015, 1:40:00 PM
- Author : Sonia Zorba
---%>
-
-<%@page import="it.inaf.oats.ia2.tap.tsm.pageutil.InsertCredentials"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
-<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
-
-<%
- String INSERT_CREDENTIALS = "INSERT_CREDENTIALS";
-
- InsertCredentials insertCredentials;
- Object insertCredentialsObj = session.getAttribute(INSERT_CREDENTIALS);
- if (insertCredentialsObj == null) {
- insertCredentials = new InsertCredentials();
- session.setAttribute(INSERT_CREDENTIALS, insertCredentials);
- } else {
- insertCredentials = (InsertCredentials) insertCredentialsObj;
- }
-
- insertCredentials.load(request, response);
-
- System.out.println(insertCredentials.getErrors().size());
-%>
-
-
-
-
-
-
-
-
-
TapSchema Manager - Credentials insertion page
-
-
-
-
-
-
-
-
-
-
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+
diff --git a/new/src/main/webapp/js/edit-tapschema.js b/new/src/main/webapp/js/edit-tapschema.js
index 19d53e93997fae564d6c0a5e827e4da49a961025..a9d334b0a7822d5fa1edf149300eb124604b5cc2 100644
--- a/new/src/main/webapp/js/edit-tapschema.js
+++ b/new/src/main/webapp/js/edit-tapschema.js
@@ -1,6 +1,6 @@
(function ($, jsonpatch, angular) {
- var BASE_PATH = "webresources/tapschema/";
+ var BASE_PATH = "rest/tapschema/";
var app = angular.module('editTapSchema', []);
@@ -11,7 +11,7 @@
}]);
function showAjaxError(errorResponse) {
- alert(errorResponse);
+ alert(errorResponse.statusText);
}
app.controller('mainController', ['$scope', '$http', function ($scope, $http) {
diff --git a/new/src/main/webapp/js/select-tapschema.js b/new/src/main/webapp/js/select-tapschema.js
index d8069087e147bd6305f68577ca8e6b3411d36d88..afae5cde9ca19f6ac5ac6cdaab0663fc2663ef75 100644
--- a/new/src/main/webapp/js/select-tapschema.js
+++ b/new/src/main/webapp/js/select-tapschema.js
@@ -1,12 +1,22 @@
-(function($) {
-
- $(document).ready(function() {
- $('[name="tapschemaRadioGroup"]').on('change', function() {
+(function ($) {
+
+ $(document).ready(function () {
+ $('[name="tapschemaRadioGroup"]').on('change', function () {
var edit = $(this).val() === 'edit';
$('#editContainer').toggleClass('hide', !edit);
$('#createContainer').toggleClass('hide', edit);
});
-
+
+ $('#tapschema-selector').on('change', function () {
+ $.ajax({
+ method: 'POST',
+ url: 'rest/tapschema/getExposedSchemas',
+ data: {tapSchemaName: $(this).val()},
+ success: function (res) {
+ $('#exposed-schemas').text(res);
+ }
+ });
+ });
});
-
+
})(jQuery);
\ No newline at end of file
diff --git a/new/src/main/webapp/selectTapSchema.jsp b/new/src/main/webapp/selectTapSchema.jsp
index 7e645864075f8dc7a71cdee9744ad002fd535dbc..39757390d71785028146326ae3150223f87e6a35 100644
--- a/new/src/main/webapp/selectTapSchema.jsp
+++ b/new/src/main/webapp/selectTapSchema.jsp
@@ -4,14 +4,10 @@
Author : Sonia Zorba
--%>
-<%@page import="it.inaf.oats.ia2.tap.tsm.pageutil.SelectTapSchema"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
-<% SelectTapSchema model = (SelectTapSchema) session.getAttribute("SELECT_TAP_SCHEMA");%>
-
-
+
+
diff --git a/new/src/test/java/TestUtils.java b/new/src/test/java/TestUtils.java
index 23a6669ed390e5d3066e7730bc39eaec7f4e31fe..424275d6971d3135b976b36237c7227f3fb1418c 100644
--- a/new/src/test/java/TestUtils.java
+++ b/new/src/test/java/TestUtils.java
@@ -17,7 +17,11 @@ import java.util.List;
public class TestUtils {
public static Credentials getCredentials() {
- return new Credentials("localhost", 3306, "root", "root");
+ Credentials credentials = new Credentials();
+ credentials.setHostname("localhost");
+ credentials.setUsername("root");
+ credentials.setPassword("root");
+ return credentials;
}
public static TapSchema getNewTAPSchemaOneSchemaSelected(Connection connection) throws SQLException {