Skip to content

Commit

Permalink
Merge pull request #27 from AOT-Technologies/ready-to-release-5.2.0
Browse files Browse the repository at this point in the history
🚀 v5.2.0 release
  • Loading branch information
abhilash-aot authored Jul 10, 2023
2 parents a8480fd + 3c57e35 commit 45cdb37
Show file tree
Hide file tree
Showing 17 changed files with 149 additions and 27 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/forms-flow-admin-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ on:
push:
branches:
- main
- develop
paths:
- "forms-flow-admin/**"
- "VERSION"
defaults:
run:
shell: bash
Expand All @@ -18,7 +20,22 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: '16.17.0'
#TODO: force installing due to dependency conflict need to resolve the dependency
- name: Set version
if: ${{ github.ref != 'refs/heads/main' }}
working-directory: .
run: |
VER=$(cat VERSION)
echo "VERSION=$VER" >> $GITHUB_ENV
- name: Set version
if: ${{ github.ref == 'refs/heads/main' }}
working-directory: .
run: |
VER=$(cat VERSION)
VER=${VER/-alpha/''}
echo "VERSION=$VER" >> $GITHUB_ENV
#TODO: force installing due to dependency conflict need to resolve the dependency
- run: npm ci --force
working-directory: ./forms-flow-admin
- run: npm run build:webpack
Expand All @@ -30,5 +47,8 @@ jobs:
aws-region: ${{ secrets.REGION }}
- run: npm ci
working-directory: ./scripts
- run: BUCKET=${{ secrets.BUCKET}} node index forms-flow-admin
- run: node index forms-flow-admin
env:
BUCKET: ${{ secrets.BUCKET}}
VERSION: ${{ env.VERSION }}
working-directory: ./scripts
22 changes: 21 additions & 1 deletion .github/workflows/forms-flow-nav.cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ on:
push:
branches:
- main
- develop
paths:
- "forms-flow-nav/**"
- "VERSION"
defaults:
run:
shell: bash
Expand All @@ -18,6 +20,21 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: '16.17.0'
- name: Set version
if: ${{ github.ref != 'refs/heads/main' }}
working-directory: .
run: |
VER=$(cat VERSION)
echo "VERSION=$VER" >> $GITHUB_ENV
- name: Set version
if: ${{ github.ref == 'refs/heads/main' }}
working-directory: .
run: |
VER=$(cat VERSION)
VER=${VER/-alpha/''}
echo "VERSION=$VER" >> $GITHUB_ENV
- run: npm ci
working-directory: ./forms-flow-nav
- run: npm run build:webpack
Expand All @@ -29,5 +46,8 @@ jobs:
aws-region: ${{ secrets.REGION }}
- run: npm ci
working-directory: ./scripts
- run: BUCKET=${{ secrets.BUCKET}} node index forms-flow-nav
- run: node index forms-flow-nav
env:
BUCKET: ${{ secrets.BUCKET}}
VERSION: ${{ env.VERSION }}
working-directory: ./scripts
22 changes: 21 additions & 1 deletion .github/workflows/forms-flow-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ on:
push:
branches:
- main
- develop
paths:
- "forms-flow-service/**"
- "VERSION"
defaults:
run:
shell: bash
Expand All @@ -18,6 +20,21 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: '16.17.0'
- name: Set version
if: ${{ github.ref != 'refs/heads/main' }}
working-directory: .
run: |
VER=$(cat VERSION)
echo "VERSION=$VER" >> $GITHUB_ENV
- name: Set version
if: ${{ github.ref == 'refs/heads/main' }}
working-directory: .
run: |
VER=$(cat VERSION)
VER=${VER/-alpha/''}
echo "VERSION=$VER" >> $GITHUB_ENV
- run: npm ci
working-directory: ./forms-flow-service
- run: npm run build:webpack
Expand All @@ -29,5 +46,8 @@ jobs:
aws-region: ${{ secrets.REGION }}
- run: npm ci
working-directory: ./scripts
- run: BUCKET=${{ secrets.BUCKET}} node index forms-flow-service
- run: node index forms-flow-service
env:
BUCKET: ${{ secrets.BUCKET}}
VERSION: ${{ env.VERSION }}
working-directory: ./scripts
20 changes: 19 additions & 1 deletion .github/workflows/forms-flow-theme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ on:
push:
branches:
- main
- develop
paths:
- "forms-flow-theme/**"
- "VERSION"
defaults:
run:
shell: bash
Expand All @@ -18,6 +20,22 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: '16.17.0'
- name: Set version
if: ${{ github.ref != 'refs/heads/main' }}
working-directory: .
run: |
VER=$(cat VERSION)
echo "VERSION=$VER" >> $GITHUB_ENV
- name: Set version
if: ${{ github.ref == 'refs/heads/main' }}
working-directory: .
run: |
VER=$(cat VERSION)
VER=${VER/-alpha/''}
echo "VERSION=$VER" >> $GITHUB_ENV
- run: echo ${{ env.VERSION }}
- run: npm ci
working-directory: ./forms-flow-theme
- run: npm run build:webpack
Expand All @@ -29,5 +47,5 @@ jobs:
aws-region: ${{ secrets.REGION }}
- run: npm ci
working-directory: ./scripts
- run: BUCKET=${{ secrets.BUCKET}} node index forms-flow-theme
- run: BUCKET=${{ secrets.BUCKET}} VERSION=${{ env.VERSION }} node index forms-flow-theme
working-directory: ./scripts
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Changelog for formsflow.ai

Mark items as `Added`, `Changed`, `Fixed`, `Removed`, `Untested Features`, `Upcoming Features`, `Known Issues`

## 5.2.0 - 2022-07-07

`Added`

**forms-flow-admin**
- Role creation functionality
- User role management

**forms-flow-nav**
- Separated to micro front-end service

**forms-flow-service**
- Added storage services
- Integrated Keycloak services
- Implemented API call services

**forms-flow-theme**
- All css components added to forms-flow-theme

`Generic changes`
- Implemented pub-sub mechanism to emit and receive events

1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v5.2.0
4 changes: 2 additions & 2 deletions forms-flow-admin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ RUN mkdir /app
COPY --from=build-stage /forms-flow-admin/app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/nginx.conf

EXPOSE 3006:8080
EXPOSE 8080
WORKDIR /usr/share/nginx/html/config
# COPY .env .
RUN apk add --no-cache bash


CMD ["nginx", "-g", "daemon off;"]
CMD ["nginx", "-g", "daemon off;"]
10 changes: 10 additions & 0 deletions forms-flow-admin/src/components/roles/roles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,13 @@
border-top-right-radius:0;
border-bottom-right-radius:0;
}
@media (max-width: 768px) {
.font-size{
white-space: nowrap;
margin-top: 2px;
}
.sub-container{
margin-left: 1rem !important;
margin-right: 2.188rem;
}
}
4 changes: 2 additions & 2 deletions forms-flow-admin/src/components/roles/roles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ const Roles = React.memo((props: any) => {
<>
<div className="container-admin">
<div className="sub-container">
<div className="search-role">
<div className="search-role col-xl-4 col-lg-4 col-md-6 col-sm-5">
<Form.Control
type="text"
placeholder={t("Search by role name")}
Expand All @@ -481,7 +481,7 @@ const Roles = React.memo((props: any) => {
</Button>
)}
</div>
<Button variant="primary" onClick={handleShowRoleModal}>
<Button variant="primary" className="font-size col-xl-2 col-lg-3 col-md-3 col-sm-4" onClick={handleShowRoleModal}>
<i className="fa fa-l fa-plus-circle mr-1" /> <Translation>{(t) => t("Create New Role")}</Translation>
</Button>
</div>
Expand Down
4 changes: 2 additions & 2 deletions forms-flow-admin/src/components/users/users.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ const Users = React.memo((props: any) => {
<>
<div className="container-admin">
<div className="sub-container">
<div className="search-role">
<div className="search-role col-xl-4 col-lg-4 col-md-6 col-sm-5">
<Form.Control
type="text"
placeholder={t("Search by name, username or email")}
Expand All @@ -347,7 +347,7 @@ const Users = React.memo((props: any) => {
)}
</div>

<div className="user-filter-container">
<div className="user-filter-container col-xl-3 col-lg-3 col-md-4 col-sm-5">
<span>{t("Filter By:")} </span>
<Form.Select size="lg" onChange={handleSelectFilter}>
<option value="ALL" selected={!props.filter}>
Expand Down
4 changes: 2 additions & 2 deletions forms-flow-nav/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ LABEL Name="formsflow"
RUN mkdir /app
COPY --from=build-stage /forms-flow-nav/app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/nginx.conf
EXPOSE 3005:8080
EXPOSE 8080
WORKDIR /usr/share/nginx/html/config
# COPY .env .
RUN apk add --no-cache bash


CMD ["nginx", "-g", "daemon off;"]
CMD ["nginx", "-g", "daemon off;"]
5 changes: 2 additions & 3 deletions forms-flow-nav/src/Navbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,13 @@ header nav {
}
.main-header {
flex-wrap: nowrap;
gap: 20px;
}
.admin-container > .header-container {
margin-left: -1rem;
}
.head-rule {
margin-top: -25px;
margin-left: 25px;
margin-right: -50px;
margin-left: -15px;
margin-right: -86px;
}
}
18 changes: 12 additions & 6 deletions forms-flow-nav/src/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,19 @@ const NavBar = React.memo(({ props }) => {
const [selectLanguages, setSelectLanguages] = React.useState([]);
const [applicationTitle, setApplicationTitle] = React.useState("");
const [tenantLogo, setTenantLogo] = React.useState("/logo_skeleton.svg");

const defaultLogoPath = document.documentElement.style.getPropertyValue("--navbar-logo-path") || "/logo.svg";
React.useEffect(() => {
props.subscribe("FF_AUTH", (msg, data) => {
setInstance(data);
});

props.subscribe("FF_PUBLIC", () => {
if(MULTITENANCY_ENABLED){
setApplicationTitle(APPLICATION_NAME)
setTenantLogo(defaultLogoPath)
}
});

props.subscribe("ES_TENANT", (msg, data) => {
if (data) {
setTenant(data);
Expand Down Expand Up @@ -97,8 +104,7 @@ const NavBar = React.memo(({ props }) => {

const logoPath = MULTITENANCY_ENABLED
? tenantLogo
: document.documentElement.style.getPropertyValue("--navbar-logo-path") ||
"/logo.svg";
: defaultLogoPath;
const getAppName = useMemo(
() => () => {
if (!MULTITENANCY_ENABLED) {
Expand Down Expand Up @@ -361,9 +367,9 @@ const NavBar = React.memo(({ props }) => {
</Nav>
</Navbar.Collapse>
) : (
<Link to={loginUrl} className="btn btn-primary">
Login
</Link>
!MULTITENANCY_ENABLED && <Link to={loginUrl} className="btn btn-primary">
Login
</Link>
)}
</Container>
</Navbar>
Expand Down
4 changes: 2 additions & 2 deletions forms-flow-service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ RUN mkdir /app
COPY --from=build-stage /forms-flow-service/app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/nginx.conf

EXPOSE 3007:8080
EXPOSE 8080

WORKDIR /usr/share/nginx/html/config
# COPY .env .
RUN apk add --no-cache bash


CMD ["nginx", "-g", "daemon off;"]
CMD ["nginx", "-g", "daemon off;"]
1 change: 1 addition & 0 deletions forms-flow-service/src/storage/storageService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ enum User {
*/
public static save(key: string, value: string): void {
sessionStorage.setItem(key, value);
localStorage.setItem(key,value);
}
/**
* removes the key value pair from the session storage if
Expand Down
4 changes: 2 additions & 2 deletions forms-flow-theme/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ LABEL Name="formsflow"
RUN mkdir /app
COPY --from=build-stage /forms-flow-theme/app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/nginx.conf
EXPOSE 3008:8080
EXPOSE 8080
WORKDIR /usr/share/nginx/html/config
# COPY .env .
RUN apk add --no-cache bash


CMD ["nginx", "-g", "daemon off;"]
CMD ["nginx", "-g", "daemon off;"]
3 changes: 2 additions & 1 deletion scripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { createReadStream, createWriteStream } from "fs";
import { createGzip } from "zlib";

const BUCKET = process.env.BUCKET;
const VERSION = process.env.VERSION;
const component = process.argv.slice(2)[0];

if (!component) {
Expand Down Expand Up @@ -58,7 +59,7 @@ const run = async (params) => {
async function upload(file_name, file) {
const params = {
Bucket: BUCKET,
Key: `${component}/${file_name}`,
Key: `${component}@${VERSION}/${file_name}`,
Body: createReadStream(file),
ContentType:"application/javascript",
ContentEncoding:"gzip"
Expand Down

0 comments on commit 45cdb37

Please sign in to comment.