diff --git a/build.gradle b/build.gradle
index 53e9b1e..31526c3 100644
--- a/build.gradle
+++ b/build.gradle
@@ -41,5 +41,4 @@ wrapper {
}
vaadin {
productionMode = true
- // nodeVersion = "12.16.3"
}
\ No newline at end of file
diff --git a/frontend/brands.js b/frontend/brands.js
new file mode 100644
index 0000000..c59fd34
--- /dev/null
+++ b/frontend/brands.js
@@ -0,0 +1,25 @@
+import '@polymer/iron-icon/iron-icon.js';
+import '@polymer/iron-iconset-svg/iron-iconset-svg.js';
+
+import {html} from '@polymer/polymer/lib/utils/html-tag.js';
+
+const template = html`
+
+`;
+
+document.head.appendChild(template.content);
\ No newline at end of file
diff --git a/src/main/java/ru/iopump/qa/allure/gui/MainLayout.java b/src/main/java/ru/iopump/qa/allure/gui/MainLayout.java
index b402746..f81b104 100644
--- a/src/main/java/ru/iopump/qa/allure/gui/MainLayout.java
+++ b/src/main/java/ru/iopump/qa/allure/gui/MainLayout.java
@@ -2,17 +2,23 @@ package ru.iopump.qa.allure.gui;
import com.vaadin.flow.component.applayout.AppLayout;
import com.vaadin.flow.component.applayout.DrawerToggle;
+import com.vaadin.flow.component.dependency.JsModule;
+import com.vaadin.flow.component.html.Anchor;
import com.vaadin.flow.component.html.H3;
+import com.vaadin.flow.component.icon.IronIcon;
import com.vaadin.flow.component.orderedlayout.FlexComponent;
import com.vaadin.flow.component.orderedlayout.HorizontalLayout;
+import com.vaadin.flow.component.orderedlayout.VerticalLayout;
import com.vaadin.flow.component.tabs.Tab;
import com.vaadin.flow.component.tabs.Tabs;
import com.vaadin.flow.router.HighlightConditions;
import com.vaadin.flow.router.RouterLink;
+import ru.iopump.qa.allure.gui.view.AboutView;
import ru.iopump.qa.allure.gui.view.ReportsView;
import ru.iopump.qa.allure.gui.view.ResultsView;
import ru.iopump.qa.allure.gui.view.SwaggerView;
+@JsModule("./brands.js")
public class MainLayout extends AppLayout {
public static final String ALLURE_SERVER = "Allure Server";
@@ -41,13 +47,29 @@ public class MainLayout extends AppLayout {
reports.setHighlightCondition(HighlightConditions.sameLocation());
var results = new RouterLink("Results", ResultsView.class);
results.setHighlightCondition(HighlightConditions.sameLocation());
- // var swagger = new Anchor(baseUrl + "/swagger", "Swagger");
var swagger = new RouterLink("Swagger", SwaggerView.class);
results.setHighlightCondition(HighlightConditions.sameLocation());
+ var about = new RouterLink("About", AboutView.class);
+ results.setHighlightCondition(HighlightConditions.sameLocation());
- Tabs tabs = new Tabs(new Tab(reports), new Tab(results), new Tab(swagger));
+ Tabs tabs = new Tabs(new Tab(reports), new Tab(results), new Tab(swagger), new Tab(about));
tabs.setOrientation(Tabs.Orientation.VERTICAL);
+ tabs.setSizeFull();
- addToDrawer(tabs);
+ var github = new Anchor("https://github.com/kochetkov-ma/allure-server",
+ new IronIcon("icomoon", "github"));
+ github.setTarget("_blank");
+ var dockerHub = new Anchor("https://hub.docker.com/r/kochetkovma/allure-server",
+ new IronIcon("icomoon", "docker"));
+ dockerHub.setTarget("_blank");
+ var linkedIn = new Anchor("https://www.linkedin.com/in/maxim-kochetkov-75178215a/",
+ new IronIcon("icomoon", "linkedin"));
+ linkedIn.setTarget("_blank");
+
+ var footer = new HorizontalLayout(github, dockerHub, linkedIn);
+ var menu = new VerticalLayout(tabs, footer);
+ menu.setHeightFull();
+
+ addToDrawer(menu);
}
}
diff --git a/src/main/java/ru/iopump/qa/allure/gui/component/FilteredGrid.java b/src/main/java/ru/iopump/qa/allure/gui/component/FilteredGrid.java
index 5c520cc..ae9bfaf 100644
--- a/src/main/java/ru/iopump/qa/allure/gui/component/FilteredGrid.java
+++ b/src/main/java/ru/iopump/qa/allure/gui/component/FilteredGrid.java
@@ -138,6 +138,7 @@ public class FilteredGrid {
return new ComponentRenderer<>(row -> {
var link = Str.toStr(columnSpec.getValue().apply(row));
var res = new Anchor(link, link);
+ res.setTarget("_blank");
res.getStyle().set(FONT_FAMILY, GERMANIA_ONE);
return res;
});
diff --git a/src/main/java/ru/iopump/qa/allure/gui/view/AboutView.java b/src/main/java/ru/iopump/qa/allure/gui/view/AboutView.java
new file mode 100644
index 0000000..9d3ef4c
--- /dev/null
+++ b/src/main/java/ru/iopump/qa/allure/gui/view/AboutView.java
@@ -0,0 +1,41 @@
+package ru.iopump.qa.allure.gui.view;
+
+import static ru.iopump.qa.allure.gui.MainLayout.ALLURE_SERVER;
+
+import com.vaadin.flow.component.Tag;
+import com.vaadin.flow.component.html.Anchor;
+import com.vaadin.flow.component.html.Div;
+import com.vaadin.flow.component.html.Paragraph;
+import com.vaadin.flow.component.orderedlayout.VerticalLayout;
+import com.vaadin.flow.router.PageTitle;
+import com.vaadin.flow.router.Route;
+import lombok.extern.slf4j.Slf4j;
+import ru.iopump.qa.allure.gui.MainLayout;
+
+@Tag("about-view")
+@PageTitle("About | " + ALLURE_SERVER)
+@Route(value = "about", layout = MainLayout.class)
+@Slf4j
+public class AboutView extends VerticalLayout {
+ public static final String FONT_FAMILY = "font-family";
+ public static final String GERMANIA_ONE = "Cambria";
+ private static final long serialVersionUID = 5122017036734476962L;
+
+ public AboutView() {
+ var description = new Div(
+ new Paragraph("This is a server to save and aggregate Allure Report results"),
+ new Paragraph(new Anchor("https://docs.qameta.io/allure/", "Allure Reporting Framework")),
+ new Paragraph("Allure Reports are very popular QA Reporting tool in Russia. " +
+ "But it hasn't any free EE servers, just plugins like Jenkins Plugin. " +
+ "This solution can be the only place to save, generate and provide Allure Reports in an organization. " +
+ "Run your tests, make zip archive with the allure results and upload to the Allure Server by API or Web-UI")
+ );
+
+ var author = new Paragraph("Author: Maxim Kochetkov, Russia, Moscow");
+ var mailTo = new Anchor("mailto:kochetkov-ma@yandex.ru", "Email: kochetkov-ma@yandex.ru");
+
+ var mainLayout = new VerticalLayout(description, author, mailTo);
+ mainLayout.getStyle().set(FONT_FAMILY, GERMANIA_ONE);
+ add(mainLayout);
+ }
+}
diff --git a/src/main/resources/META-INF/resources/frontend/brands.js b/src/main/resources/META-INF/resources/frontend/brands.js
new file mode 100644
index 0000000..c59fd34
--- /dev/null
+++ b/src/main/resources/META-INF/resources/frontend/brands.js
@@ -0,0 +1,25 @@
+import '@polymer/iron-icon/iron-icon.js';
+import '@polymer/iron-iconset-svg/iron-iconset-svg.js';
+
+import {html} from '@polymer/polymer/lib/utils/html-tag.js';
+
+const template = html`
+
+`;
+
+document.head.appendChild(template.content);
\ No newline at end of file