mirror of
https://github.com/kochetkov-ma/allure-server.git
synced 2024-11-28 08:38:44 +02:00
add about tab
This commit is contained in:
parent
231648bf63
commit
270750bcc7
@ -41,5 +41,4 @@ wrapper {
|
||||
}
|
||||
vaadin {
|
||||
productionMode = true
|
||||
// nodeVersion = "12.16.3"
|
||||
}
|
25
frontend/brands.js
Normal file
25
frontend/brands.js
Normal file
@ -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`<iron-iconset-svg name="icomoon" size="1024">
|
||||
<svg>
|
||||
<defs>
|
||||
<g id="linkedin">
|
||||
<path fill="#0077b5" style="fill: var(--color1, #0077b5)" class="path1"
|
||||
d="M872.405 872.619h-151.637v-237.611c0-56.661-1.152-129.579-79.019-129.579-79.061 0-91.136 61.653-91.136 125.397v241.792h-151.637v-488.619h145.664v66.603h1.963c20.352-38.4 69.845-78.933 143.787-78.933 153.643 0 182.059 101.12 182.059 232.747zM227.712 317.141c-48.811 0-88.021-39.509-88.021-88.107 0-48.555 39.253-88.021 88.021-88.021 48.64 0 88.064 39.467 88.064 88.021 0 48.597-39.467 88.107-88.064 88.107zM303.744 872.619h-152.064v-488.619h152.064zM948.267 0h-872.704c-41.771 0-75.563 33.024-75.563 73.771v876.459c0 40.789 33.792 73.771 75.563 73.771h872.576c41.728 0 75.861-32.981 75.861-73.771v-876.459c0-40.747-34.133-73.771-75.861-73.771z"></path>
|
||||
</g>
|
||||
<g id="github">
|
||||
<path class="path1"
|
||||
d="M512 12.672c-282.88 0-512 229.248-512 512 0 226.261 146.688 418.133 350.080 485.76 25.6 4.821 34.987-11.008 34.987-24.619 0-12.16-0.427-44.373-0.64-87.040-142.421 30.891-172.459-68.693-172.459-68.693-23.296-59.093-56.96-74.88-56.96-74.88-46.379-31.744 3.584-31.104 3.584-31.104 51.413 3.584 78.421 52.736 78.421 52.736 45.653 78.293 119.851 55.68 149.12 42.581 4.608-33.109 17.792-55.68 32.427-68.48-113.707-12.8-233.216-56.832-233.216-253.013 0-55.893 19.84-101.547 52.693-137.387-5.76-12.928-23.040-64.981 4.48-135.509 0 0 42.88-13.739 140.8 52.48 40.96-11.392 84.48-17.024 128-17.28 43.52 0.256 87.040 5.888 128 17.28 97.28-66.219 140.16-52.48 140.16-52.48 27.52 70.528 10.24 122.581 5.12 135.509 32.64 35.84 52.48 81.493 52.48 137.387 0 196.693-119.68 240-233.6 252.587 17.92 15.36 34.56 46.763 34.56 94.72 0 68.523-0.64 123.563-0.64 140.203 0 13.44 8.96 29.44 35.2 24.32 204.843-67.157 351.403-259.157 351.403-485.077 0-282.752-229.248-512-512-512z"></path>
|
||||
</g>
|
||||
<g id="docker">
|
||||
<path fill="#1488c6" style="fill: var(--color2, #1488c6)" class="path1"
|
||||
d="M205.653 737.067c-29.184 0-55.637-23.893-55.637-52.907s23.893-53.035 55.68-53.035c31.915 0 55.893 23.893 55.893 52.992s-26.539 52.907-55.936 52.949zM888.832 448.512c-5.76-42.325-32-76.8-66.56-103.253l-13.44-10.667-10.837 13.227c-21.077 23.893-29.44 66.261-26.88 97.92 2.56 23.979 10.24 47.787 23.637 66.304-10.837 5.547-24.235 10.667-34.56 16.085-24.32 7.979-47.957 10.667-71.68 10.667h-684.373l-2.56 15.787c-5.12 50.432 2.56 103.253 23.979 151.040l10.411 18.56v2.56c64 105.941 177.92 153.6 301.995 153.6 238.677 0 434.432-103.253 527.232-325.675 60.8 2.645 122.197-13.227 151.040-71.509l7.68-13.227-12.8-7.979c-34.56-21.077-81.92-23.893-121.6-13.227zM547.157 406.187h-103.595v103.253h103.68v-103.339zM547.157 276.352h-103.595v103.253h103.68v-103.125zM547.157 143.915h-103.595v103.253h103.68v-103.253zM673.877 406.187h-102.997v103.253h103.253v-103.339zM289.963 406.187h-102.955v103.253h103.339v-103.339zM419.243 406.187h-102.4v103.253h102.997v-103.339zM161.963 406.187h-102.229v103.253h103.595v-103.339zM419.243 276.352h-102.4v103.253h102.997v-103.125zM289.323 276.352h-102.144v103.253h102.955v-103.125z"></path>
|
||||
</g>
|
||||
</defs>
|
||||
</svg>
|
||||
</iron-iconset-svg>`;
|
||||
|
||||
document.head.appendChild(template.content);
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -138,6 +138,7 @@ public class FilteredGrid<T> {
|
||||
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;
|
||||
});
|
||||
|
41
src/main/java/ru/iopump/qa/allure/gui/view/AboutView.java
Normal file
41
src/main/java/ru/iopump/qa/allure/gui/view/AboutView.java
Normal file
@ -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);
|
||||
}
|
||||
}
|
25
src/main/resources/META-INF/resources/frontend/brands.js
Normal file
25
src/main/resources/META-INF/resources/frontend/brands.js
Normal file
@ -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`<iron-iconset-svg name="icomoon" size="1024">
|
||||
<svg>
|
||||
<defs>
|
||||
<g id="linkedin">
|
||||
<path fill="#0077b5" style="fill: var(--color1, #0077b5)" class="path1"
|
||||
d="M872.405 872.619h-151.637v-237.611c0-56.661-1.152-129.579-79.019-129.579-79.061 0-91.136 61.653-91.136 125.397v241.792h-151.637v-488.619h145.664v66.603h1.963c20.352-38.4 69.845-78.933 143.787-78.933 153.643 0 182.059 101.12 182.059 232.747zM227.712 317.141c-48.811 0-88.021-39.509-88.021-88.107 0-48.555 39.253-88.021 88.021-88.021 48.64 0 88.064 39.467 88.064 88.021 0 48.597-39.467 88.107-88.064 88.107zM303.744 872.619h-152.064v-488.619h152.064zM948.267 0h-872.704c-41.771 0-75.563 33.024-75.563 73.771v876.459c0 40.789 33.792 73.771 75.563 73.771h872.576c41.728 0 75.861-32.981 75.861-73.771v-876.459c0-40.747-34.133-73.771-75.861-73.771z"></path>
|
||||
</g>
|
||||
<g id="github">
|
||||
<path class="path1"
|
||||
d="M512 12.672c-282.88 0-512 229.248-512 512 0 226.261 146.688 418.133 350.080 485.76 25.6 4.821 34.987-11.008 34.987-24.619 0-12.16-0.427-44.373-0.64-87.040-142.421 30.891-172.459-68.693-172.459-68.693-23.296-59.093-56.96-74.88-56.96-74.88-46.379-31.744 3.584-31.104 3.584-31.104 51.413 3.584 78.421 52.736 78.421 52.736 45.653 78.293 119.851 55.68 149.12 42.581 4.608-33.109 17.792-55.68 32.427-68.48-113.707-12.8-233.216-56.832-233.216-253.013 0-55.893 19.84-101.547 52.693-137.387-5.76-12.928-23.040-64.981 4.48-135.509 0 0 42.88-13.739 140.8 52.48 40.96-11.392 84.48-17.024 128-17.28 43.52 0.256 87.040 5.888 128 17.28 97.28-66.219 140.16-52.48 140.16-52.48 27.52 70.528 10.24 122.581 5.12 135.509 32.64 35.84 52.48 81.493 52.48 137.387 0 196.693-119.68 240-233.6 252.587 17.92 15.36 34.56 46.763 34.56 94.72 0 68.523-0.64 123.563-0.64 140.203 0 13.44 8.96 29.44 35.2 24.32 204.843-67.157 351.403-259.157 351.403-485.077 0-282.752-229.248-512-512-512z"></path>
|
||||
</g>
|
||||
<g id="docker">
|
||||
<path fill="#1488c6" style="fill: var(--color2, #1488c6)" class="path1"
|
||||
d="M205.653 737.067c-29.184 0-55.637-23.893-55.637-52.907s23.893-53.035 55.68-53.035c31.915 0 55.893 23.893 55.893 52.992s-26.539 52.907-55.936 52.949zM888.832 448.512c-5.76-42.325-32-76.8-66.56-103.253l-13.44-10.667-10.837 13.227c-21.077 23.893-29.44 66.261-26.88 97.92 2.56 23.979 10.24 47.787 23.637 66.304-10.837 5.547-24.235 10.667-34.56 16.085-24.32 7.979-47.957 10.667-71.68 10.667h-684.373l-2.56 15.787c-5.12 50.432 2.56 103.253 23.979 151.040l10.411 18.56v2.56c64 105.941 177.92 153.6 301.995 153.6 238.677 0 434.432-103.253 527.232-325.675 60.8 2.645 122.197-13.227 151.040-71.509l7.68-13.227-12.8-7.979c-34.56-21.077-81.92-23.893-121.6-13.227zM547.157 406.187h-103.595v103.253h103.68v-103.339zM547.157 276.352h-103.595v103.253h103.68v-103.125zM547.157 143.915h-103.595v103.253h103.68v-103.253zM673.877 406.187h-102.997v103.253h103.253v-103.339zM289.963 406.187h-102.955v103.253h103.339v-103.339zM419.243 406.187h-102.4v103.253h102.997v-103.339zM161.963 406.187h-102.229v103.253h103.595v-103.339zM419.243 276.352h-102.4v103.253h102.997v-103.125zM289.323 276.352h-102.144v103.253h102.955v-103.125z"></path>
|
||||
</g>
|
||||
</defs>
|
||||
</svg>
|
||||
</iron-iconset-svg>`;
|
||||
|
||||
document.head.appendChild(template.content);
|
Loading…
Reference in New Issue
Block a user