Skip to content

Commit

Permalink
Merge branch 'liferay:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
liferay-frontend committed Oct 5, 2023
2 parents 2144147 + 9ef5643 commit dc35b42
Show file tree
Hide file tree
Showing 525 changed files with 11,920 additions and 4,396 deletions.
12 changes: 6 additions & 6 deletions build-test-azure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<local name="container.list" />

<exec executable="az" outputproperty="container.list">
<arg line="storage container list --account-name blobstoragesmoketest --prefix lfr-qa-poshi-test --connection-string ${azure.connection.string}" />
<arg line="storage container list --account-name isit35689storage --prefix lfr-qa-poshi-test --connection-string ${azure.connection.string}" />
</exec>

<script language="javascript"><![CDATA[
Expand Down Expand Up @@ -45,7 +45,7 @@
<echo>Expired Container: @{delete.name}</echo>

<exec executable="az">
<arg line="storage container delete --account-name blobstoragesmoketest --name @{delete.name} --connection-string ${azure.connection.string}" />
<arg line="storage container delete --account-name isit35689storage --name @{delete.name} --connection-string ${azure.connection.string}" />
</exec>
</sequential>
</for>
Expand All @@ -56,7 +56,7 @@
<local name="container.blobs" />

<exec executable="az" outputproperty="container.blobs">
<arg line="storage blob list --container-name lfr-qa-poshi-test-${azure.container.id} --account-name blobstoragesmoketest --prefix ${companyId}/${groupId} --output table --connection-string ${azure.connection.string}" />
<arg line="storage blob list --container-name lfr-qa-poshi-test-${azure.container.id} --account-name isit35689storage --prefix ${companyId}/${groupId} --output table --connection-string ${azure.connection.string}" />
</exec>

<echo>${container.blobs}</echo>
Expand All @@ -76,7 +76,7 @@
<local name="container.blobs" />

<exec executable="az" outputproperty="container.blobs">
<arg line="storage blob list --container-name lfr-qa-poshi-test-${azure.container.id} --account-name blobstoragesmoketest --prefix ${companyId}/${groupId} --output table --connection-string ${azure.connection.string}" />
<arg line="storage blob list --container-name lfr-qa-poshi-test-${azure.container.id} --account-name isit35689storage --prefix ${companyId}/${groupId} --output table --connection-string ${azure.connection.string}" />
</exec>

<echo>${container.blobs}</echo>
Expand All @@ -98,15 +98,15 @@
<local name="container.create.output" />

<exec executable="az" outputproperty="container.create.output">
<arg line="storage container create -n lfr-qa-poshi-test-${azure.container.id} --public-access container --account-name blobstoragesmoketest --connection-string ${azure.connection.string}" />
<arg line="storage container create -n lfr-qa-poshi-test-${azure.container.id} --public-access container --account-name isit35689storage --connection-string ${azure.connection.string}" />
</exec>

<echo>${container.create.output}</echo>
</target>

<target name="delete-azure-container">
<exec executable="az">
<arg line="storage container delete --account-name blobstoragesmoketest --name lfr-qa-poshi-test-${azure.container.id} --connection-string ${azure.connection.string}" />
<arg line="storage container delete --account-name isit35689storage --name lfr-qa-poshi-test-${azure.container.id} --connection-string ${azure.connection.string}" />
</exec>

<delete-azure-containers />
Expand Down
2 changes: 1 addition & 1 deletion build-test-elasticsearch7.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</then>
</elseif>
<else>
<property name="elasticsearch.version" value="7.17.12" />
<property name="elasticsearch.version" value="7.17.13" />
</else>
</if>

Expand Down
8 changes: 8 additions & 0 deletions learn-resources/ai-creator-openai-web.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"general": {
"en_US": {
"message": "learn-more-about-openai-integration",
"url": "https://learn.liferay.com/w/dxp/content-authoring-and-management/web-content/web-content-articles/generating-text-content-using-ai"
}
}
}
4 changes: 4 additions & 0 deletions modules/.releng/dxp/apps/scim/app.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
app.marketplace.id=
app.marketplace.title=Liferay SCIM Service
app.marketplace.version=1.0.0
app.portal.build=7413
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
artifact.git.id=39b4d7ef11202b27da081444b378e587259f6db5
artifact.javadoc.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.gradle.plugins.defaults/10.0.29/com.liferay.gradle.plugins.defaults-10.0.29-javadoc.jar
artifact.sources.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.gradle.plugins.defaults/10.0.29/com.liferay.gradle.plugins.defaults-10.0.29-sources.jar
artifact.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.gradle.plugins.defaults/10.0.29/com.liferay.gradle.plugins.defaults-10.0.29.jar
artifact.git.id=02f1f30a4d77d03ea0015e6dbe5f28ca207a232f
artifact.javadoc.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.gradle.plugins.defaults/10.0.30/com.liferay.gradle.plugins.defaults-10.0.30-javadoc.jar
artifact.sources.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.gradle.plugins.defaults/10.0.30/com.liferay.gradle.plugins.defaults-10.0.30-sources.jar
artifact.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.gradle.plugins.defaults/10.0.30/com.liferay.gradle.plugins.defaults-10.0.30.jar
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
artifact.git.id=0672364c66f3fa069255ccf6a1bd214b4db12e97
artifact.javadoc.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.gradle.plugins.source.formatter/5.2.56/com.liferay.gradle.plugins.source.formatter-5.2.56-javadoc.jar
artifact.sources.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.gradle.plugins.source.formatter/5.2.56/com.liferay.gradle.plugins.source.formatter-5.2.56-sources.jar
artifact.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.gradle.plugins.source.formatter/5.2.56/com.liferay.gradle.plugins.source.formatter-5.2.56.jar
artifact.git.id=02b1a47a97453dbb91395830348b4edada61b738
artifact.javadoc.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.gradle.plugins.source.formatter/5.2.57/com.liferay.gradle.plugins.source.formatter-5.2.57-javadoc.jar
artifact.sources.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.gradle.plugins.source.formatter/5.2.57/com.liferay.gradle.plugins.source.formatter-5.2.57-sources.jar
artifact.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.gradle.plugins.source.formatter/5.2.57/com.liferay.gradle.plugins.source.formatter-5.2.57.jar
8 changes: 4 additions & 4 deletions modules/.releng/sdk/gradle-plugins/artifact.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
artifact.git.id=afc7a2d7f26d8ebe454654e1a28e8293a6ec88d5
artifact.javadoc.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.gradle.plugins/14.0.183/com.liferay.gradle.plugins-14.0.183-javadoc.jar
artifact.sources.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.gradle.plugins/14.0.183/com.liferay.gradle.plugins-14.0.183-sources.jar
artifact.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.gradle.plugins/14.0.183/com.liferay.gradle.plugins-14.0.183.jar
artifact.git.id=02f1f30a4d77d03ea0015e6dbe5f28ca207a232f
artifact.javadoc.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.gradle.plugins/14.0.184/com.liferay.gradle.plugins-14.0.184-javadoc.jar
artifact.sources.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.gradle.plugins/14.0.184/com.liferay.gradle.plugins-14.0.184-sources.jar
artifact.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.gradle.plugins/14.0.184/com.liferay.gradle.plugins-14.0.184.jar
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
artifact.git.id=1235cd8bc234338d46e79eb742eae2a75e39ba72
artifact.sources.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.project.templates.form.field/1.0.191/com.liferay.project.templates.form.field-1.0.191-sources.jar
artifact.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.project.templates.form.field/1.0.191/com.liferay.project.templates.form.field-1.0.191.jar
artifact.git.id=f0870de4348e7883d5608f60824407df42437e4a
artifact.sources.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.project.templates.form.field/1.0.192/com.liferay.project.templates.form.field-1.0.192-sources.jar
artifact.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.project.templates.form.field/1.0.192/com.liferay.project.templates.form.field-1.0.192.jar
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
artifact.git.id=57cfa03f73bc04184f7561f41ba405b765d3e7c8
artifact.sources.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.jenkins.results.parser/1.0.1256/com.liferay.jenkins.results.parser-1.0.1256-sources.jar
artifact.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.jenkins.results.parser/1.0.1256/com.liferay.jenkins.results.parser-1.0.1256.jar
artifact.git.id=cb20e3e71dba231e16e0807aeced75d28eb86fa0
artifact.sources.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.jenkins.results.parser/1.0.1257/com.liferay.jenkins.results.parser-1.0.1257-sources.jar
artifact.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.jenkins.results.parser/1.0.1257/com.liferay.jenkins.results.parser-1.0.1257.jar
6 changes: 3 additions & 3 deletions modules/.releng/test/poshi/poshi-core/artifact.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
artifact.git.id=1d569f3b275de8211effdfaf14cbb799be4f9234
artifact.sources.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.poshi.core/1.0.148/com.liferay.poshi.core-1.0.148-sources.jar
artifact.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.poshi.core/1.0.148/com.liferay.poshi.core-1.0.148.jar
artifact.git.id=7a5cd87eb3c1158f894394f159403a771d0688cb
artifact.sources.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.poshi.core/1.0.149/com.liferay.poshi.core-1.0.149-sources.jar
artifact.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.poshi.core/1.0.149/com.liferay.poshi.core-1.0.149.jar
6 changes: 3 additions & 3 deletions modules/.releng/test/poshi/poshi-runner/artifact.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
artifact.git.id=1d569f3b275de8211effdfaf14cbb799be4f9234
artifact.sources.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.poshi.runner/1.0.471/com.liferay.poshi.runner-1.0.471-sources.jar
artifact.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.poshi.runner/1.0.471/com.liferay.poshi.runner-1.0.471.jar
artifact.git.id=7a5cd87eb3c1158f894394f159403a771d0688cb
artifact.sources.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.poshi.runner/1.0.472/com.liferay.poshi.runner-1.0.472-sources.jar
artifact.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.poshi.runner/1.0.472/com.liferay.poshi.runner-1.0.472.jar
10 changes: 5 additions & 5 deletions modules/.releng/util/source-formatter/artifact.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
artifact.git.id=0672364c66f3fa069255ccf6a1bd214b4db12e97
artifact.sources.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.source.formatter/1.0.1342/com.liferay.source.formatter-1.0.1342-sources.jar
artifact.tar.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.source.formatter/1.0.1342/com.liferay.source.formatter-1.0.1342.tar
artifact.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.source.formatter/1.0.1342/com.liferay.source.formatter-1.0.1342.jar
artifact.zip.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.source.formatter/1.0.1342/com.liferay.source.formatter-1.0.1342.zip
artifact.git.id=02b1a47a97453dbb91395830348b4edada61b738
artifact.sources.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.source.formatter/1.0.1343/com.liferay.source.formatter-1.0.1343-sources.jar
artifact.tar.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.source.formatter/1.0.1343/com.liferay.source.formatter-1.0.1343.tar
artifact.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.source.formatter/1.0.1343/com.liferay.source.formatter-1.0.1343.jar
artifact.zip.url=https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.source.formatter/1.0.1343/com.liferay.source.formatter-1.0.1343.zip
1 change: 1 addition & 0 deletions modules/apps/ai-creator/ai-creator-openai-web/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ dependencies {
compileOnly project(":apps:frontend-taglib:frontend-taglib-clay")
compileOnly project(":apps:frontend-taglib:frontend-taglib-react")
compileOnly project(":apps:journal:journal-api")
compileOnly project(":apps:learn:learn-api")
compileOnly project(":apps:portal-settings:portal-settings-api")
compileOnly project(":apps:site:site-api")
compileOnly project(":apps:static:portal-configuration:portal-configuration-metatype-api")
Expand Down
1 change: 1 addition & 0 deletions modules/apps/ai-creator/ai-creator-openai-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"@clayui/link": "3.88.0",
"@clayui/loading-indicator": "3.60.0",
"classnames": "2.3.1",
"frontend-js-components-web": "*",
"frontend-js-web": "*",
"react": "16.12.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package com.liferay.ai.creator.openai.web.internal.display.context;

import com.liferay.ai.creator.openai.web.internal.constants.AICreatorOpenAIPortletKeys;
import com.liferay.learn.LearnMessageUtil;
import com.liferay.portal.kernel.portlet.RequestBackedPortletURLFactory;
import com.liferay.portal.kernel.portlet.RequestBackedPortletURLFactoryUtil;
import com.liferay.portal.kernel.portlet.url.builder.ResourceURLBuilder;
Expand Down Expand Up @@ -44,6 +45,9 @@ public Map<String, Object> getProps() {
"/ai_creator_openai/get_completion"
).buildString();
}
).put(
"learnResources",
LearnMessageUtil.getReactDataJSONObject("ai-creator-openai-web")
).build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

import ClayForm from '@clayui/form';
import {Container} from '@clayui/layout';
import ClayLink from '@clayui/link';
import classNames from 'classnames';
import {LearnMessage, LearnResourcesContext} from 'frontend-js-components-web';
import {fetch} from 'frontend-js-web';
import React, {FormEvent, useEffect, useRef, useState} from 'react';

Expand All @@ -18,16 +18,29 @@ import {TextContent} from './TextContent';

interface Props {
getCompletionURL: string;
learnResources: AICreatorModalLearnResources;
portletNamespace: string;
}

type AICreatorModalLearnResources = {
'ai-creator-openai-web': {
general: {
[key: string]: {
message: string;
url: string;
};
};
};
};

type RequestStatus =
| {type: 'idle'}
| {type: 'loading'}
| {errorMessage: string; type: 'error'};

export default function AICreatorModal({
getCompletionURL,
learnResources,
portletNamespace,
}: Props) {
const closeModal = () => {
Expand Down Expand Up @@ -130,12 +143,15 @@ export default function AICreatorModal({
/>
) : null}

<ClayForm.Group className="c-mb-0 d-none">
<ClayLink href="#">
{Liferay.Language.get(
'learn-more-about-openai-integration'
)}
</ClayLink>
<ClayForm.Group className="c-mb-0">
<LearnResourcesContext.Provider
value={learnResources}
>
<LearnMessage
resource="ai-creator-openai-web"
resourceKey="general"
/>
</LearnResourcesContext.Provider>
</ClayForm.Group>
</Container>

Expand Down
8 changes: 7 additions & 1 deletion modules/apps/ai-creator/ai-creator-openai-web/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"@generated": "ef1cd2c35d9ff2d6f173ecd8973f049606ee42cd",
"@generated": "b08be50778f0f0b3c64a79dc219e98e99173c1c8",
"@overrides": {
},
"@readonly": "** AUTO-GENERATED: DO NOT EDIT OUTSIDE @overrides **",
Expand All @@ -13,6 +13,9 @@
"moduleResolution": "node",
"outDir": "./types",
"paths": {
"frontend-js-components-web": [
"../../frontend-js/frontend-js-components-web/src/main/resources/META-INF/resources/index.ts"
],
"frontend-js-web": [
"../../frontend-js/frontend-js-web/src/main/resources/META-INF/resources/index.d.ts"
]
Expand All @@ -35,6 +38,9 @@
"../../../global.d.ts"
],
"references": [
{
"path": "../../frontend-js/frontend-js-components-web"
},
{
"path": "../../frontend-js/frontend-js-web"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,22 @@

interface Props {
getCompletionURL: string;
learnResources: AICreatorModalLearnResources;
portletNamespace: string;
}
declare type AICreatorModalLearnResources = {
'ai-creator-openai-web': {
general: {
[key: string]: {
message: string;
url: string;
};
};
};
};
export default function AICreatorModal({
getCompletionURL,
learnResources,
portletNamespace,
}: Props): JSX.Element;
export {};
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

import com.liferay.petra.executor.PortalExecutorManager;
import com.liferay.petra.function.UnsafeSupplier;
import com.liferay.portal.kernel.feature.flag.FeatureFlag;
import com.liferay.portal.kernel.feature.flag.listener.FeatureFlagListener;
import com.liferay.portal.kernel.feature.flag.FeatureFlagListener;
import com.liferay.portal.kernel.util.MapUtil;
import com.liferay.portal.kernel.util.Tuple;

import java.util.ArrayList;
Expand Down Expand Up @@ -51,7 +51,8 @@ public void registerBatchEngineUnit(
@Activate
protected void activate(BundleContext bundleContext) {
_serviceRegistration = bundleContext.registerService(
FeatureFlagListener.class, new FeatureFlagListenerImpl(), null);
FeatureFlagListener.class, new FeatureFlagListenerImpl(),
MapUtil.singletonDictionary("featureFlagKey", "*"));
}

@Deactivate
Expand All @@ -74,12 +75,14 @@ private Tuple _getTuple(long companyId, String featureFlagKey) {
private class FeatureFlagListenerImpl implements FeatureFlagListener {

@Override
public void onDisabled(long companyId, FeatureFlag featureFlag) {
}
public void onValue(
long companyId, String featureFlagKey, boolean enabled) {

@Override
public void onEnabled(long companyId, FeatureFlag featureFlag) {
Tuple tuple = _getTuple(companyId, featureFlag.getKey());
if (!enabled) {
return;
}

Tuple tuple = _getTuple(companyId, featureFlagKey);

if (!_unsafeSuppliers.containsKey(tuple)) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,7 @@
/**
* @author Matija Petanjek
*/
@FeatureFlags(
{"LPS-135430", "LPS-148856", "LPS-167253", "LPS-181663", "LPS-187142"}
)
@FeatureFlags({"LPS-135430", "LPS-148856", "LPS-181663", "LPS-187142"})
@RunWith(Arquillian.class)
public class BatchEngineBrokerTest {

Expand Down
Loading

0 comments on commit dc35b42

Please sign in to comment.