diff --git a/backend/src/main/resources/application.yml b/backend/src/main/resources/application.yml index eafffa8..fd9ee91 100644 --- a/backend/src/main/resources/application.yml +++ b/backend/src/main/resources/application.yml @@ -22,8 +22,11 @@ spring: servlet: SecurityAutoConfiguration - server: port : 8081 +telegram: + bot: + token: + 12345:mybottesttoken diff --git a/common/src/commonMain/kotlin/ru/posidata/common/Resources.kt b/common/src/commonMain/kotlin/ru/posidata/common/Resources.kt index f07c5af..e0e6ec1 100644 --- a/common/src/commonMain/kotlin/ru/posidata/common/Resources.kt +++ b/common/src/commonMain/kotlin/ru/posidata/common/Resources.kt @@ -39,6 +39,7 @@ enum class Resources( FEEBAS(22, "A Water-type Pokémon that is often seen as unattractive, but evolves into the beautiful Milotic.", POKEMON), // BigData + // phase 1 HADOOP(23, "Framework that allows for the distributed processing of large data sets across clusters using programming models.", BIG_DATA), FLINK(24, "A stream processing framework that processes data in real time and is known for its low-latency performance.", BIG_DATA), HIVE(25, "A data warehouse infrastructure built on top of Hadoop, enabling users to perform queries on large datasets.", BIG_DATA), @@ -60,7 +61,18 @@ enum class Resources( ARVADOS(41, "An open-source platform for managing and analyzing large-scale genomic and biomedical data.", BIG_DATA), GEODE(42, "An open-source, distributed data management platform designed for high performance real-time data access and analytics.", BIG_DATA), ADABAS(43, "A high-performance, transactional database management system designed to handle large volumes of data.", BIG_DATA), - ICEBERG(44, "An open table format for large analytic datasets that enables high-performance reads/writes and supports schema evolution.", BIG_DATA) ; + ICEBERG(44, "An open table format for large analytic datasets that enables high-performance reads/writes and supports schema evolution.", BIG_DATA), + // phase 2 + KUDU(45, "A distributed, columnar storage engine optimized for fast analytics on large datasets, designed for integration with Hadoop.", BIG_DATA), + DRUID(46, "A real-time analytics database designed for fast slice-and-dice queries on large, high-dimensional data.", BIG_DATA), + LUIGI(47, "A Python-based workflow management system used to build complex pipelines of batch jobs.", BIG_DATA), + MILVUS(48, "An open-source vector database designed to manage, search, and index massive embedding vectors.", BIG_DATA), + WEAVIATE(49, "An open-source vector search engine and graph database designed for machine learning and semantic search.", BIG_DATA), + PAIMON(50, "A high-performance streaming table store for large-scale real-time data processing.", BIG_DATA), + DORIS(51, "An MPP-based interactive SQL data warehouse that provides sub-second query responses on large datasets.", BIG_DATA), + LANCE(52, "A data format and query engine designed for fast machine learning and analytics workflows with efficient version control.", BIG_DATA), + NIMBLE(53, "A lightweight, flexible, and scalable in-memory computing platform designed for real-time analytics.", BIG_DATA); + ; companion object { fun getById(i: Int): Resources = Resources.entries.find { it.id == i }!! diff --git a/frontend/src/jsMain/kotlin/ru/posidata/App.kt b/frontend/src/jsMain/kotlin/ru/posidata/App.kt index ba979c8..0c8662c 100644 --- a/frontend/src/jsMain/kotlin/ru/posidata/App.kt +++ b/frontend/src/jsMain/kotlin/ru/posidata/App.kt @@ -33,11 +33,6 @@ val App: FC = FC { path = "/" element = mainView.create() errorElement = errorBoundary.create() - }, - jso { - path = "/luckydraw" - element = luckyDrawCard.create() - errorElement = errorBoundary.create() } ) ) diff --git a/frontend/src/jsMain/kotlin/ru/posidata/views/main/MainView.kt b/frontend/src/jsMain/kotlin/ru/posidata/views/main/MainView.kt index 886b746..2dbcfdb 100644 --- a/frontend/src/jsMain/kotlin/ru/posidata/views/main/MainView.kt +++ b/frontend/src/jsMain/kotlin/ru/posidata/views/main/MainView.kt @@ -3,7 +3,6 @@ package ru.posidata.views.main import js.objects.jso import react.* import react.dom.html.ReactHTML -import react.dom.html.ReactHTML.button import react.dom.html.ReactHTML.div import ru.posidata.common.Answer.NONE import ru.posidata.common.Selection @@ -16,8 +15,6 @@ import ru.posidata.common.UserForSerializationDTO import web.cssom.* val mainView = FC { - val (luckyDraw, setLuckyDraw) = useState(false) - Particles::class.react { id = "tsparticles" url = "${kotlinx.browser.window.location.origin}/particles.json" @@ -31,137 +28,122 @@ val mainView = FC { val (user, setUser) = useState(null) val (tgUser, setTgUser) = useState(null) - if (!luckyDraw) { + div { + className = ClassName("full-width-container") div { - className = ClassName("full-width-container") + className = ClassName("row justify-content-center align-items-center") + style = jso { + minHeight = "100vh".unsafeCast() + } + div { - className = ClassName("row justify-content-center align-items-center") + id = "back" + className = ClassName("card col-xl-4 col-lg-5 col-md-7 col-sm-8 col-12") style = jso { - minHeight = "100vh".unsafeCast() + minHeight = "80vh".unsafeCast() + borderRadius = "40px 40px 40px 40px".unsafeCast() + boxShadow = "10px 10px 20px rgba(0, 0, 0, 0.5)".unsafeCast() } + headerRow {} + div { - id = "back" - className = ClassName("card col-xl-4 col-lg-5 col-md-7 col-sm-8 col-12") + className = ClassName("row justify-content-center text-white mt-3 ") style = jso { - minHeight = "80vh".unsafeCast() - borderRadius = "40px 40px 40px 40px".unsafeCast() - boxShadow = "10px 10px 20px rgba(0, 0, 0, 0.5)".unsafeCast() + zIndex = "1000".unsafeCast() + minHeight = "53vh".unsafeCast() + display = Display.flex } + if (user != null && user.gameNumber() == 4) { + ReactHTML.h6 { + className = ClassName("mb-2 text-white mx-2") + +"Ты отыграл уже три раза, в рейтинге участвовать больше не получится, обнови страницу если хочешь просто пройти тест. Твои результаты:" - headerRow {} - - div { - className = ClassName("row justify-content-center text-white mt-3 ") - style = jso { - zIndex = "1000".unsafeCast() - minHeight = "53vh".unsafeCast() - display = Display.flex } - if (user != null && user.gameNumber() == 4) { - ReactHTML.h6 { - className = ClassName("mb-2 text-white mx-2") - +"Ты отыграл уже три раза, в рейтинге участвовать больше не получится, обнови страницу если хочешь просто пройти тест. Твои результаты:" - + ReactHTML.h6 { + className = ClassName("mb-2 text-center") + style = jso { + color = "yellow".unsafeCast() } - ReactHTML.h6 { - className = ClassName("mb-2 text-center") - style = jso { - color = "yellow".unsafeCast() - } - +"${user.firstGameScore}/12" + +"${user.firstGameScore}/12" + } + ReactHTML.h6 { + className = ClassName("mb-2 text-center") + style = jso { + color = "yellow".unsafeCast() } - ReactHTML.h6 { - className = ClassName("mb-2 text-center") - style = jso { - color = "yellow".unsafeCast() - } - +"${user.firstGameScore}/12" + +"${user.firstGameScore}/12" + } + ReactHTML.h6 { + className = ClassName("mb-2 text-center") + style = jso { + color = "yellow".unsafeCast() } - ReactHTML.h6 { - className = ClassName("mb-2 text-center") - style = jso { - color = "yellow".unsafeCast() + +"${user.thirdGameScore}/12" + } + } else { + when (selection) { + Selection.NONE -> { + welcomeCard { + this.setSelection = setSelection + this.setUser = setUser + this.tgUser = tgUser + this.setTgUser = setTgUser } - +"${user.thirdGameScore}/12" } - } else { - when (selection) { - Selection.NONE -> { - welcomeCard { - this.setSelection = setSelection - this.setUser = setUser - this.tgUser = tgUser - this.setTgUser = setTgUser - } + + QUESTION -> questionCard { + this.counter = counter + this.setCounter = setCounter + this.answers = answers + this.setAnswers = setAnswers + this.setPokemonId = setPokemonId + this.pokemonId = pokemonId + this.setSelection = setSelection + this.uniqueRandom = uniqueRandom + this.setUniqueRandom = setUniqueRandom + + this.user = user + this.tgUser = tgUser + this.setUser = setUser + } + + ANSWER -> { + answerCard { + this.setSelection = setSelection + this.counter = counter + this.pokemonId = pokemonId + this.answers = answers } + } - QUESTION -> questionCard { + RESULTS -> { + resultCard { this.counter = counter - this.setCounter = setCounter this.answers = answers - this.setAnswers = setAnswers - this.setPokemonId = setPokemonId - this.pokemonId = pokemonId this.setSelection = setSelection - this.uniqueRandom = uniqueRandom + this.setCounter = setCounter + this.setAnswers = setAnswers this.setUniqueRandom = setUniqueRandom + this.setSelection = setSelection this.user = user this.tgUser = tgUser this.setUser = setUser } - - ANSWER -> { - answerCard { - this.setSelection = setSelection - this.counter = counter - this.pokemonId = pokemonId - this.answers = answers - } - } - - RESULTS -> { - resultCard { - this.counter = counter - this.answers = answers - this.setSelection = setSelection - this.setCounter = setCounter - this.setAnswers = setAnswers - this.setUniqueRandom = setUniqueRandom - this.setSelection = setSelection - - this.user = user - this.tgUser = tgUser - this.setUser = setUser - } - } } } } + } - if (selection != Selection.NONE) { - progressBar { - this.counter = counter - this.selection = selection - this.answers = answers - } - } - - button { - className = ClassName("btn btn-outline-info btn-lg") - onClick = { - setLuckyDraw(true) - } - +"Розыгрыш" + if (selection != Selection.NONE) { + progressBar { + this.counter = counter + this.selection = selection + this.answers = answers } } } } - } else { - luckyDrawCard { - - } } } - diff --git a/frontend/src/jsMain/resources/img/bigdata/DORIS.png b/frontend/src/jsMain/resources/img/bigdata/DORIS.png new file mode 100644 index 0000000..278398b Binary files /dev/null and b/frontend/src/jsMain/resources/img/bigdata/DORIS.png differ diff --git a/frontend/src/jsMain/resources/img/bigdata/DRUID.png b/frontend/src/jsMain/resources/img/bigdata/DRUID.png new file mode 100644 index 0000000..ae840b5 Binary files /dev/null and b/frontend/src/jsMain/resources/img/bigdata/DRUID.png differ diff --git a/frontend/src/jsMain/resources/img/bigdata/LANCE.png b/frontend/src/jsMain/resources/img/bigdata/LANCE.png new file mode 100644 index 0000000..837a9c1 Binary files /dev/null and b/frontend/src/jsMain/resources/img/bigdata/LANCE.png differ diff --git a/frontend/src/jsMain/resources/img/bigdata/LUIGI.png b/frontend/src/jsMain/resources/img/bigdata/LUIGI.png new file mode 100644 index 0000000..3681037 Binary files /dev/null and b/frontend/src/jsMain/resources/img/bigdata/LUIGI.png differ diff --git a/frontend/src/jsMain/resources/img/bigdata/MILVUS.png b/frontend/src/jsMain/resources/img/bigdata/MILVUS.png new file mode 100644 index 0000000..36a0cff Binary files /dev/null and b/frontend/src/jsMain/resources/img/bigdata/MILVUS.png differ diff --git a/frontend/src/jsMain/resources/img/bigdata/NIMBLE.png b/frontend/src/jsMain/resources/img/bigdata/NIMBLE.png new file mode 100644 index 0000000..9cbab0b Binary files /dev/null and b/frontend/src/jsMain/resources/img/bigdata/NIMBLE.png differ diff --git a/frontend/src/jsMain/resources/img/bigdata/PAIMON.png b/frontend/src/jsMain/resources/img/bigdata/PAIMON.png new file mode 100644 index 0000000..e2d3190 Binary files /dev/null and b/frontend/src/jsMain/resources/img/bigdata/PAIMON.png differ diff --git a/frontend/src/jsMain/resources/img/bigdata/WEAVIATE.png b/frontend/src/jsMain/resources/img/bigdata/WEAVIATE.png new file mode 100644 index 0000000..74cc6a6 Binary files /dev/null and b/frontend/src/jsMain/resources/img/bigdata/WEAVIATE.png differ