mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-05 22:38:48 +00:00
Merge branch 'main' into feat/ui-revamp-surface
This commit is contained in:
commit
3c4c49df23
8 changed files with 111 additions and 117 deletions
71
.github/workflows/cloud-frontend.yml
vendored
71
.github/workflows/cloud-frontend.yml
vendored
|
|
@ -4,9 +4,8 @@ on:
|
|||
workflow_dispatch:
|
||||
inputs:
|
||||
branch:
|
||||
description: 'Branch to deploy (must start with lts/)'
|
||||
description: 'Git branch to deploy (must start with "lts-", e.g., lts-3.6)'
|
||||
required: true
|
||||
default: 'lts/latest'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
|
@ -14,32 +13,27 @@ jobs:
|
|||
|
||||
steps:
|
||||
|
||||
# - name: Check authorization
|
||||
# run: |
|
||||
# allowed_user1=${{ secrets.ALLOWED_USER1_USERNAME }}
|
||||
# allowed_user2=${{ secrets.ALLOWED_USER2_USERNAME }}
|
||||
# allowed_user3=${{ secrets.ALLOWED_USER3_USERNAME }}
|
||||
- name: Check user authorization
|
||||
run: |
|
||||
allowed_user1=${{ secrets.ALLOWED_USER1_USERNAME }}
|
||||
allowed_user2=${{ secrets.ALLOWED_USER2_USERNAME }}
|
||||
allowed_user3=${{ secrets.ALLOWED_USER3_USERNAME }}
|
||||
|
||||
# if [[ "${{ github.actor }}" != "$allowed_user1" && \
|
||||
# "${{ github.actor }}" != "$allowed_user2" && \
|
||||
# "${{ github.actor }}" != "$allowed_user3" ]]; then
|
||||
# echo "❌ User '${{ github.actor }}' is not authorized to trigger this workflow."
|
||||
# exit 1
|
||||
# else
|
||||
# echo "✅ User '${{ github.actor }}' is authorized."
|
||||
# fi
|
||||
if [[ "${{ github.actor }}" != "$allowed_user1" && \
|
||||
"${{ github.actor }}" != "$allowed_user2" && \
|
||||
"${{ github.actor }}" != "$allowed_user3" ]]; then
|
||||
echo "❌ User '${{ github.actor }}' is not authorized to trigger this workflow."
|
||||
exit 1
|
||||
else
|
||||
echo "✅ User '${{ github.actor }}' is authorized."
|
||||
fi
|
||||
|
||||
# - name: Validate branch prefix
|
||||
# run: |
|
||||
# if [[ "${{ github.event.inputs.branch }}" != lts/* ]]; then
|
||||
# echo "❌ Branch name must start with 'lts/'"
|
||||
# exit 1
|
||||
# fi
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Checkout code (with submodules)
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.inputs.branch }}
|
||||
token: ${{ secrets.TOKEN_PR }}
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v2
|
||||
|
|
@ -49,27 +43,20 @@ jobs:
|
|||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Build the project
|
||||
run: npm run build:plugins:prod && npm run build:frontend
|
||||
env:
|
||||
GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }}
|
||||
NODE_ENV: ${{ secrets.NODE_ENV }}
|
||||
NODE_OPTIONS: ${{ secrets.NODE_OPTIONS }}
|
||||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
||||
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
||||
SERVE_CLIENT: ${{ secrets.SERVE_CLIENT }}
|
||||
SERVER_IP: ${{ secrets.SERVER_IP }}
|
||||
TJDB_SQL_MODE_DISABLE: ${{ secrets.TJDB_SQL_MODE_DISABLE }}
|
||||
TOOLJET_SERVER_URL: ${{ secrets.TOOLJET_SERVER_URL }}
|
||||
TOOLJET_EDITION: cloud
|
||||
|
||||
- name: Deploy to Netlify
|
||||
run: |
|
||||
npm install -g netlify-cli
|
||||
netlify deploy --prod --dir=frontend/build --auth=$NETLIFY_AUTH_TOKEN --site=${{ secrets.CLOUD_NETLIFY_SITE_ID }}
|
||||
env:
|
||||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||
|
||||
- name: ✅ Deployment complete
|
||||
run: echo "🎉 Deployment to Netlify successful for branch ${{ github.event.inputs.branch }} by ${{ github.actor }}"
|
||||
GOOGLE_MAPS_API_KEY: ${{ secrets.CLOUD_GOOGLE_MAPS_API_KEY }}
|
||||
NODE_ENV: ${{ secrets.CLOUD_NODE_ENV }}
|
||||
NODE_OPTIONS: ${{ secrets.CLOUD_NODE_OPTIONS }}
|
||||
SENTRY_AUTH_TOKEN: ${{ secrets.CLOUD_SENTRY_AUTH_TOKEN }}
|
||||
SENTRY_ORG: ${{ secrets.CLOUD_SENTRY_ORG }}
|
||||
SENTRY_PROJECT: ${{ secrets.CLOUD_SENTRY_PROJECT }}
|
||||
SERVE_CLIENT: ${{ secrets.CLOUD_SERVE_CLIENT }}
|
||||
SERVER_IP: ${{ secrets.CLOUD_SERVER_IP }}
|
||||
TJDB_SQL_MODE_DISABLE: ${{ secrets.CLOUD_TJDB_SQL_MODE_DISABLE }}
|
||||
TOOLJET_SERVER_URL: ${{ secrets.CLOUD_TOOLJET_SERVER_URL }}
|
||||
TOOLJET_EDITION: cloud
|
||||
|
|
|
|||
107
.github/workflows/docker-release.yml
vendored
107
.github/workflows/docker-release.yml
vendored
|
|
@ -21,7 +21,7 @@ jobs:
|
|||
if: "contains(github.event.release.tag_name, '-ce-lts')"
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: refs/heads/lts-4.0
|
||||
ref: refs/heads/lts-3.6
|
||||
|
||||
# Create Docker Buildx builder with platform configuration
|
||||
- name: Set up Docker Buildx
|
||||
|
|
@ -99,7 +99,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout code to main for pre-release EE edition
|
||||
if: "!contains(github.event.release.tag_name, 'ee-lts')"
|
||||
if: "!contains(github.event.release.tag_name, '-lts')"
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: refs/heads/main
|
||||
|
|
@ -108,7 +108,7 @@ jobs:
|
|||
if: "contains(github.event.release.tag_name, '-ee-lts')"
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: refs/heads/lts-4.0
|
||||
ref: refs/heads/lts-3.6
|
||||
|
||||
# Create Docker Buildx builder with platform configuration
|
||||
- name: Set up Docker Buildx
|
||||
|
|
@ -148,7 +148,6 @@ jobs:
|
|||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
|
||||
- name: Build and Push Docker image for LTS tag
|
||||
if: "contains(github.event.release.tag_name, '-ee-lts')"
|
||||
uses: docker/build-push-action@v4
|
||||
|
|
@ -156,7 +155,7 @@ jobs:
|
|||
context: .
|
||||
build-args: |
|
||||
CUSTOM_GITHUB_TOKEN=${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
||||
BRANCH_NAME=lts
|
||||
BRANCH_NAME=lts-3.6
|
||||
file: docker/ee/ee-production.Dockerfile
|
||||
push: true
|
||||
tags: tooljet/tooljet-ee:${{ github.event.release.tag_name }},tooljet/tooljet-ee:ee-lts-latest,tooljet/tooljet:ee-lts-latest,tooljet/tooljet:${{ github.event.release.tag_name }}
|
||||
|
|
@ -176,64 +175,64 @@ jobs:
|
|||
curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"$message\"}" ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
|
||||
|
||||
# commented out for now, since cloud modularisation is not yet ready
|
||||
build-tooljet-image-for-cloud-edtion:
|
||||
|
||||
# build-tooljet-image-for-cloud-edtion:
|
||||
runs-on: ubuntu-latest
|
||||
if: "${{ github.event.release }}"
|
||||
|
||||
# runs-on: ubuntu-latest
|
||||
# if: "${{ github.event.release }}"
|
||||
steps:
|
||||
- name: Checkout code to LTS for Cloud LTS edition
|
||||
if: "contains(github.event.release.tag_name, '-cloud-lts')"
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: refs/heads/lts-3.6
|
||||
|
||||
# steps:
|
||||
# - name: Checkout code to LTS for Cloud LTS edition
|
||||
# if: "contains(github.event.release.tag_name, '-cloud-lts')"
|
||||
# uses: actions/checkout@v2
|
||||
# with:
|
||||
# ref: refs/heads/lts-4.0
|
||||
# Create Docker Buildx builder with platform configuration
|
||||
- name: Set up Docker Buildx
|
||||
run: |
|
||||
mkdir -p ~/.docker/cli-plugins
|
||||
curl -SL https://github.com/docker/buildx/releases/download/v0.11.0/buildx-v0.11.0.linux-amd64 -o ~/.docker/cli-plugins/docker-buildx
|
||||
chmod a+x ~/.docker/cli-plugins/docker-buildx
|
||||
docker buildx create --name mybuilder --platform linux/arm64,linux/amd64,linux/amd64/v2,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6
|
||||
docker buildx use mybuilder
|
||||
|
||||
# # Create Docker Buildx builder with platform configuration
|
||||
# - name: Set up Docker Buildx
|
||||
# run: |
|
||||
# mkdir -p ~/.docker/cli-plugins
|
||||
# curl -SL https://github.com/docker/buildx/releases/download/v0.11.0/buildx-v0.11.0.linux-amd64 -o ~/.docker/cli-plugins/docker-buildx
|
||||
# chmod a+x ~/.docker/cli-plugins/docker-buildx
|
||||
# docker buildx create --name mybuilder --platform linux/arm64,linux/amd64,linux/amd64/v2,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6
|
||||
# docker buildx use mybuilder
|
||||
- name: Set DOCKER_CLI_EXPERIMENTAL
|
||||
run: echo "DOCKER_CLI_EXPERIMENTAL=enabled" >> $GITHUB_ENV
|
||||
|
||||
# - name: Set DOCKER_CLI_EXPERIMENTAL
|
||||
# run: echo "DOCKER_CLI_EXPERIMENTAL=enabled" >> $GITHUB_ENV
|
||||
- name: use mybuilder buildx
|
||||
run: docker buildx use mybuilder
|
||||
|
||||
# - name: use mybuilder buildx
|
||||
# run: docker buildx use mybuilder
|
||||
- name: Docker Login
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
# - name: Docker Login
|
||||
# uses: docker/login-action@v2
|
||||
# with:
|
||||
# username: ${{ secrets.DOCKER_USERNAME }}
|
||||
# password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
- name: Build and Push Docker image for LTS tag
|
||||
if: "contains(github.event.release.tag_name, '-cloud-lts')"
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
build-args: |
|
||||
CUSTOM_GITHUB_TOKEN=${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
||||
BRANCH_NAME=lts-3.6
|
||||
file: docker/cloud/cloud-server.Dockerfile
|
||||
push: true
|
||||
tags: tooljet/saas:${{ github.event.release.tag_name }}
|
||||
platforms: linux/amd64
|
||||
env:
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
# - name: Build and Push Docker image for LTS tag
|
||||
# if: "contains(github.event.release.tag_name, '-cloud-lts')"
|
||||
# uses: docker/build-push-action@v4
|
||||
# with:
|
||||
# context: .
|
||||
# args: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
||||
# file: docker/cloud/cloud-server.Dockerfile
|
||||
# push: true
|
||||
# tags: tooljet/saas:${{ github.event.release.tag_name }}
|
||||
# platforms: linux/amd64
|
||||
# env:
|
||||
# DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
# DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||
- name: Send Slack Notification
|
||||
run: |
|
||||
if [[ "${{ job.status }}" == "success" ]]; then
|
||||
message="ToolJet cloud image published:\n\`tooljet/saas:${{ github.event.release.tag_name }}\`"
|
||||
else
|
||||
message="Job '${{ env.JOB_NAME }}' failed! Image built:\n\`tooljet/saas:${{ github.event.release.tag_name }}\`"
|
||||
fi
|
||||
|
||||
# - name: Send Slack Notification
|
||||
# run: |
|
||||
# if [[ "${{ job.status }}" == "success" ]]; then
|
||||
# message="ToolJet cloud image published:\n\`tooljet/saas:${{ github.event.release.tag_name }}\`"
|
||||
# else
|
||||
# message="Job '${{ env.JOB_NAME }}' failed! Image built:\n\`tooljet/saas:${{ github.event.release.tag_name }}\`"
|
||||
# fi
|
||||
|
||||
# curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"$message\"}" ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"$message\"}" ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
|
||||
|
||||
try-tooljet-image-build:
|
||||
|
|
|
|||
|
|
@ -44,8 +44,10 @@ ENV NODE_ENV=production
|
|||
|
||||
# Building ToolJet server
|
||||
COPY ./server/package.json ./server/package-lock.json ./server/
|
||||
RUN npm --prefix server install --only=production
|
||||
RUN npm --prefix server install
|
||||
COPY ./server/ ./server/
|
||||
RUN npm install -g @nestjs/cli
|
||||
RUN npm install -g copyfiles
|
||||
RUN npm --prefix server run build
|
||||
|
||||
FROM debian:12
|
||||
|
|
@ -97,7 +99,7 @@ COPY --from=builder /app/plugins/package.json ./app/plugins/package.json
|
|||
# copy server build
|
||||
COPY --from=builder /app/server/package.json ./app/server/package.json
|
||||
COPY --from=builder /app/server/.version ./app/server/.version
|
||||
COPY --from=builder /app/server/keys ./app/server/keys
|
||||
COPY --from=builder /app/server/ee/keys ./app/server/ee/keys
|
||||
COPY --from=builder /app/server/node_modules ./app/server/node_modules
|
||||
COPY --from=builder /app/server/templates ./app/server/templates
|
||||
COPY --from=builder /app/server/scripts ./app/server/scripts
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 0ae5dac299e4a72e219243255722fbea2f530808
|
||||
Subproject commit 82d28db0cd954aa017d97938f368586b0650ef09
|
||||
|
|
@ -182,7 +182,7 @@ export const AppCanvas = ({ appId, isViewer = false, switchDarkMode, darkMode })
|
|||
)}
|
||||
style={canvasContainerStyles}
|
||||
>
|
||||
{showOnDesktop && (
|
||||
{showOnDesktop && appType !== 'module' && (
|
||||
<PagesSidebarNavigation
|
||||
showHeader={showHeader}
|
||||
isMobileDevice={currentLayout === 'mobile'}
|
||||
|
|
@ -202,6 +202,7 @@ export const AppCanvas = ({ appId, isViewer = false, switchDarkMode, darkMode })
|
|||
scrollbarWidth: 'none',
|
||||
overflow: 'auto',
|
||||
width: currentMode === 'view' ? `calc(100% - ${isViewerSidebarPinned ? '0px' : '0px'})` : '100%',
|
||||
...(appType === 'module' && isModuleMode && { height: 'inherit' }),
|
||||
}}
|
||||
className={`app-${appId} _tooljet-page-${getPageId()}`}
|
||||
>
|
||||
|
|
@ -213,7 +214,7 @@ export const AppCanvas = ({ appId, isViewer = false, switchDarkMode, darkMode })
|
|||
{environmentLoadingState !== 'loading' && (
|
||||
<div>
|
||||
<Container
|
||||
id="canvas"
|
||||
id={moduleId}
|
||||
gridWidth={gridWidth}
|
||||
canvasWidth={canvasWidth}
|
||||
canvasHeight={canvasHeight}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import Tooltip from 'react-bootstrap/Tooltip';
|
|||
import './rightSidebarToggle.scss';
|
||||
import SolidIcon from '@/_ui/Icon/SolidIcons';
|
||||
import { RIGHT_SIDE_BAR_TAB } from '@/AppBuilder/RightSideBar/rightSidebarConstants';
|
||||
import { useModuleContext } from '@/AppBuilder/_contexts/ModuleContext';
|
||||
import { SidebarItem } from './SidebarItem';
|
||||
|
||||
const RightSidebarToggle = ({ darkMode = false }) => {
|
||||
|
|
@ -13,6 +14,7 @@ const RightSidebarToggle = ({ darkMode = false }) => {
|
|||
(state) => [state.isRightSidebarOpen, state.setRightSidebarOpen],
|
||||
shallow
|
||||
);
|
||||
const { appType } = useModuleContext();
|
||||
const setActiveRightSideBarTab = useStore((state) => state.setActiveRightSideBarTab);
|
||||
const activeRightSideBarTab = useStore((state) => state.activeRightSideBarTab);
|
||||
const isRightSidebarPinned = useStore((state) => state.isRightSidebarPinned);
|
||||
|
|
@ -50,16 +52,18 @@ const RightSidebarToggle = ({ darkMode = false }) => {
|
|||
className={`left-sidebar-item left-sidebar-layout left-sidebar-inspector`}
|
||||
tip="Component properties"
|
||||
/>
|
||||
<SidebarItem
|
||||
selectedSidebarItem={activeRightSideBarTab === RIGHT_SIDE_BAR_TAB.PAGES}
|
||||
onClick={() => {
|
||||
handleToggle(RIGHT_SIDE_BAR_TAB.PAGES);
|
||||
}}
|
||||
darkMode={darkMode}
|
||||
icon="file01"
|
||||
className={`left-sidebar-item left-sidebar-layout left-sidebar-inspector`}
|
||||
tip="Page settings"
|
||||
/>
|
||||
{appType !== 'module' && (
|
||||
<SidebarItem
|
||||
selectedSidebarItem={activeRightSideBarTab === RIGHT_SIDE_BAR_TAB.PAGES}
|
||||
onClick={() => {
|
||||
handleToggle(RIGHT_SIDE_BAR_TAB.PAGES);
|
||||
}}
|
||||
darkMode={darkMode}
|
||||
icon="file01"
|
||||
className={`left-sidebar-item left-sidebar-layout left-sidebar-inspector`}
|
||||
tip="Page settings"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export const ModuleProvider = ({ moduleId, isModuleMode, appType, isModuleEditor
|
|||
export const useModuleContext = () => {
|
||||
const context = useContext(ModuleContext);
|
||||
if (!context) {
|
||||
throw new Error('useModuleContext must be used within a ModuleProvider');
|
||||
return { moduleId: 'canvas', isModuleMode: false, isModuleEditor: false };
|
||||
}
|
||||
return context;
|
||||
};
|
||||
|
|
@ -21,7 +21,7 @@ export const useModuleContext = () => {
|
|||
export const useModuleId = () => {
|
||||
const context = useContext(ModuleContext);
|
||||
if (!context) {
|
||||
throw new Error('useModuleId must be used within a ModuleProvider');
|
||||
return 'canvas';
|
||||
}
|
||||
|
||||
return context.moduleId;
|
||||
|
|
|
|||
|
|
@ -4,11 +4,12 @@
|
|||
command = "npm run build:plugins:prod && npm run build:frontend"
|
||||
|
||||
[template.environment]
|
||||
NODE_ENV = "production"
|
||||
NODE_VERSION = "14.17.3"
|
||||
NPM_VERSION = "7.20.0"
|
||||
NODE_ENV = "production"
|
||||
TOOLJET_EDITION = "cloud"
|
||||
NODE_VERSION = "22.15.1"
|
||||
NPM_VERSION = "10.9.2"
|
||||
|
||||
[[redirects]]
|
||||
from = "/*"
|
||||
to = "/"
|
||||
status = 200
|
||||
status = 200
|
||||
|
|
|
|||
Loading…
Reference in a new issue