init
This commit is contained in:
commit
f7307a8c23
113
.gitignore
vendored
Normal file
113
.gitignore
vendored
Normal file
@ -0,0 +1,113 @@
|
||||
node_modules
|
||||
HELP.md
|
||||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
/.mvn/wrapper/maven-wrapper.properties
|
||||
/src/main/bundles/dev.bundle
|
||||
/src/main/bundles/README.md
|
||||
/src/main/frontend/generated/flow/Flow.tsx
|
||||
/src/main/frontend/generated/flow/generated-flow-imports.d.ts
|
||||
/src/main/frontend/generated/flow/generated-flow-imports.js
|
||||
/src/main/frontend/generated/flow/generated-flow-webcomponent-imports.js
|
||||
/src/main/frontend/generated/flow/ReactAdapter.tsx
|
||||
/src/main/frontend/generated/jar-resources/com/github/appreciated/apexcharts/apexcharts-wrapper.ts
|
||||
/src/main/frontend/generated/jar-resources/com/github/appreciated/apexcharts/apexcharts-wrapper-styles.css
|
||||
/src/main/frontend/generated/jar-resources/com/github/appreciated/apexcharts/declarations.d.ts
|
||||
/src/main/frontend/generated/jar-resources/copilot/base-panel-CtbJwWq1.js
|
||||
/src/main/frontend/generated/jar-resources/copilot/copilot-Cj-G4kPi.js
|
||||
/src/main/frontend/generated/jar-resources/copilot/copilot-features-plugin-Sf57yYee.js
|
||||
/src/main/frontend/generated/jar-resources/copilot/copilot-feedback-plugin-aYzbzFyU.js
|
||||
/src/main/frontend/generated/jar-resources/copilot/copilot-global-vars-later-Cmafk9dE.js
|
||||
/src/main/frontend/generated/jar-resources/copilot/copilot-info-plugin-DAX7GxFL.js
|
||||
/src/main/frontend/generated/jar-resources/copilot/copilot-init-step2-DpKGNrcj.js
|
||||
/src/main/frontend/generated/jar-resources/copilot/copilot-log-plugin-BPSkPKUL.js
|
||||
/src/main/frontend/generated/jar-resources/copilot/copilot-shortcuts-plugin-BhZyJbe8.js
|
||||
/src/main/frontend/generated/jar-resources/copilot/icons-18Y63hfX.js
|
||||
/src/main/frontend/generated/jar-resources/copilot/overlay-monkeypatch-Ux66pzCq.js
|
||||
/src/main/frontend/generated/jar-resources/copilot/state-CX50xuH-.js
|
||||
/src/main/frontend/generated/jar-resources/vaadin-dev-tools/connection.d.ts
|
||||
/src/main/frontend/generated/jar-resources/vaadin-dev-tools/License.d.ts
|
||||
/src/main/frontend/generated/jar-resources/vaadin-dev-tools/live-reload-connection.d.ts
|
||||
/src/main/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.d.ts
|
||||
/src/main/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.js
|
||||
/src/main/frontend/generated/jar-resources/vaadin-dev-tools/websocket-connection.d.ts
|
||||
/src/main/frontend/generated/jar-resources/vaadin-popover/popover.ts
|
||||
/src/main/frontend/generated/jar-resources/vaadin-time-picker/helpers.js
|
||||
/src/main/frontend/generated/jar-resources/vaadin-time-picker/timepickerConnector.js
|
||||
/src/main/frontend/generated/jar-resources/comboBoxConnector.js
|
||||
/src/main/frontend/generated/jar-resources/contextMenuConnector.js
|
||||
/src/main/frontend/generated/jar-resources/contextMenuTargetConnector.js
|
||||
/src/main/frontend/generated/jar-resources/copilot.js
|
||||
/src/main/frontend/generated/jar-resources/datepickerConnector.js
|
||||
/src/main/frontend/generated/jar-resources/disableOnClickFunctions.js
|
||||
/src/main/frontend/generated/jar-resources/dndConnector.js
|
||||
/src/main/frontend/generated/jar-resources/Flow.d.ts
|
||||
/src/main/frontend/generated/jar-resources/Flow.js
|
||||
/src/main/frontend/generated/jar-resources/Flow.js.map
|
||||
/src/main/frontend/generated/jar-resources/flow-component-directive.js
|
||||
/src/main/frontend/generated/jar-resources/flow-component-renderer.js
|
||||
/src/main/frontend/generated/jar-resources/FlowBootstrap.d.ts
|
||||
/src/main/frontend/generated/jar-resources/FlowBootstrap.js
|
||||
/src/main/frontend/generated/jar-resources/FlowClient.d.ts
|
||||
/src/main/frontend/generated/jar-resources/FlowClient.js
|
||||
/src/main/frontend/generated/jar-resources/gridConnector.ts
|
||||
/src/main/frontend/generated/jar-resources/index.d.ts
|
||||
/src/main/frontend/generated/jar-resources/index.js
|
||||
/src/main/frontend/generated/jar-resources/index.js.map
|
||||
/src/main/frontend/generated/jar-resources/lit-renderer.ts
|
||||
/src/main/frontend/generated/jar-resources/menubarConnector.js
|
||||
/src/main/frontend/generated/jar-resources/messageListConnector.js
|
||||
/src/main/frontend/generated/jar-resources/ReactRouterOutletElement.tsx
|
||||
/src/main/frontend/generated/jar-resources/selectConnector.js
|
||||
/src/main/frontend/generated/jar-resources/theme-util.js
|
||||
/src/main/frontend/generated/jar-resources/tooltip.ts
|
||||
/src/main/frontend/generated/jar-resources/vaadin-big-decimal-field.js
|
||||
/src/main/frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js
|
||||
/src/main/frontend/generated/jar-resources/virtualListConnector.js
|
||||
/src/main/frontend/generated/index.tsx
|
||||
/src/main/frontend/generated/layouts.json
|
||||
/src/main/frontend/generated/routes.tsx
|
||||
/src/main/frontend/generated/vaadin.ts
|
||||
/src/main/frontend/generated/vaadin-featureflags.js
|
||||
/src/main/frontend/generated/vaadin-react.tsx
|
||||
/src/main/frontend/generated/vite-devmode.ts
|
||||
/src/main/frontend/index.html
|
||||
/.gitattributes
|
||||
/mvnw
|
||||
/mvnw.cmd
|
||||
/package.json
|
||||
/package-lock.json
|
||||
/tsconfig.json
|
||||
/types.d.ts
|
||||
/vite.config.ts
|
||||
/vite.generated.ts
|
141
pom.xml
Normal file
141
pom.xml
Normal file
@ -0,0 +1,141 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>3.4.1</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>de.own</groupId>
|
||||
<artifactId>skill</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>skill</name>
|
||||
<description>skill</description>
|
||||
<url/>
|
||||
<licenses>
|
||||
<license/>
|
||||
</licenses>
|
||||
<developers>
|
||||
<developer/>
|
||||
</developers>
|
||||
<scm>
|
||||
<connection/>
|
||||
<developerConnection/>
|
||||
<tag/>
|
||||
<url/>
|
||||
</scm>
|
||||
<properties>
|
||||
<java.version>21</java.version>
|
||||
<vaadin.version>24.6.1</vaadin.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.vaadin</groupId>
|
||||
<artifactId>vaadin-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.appreciated</groupId>
|
||||
<artifactId>apexcharts</artifactId>
|
||||
<version>24.0.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.vaadin</groupId>
|
||||
<artifactId>vaadin-bom</artifactId>
|
||||
<version>${vaadin.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>Vaadin Directory</id>
|
||||
<url>https://maven.vaadin.com/vaadin-addons</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<annotationProcessorPaths>
|
||||
<path>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.36</version>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>production</id>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.vaadin</groupId>
|
||||
<artifactId>vaadin-core</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.vaadin</groupId>
|
||||
<artifactId>vaadin-dev</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.vaadin</groupId>
|
||||
<artifactId>vaadin-maven-plugin</artifactId>
|
||||
<version>${vaadin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>frontend</id>
|
||||
<phase>compile</phase>
|
||||
<goals>
|
||||
<goal>prepare-frontend</goal>
|
||||
<goal>build-frontend</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
</project>
|
10
src/main/java/de/own/skill/AppShell.java
Normal file
10
src/main/java/de/own/skill/AppShell.java
Normal file
@ -0,0 +1,10 @@
|
||||
package de.own.skill;
|
||||
|
||||
import com.vaadin.flow.component.page.AppShellConfigurator;
|
||||
import com.vaadin.flow.theme.Theme;
|
||||
import com.vaadin.flow.theme.lumo.Lumo;
|
||||
|
||||
@Theme(variant = Lumo.DARK)
|
||||
public class AppShell implements AppShellConfigurator {
|
||||
// Your AppShell configuration
|
||||
}
|
13
src/main/java/de/own/skill/MyData.java
Normal file
13
src/main/java/de/own/skill/MyData.java
Normal file
@ -0,0 +1,13 @@
|
||||
package de.own.skill;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
public class MyData {
|
||||
private String presentationName;
|
||||
List<Row> data = new ArrayList<>();
|
||||
}
|
127
src/main/java/de/own/skill/PresentationView.java
Normal file
127
src/main/java/de/own/skill/PresentationView.java
Normal file
@ -0,0 +1,127 @@
|
||||
package de.own.skill;
|
||||
|
||||
import com.github.appreciated.apexcharts.ApexCharts;
|
||||
import com.github.appreciated.apexcharts.ApexChartsBuilder;
|
||||
import com.github.appreciated.apexcharts.config.builder.*;
|
||||
import com.github.appreciated.apexcharts.config.chart.Type;
|
||||
import com.github.appreciated.apexcharts.config.subtitle.Style;
|
||||
import com.github.appreciated.apexcharts.config.theme.Mode;
|
||||
import com.github.appreciated.apexcharts.helper.Series;
|
||||
import com.vaadin.flow.component.UI;
|
||||
import com.vaadin.flow.component.Unit;
|
||||
import com.vaadin.flow.component.grid.Grid;
|
||||
import com.vaadin.flow.component.orderedlayout.HorizontalLayout;
|
||||
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
||||
import com.vaadin.flow.router.Route;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Route("")
|
||||
public class PresentationView extends VerticalLayout {
|
||||
private final HorizontalLayout backendLayout = new HorizontalLayout();
|
||||
private final HorizontalLayout frontendLayout = new HorizontalLayout();
|
||||
private final Grid<Row> backendGrid = new Grid<>(Row.class);
|
||||
private final Grid<Row> frontendGrid = new Grid<>(Row.class);
|
||||
public PresentationView() {
|
||||
setSizeFull();
|
||||
MyData backendData = initBackendData();
|
||||
MyData frontendData = initFrontendData();
|
||||
|
||||
|
||||
backendGrid.setItems(backendData.getData());
|
||||
backendGrid.setMinWidth(500, Unit.PIXELS);
|
||||
backendGrid.setMaxWidth(500, Unit.PIXELS);
|
||||
backendGrid.setHeightFull();
|
||||
|
||||
frontendGrid.setItems(frontendData.getData());
|
||||
frontendGrid.setMinWidth(500, Unit.PIXELS);
|
||||
frontendGrid.setMaxWidth(500, Unit.PIXELS);
|
||||
frontendGrid.setHeightFull();
|
||||
|
||||
backendLayout.setWidth(500, Unit.PIXELS);
|
||||
backendLayout.setHeight(500, Unit.PIXELS);
|
||||
backendLayout.add(backendGrid);
|
||||
ApexCharts backendChart = initChartByType(backendData, Type.RADAR, "Backend skills");
|
||||
backendLayout.add(backendChart);
|
||||
|
||||
|
||||
frontendLayout.setHeightFull();
|
||||
frontendLayout.setMaxWidth(500, Unit.PIXELS);
|
||||
frontendLayout.add(frontendGrid);
|
||||
ApexCharts frontendChart = initChartByType(frontendData, Type.BAR, "Frontend skills");
|
||||
frontendLayout.add(frontendChart);
|
||||
|
||||
UI.getCurrent().getPage().retrieveExtendedClientDetails(details -> {
|
||||
if (details.getBodyClientWidth() < 500) {
|
||||
add(new VerticalLayout(backendChart, backendGrid, frontendChart, frontendGrid));
|
||||
backendGrid.setHeight(500, Unit.PIXELS);
|
||||
frontendGrid.setHeight(500, Unit.PIXELS);
|
||||
} else {
|
||||
add(backendLayout,frontendLayout);
|
||||
}
|
||||
});
|
||||
|
||||
UI.getCurrent().getPage().addStyleSheet("data:text/css," +
|
||||
".apexcharts-menu-icon { display: none !important; }");
|
||||
}
|
||||
|
||||
private ApexCharts initChartByType(MyData data, Type type, String title) {
|
||||
String[] names = data.getData().stream().map(Row::getName).toArray(String[]::new);
|
||||
Double[] scores = data.getData().stream().map(Row::getScore).toArray(Double[]::new);
|
||||
Style style =new Style();
|
||||
style.setColor("red");
|
||||
ApexCharts chart = new ApexChartsBuilder()
|
||||
.withTheme(ThemeBuilder.get().withMode(Mode.LIGHT).build())
|
||||
.withChart(ChartBuilder.get().withType(type).build())
|
||||
.withTitle(TitleSubtitleBuilder.get().withText(title).withStyle(style).build())
|
||||
.withYaxis(YAxisBuilder.get()
|
||||
.withMin(0d)
|
||||
.withMax(9d)
|
||||
.build())
|
||||
.withTooltip(TooltipBuilder.get().withTheme("dark").withFillSeriesColor(true).build())
|
||||
// .withColors("#142a4d", "#142a4d", "#142a4d")
|
||||
// .withColors("red")
|
||||
|
||||
.withLabels(names)
|
||||
.withSeries(new Series<>("Scores", scores))
|
||||
.build();
|
||||
chart.setWidth(500, Unit.PIXELS);
|
||||
chart.setHeight(500, Unit.PIXELS);
|
||||
return chart;
|
||||
}
|
||||
|
||||
private MyData initBackendData() {
|
||||
MyData myData = new MyData();
|
||||
myData.setData(List.of(
|
||||
Row.builder().name("Apache Poi").score(7d).build(),
|
||||
Row.builder().name("Flowable").score(5d).build(),
|
||||
Row.builder().name("Flyway").score(6d).build(),
|
||||
Row.builder().name("Git").score(8d).build(),
|
||||
Row.builder().name("Hibernate").score(8d).build(),
|
||||
Row.builder().name("Jasper Report").score(6d).build(),
|
||||
Row.builder().name("Jenkins").score(3d).build(),
|
||||
Row.builder().name("Junit").score(5d).build(),
|
||||
Row.builder().name("Liquibase").score(7d).build(),
|
||||
Row.builder().name("Mapstruct").score(7d).build(),
|
||||
Row.builder().name("Open CSV").score(5d).build(),
|
||||
Row.builder().name("QueryDSL").score(6d).build(),
|
||||
Row.builder().name("SonarQ").score(3d).build(),
|
||||
Row.builder().name("Spring").score(8d).build(),
|
||||
Row.builder().name("Spring Data JPA").score(8d).build()
|
||||
)
|
||||
);
|
||||
return myData;
|
||||
}
|
||||
|
||||
private MyData initFrontendData() {
|
||||
MyData myData = new MyData();
|
||||
myData.setData(List.of(
|
||||
Row.builder().name("Primeface").score(7d).build(),
|
||||
Row.builder().name("Swing").score(6d).build(),
|
||||
Row.builder().name("Vaadin").score(7d).build(),
|
||||
Row.builder().name("Vuejs").score(6d).build()
|
||||
)
|
||||
);
|
||||
return myData;
|
||||
}
|
||||
}
|
11
src/main/java/de/own/skill/Row.java
Normal file
11
src/main/java/de/own/skill/Row.java
Normal file
@ -0,0 +1,11 @@
|
||||
package de.own.skill;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
public class Row {
|
||||
private String name;
|
||||
private Double score;
|
||||
}
|
13
src/main/java/de/own/skill/SkillApplication.java
Normal file
13
src/main/java/de/own/skill/SkillApplication.java
Normal file
@ -0,0 +1,13 @@
|
||||
package de.own.skill;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class SkillApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(SkillApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
2
src/main/resources/application.properties
Normal file
2
src/main/resources/application.properties
Normal file
@ -0,0 +1,2 @@
|
||||
vaadin.launch-browser=true
|
||||
spring.application.name=skill
|
13
src/test/java/de/own/skill/SkillApplicationTests.java
Normal file
13
src/test/java/de/own/skill/SkillApplicationTests.java
Normal file
@ -0,0 +1,13 @@
|
||||
package de.own.skill;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest
|
||||
class SkillApplicationTests {
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user