Skip to content

Commit

Permalink
#10 pull request
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztof-olejniczak committed Feb 4, 2022
1 parent 2e25ce4 commit efed8ce
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,20 @@
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@SpringBootApplication
@EnableTransactionManagement
@EnableAsync
@EnableWebMvc
public class DataverseSupersetApplication {
public class DataverseSupersetApplication implements WebMvcConfigurer {
public static void main(String[] args) {
SpringApplication.run(DataverseSupersetApplication.class, args);
}
Expand All @@ -67,4 +71,10 @@ public Map<String, String> siteUrlMapping() {
public Map<String, String> supersetConfig() {
return new HashMap<>();
}

@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/**")
.addResourceLocations("classpath:/static/");
}
}
15 changes: 0 additions & 15 deletions src/main/java/eu/sshoc/dataversesuperset/WebConfiguration.java

This file was deleted.

File renamed without changes.
File renamed without changes.
9 changes: 4 additions & 5 deletions src/main/resources/templates/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,14 @@ <h1 th:text="#{main.title}"></h1>
<iframe id="chartIFrame"></iframe>
</div>

<div th:unless="${chartToUrl != null && chartToUrl.size() > 0}">
<div>Dataset imported to superset, but no related charts found</div>
</div>

<p>
Dataset imported to superset!
<a th:href="${@environment.getProperty('superset.uri') + 'superset/explore/table/' + data.datasetId}" target="_blank">Create a chart in Superset</a>
</p>

<div th:unless="${chartToUrl != null && chartToUrl.size() > 0}">
<div>No related charts found</div>
</div>

</div>

<div th:case="'ERROR'">
Expand Down

0 comments on commit efed8ce

Please sign in to comment.