diff --git a/src/main/java/ru/ulstu/extractor/ts/controller/TimeSeriesMarkupController.java b/src/main/java/ru/ulstu/extractor/ts/controller/TimeSeriesMarkupController.java new file mode 100644 index 0000000..5caad5c --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/ts/controller/TimeSeriesMarkupController.java @@ -0,0 +1,27 @@ +package ru.ulstu.extractor.ts.controller; + +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; +import ru.ulstu.extractor.ts.model.TimeSeries; +import ru.ulstu.extractor.ts.service.TimeSeriesService; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; + +@Controller +@ApiIgnore +public class TimeSeriesMarkupController { + private final TimeSeriesService timeSeriesService; + + public TimeSeriesMarkupController(TimeSeriesService timeSeriesService) { + this.timeSeriesService = timeSeriesService; + } + + @GetMapping("time-series-markup") + public String markupTs(Model model) { + List ts = timeSeriesService.getAllTimeSeries(); + model.addAttribute("ts", ts); + return "markup"; + } +} diff --git a/src/main/resources/templates/markup.html b/src/main/resources/templates/markup.html new file mode 100644 index 0000000..329d010 --- /dev/null +++ b/src/main/resources/templates/markup.html @@ -0,0 +1,24 @@ + + + + Простая обработка формы на Spring MVC + + +
+ + + + + + + + + + + + +
Разметка временных рядов
+
+