Skip to content

Commit

Permalink
#1612 Fixed spline integration and schema, removed redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian-Olosutean committed Dec 18, 2020
1 parent 3f7e513 commit 17b19e1
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 40 deletions.
33 changes: 23 additions & 10 deletions menas-web/pom.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<!--
~ Copyright 2018 ABSA Group Limited
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>menas-web</artifactId>
<packaging>war</packaging>

<parent>
<artifactId>parent</artifactId>
<groupId>za.co.absa.enceladus</groupId>
<artifactId>parent</artifactId>
<version>2.12.0-AWS-SNAPSHOT</version>
</parent>

Expand All @@ -35,11 +47,6 @@
<artifactId>httpclient</artifactId>
<version>${httpclient.version}</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>webjars-locator-core</artifactId>
<version>${webjars.locator.version}</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down Expand Up @@ -124,6 +131,12 @@
</exclusions>
</dependency>

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>

<!-- GSON -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@

package za.co.absa.enceladus.menas.web

import org.springframework.beans.factory.annotation.Value
import org.springframework.context.annotation.{Bean, Configuration}
import org.springframework.web.servlet.config.annotation.{CorsRegistry, ResourceHandlerRegistry, WebMvcConfigurer}
import org.springframework.web.servlet.config.annotation.{ResourceHandlerRegistry, WebMvcConfigurer}
import org.webjars.WebJarAssetLocator

@Configuration
Expand Down
6 changes: 3 additions & 3 deletions menas-web/ui/components/schema/schemaDetail.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ sap.ui.define([
};

jQuery.ajax({
url: "api/schema/registry",
url: window.apiUrl + "/api/schema/registry",
type: 'POST',
data: $.param(data),
contentType: 'application/x-www-form-urlencoded',
Expand Down Expand Up @@ -216,7 +216,7 @@ sap.ui.define([
};

jQuery.ajax({
url: "api/schema/remote",
url: window.apiUrl + "/api/schema/remote",
type: 'POST',
data: $.param(data),
contentType: 'application/x-www-form-urlencoded',
Expand Down Expand Up @@ -384,7 +384,7 @@ sap.ui.define([

checkRegistryIntegration: function () {
jQuery.ajax({
url: "api/schema/features",
url: window.apiUrl + "/api/schema/features",
type: 'GET',
context: this,
complete: this.handleRegistryIntegrationResponse
Expand Down
11 changes: 8 additions & 3 deletions menas-web/ui/service/RestDAO.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ class RestClient {
return jqXHR.then(this.identity(jqXHR), this.handleExpiredSession);
}

static getSync(url, shouldUseCache = false) {
static getSync(url, shouldUseCache = false, isWeb = false) {
let requestUrl = isWeb ? url : window.apiUrl + "/" + url;
let request = {
headers: {
"X-CSRF-TOKEN": localStorage.getItem("csrfToken"),
"JWT": localStorage.getItem("jwtToken")
},
url: window.apiUrl + "/" + url,
url: requestUrl,
async: false
};
const jqXHR = shouldUseCache ? RestClient.cache(request) : $.ajax(request);
Expand Down Expand Up @@ -233,7 +234,11 @@ class ConfigRestClient {
}

static getLineageExecutionIdApiTemplate() {
return RestClient.get(`metadata/lineageExecutionIdApiTemplate`)
let request = {
url: `lineageExecutionIdApiTemplate`,
async: true
};
return $.ajax(request);
}

}
2 changes: 1 addition & 1 deletion menas-web/ui/service/RunRestDAO.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class RunRestDAO {
.replace("%s", outputPath)
.replace("%s", applicationId);

RestClient.getSync(url).then((response) => {
RestClient.getSync(url, false, true).then((response) => {
this._totalCount = response.totalCount;
if (this._totalCount > 0) {
this._executionEventId = response.items[0].executionEventId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ import za.co.absa.enceladus.menas.auth.kerberos.MenasKerberosAuthentication
class WebSecurityConfig @Autowired()(beanFactory: BeanFactory,
jwtAuthFilter: JwtAuthenticationFilter,
@Value("${menas.auth.mechanism:}")
authMechanism: String,
@Value("${menas.version}")
menasVersion: String) {
authMechanism: String) {

private val logger = LoggerFactory.getLogger(this.getClass)

Expand Down

0 comments on commit 17b19e1

Please sign in to comment.