forked from eclipse-vorto/vorto
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…clipse-vorto#57, closes eclipse-vorto#56 and eclipse-vorto#57 Signed-off-by: Nagavijay Sivakumar <[email protected]> Removed iframe resizer javascript. No longer used.
- Loading branch information
Nagavijay Sivakumar
committed
Mar 24, 2016
1 parent
55c56a9
commit e624a7a
Showing
8 changed files
with
201 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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,29 +90,29 @@ private ApiInfo apiInfo() { | |
+ "These information models can be managed and shared within the Vorto Information Model Repository. <br/>" | ||
+ " Code Generators for Information Models let you integrate devices into different platforms." | ||
+ "<br/>", | ||
"1.0.0", "", "", "", ""); | ||
"1.0.0", "", "", "EPL", "https://eclipse.org/org/documents/epl-v10.php"); | ||
} | ||
|
||
@Autowired | ||
private UserRepository userRepository; | ||
|
||
@Bean | ||
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("[email protected]"); | ||
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 { | ||
|
||
|
35 changes: 35 additions & 0 deletions
35
server/repo/repo-ui/src/main/resources/static/css/swagger-custom.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.