Skip to content

Commit

Permalink
SUPINT-2380: nuxeo admin console web scripts works
Browse files Browse the repository at this point in the history
  • Loading branch information
rakeshkumar1019 committed Jun 12, 2024
1 parent 08c476a commit 40a4eae
Show file tree
Hide file tree
Showing 205 changed files with 447 additions and 30 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ jobs:
run: npm install -g @angular/cli

- name: Install Dependencies
working-directory: ./nuxeo-admin-console-ui//nuxeo-admin-console-web
run: npm install

- name: Build Angular Project
working-directory: ./nuxeo-admin-console-ui//nuxeo-admin-console-web
run: npm run build
4 changes: 4 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,15 @@ jobs:
npm config set @hylandsoftware:registry https://npm.pkg.github.com --global
npm config set //npm.pkg.github.com/:_authToken=${{ secrets.GIT_TOKEN }} --global
npm config set registry https://registry.npmjs.org/ --global
- name: Install @angular/cli
run: npm install -g @angular/cli

- name: Install Dependencies
working-directory: ./nuxeo-admin-console-ui//nuxeo-admin-console-web
run: npm install

- name: Lint
working-directory: ./nuxeo-admin-console-ui//nuxeo-admin-console-web
run: npm run lint
3 changes: 3 additions & 0 deletions .github/workflows/utest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ jobs:
- name: Install @angular/cli
run: npm install -g @angular/cli


- name: Install Dependencies
working-directory: ./nuxeo-admin-console-ui//nuxeo-admin-console-web
run: npm install

- name: Install Chrome and Chromedriver
Expand All @@ -56,5 +58,6 @@ jobs:
run: google-chrome --version

- name: Unit tests
working-directory: ./nuxeo-admin-console-ui//nuxeo-admin-console-web
run: |
xvfb-run --auto-servernum --server-args="-screen 0 1024x768x24" npm test
39 changes: 35 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
# nuxeo-admin-console-ui
Nuxeo Admin console UI is a standard base web application for Nuxeo admin users.
# Nuxeo Admin Console UI

# Note
Replace ghp_your_authenticated_token in .npmrc file with your Github token.
## nuxeo-admin-console-package
The `nuxeo-admin-console-package` is a Maven module designed for packaging and assembling the admin console application for deployment and distribution.

## nuxeo-admin-console-web
The main project code resides in this module.

### How to Run the Project

1. Navigate to the project directory:
```bash
cd nuxeo-admin-console-web
```
2. Install the dependencies:
```bash
npm install
```
3. Start the project:
```bash
npm run start
```
4. Test the project:
```bash
npm run test
```
5. build the project:
```bash
npm run build
```

## Documentation Links:
1. Package Manifest
>`nuxeo-admin-console-package/src/main/resources/package.xml`
> https://doc.nuxeo.com/nxdoc/master/package-manifest/
46 changes: 46 additions & 0 deletions nuxeo-admin-console-package/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<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 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.nuxeo.admin.console</groupId>
<artifactId>admin-console</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>nuxeo-admin-console-package</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>zip</packaging>
<name>Nuxeo admin console package - Admin console package</name>

<dependencies>
<!-- Base distribution(s) for the MP -->
<dependency>
<groupId>org.nuxeo.ecm.distribution</groupId>
<artifactId>nuxeo-nxr-server</artifactId>
<type>zip</type>
<scope>provided</scope>
</dependency>

<!-- Additional bundles to be deployed by the MP -->
<dependency>
<groupId>org.nuxeo.admin.console</groupId>
<artifactId>nuxeo-admin-console-web</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.nuxeo.build</groupId>
<artifactId>ant-assembly-maven-plugin</artifactId>
<configuration>
<buildFiles>
<buildFile>${basedir}/src/main/assemble/assembly.xml</buildFile>
</buildFiles>
</configuration>
</plugin>
</plugins>
</build>


</project>
144 changes: 144 additions & 0 deletions nuxeo-admin-console-package/src/main/assemble/assembly.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
<!-- https://doc.nuxeo.com/nxdoc/master/packaging-examples/ -->
<project name="admin-console-package" default="build" xmlns:nx="urn:nuxeo-build" xmlns:artifact="urn:nuxeo-artifact">
<taskdef resource="org/nuxeo/build/antlib.xml" uri="urn:nuxeo-build" />
<taskdef resource="org/nuxeo/build/artifact/antlib.xml" uri="urn:nuxeo-artifact" />
<taskdef resource="net/sf/antcontrib/antlib.xml" />

<target name="build" description="Build ${maven.project.name}">
<property name="outdir" value="${maven.project.build.directory}" />
<!-- Include your artifacts in the graph adding your groupId to groupPrefixes -->
<artifact:nuxeo-expand includeTestScope="true" groupPrefixes="org.nuxeo,org.nuxeo.admin.console" />
<!-- Prints the graph for debugging purpose -->
<artifact:print output="${outdir}/dependency-tree.log" />
<tstamp />

<delete failonerror="false" dir="${outdir}/nxr" />
<mkdir dir="${outdir}/nxr" />
<delete failonerror="false" dir="${outdir}/marketplace" />
<mkdir dir="${outdir}/marketplace" />
<copy todir="${outdir}/marketplace">
<fileset dir="src/main/resources" />
<filterset>
<filter token="VERSION" value="${maven.project.version}" />
<filter token="DISTRIB_VERSION" value="${nuxeo.platform.version}" />
<filter token="NUXEO_TARGET_VERSION" value="${nuxeo.target.version}" />
<filter token="STUDIO_PROJECT_VERSION" value="${studio.project.version}" />
</filterset>
</copy>

<!-- Base distribution NXR -->
<copy todir="${outdir}">
<artifact:file key="org.nuxeo.ecm.distribution:nuxeo-nxr-server::zip" />
</copy>

<!-- Nuxeo bundles -->
<copy todir="${outdir}/nxr/bundles" overwrite="true">
<artifact:set>
<includes>
<artifact groupId="org.nuxeo*" />
<artifact groupId="nuxeo-studio" />
<!-- Include your artifacts using their groupId for instance -->
<artifact groupId="org.nuxeo.admin.console*" />
</includes>
<excludes>
<artifact groupId="${maven.project.groupId}" artifactId="${maven.project.artifactId}" version="${maven.project.version}" type="${maven.project.packaging}" />
<artifact scope="test" />
<artifact scope="provided" />
<artifact type="pom" />
<artifact groupId="org.nuxeo.lib*" />
<artifact groupId="org.nuxeo.build*" />
</excludes>
</artifact:set>
</copy>
<!-- Third-party libraries -->
<copy todir="${outdir}/nxr/lib" overwrite="true">
<artifact:set>
<includes>
<artifact groupId="!org.nuxeo*" />
<artifact groupId="org.nuxeo.lib*" />
<artifact groupId="org.nuxeo.build*" />
</includes>
<excludes>
<artifact scope="test" />
<artifact scope="provided" />
<artifact type="pom" />
<artifact groupId="nuxeo-studio" />
<!-- Filter out your artifacts using their groupId for instance -->
<artifact groupId="org.nuxeo.admin.console*" />
</excludes>
</artifact:set>
</copy>
<nx:rmdups dir="${outdir}/nxr/lib" />
<!-- Temporary ZIP Nuxeo NXR to compare with base distribution NXR -->
<zip destfile="${outdir}/nxr-${maven.project.version}.zip" basedir="${outdir}/nxr" />

<!-- Your MP only needs to include files not already provided by the base distribution -->
<nx:zipdiff
file1="${outdir}/nxr-${maven.project.version}.zip"
file2="${outdir}/nuxeo-nxr-server-${nuxeo.platform.version}.zip"
includesfile="${outdir}/includes"
excludesfile="${outdir}/excludesfile"
patternsetid="nxr.versus.distribution"
ignoreContent="true"
ignoreContentPattern=".*\.jar$"></nx:zipdiff>
<unzip src="${outdir}/nxr-${maven.project.version}.zip" dest="${outdir}/marketplace/install">
<patternset refid="nxr.versus.distribution" />
</unzip>

<!-- Generate install.xml content -->
<!-- See documentation at http://doc.nuxeo.com/x/IgIz -->
<var name="install.bundles" value="" />
<if>
<available file="${outdir}/marketplace/install/bundles" />
<then>
<var name="install.bundles" value="${line.separator}
&lt;update file=&quot;${package.root}/install/bundles&quot; todir=&quot;${env.bundles}&quot; /&gt;" />
</then>
</if>

<var name="install.libs" value="" />
<if>
<available file="${outdir}/marketplace/install/lib" />
<then>

<var name="install.libs" value="${line.separator}
&lt;update file=&quot;${package.root}/install/lib&quot; todir=&quot;${env.lib}&quot; /&gt;" />
</then>
</if>

<var name="install.templates" value="" />
<if>
<available file="${outdir}/marketplace/install/templates" />
<then>
<var
name="install.templates"
value="${line.separator}
&lt;copy dir=&quot;${package.root}/install/templates&quot; todir=&quot;${env.templates}&quot; overwrite=&quot;true&quot; /&gt;${line.separator}
&lt;config addtemplate=&quot;admin-console-package&quot; /&gt;${line.separator}" />
</then>
</if>

<copy file="src/main/resources/install.xml" todir="${outdir}/marketplace" overwrite="true">
<filterset>
<filter token="BUNDLES" value="${install.bundles}" />
<filter token="LIBS" value="${install.libs}" />
<filter token="TEMPLATES" value="${install.templates}" />
</filterset>
</copy>

<!-- Studio Registries Extraction -->
<nx:studioExtraction todir="${outdir}/marketplace">
<fileset dir="${outdir}/marketplace/install/bundles" />
</nx:studioExtraction>

<zip destfile="${outdir}/${maven.project.artifactId}-${maven.project.version}.zip" basedir="${outdir}/marketplace" />
<artifact:attach file="${outdir}/${maven.project.artifactId}-${maven.project.version}.zip" type="zip" />

<!-- cleanups -->
<delete dir="${outdir}/marketplace" failonerror="false" />
<delete dir="${outdir}/nxr" failonerror="false" />
<delete file="${outdir}/nuxeo-nxr-server-${maven.project.version}.zip" failonerror="false" />
<delete file="${outdir}/nxr-${maven.project.version}.zip" failonerror="false" />
</target>

</project>
6 changes: 6 additions & 0 deletions nuxeo-admin-console-package/src/main/resources/install.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!-- See documentation at http://doc.nuxeo.com/x/IgIz -->
<install>
@BUNDLES@
@LIBS@
@TEMPLATES@
</install>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Edit this file to customize your configuration ##
#admin-console-package.target=

# Set list of templates to include, comma separated values.
nuxeo.template.includes=common

# org.nuxeo.ecm.instance.description=Nuxeo ECM customized with admin-console-package
18 changes: 18 additions & 0 deletions nuxeo-admin-console-package/src/main/resources/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!-- See documentation at http://doc.nuxeo.com/x/HgIz -->
<package type="addon" name="nuxeo-admin-console-ui-package" version="1.0.0">
<title>Nuxeo Admin Console UI package</title>
<description>
<p>Nuxeo Admin console UI is a standard base web application for Nuxeo admin useres.</p>
</description>
<home-page>http://localhost:8080/nuxeo/admin-console</home-page>
<vendor>nuxeo</vendor>
<require-terms-and-conditions-acceptance>false</require-terms-and-conditions-acceptance>
<license>Apache License, Version 2.0</license>
<license-url>http://www.apache.org/licenses/LICENSE-2.0</license-url>
<target-platform>
<name>lts</name>
<version>[2021.1,2023)</version>
</target-platform>
<!-- Visibility: PRIVATE | MARKETPLACE | DEV | PUBLIC -->
<visibility>PUBLIC</visibility>
</package>
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions nuxeo-admin-console-web/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# nuxeo-admin-console-ui
Nuxeo Admin console UI is a standard base web application for Nuxeo admin users.

# Note
Replace ghp_your_authenticated_token in .npmrc file with your Github token.
Loading

0 comments on commit 40a4eae

Please sign in to comment.