1
0
mirror of https://github.com/pcvolkmer/etl-processor.git synced 2025-07-04 15:32:55 +00:00

feat: add page that shows transformation configuration

This commit is contained in:
2023-12-04 17:35:44 +01:00
parent 7f54efe034
commit 3e45de56cf
5 changed files with 117 additions and 1 deletions

View File

@ -51,9 +51,13 @@ class TransformationService(private val objectMapper: ObjectMapper, private val
return objectMapper.readValue(json, MtbFile::class.java)
}
fun getTransformations(): List<Transformation> {
return this.transformations
}
}
class Transformation private constructor(internal val path: String) {
class Transformation private constructor(val path: String) {
lateinit var existingValue: Any
private set

View File

@ -0,0 +1,41 @@
/*
* This file is part of ETL-Processor
*
* Copyright (c) 2023 Comprehensive Cancer Center Mainfranken, Datenintegrationszentrum Philipps-Universität Marburg and Contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package dev.dnpm.etl.processor.web
import dev.dnpm.etl.processor.services.TransformationService
import org.springframework.stereotype.Controller
import org.springframework.ui.Model
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
@Controller
@RequestMapping(path = ["transformations"])
class TransformationController(
private val transformationService: TransformationService
) {
@GetMapping
fun index(model: Model): String {
model.addAttribute("transformations", transformationService.getTransformations())
return "transformations"
}
}