-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: #11 Implemented index page generation, except for players by ra…
…nk charts and tables. - Added profileLink, rank and rankDisplayName usability getters to PlayerEntity, profileLink to PlayerDto. - Links to user profile changed to https:// instead of http://. - Html of <td> with user rank color, login and info with profile link extracted to a FTL macro that is imported into page FTLs. - Added an ExampleTemplate and example.ftl to be able to test FreeMarker quickly. - Re-generated top by speed files are not yet added. - Order of players in "Действующие пользователи, у которых падает /get-index-data" is random, since java Map is not sorted. - Link to method on the index page fixed: /get-summary instead of /get-stats-overview.
- Loading branch information
1 parent
2813a47
commit 66a9c71
Showing
13 changed files
with
438 additions
and
26 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
36 changes: 36 additions & 0 deletions
36
kgparserSpringBoot/src/main/java/ru/klavogonki/kgparser/freemarker/ExampleTemplate.java
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,36 @@ | ||
package ru.klavogonki.kgparser.freemarker; | ||
|
||
import lombok.extern.log4j.Log4j2; | ||
import ru.klavogonki.kgparser.Rank; | ||
import ru.klavogonki.kgparser.jsonParser.entity.PlayerEntity; | ||
|
||
/** | ||
* Used to try out the FreeMarker features without waiting for getting the data from the database. | ||
*/ | ||
@Log4j2 | ||
public class ExampleTemplate extends FreemarkerTemplate { | ||
|
||
@Override | ||
public String getTemplatePath() { | ||
return "ftl/example.ftl"; | ||
} | ||
|
||
@Override | ||
public void export(final String filePath) { | ||
templateData.put("testInteger", 123456789); | ||
|
||
PlayerEntity player = new PlayerEntity(); | ||
player.setLogin("nosferatum"); | ||
player.setPlayerId(242585); | ||
player.setRankLevel(Rank.getLevel(Rank.superman).intValue()); | ||
|
||
templateData.put("testPlayer", player); | ||
|
||
String result = super.exportToString(); | ||
logger.debug("result:\n{}", result); | ||
} | ||
|
||
public static void main(String[] args) { | ||
new ExampleTemplate().export("example.html"); | ||
} | ||
} |
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
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.