Skip to content

Commit

Permalink
MARP-1481 Upgrade connector for Ivy 12
Browse files Browse the repository at this point in the history
  • Loading branch information
quanpham-axonivy committed Nov 29, 2024
1 parent f14645c commit cd85373
Show file tree
Hide file tree
Showing 67 changed files with 853 additions and 641 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ on:

jobs:
build:
uses: axonivy-market/github-workflows/.github/workflows/ci.yml@v4
uses: axonivy-market/github-workflows/.github/workflows/ci.yml@v5
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ on: workflow_dispatch

jobs:
build:
uses: axonivy-market/github-workflows/.github/workflows/release.yml@v4
uses: axonivy-market/github-workflows/.github/workflows/release.yml@v5
7 changes: 1 addition & 6 deletions open-weather-connector-demo/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**/*.ivyClass|**/*.p.json|**/*.rddescriptor|**/*.xhtml" kind="src" path="src_hd">
<attributes>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src_wsproc">
<classpathentry kind="src" path="src_wsproc">
<attributes>
<attribute name="optional" value="true"/>
</attributes>
Expand Down
8 changes: 6 additions & 2 deletions open-weather-connector-demo/.project
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>ch.ivyteam.ivy.dialog.form.build.ivyDialogFormBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>ch.ivyteam.ivy.designer.ide.ivyModelValidationBuilder</name>
<arguments>
Expand All @@ -44,6 +49,5 @@
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jem.beaninfo.BeanInfoNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
</projectDescription>
</projectDescription>
12 changes: 0 additions & 12 deletions open-weather-connector-demo/.settings/.jsdtscope

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_DATA_CLASS=com.axonivy.connector.openweather.open.weather.connector.demo.Data
ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_NAMESPACE=com.axonivy.connector.openweather.open.weather.connector.demo
ch.ivyteam.ivy.project.preferences\:PRIMEFACES_VERSION=11
ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=100000
ch.ivyteam.ivy.project.preferences\:PRIMEFACES_VERSION=13
ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=120001
eclipse.preferences.version=1
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
org.eclipse.jdt.core.compiler.compliance=21
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=17
org.eclipse.jdt.core.compiler.source=21
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
<wb-module deploy-name="open-weather-connector-demo">
<wb-resource deploy-path="/" source-path="/webContent" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src_hd"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src_wsproc"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src_dataClasses"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/js"/>
<property name="context-root" value="open-weather-connector-demo"/>
<property name="java-output-path" value="/open-weather-connector-demo/target/classes"/>
</wb-module>
</project-modules>
</project-modules>
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="wst.jsdt.web"/>
<installed facet="java" version="17"/>
<installed facet="java" version="21"/>
<installed facet="jst.web" version="3.0"/>
<installed facet="wst.jsdt.web" version="1.0"/>
<installed facet="jst.jsf" version="2.1"/>
</faceted-project>
</faceted-project>

This file was deleted.

This file was deleted.

3 changes: 2 additions & 1 deletion open-weather-connector-demo/config/variables.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# yaml-language-server: $schema=https://json-schema.axonivy.com/app/12.0.0/variables.json
Variables:
openWeatherConnectorDemo:
# Default city for searching weather
defaultSearchedCity: 'New York'

# Default units for searching weather
defaultUnits: 'metric'
defaultUnits: 'metric'
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema" : "https://json-schema.axonivy.com/data-class/12.0.0/data-class.json",
"simpleName" : "Data",
"namespace" : "com.axonivy.connector.openweather.demo.data",
"isBusinessCaseData" : false
}

This file was deleted.

4 changes: 2 additions & 2 deletions open-weather-connector-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.axonivy.connector.openweather</groupId>
<artifactId>open-weather-connector-demo</artifactId>
<version>10.0.19-SNAPSHOT</version>
<version>12.0.0</version>
<packaging>iar</packaging>
<properties>
<project.build.plugin.version>10.0.16</project.build.plugin.version>
<project.build.plugin.version>12.0.0</project.build.plugin.version>
</properties>
<pluginRepositories>
<pluginRepository>
Expand Down
26 changes: 16 additions & 10 deletions open-weather-connector-demo/processes/ForecastWeatherDemo.p.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"format" : "10.0.0",
"$schema" : "https://json-schema.axonivy.com/process/12.0.0/process.json",
"id" : "18D69CF66BD221F0",
"config" : {
"data" : "com.axonivy.connector.openweather.demo.data.Data"
Expand All @@ -9,18 +9,23 @@
"type" : "RequestStart",
"name" : "start.ivp",
"config" : {
"callSignature" : "start",
"signature" : "start",
"request" : {
"name" : "<%=ivy.cms.co(\"/Processes/ForecastWeatherDemo/name\")%>"
},
"case" : {
"name" : "<%=ivy.cms.co(\"/Processes/ForecastWeatherDemo/Tasks/DisplayForecastWeather/name\")%>"
},
"outLink" : "start.ivp",
"startName" : "<%=ivy.cms.co(\"/Processes/ForecastWeatherDemo/name\")%>",
"tags" : "demo"
}
},
"tags" : [
"demo"
],
"visual" : {
"at" : { "x" : 96, "y" : 64 }
},
"connect" : { "id" : "f4", "to" : "f3" }
"connect" : [
{ "id" : "f4", "to" : "f3" }
]
}, {
"id" : "f1",
"type" : "TaskEnd",
Expand All @@ -32,13 +37,14 @@
"type" : "DialogCall",
"name" : "ForecastWeatherDemo",
"config" : {
"dialogId" : "com.axonivy.connector.openweather.demo.ui.ForecastWeatherDemo",
"startMethod" : "start()"
"dialog" : "com.axonivy.connector.openweather.demo.ui.ForecastWeatherDemo:start()"
},
"visual" : {
"at" : { "x" : 272, "y" : 63 },
"size" : { "width" : 174, "height" : 57 }
},
"connect" : { "id" : "f2", "to" : "f1" }
"connect" : [
{ "id" : "f2", "to" : "f1" }
]
} ]
}
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,8 @@ private int calculateModelStartX(int index) {
private void createTemperatureModel() {
temperatureModel = new LineChartModel();
LineChartOptions options = new LineChartOptions();
options.setResponsive(true);
options.setMaintainAspectRatio(false);
temperatureModel.setOptions(options);
temperatureModel.setData(prepareTemperatureChartData());
temperatureModel.setExtender(Constants.UiVariable.TEMPERATURE_CHART_EXTENDER_JS_METHOD_NAME);
Expand Down Expand Up @@ -412,6 +414,8 @@ public ChartData preparePrecipitationChartData() {
public void createWindModel() {
windModel = new LineChartModel();
LineChartOptions options = new LineChartOptions();
options.setResponsive(true);
options.setMaintainAspectRatio(false);
windModel.setData(prepareWindChartData());
windModel.setOptions(options);
windModel.setExtender(Constants.UiVariable.WIND_CHART_EXTENDER_JS_METHOD_NAME);
Expand Down Expand Up @@ -470,6 +474,8 @@ public List<String> prepareTimeLabels() {
public void createPrecipitationModel() {
precipitationModel = new BarChartModel();
BarChartOptions options = new BarChartOptions();
options.setResponsive(true);
options.setMaintainAspectRatio(false);
precipitationModel.setOptions(options);
precipitationModel.setData(preparePrecipitationChartData());
precipitationModel.setExtender(Constants.UiVariable.PRECIPITATION_CHART_EXTENDER_JS_METHOD_NAME);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
value="#{forecastWeatherBean.currentChartWindowEndX}" />
</p:outputPanel>
<p:panelGrid columns="4" layout="grid" styleClass="ui-fluid"
columnClasses="ui-g-4 p-pl-0, ui-g-3, ui-g-3, ui-g-2 p-pr-0">
columnClasses="ui-g-4 pl-0, ui-g-3, ui-g-3, ui-g-2 pr-0">

<h:panelGroup styleClass="ui-float-label">
<p:inputText value="#{forecastWeatherBean.searchCityName}" />
Expand Down Expand Up @@ -57,15 +57,15 @@
<p:spacer height="20" />

<p:panelGrid layout="grid" columns="2"
columnClasses="ui-g-3 p-p-0, ui-g-9 p-py-0">
columnClasses="ui-g-3 p-0, ui-g-9 py-0">
<p:outputPanel id="forecast-panel"
styleClass="p-text-center #{ivyFreyaTheme.getMode() == 'dark' ? 'weather-detail-container-dark-mode' : 'weather-detail-container-light-mode'}">
styleClass="text-center #{ivyFreyaTheme.getMode() == 'dark' ? 'weather-detail-container-dark-mode' : 'weather-detail-container-light-mode'}">
<p:panelGrid layout="grid" columns="2"
columnClasses="ui-g-6 p-py-3, ui-g-6 p-py-3">
columnClasses="ui-g-6 py-3, ui-g-6 py-3">
<p:outputPanel styleClass="p-text-left">
<i class="pi pi-map-marker" /> #{forecastWeatherBean.cityName}</p:outputPanel>

<p:outputPanel styleClass="p-text-right">#{forecastWeatherBean.time12HourName}</p:outputPanel>
<p:outputPanel styleClass="text-right">#{forecastWeatherBean.time12HourName}</p:outputPanel>
</p:panelGrid>
<div class="weather-condition-img-container">
<p:graphicImage
Expand Down Expand Up @@ -96,7 +96,7 @@
</div>
<div>#{forecastWeatherBean.currentWeatherDetail}</div>
<p:panelGrid layout="grid" columns="2"
styleClass="weather-other-detail-container p-mt-4"
styleClass="weather-other-detail-container mt-4"
columnClasses="ui-g-6, ui-g-6">
<p:outputPanel>
<div>#{ivy.cms.co('/Dialogs/com/axonivy/connector/openweather/demo/ui/ForecastWeatherDemo/HumidityLabel')}</div>
Expand All @@ -107,7 +107,7 @@
<div class="weather-windspeed-detail">#{forecastWeatherBean.currentWindSpeed}#{forecastWeatherBean.speedUnit}</div>
</p:outputPanel>
</p:panelGrid>
<p:outputPanel styleClass="weather-date-container p-mt-4">#{forecastWeatherBean.dateName}</p:outputPanel>
<p:outputPanel styleClass="weather-date-container mt-4">#{forecastWeatherBean.dateName}</p:outputPanel>
</p:outputPanel>
<p:outputPanel styleClass="weather-chart-btn-container">
<p:tabView id="weather-chart-panel" styleClass="weather-tab-view">
Expand All @@ -116,23 +116,22 @@
title="#{ivy.cms.co('/Dialogs/com/axonivy/connector/openweather/demo/ui/ForecastWeatherDemo/TemperatureLabel')}">
<p:lineChart id="temp-chart" widgetVar="tempChartWidgetVar"
model="#{forecastWeatherBean.temperatureModel}"
style="cursor: pointer; width: 20px; height: 5px;"
style="cursor: pointer; width: 100%; height: 90%;"
styleClass="weather-chart" />
</p:tab>

<p:tab
title="#{ivy.cms.co('/Dialogs/com/axonivy/connector/openweather/demo/ui/ForecastWeatherDemo/PrecipitationLabel')}">
<p:barChart id="pop-chart" widgetVar="popChartWidgetVar"
model="#{forecastWeatherBean.precipitationModel}"
style="cursor: pointer; width: 20px; height: 5px;"
style="cursor: pointer; width: 100%; height: 90%;"
styleClass="weather-chart" />
</p:tab>

<p:tab
title="#{ivy.cms.co('/Dialogs/com/axonivy/connector/openweather/demo/ui/ForecastWeatherDemo/WindSpeedLabel')}">
<p:lineChart id="wind-chart" widgetVar="windChartWidgetVar"
model="#{forecastWeatherBean.windModel}"
style="cursor: pointer; width: 20px; height: 5px;"
style="cursor: pointer; width: 100%; height: 90%;"
styleClass="weather-chart" />
</p:tab>

Expand All @@ -149,11 +148,11 @@
<p:ajax
update=":form:forecast-panel :form:forecast-btn-panel :form:property-panel"
oncomplete="panChart(#{dailyForecastDisplayInfo.chartWindowStartX}, #{dailyForecastDisplayInfo.chartWindowEndX})" />
<p:outputPanel styleClass="p-mb-2">
<p:outputPanel styleClass="mb-2">
<span class="weather-date-btn-label">#{status.first ?
'Today' : dailyForecastDisplayInfo.shortDateName}</span>
</p:outputPanel>
<p:outputPanel styleClass="p-mb-2">
<p:outputPanel styleClass="mb-2">
<p:graphicImage
value="https://openweathermap.org/img/wn/#{dailyForecastDisplayInfo.dailyForecast.weatherIcon}@2x.png"
width="100px" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema" : "https://json-schema.axonivy.com/data-class/12.0.0/data-class.json",
"simpleName" : "ForecastWeatherDemoData",
"namespace" : "com.axonivy.connector.openweather.demo.ui.ForecastWeatherDemo",
"isBusinessCaseData" : false
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"format" : "10.0.0",
"$schema" : "https://json-schema.axonivy.com/process/12.0.0/process.json",
"id" : "18D69D45CF17FC2E",
"kind" : "HTML_DIALOG",
"config" : {
Expand All @@ -10,13 +10,15 @@
"type" : "HtmlDialogStart",
"name" : "start()",
"config" : {
"callSignature" : "start",
"signature" : "start",
"guid" : "18D69D45CF2DCB22"
},
"visual" : {
"at" : { "x" : 96, "y" : 64 }
},
"connect" : { "id" : "f2", "to" : "f1" }
"connect" : [
{ "id" : "f2", "to" : "f1" }
]
}, {
"id" : "f1",
"type" : "HtmlDialogEnd",
Expand All @@ -33,7 +35,9 @@
"visual" : {
"at" : { "x" : 96, "y" : 160 }
},
"connect" : { "id" : "f5", "to" : "f4" }
"connect" : [
{ "id" : "f5", "to" : "f4" }
]
}, {
"id" : "f4",
"type" : "HtmlDialogExit",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ and refence it below in the head part.
<h:outputScript name="js/layout.js" library="#{ivyFreyaTheme.library}" />
<h:outputStylesheet name="#{ivyFreyaTheme.layout}"
library="#{ivyFreyaTheme.library}" />
<h:outputStylesheet name="primeflex-2.min.css" library="primeflex" />
<h:outputStylesheet name="primeflex-3.min.css" library="primeflex" />
<h:outputStylesheet name="custom.css" library="ivy-branding" />
</h:head>
<h:body class="body-hd">
Expand Down
2 changes: 1 addition & 1 deletion open-weather-connector-product/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.axonivy.connector.openweather</groupId>
<artifactId>open-weather-connector-product</artifactId>
<version>10.0.19-SNAPSHOT</version>
<version>12.0.0</version>
<packaging>pom</packaging>

<properties>
Expand Down
Loading

0 comments on commit cd85373

Please sign in to comment.