All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkiverse.barcode.deployment.okapi.OkapiDevUIProcessor Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
package io.quarkiverse.barcode.deployment.okapi;

import io.quarkus.deployment.IsDevelopment;
import io.quarkus.deployment.annotations.BuildProducer;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.devui.spi.page.CardPageBuildItem;
import io.quarkus.devui.spi.page.ExternalPageBuilder;
import io.quarkus.devui.spi.page.Page;
import uk.org.okapibarcode.OkapiBarcode;

class OkapiDevUIProcessor {

    @BuildStep(onlyIf = IsDevelopment.class)
    void createVersion(BuildProducer cardPageBuildItemBuildProducer) {
        final CardPageBuildItem card = new CardPageBuildItem();

        final ExternalPageBuilder versionPage = Page.externalPageBuilder("Okapi Version")
                .icon("font-awesome-solid:tag")
                .url("https://github.com/woo-j/OkapiBarcode")
                .doNotEmbed()
                .staticLabel(OkapiBarcode.class.getPackage().getImplementationVersion());

        card.addPage(versionPage);
        card.setCustomCard("qwc-okapi-card.js");
        cardPageBuildItemBuildProducer.produce(card);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy