Skip to content

Commit

Permalink
JNG-5211 bulk operations 2
Browse files Browse the repository at this point in the history
  • Loading branch information
noherczeg committed Sep 20, 2023
1 parent a5f0ad0 commit 70bcc94
Show file tree
Hide file tree
Showing 15 changed files with 784 additions and 84 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>hu.blackbelt.judo.generator</groupId>
<artifactId>operationfaulttest-application-frontend-react</artifactId>
<version>${revision}</version>
</parent>
<artifactId>operationfaulttest-application-frontend-react-operation_fault_test__actor</artifactId>
<name>OperationFaultTest - Actor frontend react</name>
<description>OperationFaultTest - Actor react frontend</description>

<packaging>bundle</packaging>

<properties>
<actor>operationfaulttest__actor</actor>
<actor-shortname>actor</actor-shortname>
<actor-name>Actor</actor-name>
<actor-fq-name>OperationFaultTest::Actor</actor-fq-name>

<ui-model>${project.parent.basedir}/model/${model-name}-ui.model</ui-model>

<node-install-dir>${project.parent.parent.parent.basedir}/.nodejs</node-install-dir>
<generation-target>${basedir}/target/frontend-react</generation-target>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>5.1.8</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Web-ContextPath>/${model-name}/${actor}</Web-ContextPath>
<Include-Resource>
/=${generation-target}/dist
</Include-Resource>
</instructions>
</configuration>
</plugin>

<plugin>
<groupId>hu.blackbelt.judo.meta</groupId>
<artifactId>judo-ui-generator-maven-plugin</artifactId>
<version>${judo-meta-ui-version}</version>
<executions>
<execution>
<id>execute-ui-services-generation</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<uris>
<uri>mvn:hu.blackbelt.judo.generator:judo-ui-typescript-rest-api:${judo-ui-typescript-rest-version}</uri>
<uri>mvn:hu.blackbelt.judo.generator:judo-ui-typescript-rest-service:${judo-ui-typescript-rest-version}</uri>
<uri>mvn:hu.blackbelt.judo.generator:judo-ui-typescript-rest-axios:${judo-ui-typescript-rest-version}</uri>
</uris>
<type>ui-typescript-rest</type>
<scanPackages>
hu.blackbelt.judo.generator.commons,
hu.blackbelt.judo.ui.generator.typescript.rest
</scanPackages>
<applications>
${actor-fq-name}
</applications>
<ui>${ui-model}</ui>
<destination>${generation-target}/src/generated</destination>
</configuration>
</execution>
<execution>
<id>execute-ui-generation</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<uris>
<uri>mvn:hu.blackbelt.judo.generator:judo-ui-react:${revision}</uri>
</uris>
<type>ui-react</type>
<scanPackages>
hu.blackbelt.judo.generator.commons,
hu.blackbelt.judo.ui.generator.react,
hu.blackbelt.judo.ui.generator.typescript.rest.commons
</scanPackages>
<applications>
${actor-fq-name}
</applications>
<ui>${ui-model}</ui>
<destination>${generation-target}</destination>
<templateParameters>
<debugPrint>true</debugPrint>
<appModelName>${model-name}</appModelName>
<appScope>${appScope}</appScope>
<appVersion>${appVersion}</appVersion>

<defaultLanguage>${defaultLanguage}</defaultLanguage>
<tablePageLimit>${tablePageLimit}</tablePageLimit>

<muiLicensePlan>${muiLicensePlan}</muiLicensePlan>
</templateParameters>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>hu.blackbelt.judo.generator</groupId>
<artifactId>judo-ui-typescript-rest-commons</artifactId>
<version>${judo-ui-typescript-rest-version}</version>
</dependency>
<dependency>
<groupId>hu.blackbelt.judo.generator</groupId>
<artifactId>judo-ui-typescript-rest-api</artifactId>
<version>${judo-ui-typescript-rest-version}</version>
</dependency>
<dependency>
<groupId>hu.blackbelt.judo.generator</groupId>
<artifactId>judo-ui-typescript-rest-service</artifactId>
<version>${judo-ui-typescript-rest-version}</version>
</dependency>
<dependency>
<groupId>hu.blackbelt.judo.generator</groupId>
<artifactId>judo-ui-typescript-rest-axios</artifactId>
<version>${judo-ui-typescript-rest-version}</version>
</dependency>
<dependency>
<groupId>hu.blackbelt.judo.generator</groupId>
<artifactId>judo-ui-react</artifactId>
<version>${revision}</version>
</dependency>
</dependencies>
</plugin>

<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>${frontend-maven-plugin-version}</version>
<executions>
<execution>
<id>pnpm install</id>
<goals>
<goal>pnpm</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<arguments>install</arguments>
</configuration>
</execution>

<execution>
<id>format code</id>
<goals>
<goal>pnpm</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<arguments>run format</arguments>
</configuration>
</execution>

<execution>
<id>build</id>
<goals>
<goal>pnpm</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>
</executions>
<configuration>
<installDirectory>${node-install-dir}</installDirectory>
<workingDirectory>${generation-target}</workingDirectory>
</configuration>
</plugin>
</plugins>
</build>
</project>
26 changes: 26 additions & 0 deletions judo-ui-react-itest/OperationFaultTest/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>hu.blackbelt.judo.generator</groupId>
<artifactId>judo-ui-react-itest</artifactId>
<version>${revision}</version>
</parent>
<artifactId>operationfaulttest-application-frontend-react</artifactId>
<version>${revision}</version>

<name>JUDO UI React Frontend Generator ITest - OperationFaultTest</name>

<packaging>pom</packaging>

<properties>
<model-name>OperationFaultTest</model-name>
<override-dir>${basedir}/generator-overrides</override-dir>
<node-install-dir>${project.parent.parent.basedir}/.nodejs</node-install-dir>
</properties>

<modules>
<module>operation_fault_test__actor</module>
</modules>
</project>
1 change: 1 addition & 0 deletions judo-ui-react-itest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<module>CRUDActionsTest</module>
<module>FormsTest</module>
<module>MultiPrincipalTest</module>
<module>OperationFaultTest</module>
<module>OperationParametersTest</module>
<module>ReadOnlyTest</module>
<module>RelationTestReckless</module>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import lombok.extern.slf4j.Slf4j;

import java.util.Collection;
import java.util.Optional;
import java.util.Comparator;

@Slf4j
@TemplateHelper
Expand Down Expand Up @@ -248,4 +248,16 @@ public static String getSortDirection(Column column) {
return "null";
}
}

public static java.util.List<Action> getBulkOperationActionsForTable(Table table) {
return table.getRowActions().stream()
.filter(Action::getIsCallOperationAction)
.filter(Action::isIsBulk)
.sorted(Comparator.comparing(NamedElement::getFQName))
.toList();
}

public static boolean tableHasBulkOperations(Table table) {
return !getBulkOperationActionsForTable(table).isEmpty();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@
"judo.modal.filter.equals": "equals",
"judo.modal.filter.notEquals": "notEquals",
"judo.error.error": "Error",
"judo.error.unhandled": "An unhandled error occurred.",
"judo.error.unmappable": "An error occurred, but we could not display the error info.",
"judo.error.internal-server-error": "An internal server error occurred.",
"judo.error.technical": "Something went wrong. Please contact with the system admins.",
"judo.error.technical.no-response": "No response received while processing your request. Please contact with the system admins.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@
"judo.modal.filter.equals": "equals",
"judo.modal.filter.notEquals": "notEquals",
"judo.error.error": "Error",
"judo.error.unhandled": "An unhandled error occurred.",
"judo.error.unmappable": "An error occurred, but we could not display the error info.",
"judo.error.internal-server-error": "An internal server error occurred.",
"judo.error.technical": "Something went wrong. Please contact with the system admins.",
"judo.error.technical.no-response": "No response received while processing your request. Please contact with the system admins.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@
"judo.applications.available_applications": "Választható alkalmazások",
"judo.applications.change": "Alkalmazás váltás",
"judo.error.error": "Hiba",
"judo.error.unhandled": "Ismeretlen hiba történt.",
"judo.error.unmappable": "Hiba történt, nem tudjuk megjeleníteni a választ.",
"judo.error.internal-server-error": "Belső alkalmazás hiba történt",
"judo.error.technical": "Azonosítatlan hiba történt. Kérjük lépjen kapcsolatba a rendszer üzemeltetőivel!",
"judo.error.technical.no-response": "Nem érkezett válasz a műveletre. Kérjük lépjen kapcsolatba a rendszer üzemeltetőivel!",
Expand Down
Loading

0 comments on commit 70bcc94

Please sign in to comment.