1
0
mirror of https://github.com/kochetkov-ma/allure-server.git synced 2024-11-21 16:46:43 +02:00

add: CustomReportMetaPlugin.java

This commit is contained in:
kochetkov-ma 2024-07-01 19:44:57 +01:00
parent 0d7342b9f2
commit cd6d9d6064
5 changed files with 14 additions and 11 deletions

View File

@ -9,7 +9,6 @@ Allure Portal (Allure Report Server)
![Docker Pulls](https://img.shields.io/docker/pulls/kochetkovma/allure-server?link=https)
## About
https://allurereport.org/docs

View File

@ -3,7 +3,7 @@ services:
allure-server:
# For local debug #
# build: .
image: kochetkovma/allure-server:2.13.5
image: kochetkovma/allure-server:2.13.6
ports:
- 8080:8080
volumes:

View File

@ -3,13 +3,17 @@ services:
allure-server:
# For local debug #
# build: .
image: kochetkovma/allure-server:2.13.5
image: kochetkovma/allure-server:2.13.6
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/allure
SPRING_DATASOURCE_USERNAME: postgres
SPRING_DATASOURCE_PASSWORD: postgres
SPRING_JPA_DATABASE: postgresql
SPRING_JPA_HIBERNATE_DDL-AUTO: update # Careful! 'create' destroy data! https://stackoverflow.com/questions/21113154/spring-boot-ddl-auto-generator
TMS_ENABLED: 'false'
TMS_HOST: jira.localhost
TOKEN: '<token-here>'
TMS_DRYRUN: 'false'
ports:
- 8080:8080
volumes:

View File

@ -4,7 +4,6 @@ import io.qameta.allure.core.LaunchResults;
import io.qameta.allure.summary.SummaryData;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.springframework.core.io.ClassPathResource;
import java.nio.file.Files;
import java.nio.file.Path;
@ -50,8 +49,14 @@ public class CustomReportMetaPlugin implements AllureServerPlugin {
Files.write(customLogoPath, bytes);
String cssForNewLogo = new String(new ClassPathResource("static/" + LOGO_STYLE_FILE).getContentAsByteArray(), UTF_8)
.replace("img.png", logoName);
var cssForNewLogo = """
.side-nav__brand {
background: url('img.png') no-repeat left center !important;
padding-left: 200px !important;
margin-left: 10px;
}
""";
cssForNewLogo = cssForNewLogo.replace("img.png", logoName);
Files.writeString(customLogoCssPath, cssForNewLogo, UTF_8, Files.exists(customLogoCssPath) ? TRUNCATE_EXISTING : CREATE_NEW);
log.info("{}: {} copied to {}", getName(), logoName, customLogoPath);
}

View File

@ -1,5 +0,0 @@
.side-nav__brand {
background: url('img.png') no-repeat left center !important;
padding-left: 200px !important;
margin-left: 10px;
}