diff --git a/server/repo/repo-ui/pom.xml b/server/repo/repo-ui/pom.xml index b5208b58dc..87a9e66d30 100644 --- a/server/repo/repo-ui/pom.xml +++ b/server/repo/repo-ui/pom.xml @@ -75,11 +75,6 @@ swagger-models 1.5.6 - - org.webjars - swagger-ui - 2.1.4 - io.springfox @@ -96,6 +91,26 @@ + + + org.webjars.bower + angular-swagger-ui + 0.2.7 + + + org.webjars.bower + jquery + + + org.webjars.bower + bootstrap-less-only + + + org.webjars.bower + angular + + + @@ -129,4 +144,4 @@ - + \ No newline at end of file diff --git a/server/repo/repo-ui/src/main/java/org/eclipse/vorto/repository/VortoRepository.java b/server/repo/repo-ui/src/main/java/org/eclipse/vorto/repository/VortoRepository.java index d98d0d4be1..916d0a7829 100644 --- a/server/repo/repo-ui/src/main/java/org/eclipse/vorto/repository/VortoRepository.java +++ b/server/repo/repo-ui/src/main/java/org/eclipse/vorto/repository/VortoRepository.java @@ -3,12 +3,12 @@ * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Eclipse Distribution License v1.0 which accompany this distribution. - * + * * The Eclipse Public License is available at * http://www.eclipse.org/legal/epl-v10.html * The Eclipse Distribution License is available at * http://www.eclipse.org/org/documents/edl-v10.php. - * + * * Contributors: * Bosch Software Innovations GmbH - Please refer to git log *******************************************************************************/ @@ -60,7 +60,7 @@ @EnableSwagger2 @EnableJpaRepositories public class VortoRepository { - + public static void main(String[] args) { SpringApplication.run(VortoRepository.class, args); } @@ -90,9 +90,9 @@ private ApiInfo apiInfo() { + "These information models can be managed and shared within the Vorto Information Model Repository.
" + " Code Generators for Information Models let you integrate devices into different platforms." + "
", - "1.0.0", "", "", "", ""); + "1.0.0", "", "", "EPL", "https://eclipse.org/org/documents/epl-v10.php"); } - + @Autowired private UserRepository userRepository; @@ -100,19 +100,19 @@ private ApiInfo apiInfo() { public static PasswordEncoder encoder() { return new BCryptPasswordEncoder(11); } - + @PostConstruct public void createAdminIfNotExists() throws Exception { if (userRepository.findByUsername("admin") == null){ - + User user = new User(); - + user.setUsername("admin".toLowerCase()); user.setPassword( encoder().encode("!v0rt0admin")); user.setHasWatchOnRepository(false); user.setEmail("alexander.edelmann@bosch-si.com"); user.setRoles(Role.ADMIN); - + userRepository.save(user); } } @@ -127,10 +127,10 @@ protected static class SecurityConfiguration extends WebSecurityConfigurerAdapte @Autowired private RESTAuthenticationEntryPoint authenticationEntryPoint; - + @Autowired private PasswordEncoder passwordEncoder; - + @Override protected void configure(HttpSecurity http) throws Exception { diff --git a/server/repo/repo-ui/src/main/resources/static/css/swagger-custom.css b/server/repo/repo-ui/src/main/resources/static/css/swagger-custom.css new file mode 100644 index 0000000000..1a1f7c95d9 --- /dev/null +++ b/server/repo/repo-ui/src/main/resources/static/css/swagger-custom.css @@ -0,0 +1,35 @@ +.swagger-validator { + display: none; +} + +.swagger-section .swagger-ui-wrap { + font-family: Droid Sans",​sans-serif; + font: inherit; + line-height: 1; + margin-left: auto; + margin-right: auto; + max-width: 960px; + +} + #swagger-ui-container .btn { + border: 0 none; + border-radius: 2px; + font-weight: bold; + } + + #swagger-ui-container .btn-default{ + background-color: #337ab7; + border-color: #ccc; + color: #333; + } + #swagger-ui-container .api-name { + font-size: 25px; + font-weight: bold; + padding-bottom: 10px; + + } + +.api-description { + font-size: 15px; + padding-bottom: 10px; + } \ No newline at end of file diff --git a/server/repo/repo-ui/src/main/resources/static/index.html b/server/repo/repo-ui/src/main/resources/static/index.html index e6765a544b..c75fc9185b 100644 --- a/server/repo/repo-ui/src/main/resources/static/index.html +++ b/server/repo/repo-ui/src/main/resources/static/index.html @@ -17,31 +17,34 @@ - + + + - - + + - + - + + - - + + - +