Skip to content

Commit

Permalink
update deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
vegegoku committed Sep 14, 2023
1 parent 4650f1f commit 2a6c23a
Show file tree
Hide file tree
Showing 14 changed files with 195 additions and 63 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,30 @@
# limitations under the License.
#

name: Deploy
name: Publish-app

on:
push:
branches: [ master ]
branches: [ 1.x.x-development ]
env:
MAVEN_OPTS: -Xms1024m -Xmx2048m -XX:MaxPermSize=2048m
MAVEN_OPTS: -Xms4096m -Xmx6144m -XX:MaxPermSize=6144m
JAVA_OPTS: -Xms4096m -Xmx6144m -XX:MaxPermSize=6144m

jobs:
deploy:
runs-on: ubuntu-18.04
publish-app:
runs-on: ubuntu-20.04
strategy:
matrix:
java-version: [ 11 ]
steps:
- name: Check out Git repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install Java and Maven
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java-version }}
- run: mvn verify -T4
java-version: 11
distribution: 'temurin'
- run: mvn verify -T4 -B -e
- name: Copy jar over ssh
uses: garygrossgarten/github-action-scp@release
with:
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ protected HTMLDivElement init() {
.appendChild(DominoElement.of(li().add(a()
.attr("href", "https://www.patreon.com/bePatron?u=30748189")
.css("d-patreon")
.add(img("/images/patreon-2296036-1911995.png"))
.add(img("images/patreon-2296036-1911995.png"))
))
.showOn(ScreenMedia.MEDIUM_AND_UP)
.hideOn(ScreenMedia.SMALL_AND_DOWN)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ private void sample4() {
.offset4()
.appendChild(Card.create()
.fitContent()
.appendChild(img("/images/login/login-bg-1.jpg")
.appendChild(img("images/login/login-bg-1.jpg")
.css(Styles.img_responsive))
.appendChild(DominoElement.of(div().css(Styles.padding_20))
.appendChild(TextBox.create("User name")
Expand Down Expand Up @@ -170,7 +170,7 @@ private void sample5() {
.css(Styles.align_center)
.css(Styles.padding_30)
.css("avatar-container")
.add(img("/images/login/login-bg-2.png")
.add(img("images/login/login-bg-2.png")
.css(Styles.img_responsive)
.css(Elevation.LEVEL_1.getStyle())
.css("login-avatar")))
Expand Down Expand Up @@ -209,7 +209,7 @@ private void sample6() {
.condense()
.appendChild(div()
.css("avatar-container")
.add(img("/images/greyscale-1.jpg")
.add(img("images/greyscale-1.jpg")
.css(Styles.img_responsive))))
.appendChild(Column.span6()
.condense()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,9 @@ private void initModalsSize() {

ModalDialog defaultSizeModal = createModalDialog();
defaultSizeModal.setModal(false);
// defaultSizeModal.appendChild(TextBox.create("sample"));
defaultSizeModal.appendChild(CheckBox.create("sample"));


defaultSizeModal.appendChild(TextNode.of(SAMPLE_CONTENT));
Button defaultSizeButton = Button.createDefault("MODAL - DEFAULT SIZE");
defaultSizeButton.addClickListener(e -> openDialog(defaultSizeModal));

Expand Down
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<vertx.version>3.9.0</vertx.version>
<vertx.version>3.9.16</vertx.version>
<elemento.version>1.0.3</elemento.version>
<elemental2.version>1.1.0</elemental2.version>
<domino.jackson.version>HEAD-SNAPSHOT</domino.jackson.version>
<domino.history.version>HEAD-SNAPSHOT</domino.history.version>
<domino.ui.version>1.0.2-SNAPSHOT</domino.ui.version>
<domino.mvp.version>1.0.0</domino.mvp.version>
<domino.jackson.version>1.0.0</domino.jackson.version>
<domino.history.version>1.0.0</domino.history.version>
<domino.ui.version>1.0.3</domino.ui.version>
<domino.mvp.version>1.0.1</domino.mvp.version>
</properties>

<repositories>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protected HTMLDivElement init() {
Card.create()
.styler(style -> style
.addCss("classy-card"))
.appendChild(img("./images/samples/dominodo.png")
.appendChild(img("images/samples/dominodo.png")
.css(Styles.img_responsive)
.css(Elevation.LEVEL_1.getStyle()))
.appendChild(h(4).textContent("DominoDo"))
Expand All @@ -61,7 +61,7 @@ protected HTMLDivElement init() {
Card.create()
.styler(style -> style
.addCss("classy-card"))
.appendChild(img("./images/samples/nalu-initializer.png")
.appendChild(img("images/samples/nalu-initializer.png")
.css(Styles.img_responsive)
.css(Elevation.LEVEL_1.getStyle()))
.appendChild(h(4).textContent("Nalu Initializer"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ private void horizontalSpin() {
))
.appendChild(Column.span2()
.appendChild(HSpinSelect.<String>create()
.appendChild(SpinItem.create("item 1", div().css("sample-spin-item").add(img("/images/flags/jordan.png").style("width: 48px; height: 48px;"))))
.appendChild(SpinItem.create("item 2", div().css("sample-spin-item").add(img("/images/flags/oman.png").style("width: 48px; height: 48px;"))))
.appendChild(SpinItem.create("item 3", div().css("sample-spin-item").add(img("/images/flags/palestine.png").style("width: 48px; height: 48px;"))))
.appendChild(SpinItem.create("item 4", div().css("sample-spin-item").add(img("/images/flags/brazil.png").style("width: 48px; height: 48px;"))))
.appendChild(SpinItem.create("item 5", div().css("sample-spin-item").add(img("/images/flags/european-union.png").style("width: 48px; height: 48px;"))))
.appendChild(SpinItem.create("item 1", div().css("sample-spin-item").add(img("images/flags/jordan.png").style("width: 48px; height: 48px;"))))
.appendChild(SpinItem.create("item 2", div().css("sample-spin-item").add(img("images/flags/oman.png").style("width: 48px; height: 48px;"))))
.appendChild(SpinItem.create("item 3", div().css("sample-spin-item").add(img("images/flags/palestine.png").style("width: 48px; height: 48px;"))))
.appendChild(SpinItem.create("item 4", div().css("sample-spin-item").add(img("images/flags/brazil.png").style("width: 48px; height: 48px;"))))
.appendChild(SpinItem.create("item 5", div().css("sample-spin-item").add(img("images/flags/european-union.png").style("width: 48px; height: 48px;"))))
))
.appendChild(Column.span6()
.appendChild(HSpinSelect.<String>create(Icons.ALL.arrow_back(), Icons.ALL.arrow_forward())
Expand Down Expand Up @@ -130,11 +130,11 @@ private void verticalSpin() {
.appendChild(Column.span2()
.appendChild(VSpinSelect.<String>create()
.setHeight("50px")
.appendChild(SpinItem.create("item 1", div().css("sample-spin-item").add(img("/images/flags/jordan.png").style("width: 48px; height: 48px;"))))
.appendChild(SpinItem.create("item 2", div().css("sample-spin-item").add(img("/images/flags/oman.png").style("width: 48px; height: 48px;"))))
.appendChild(SpinItem.create("item 3", div().css("sample-spin-item").add(img("/images/flags/palestine.png").style("width: 48px; height: 48px;"))))
.appendChild(SpinItem.create("item 4", div().css("sample-spin-item").add(img("/images/flags/brazil.png").style("width: 48px; height: 48px;"))))
.appendChild(SpinItem.create("item 5", div().css("sample-spin-item").add(img("/images/flags/european-union.png").style("width: 48px; height: 48px;"))))
.appendChild(SpinItem.create("item 1", div().css("sample-spin-item").add(img("images/flags/jordan.png").style("width: 48px; height: 48px;"))))
.appendChild(SpinItem.create("item 2", div().css("sample-spin-item").add(img("images/flags/oman.png").style("width: 48px; height: 48px;"))))
.appendChild(SpinItem.create("item 3", div().css("sample-spin-item").add(img("images/flags/palestine.png").style("width: 48px; height: 48px;"))))
.appendChild(SpinItem.create("item 4", div().css("sample-spin-item").add(img("images/flags/brazil.png").style("width: 48px; height: 48px;"))))
.appendChild(SpinItem.create("item 5", div().css("sample-spin-item").add(img("images/flags/european-union.png").style("width: 48px; height: 48px;"))))
))
.appendChild(Column.span6()
.appendChild(VSpinSelect.<String>create(Icons.ALL.arrow_upward(), Icons.ALL.arrow_downward())
Expand Down
3 changes: 2 additions & 1 deletion ui-demo-backend/src/main/resources/config.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"http.port": 8080
"http.port": 8080,
"app.root.path": ""
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.dominokit.domino.ui.demo;

import com.google.gwt.core.client.EntryPoint;
import elemental2.dom.DomGlobal;
import org.dominokit.domino.api.client.ClientApp;
import org.dominokit.domino.gwt.client.app.DominoGWT;
import org.dominokit.domino.view.GwtView;
Expand All @@ -12,7 +13,12 @@ public class AppClientModule implements EntryPoint {
private static final Logger LOGGER = Logger.getLogger(AppClientModule.class.getName());

public void onModuleLoad() {
DominoGWT.init();
if (System.getProperty("superdevmode").equals("on")) {
DominoGWT.init();
}else {
DominoGWT.InitOptions initOptions = new DominoGWT.InitOptions("domino-ui/demo/v1");
DominoGWT.init(initOptions);
}
GwtView.init();
ClientApp.make().run();
LOGGER.info("ui-demo Application frontend have been initialized.");
Expand Down
5 changes: 5 additions & 0 deletions ui-demo-server/ui-demo-server-backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@
<artifactId>ui-demo-server-shared</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-web-templ-freemarker</artifactId>
<version>${vertx.version}</version>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
import io.vertx.core.buffer.Buffer;
import io.vertx.core.http.HttpMethod;
import io.vertx.core.json.Json;
import io.vertx.core.json.JsonObject;
import org.dominokit.domino.api.server.entrypoint.ServerAppEntryPoint;
import org.dominokit.domino.api.server.entrypoint.VertxContext;
import org.dominokit.domino.api.server.plugins.IndexPageContext;
import org.dominokit.domino.uidemoserver.shared.model.ContactList;
import org.dominokit.domino.uidemoserver.shared.model.ContactList_MapperImpl;
import org.slf4j.Logger;
Expand All @@ -19,7 +21,9 @@ public class DemoServerEntryPoint implements ServerAppEntryPoint<VertxContext> {
private static final Logger LOGGER = LoggerFactory.getLogger(DemoServerEntryPoint.class);
@Override
public void onModulesLoaded(VertxContext vertxContext) {
LOGGER.info("Executing server entry point...");
JsonObject indexContext = new JsonObject();
indexContext.put("appRootPath", vertxContext.config().getString("app.root.path"));
IndexPageContext.INSTANCE.setIndexPageProvider(new DynamicIndexPageProvider(indexContext));
vertxContext
.router()
.route(HttpMethod.GET, "/service/contacts")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package org.dominokit.domino.uidemoserver.server.resources;

import com.google.auto.service.AutoService;
import io.vertx.core.http.HttpServerResponse;
import io.vertx.core.json.JsonObject;
import io.vertx.ext.web.RoutingContext;
import io.vertx.ext.web.templ.freemarker.FreeMarkerTemplateEngine;
import org.dominokit.domino.api.server.PluginContext;
import org.dominokit.domino.api.server.plugins.IndexPageProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@AutoService(IndexPageProvider.class)
public class DynamicIndexPageProvider implements IndexPageProvider {

public static final Logger LOGGER = LoggerFactory.getLogger(DynamicIndexPageProvider.class);
private final JsonObject engineContext = new JsonObject();

public DynamicIndexPageProvider(JsonObject engineContext) {
this.engineContext.mergeIn(engineContext);
}

@Override
public HttpServerResponse serveIndexPage(PluginContext context, RoutingContext routingContext, int statusCode) {
LOGGER.info("Loading index page using dynamic index page loader...");
FreeMarkerTemplateEngine engine = FreeMarkerTemplateEngine.create(context.getVertx());

HttpServerResponse response = routingContext
.response()
.setStatusCode(statusCode)
.putHeader("Content-type", "text/html");

engine.render(engineContext
, "templates/index.ftl", processedTemplate -> {
if(processedTemplate.succeeded()) {
String content = processedTemplate.result().toString();
response.putHeader("Content-length", content.length() + "")
.write(content);
response.end();
}else{
response.end();
LOGGER.error("failed to process index page template : ", processedTemplate.cause());
}
});

return response;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<!doctype html>

<html>
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-143772295-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-143772295-1');
</script>

<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-KRZMCDW');</script>
<!-- End Google Tag Manager -->

<meta charset=UTF-8>
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">

<!--<link type="text/css" rel="stylesheet" href="/static/css/domino-ui.css">-->
<link type="text/css" rel="stylesheet" href="${appRootPath}/fontawesome/css/fontawesome-all.css">
<link type="text/css" rel="stylesheet" href="${appRootPath}/css/domino-ui.dev.css">
<link type="text/css" rel="stylesheet" href="${appRootPath}/css/themes/all-themes.css">
<link type="text/css" rel="stylesheet" href="${appRootPath}/dev.css">
<link type="text/css" rel="stylesheet" href="${appRootPath}/ui-demo.css">
<link rel="stylesheet" type="text/css" href="${appRootPath}/prettify/prettify.css">
<link rel="stylesheet" type="text/css" href="${appRootPath}/prettify/desert.css">

<title>ui-demo</title>
<script type="text/javascript" src="${appRootPath}/prettify/prettify.js"></script>
<script src="${appRootPath}/polyfill/polyfill-ie11.js"></script>
<script src="${appRootPath}/app.nocache.js"></script>

<script>
((window.gitter = {}).chat = {}).options = {
room: 'domino-gwt/domino-ui'
};
</script>
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
</head>

<body>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KRZMCDW"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1'
style="position:absolute;width:0;height:0;border:0"></iframe>

<noscript>
<div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
Your web browser must have JavaScript enabled
in order for this application to display correctly.
</div>
</noscript>

</body>
</html>

0 comments on commit 2a6c23a

Please sign in to comment.