Skip to content

Commit

Permalink
Dashboard 1.1 (#165)
Browse files Browse the repository at this point in the history
* Google Java Format

* removed unnecessary code from htmx-demo

---------

Co-authored-by: github-actions <>
  • Loading branch information
Harsh4902 authored Jul 29, 2023
1 parent 5654cff commit 0be733c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
6 changes: 0 additions & 6 deletions Examples/htmx-ui-demo/DashboardApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,18 @@ public RedisEnv redisEnv() {
}

private StringBuilder currentContent;

public List<MessageItem> messages = new ArrayList<>();

private String Url = "http://localhost:8080/v1/examples/wiki-summary?query=";

@GetMapping
public String index(Model model) {
addChat();
addAttributeForIndex(model);
return "index";
}

@PostMapping
public String sendMessage(@ModelAttribute("item") MessageItem messageItem, Model model) {
System.out.println(messageItem);
messages.add(messageItem);
System.out.println(messages);
return "redirect:/";
}

Expand Down Expand Up @@ -96,7 +91,6 @@ private void addAttributeForIndex(Model model) {

@GetMapping("/responce")
public String reply(Model model) {
System.out.println("reply");
currentContent = new StringBuilder();
MessageItem messageItem = new MessageItem("", true);
model.addAttribute("item", messageItem);
Expand Down
3 changes: 0 additions & 3 deletions Examples/htmx-ui-demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,6 @@ <h3 class="card-title">Chat</h3>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@tabler/[email protected]/dist/js/tabler.min.js"></script>
<script type="text/javascript">
htmx.on('#new-message', 'htmx:afterRequest', function (evt) {
evt.detail.elt.value = '';
Expand Down

0 comments on commit 0be733c

Please sign in to comment.