Advertisement
Guest User

Untitled

a guest
Dec 18th, 2014
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. <table align="center">
  2. <thead>
  3. <tr>
  4. <th th:text="host">host</th>
  5. <th th:text="status">status</th>
  6. <th th:text="command">command</th>
  7. </tr>
  8. </thead>
  9. <tbody>
  10. <tr th:each="hostInstance: ${allHosts}">
  11. <td th:text="${hostInstance.name}"></td>
  12. <td th:text="${hostInstance.status}"></td>
  13. <td>
  14. <button type="submit" name="start" th:value="${hostInstance.name}" th:text="Start"></button>
  15. </td>
  16. </tr>
  17. </tbody>
  18. </table>
  19.  
  20. @RequestMapping(value="/network", params={"start"})
  21. public String startApp(final NetworkCluster networkCluster, final BindingResult bindingResult, final HttpServletRequest req, Model model) {
  22. String result = req.getParameter("start");
  23. System.out.println(result + " is clicked");
  24. return "redirect:/network";
  25. }
  26.  
  27. <table align="center">
  28. <thead>
  29. <tr>
  30. <th>host</th>
  31. <th>status</th>
  32. <th>command</th>
  33. </tr>
  34. </thead>
  35. <tbody>
  36. <tr>
  37. <td>machine_1</td>
  38. <td>down</td>
  39. <td>
  40. <div>
  41. <p><button type="submit" name="start" value="machine_1">Start</button></p>
  42.  
  43. </div>
  44. </td>
  45. </tr>
  46. <tr>
  47. <td>machine_2</td>
  48. <td>down</td>
  49. <td>
  50. <div>
  51. <p><button type="submit" name="start" value="machine_2">Start</button></p>
  52.  
  53. </div>
  54. </td>
  55. </tr>
  56.  
  57. </tbody>
  58. </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement