forked from meissa/ModeratorElection
Member Names external by application.properties
This commit is contained in:
parent
abaff760ab
commit
d1e633c4d3
6 changed files with 66 additions and 23 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
||||||
build/
|
build/
|
||||||
.gradle/
|
.gradle/
|
||||||
|
.idea/
|
|
@ -4,7 +4,14 @@
|
||||||
<option name="autoReloadType" value="SELECTIVE" />
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="cd657914-f421-422e-8fe7-ce4378fd5404" name="Changes" comment="" />
|
<list default="true" id="cd657914-f421-422e-8fe7-ce4378fd5404" name="Changes" comment="">
|
||||||
|
<change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/gradlew" beforeDir="false" afterPath="$PROJECT_DIR$/gradlew" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/com/ModeratorElection/MEApplication.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/ModeratorElection/MEApplication.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/com/ModeratorElection/MainView.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/ModeratorElection/MainView.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/resources/application.properties" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/application.properties" afterDir="false" />
|
||||||
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||||
|
@ -40,6 +47,9 @@
|
||||||
<component name="PackageJsonUpdateNotifier">
|
<component name="PackageJsonUpdateNotifier">
|
||||||
<dismissed value="$PROJECT_DIR$/package.json" />
|
<dismissed value="$PROJECT_DIR$/package.json" />
|
||||||
</component>
|
</component>
|
||||||
|
<component name="ProblemsViewState">
|
||||||
|
<option name="selectedTabId" value="QODANA_PROBLEMS_VIEW_TAB" />
|
||||||
|
</component>
|
||||||
<component name="ProjectColorInfo">{
|
<component name="ProjectColorInfo">{
|
||||||
"associatedIndex": 1
|
"associatedIndex": 1
|
||||||
}</component>
|
}</component>
|
||||||
|
@ -48,17 +58,32 @@
|
||||||
<option name="hideEmptyMiddlePackages" value="true" />
|
<option name="hideEmptyMiddlePackages" value="true" />
|
||||||
<option name="showLibraryContents" value="true" />
|
<option name="showLibraryContents" value="true" />
|
||||||
</component>
|
</component>
|
||||||
<component name="PropertiesComponent"><![CDATA[{
|
<component name="PropertiesComponent">{
|
||||||
"keyToString": {
|
"keyToString": {
|
||||||
"ASKED_ADD_EXTERNAL_FILES": "true",
|
"ASKED_ADD_EXTERNAL_FILES": "true",
|
||||||
"Gradle.ModeratorElection [:MEApplication.main()].executor": "Run",
|
"Application.App_build.executor": "Run",
|
||||||
"Gradle.base-starter-spring-gradle [:DemoApplication.main()].executor": "Run",
|
"Gradle.Build ModeratorElection.executor": "Run",
|
||||||
"Gradle.base-starter-spring-gradle [:MEApplication.main()].executor": "Run",
|
"Gradle.Load Gradle Dependencies.executor": "Run",
|
||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
"Gradle.ModeratorElection [:MEApplication.main()].executor": "Run",
|
||||||
"kotlin-language-version-configured": "true",
|
"Gradle.base-starter-spring-gradle [:DemoApplication.main()].executor": "Run",
|
||||||
"last_opened_file_path": "/home/zam/repo/JavaLearning/base-starter-spring-gradle"
|
"Gradle.base-starter-spring-gradle [:MEApplication.main()].executor": "Run",
|
||||||
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
|
"kotlin-language-version-configured": "true",
|
||||||
|
"last_opened_file_path": "/home/zam/repo/JavaLearning/base-starter-spring-gradle",
|
||||||
|
"settings.editor.selected.configurable": "build.tools"
|
||||||
}
|
}
|
||||||
}]]></component>
|
}</component>
|
||||||
|
<component name="RunManager">
|
||||||
|
<configuration name="App_build" type="Application" factoryName="Application">
|
||||||
|
<option name="ALTERNATIVE_JRE_PATH" value="21" />
|
||||||
|
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
|
||||||
|
<option name="MAIN_CLASS_NAME" value="com.ModeratorElection.MEApplication" />
|
||||||
|
<module name="ModeratorElection" />
|
||||||
|
<method v="2">
|
||||||
|
<option name="Make" enabled="true" />
|
||||||
|
</method>
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
||||||
<component name="TaskManager">
|
<component name="TaskManager">
|
||||||
<task active="true" id="Default" summary="Default task">
|
<task active="true" id="Default" summary="Default task">
|
||||||
|
@ -70,4 +95,15 @@
|
||||||
</task>
|
</task>
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
|
<component name="Vcs.Log.Tabs.Properties">
|
||||||
|
<option name="TAB_STATES">
|
||||||
|
<map>
|
||||||
|
<entry key="MAIN">
|
||||||
|
<value>
|
||||||
|
<State />
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
</map>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
</project>
|
</project>
|
14
gradlew
vendored
14
gradlew
vendored
|
@ -145,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||||
case $MAX_FD in #(
|
case $MAX_FD in #(
|
||||||
max*)
|
max*)
|
||||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||||
# shellcheck disable=SC3045
|
# shellcheck disable=SC2039,SC3045
|
||||||
MAX_FD=$( ulimit -H -n ) ||
|
MAX_FD=$( ulimit -H -n ) ||
|
||||||
warn "Could not query maximum file descriptor limit"
|
warn "Could not query maximum file descriptor limit"
|
||||||
esac
|
esac
|
||||||
|
@ -153,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||||
'' | soft) :;; #(
|
'' | soft) :;; #(
|
||||||
*)
|
*)
|
||||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||||
# shellcheck disable=SC3045
|
# shellcheck disable=SC2039,SC3045
|
||||||
ulimit -n "$MAX_FD" ||
|
ulimit -n "$MAX_FD" ||
|
||||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||||
esac
|
esac
|
||||||
|
@ -202,11 +202,11 @@ fi
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
# Collect all arguments for the java command;
|
# Collect all arguments for the java command:
|
||||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||||
# shell script including quotes and variable substitutions, so put them in
|
# and any embedded shellness will be escaped.
|
||||||
# double quotes to make sure that they get re-expanded; and
|
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||||
# * put everything else in single quotes, so that it's not re-expanded.
|
# treated as '${Hostname}' itself on the command line.
|
||||||
|
|
||||||
set -- \
|
set -- \
|
||||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
|
|
|
@ -5,7 +5,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
public class MEApplication {
|
public class MEApplication {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(MEApplication.class, args);
|
SpringApplication.run(MEApplication.class, args);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,19 +14,25 @@ import com.vaadin.flow.component.orderedlayout.HorizontalLayout;
|
||||||
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
||||||
import com.vaadin.flow.router.Route;
|
import com.vaadin.flow.router.Route;
|
||||||
import com.vaadin.flow.router.PageTitle;
|
import com.vaadin.flow.router.PageTitle;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Route("")
|
@Route("")
|
||||||
@PageTitle("Moderatorenwahl")
|
@PageTitle("Moderatorenwahl")
|
||||||
|
@Configuration
|
||||||
public class MainView extends VerticalLayout {
|
public class MainView extends VerticalLayout {
|
||||||
|
|
||||||
public MainView() {
|
public MainView(@Value("${membernames}") String membernames) {
|
||||||
|
String[] memberNamesArray = membernames.split(",");
|
||||||
|
List<String> selectMemberItemsNameslist = Arrays.asList(memberNamesArray);
|
||||||
CheckboxGroup<String> checkboxGroup = new CheckboxGroup<>();
|
CheckboxGroup<String> checkboxGroup = new CheckboxGroup<>();
|
||||||
checkboxGroup.setLabel("Team members to elect");
|
checkboxGroup.setLabel("Team members to elect");
|
||||||
checkboxGroup.setItems("Micha", "Ansgar", "Clemens", "Mattis", "Erik", "Mirco");
|
checkboxGroup.setItems(selectMemberItemsNameslist);
|
||||||
checkboxGroup.select("Micha", "Ansgar", "Clemens", "Mattis", "Erik", "Mirco");
|
checkboxGroup.select(selectMemberItemsNameslist);
|
||||||
checkboxGroup.addThemeVariants(CheckboxGroupVariant.LUMO_VERTICAL);
|
checkboxGroup.addThemeVariants(CheckboxGroupVariant.LUMO_VERTICAL);
|
||||||
add(checkboxGroup);
|
add(checkboxGroup);
|
||||||
|
|
||||||
|
|
|
@ -8,3 +8,4 @@ vaadin.launch-browser=true
|
||||||
# For more information https://vaadin.com/docs/latest/integrations/spring/configuration#special-configuration-parameters
|
# For more information https://vaadin.com/docs/latest/integrations/spring/configuration#special-configuration-parameters
|
||||||
vaadin.allowed-packages = com.vaadin,org.vaadin,dev.hilla,com.example.application
|
vaadin.allowed-packages = com.vaadin,org.vaadin,dev.hilla,com.example.application
|
||||||
spring.jpa.defer-datasource-initialization = true
|
spring.jpa.defer-datasource-initialization = true
|
||||||
|
membernames=Micha,Ansgar,Clemens,Mattis,Erik,Mirco
|
||||||
|
|
Loading…
Reference in a new issue