Java Code Examples for org.springframework.http.MediaType#TEXT_HTML_VALUE
The following examples show how to use
org.springframework.http.MediaType#TEXT_HTML_VALUE .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: NodeIndexController.java From Jpom with MIT License | 6 votes |
@RequestMapping(value = "list.html", method = RequestMethod.GET, produces = MediaType.TEXT_HTML_VALUE) @Feature(method = MethodFeature.LIST) public String list(String group) { List<NodeModel> nodeModels = nodeService.list(); // if (nodeModels != null && StrUtil.isNotEmpty(group)) { // 筛选 List<NodeModel> filterList = nodeModels.stream().filter(nodeModel -> StrUtil.equals(group, nodeModel.getGroup())).collect(Collectors.toList()); if (CollUtil.isNotEmpty(filterList)) { // 如果传入的分组找到了节点,就返回 否则返回全部 nodeModels = filterList; } } setAttribute("array", nodeModels); // 获取所有的ssh 名称 JSONObject sshName = new JSONObject(); List<SshModel> sshModels = sshService.list(); if (sshModels != null) { sshModels.forEach(sshModel -> sshName.put(sshModel.getId(), sshModel.getName())); } setAttribute("sshName", sshName); // group HashSet<String> allGroup = nodeService.getAllGroup(); setAttribute("groups", allGroup); return "node/list"; }
Example 2
Source File: ParseService.java From yauaa with Apache License 2.0 | 5 votes |
@GetMapping( value = "/", produces = MediaType.TEXT_HTML_VALUE ) public String getHtml(@RequestHeader("User-Agent") String userAgentString) { return doHTML(userAgentString); }
Example 3
Source File: UserRoleDynamicController.java From Jpom with MIT License | 5 votes |
@RequestMapping(value = "dynamicData.html", method = RequestMethod.GET, produces = MediaType.TEXT_HTML_VALUE) @Feature(method = MethodFeature.EDIT) public String list() { Map<ClassFeature, DynamicData> dynamicDataMap = DynamicData.getDynamicDataMap(); setAttribute("dynamicDataMap", dynamicDataMap); return "user/role/dynamicData"; }
Example 4
Source File: TomcatLogController.java From Jpom with MIT License | 5 votes |
/** * tomcat 日志管理 * * @param id tomcat id * @return 项目管理面 */ @RequestMapping(value = "console", method = RequestMethod.GET, produces = MediaType.TEXT_HTML_VALUE) @Feature(method = MethodFeature.LOG) public String console(String id) { setAttribute("id", id); return "node/tomcat/console"; }
Example 5
Source File: MonitorListController.java From Jpom with MIT License | 5 votes |
/** * 修改监控 * * @param id id * @return json */ @RequestMapping(value = "edit.html", method = RequestMethod.GET, produces = MediaType.TEXT_HTML_VALUE) @Feature(method = MethodFeature.EDIT) public String edit(String id) { MonitorModel monitorModel = null; if (StrUtil.isNotEmpty(id)) { monitorModel = monitorService.getItem(id); } setAttribute("model", monitorModel); //监控周期 JSONArray cycleArray = Cycle.getJSONArray(); setAttribute("cycleArray", cycleArray); List<NodeModel> nodeModels = nodeService.listAndProject(); setAttribute("nodeModels", nodeModels); // List<UserModel> list = userService.list(false); JSONArray jsonArray = new JSONArray(); list.forEach(userModel -> { JSONObject jsonObject = new JSONObject(); jsonObject.put("title", userModel.getName()); jsonObject.put("value", userModel.getId()); if (StrUtil.isEmpty(userModel.getEmail()) && StrUtil.isEmpty(userModel.getDingDing())) { jsonObject.put("disabled", true); } jsonArray.add(jsonObject); }); setAttribute("userLists", jsonArray); return "monitor/edit"; }
Example 6
Source File: NginxController.java From Jpom with MIT License | 5 votes |
@RequestMapping(value = "item.html", method = RequestMethod.GET, produces = MediaType.TEXT_HTML_VALUE) @Feature(method = MethodFeature.EDIT) public String setting(String type) { List<String> ngxDirectory = whitelistDirectoryService.getNgxDirectory(getNode()); setAttribute("nginx", ngxDirectory); setAttribute("type", type); JSONObject data = NodeForward.requestData(getNode(), NodeUrl.System_Nginx_item_data, getRequest(), JSONObject.class); setAttribute("data", data); return "node/system/nginxSetting"; }
Example 7
Source File: TomcatManageController.java From Jpom with MIT License | 5 votes |
/** * 删除tomcat * * @return 操作结果 */ @RequestMapping(value = "delete", method = RequestMethod.POST, produces = MediaType.TEXT_HTML_VALUE) @ResponseBody @OptLog(UserOperateLogV1.OptType.Del_Tomcat) @Feature(method = MethodFeature.DEL) public String delete() { return tomcatService.delete(getNode(), getRequest()); }
Example 8
Source File: TomcatManageController.java From Jpom with MIT License | 5 votes |
/** * 查询文件列表 * * @return 文件列表 */ @RequestMapping(value = "getFileList", method = RequestMethod.POST, produces = MediaType.TEXT_HTML_VALUE) @ResponseBody @Feature(method = MethodFeature.FILE) public String getFileList() { return tomcatService.getFileList(getNode(), getRequest()); }
Example 9
Source File: LoginControl.java From Jpom with MIT License | 5 votes |
/** * 登录页面 * * @return login */ @RequestMapping(value = "login.html", method = RequestMethod.GET, produces = MediaType.TEXT_HTML_VALUE) @NotLogin public String login() { if (userService.userListEmpty()) { // 调整到初始化也 return BaseJpomInterceptor.getRedirect(getRequest(), "/install.html"); } // 是否显示验证码 setAttribute("showCode", showCode()); return "login"; }
Example 10
Source File: MonitorLogController.java From Jpom with MIT License | 5 votes |
/** * 展示监控页面 * * @return page */ @RequestMapping(value = "log.html", method = RequestMethod.GET, produces = MediaType.TEXT_HTML_VALUE) @Feature(method = MethodFeature.LOG) public String list() { // 所有节点 List<NodeModel> nodeModels = nodeService.list(); setAttribute("nodeArray", nodeModels); //通知方式 JSONArray notifyTypeArray = BaseEnum.toJSONArray(MonitorModel.NotifyType.class); setAttribute("notifyTypeArray", notifyTypeArray); return "monitor/loglist"; }
Example 11
Source File: TomcatManageController.java From Jpom with MIT License | 5 votes |
/** * 保存Tomcat信息 * * @param id tomcat的id,如果id非空则更新,如果id是空则保存 * @return 操作结果 */ @RequestMapping(value = "save", method = RequestMethod.POST, produces = MediaType.TEXT_HTML_VALUE) @ResponseBody @OptLog(UserOperateLogV1.OptType.Save_Tomcat) @Feature(method = MethodFeature.EDIT) public String save(String id) { NodeModel nodeModel = getNode(); if (StrUtil.isEmpty(id)) { return tomcatService.addTomcat(nodeModel, getRequest()); } else { // 修改Tomcat信息 return tomcatService.updateTomcat(nodeModel, getRequest()); } }
Example 12
Source File: SshController.java From Jpom with MIT License | 5 votes |
@RequestMapping(value = "terminal.html", method = RequestMethod.GET, produces = MediaType.TEXT_HTML_VALUE) @Feature(method = MethodFeature.TERMINAL) public String terminal(String id) { SshModel sshModel = sshService.getItem(id); setAttribute("item", sshModel); return "node/ssh/terminal"; }
Example 13
Source File: CatalogController.java From microservice with Apache License 2.0 | 4 votes |
@RequestMapping(value = "/searchForm.html", produces = MediaType.TEXT_HTML_VALUE) public ModelAndView searchForm() { return new ModelAndView("searchForm"); }
Example 14
Source File: ContentEndpointController.java From yes-cart with Apache License 2.0 | 4 votes |
@ApiOperation(value = "Show shop mail template preview") @Secured({"ROLE_SMADMIN","ROLE_SMSHOPADMIN","ROLE_SMSHOPUSER","ROLE_SMSUBSHOPUSER"}) @RequestMapping(value = "/shops/{shopId}/mail/{template}/preview", method = RequestMethod.GET, produces = { MediaType.TEXT_HTML_VALUE, MediaType.TEXT_PLAIN_VALUE }) @ResponseBody ResponseEntity<String> getShopMail(@ApiParam(value = "Shop ID", required = true) @PathVariable("shopId") long shopId, @ApiParam(value = "Mail template code", required = true) @PathVariable("template") String template, @ApiParam(value = "Order details to use") @RequestParam(value = "order", required = false) String order, @ApiParam(value = "Order delivery details to use") @RequestParam(value = "delivery", required = false) String delivery, @ApiParam(value = "Customer details to use") @RequestParam(value = "customer", required = false) String customer, @ApiParam(value = "Format to generate email", allowableValues = "html,txt") @RequestParam(value = "format", required = false, defaultValue = "html") String format) throws Exception;
Example 15
Source File: CatalogController.java From microservice-kubernetes with Apache License 2.0 | 4 votes |
@RequestMapping(value = "/{id}.html", method = RequestMethod.GET, produces = MediaType.TEXT_HTML_VALUE) public ModelAndView Item(@PathVariable("id") long id) { return new ModelAndView("item", "item", itemRepository.findById(id).get()); }
Example 16
Source File: WeatherMvcEndpoint.java From building-microservices with Apache License 2.0 | 4 votes |
@RequestMapping(produces = MediaType.TEXT_HTML_VALUE) @ResponseBody public String invokeHtml() { return "<h1 style=\"color:red\">" + getDelegate().invoke() + "</h1>"; }
Example 17
Source File: UiController.java From spring-boot-admin with Apache License 2.0 | 4 votes |
@GetMapping(path = "/", produces = MediaType.TEXT_HTML_VALUE) public String index() { return "index"; }
Example 18
Source File: UserVehicleController.java From building-microservices with Apache License 2.0 | 4 votes |
@GetMapping(path = "/{username}/vehicle.html", produces = MediaType.TEXT_HTML_VALUE) public String VehicleDetailsHtml(@PathVariable String username) { VehicleDetails details = this.userVehicleService.getVehicleDetails(username); String makeAndModel = details.getMake() + " " + details.getModel(); return "<html><body><h1>" + makeAndModel + "</h1></body></html>"; }
Example 19
Source File: CatalogController.java From microservice with Apache License 2.0 | 4 votes |
@RequestMapping(value = "/{id}.html", method = RequestMethod.GET, produces = MediaType.TEXT_HTML_VALUE) public ModelAndView Item(@PathVariable("id") long id) { return new ModelAndView("item", "item", itemRepository.findById(id).get()); }
Example 20
Source File: UserRoleListController.java From Jpom with MIT License | 4 votes |
@RequestMapping(value = "list.html", method = RequestMethod.GET, produces = MediaType.TEXT_HTML_VALUE) @Feature(method = MethodFeature.LIST) public String list() { return "user/role/list"; }