From 7165e25fbbd569ed20b00c4ad0e9f34381336e4d Mon Sep 17 00:00:00 2001 From: Nikhil Nandagopal Date: Tue, 27 Oct 2020 20:01:30 +0530 Subject: [PATCH 1/5] Update install.sh (#1432) --- deploy/install.sh | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/deploy/install.sh b/deploy/install.sh index 72fe0f10db..63432ff1b2 100755 --- a/deploy/install.sh +++ b/deploy/install.sh @@ -27,6 +27,16 @@ check_ports_occupied() { fi if [[ -n $port_check_output ]]; then + curl -s --location --request POST 'https://hook.integromat.com/dkwb6i52am93pi30ojeboktvj32iw0fa' \ + --header 'Content-Type: text/plain' \ + --data-raw '{ + "userId": "'"$APPSMITH_INSTALLATION_ID"'", + "event": "Installation Error", + "data": { + "os": "'"$os"'", + "error": "port taken" + } + }' > /dev/null echo "+++++++++++ ERROR ++++++++++++++++++++++" echo "Appsmith requires ports 80 & 443 to be open. Please shut down any other service(s) that may be running on these ports." echo "++++++++++++++++++++++++++++++++++++++++" @@ -73,6 +83,16 @@ install_docker_compose() { echo "" fi else + curl -s --location --request POST 'https://hook.integromat.com/dkwb6i52am93pi30ojeboktvj32iw0fa' \ + --header 'Content-Type: text/plain' \ + --data-raw '{ + "userId": "'"$APPSMITH_INSTALLATION_ID"'", + "event": "Installation Error", + "data": { + "os": "'"$os"'", + "error": "Docker Compose Not Found" + } + }' > /dev/null echo "+++++++++++ IMPORTANT READ ++++++++++++++++++++++" echo "docker-compose not found! Please install docker-compose first and then continue with this installation." echo "Refer https://docs.docker.com/compose/install/ for installing docker-compose." @@ -360,6 +380,16 @@ if [[ $desired_os -eq 0 ]];then echo "" echo "This script is currently meant to install Appsmith on Mac OS X | Ubuntu machines." echo_contact_support " if you wish to extend this support." + curl -s --location --request POST 'https://hook.integromat.com/dkwb6i52am93pi30ojeboktvj32iw0fa' \ + --header 'Content-Type: text/plain' \ + --data-raw '{ + "userId": "'"$APPSMITH_INSTALLATION_ID"'", + "event": "Installation Error", + "data": { + "os": "'"$os"'", + "error": "OS Not Supported" + } + }' > /dev/null bye else echo "🙌 You're on an OS that is supported by this installation script." @@ -369,6 +399,16 @@ fi if [[ $EUID -eq 0 ]]; then echo "Please do not run this script as root/sudo." echo_contact_support + curl -s --location --request POST 'https://hook.integromat.com/dkwb6i52am93pi30ojeboktvj32iw0fa' \ + --header 'Content-Type: text/plain' \ + --data-raw '{ + "userId": "'"$APPSMITH_INSTALLATION_ID"'", + "event": "Installation Error", + "data": { + "os": "'"$os"'", + "error": "Running as Root" + } + }' > /dev/null bye fi From 33c5fc054e55de888a587a7396b05af0a6d0ad7b Mon Sep 17 00:00:00 2001 From: Nikhil Nandagopal Date: Thu, 29 Oct 2020 12:04:43 +0530 Subject: [PATCH 2/5] name fix --- deploy/install.sh | 125 ++++++++++++++++++++++++++++++---------------- 1 file changed, 83 insertions(+), 42 deletions(-) diff --git a/deploy/install.sh b/deploy/install.sh index 63432ff1b2..194ebe7386 100755 --- a/deploy/install.sh +++ b/deploy/install.sh @@ -41,7 +41,7 @@ check_ports_occupied() { echo "Appsmith requires ports 80 & 443 to be open. Please shut down any other service(s) that may be running on these ports." echo "++++++++++++++++++++++++++++++++++++++++" echo "" - bye + exit 1 fi } @@ -59,7 +59,16 @@ install_docker() { $apt_cmd update echo "Installing docker" $apt_cmd install docker-ce docker-ce-cli containerd.io - + elif [[ $package_manager == zypper ]]; then + zypper_cmd="sudo zypper --quiet --no-gpg-checks --non-interactive" + echo "Installing docker" + if [[ $os == sles ]]; then + os_sp="$(cat /etc/*-release | awk -F= '$1 == "VERSION_ID" { gsub(/"/, ""); print $2; exit }')" + os_arch="$(uname -i)" + sudo SUSEConnect -p sle-module-containers/$os_sp/$os_arch -r '' + fi + $zypper_cmd install docker docker-runc containerd + sudo systemctl enable docker.service else yum_cmd="sudo yum --assumeyes --quiet" $yum_cmd install yum-utils @@ -72,7 +81,7 @@ install_docker() { } install_docker_compose() { - if [[ $package_manager == "apt-get" || $package_manager == "yum" ]]; then + if [[ $package_manager == "apt-get" || $package_manager == "zypper" || $package_manager == "yum" ]]; then if [[ ! -f /usr/bin/docker-compose ]];then echo "++++++++++++++++++++++++" echo "Installing docker-compose" @@ -97,7 +106,7 @@ install_docker_compose() { echo "docker-compose not found! Please install docker-compose first and then continue with this installation." echo "Refer https://docs.docker.com/compose/install/ for installing docker-compose." echo "+++++++++++++++++++++++++++++++++++++++++++++++++" - bye + exit 1 fi } @@ -139,6 +148,16 @@ check_os() { os="centos" package_manager="yum" ;; + SLES*) + desired_os=1 + os="sles" + package_manager="zypper" + ;; + openSUSE*) + desired_os=1 + os="opensuse" + package_manager="zypper" + ;; *) desired_os=0 os="Not Found" @@ -333,22 +352,25 @@ echo_contact_support() { } bye() { # Prints a friendly good bye message and exits the script. - set +o errexit - echo "Please share your email to receive support with the installation" - read -rp 'Email: ' email + if [ "$?" -ne 0 ]; then + set +o errexit + echo "Please share your email if you wish to receive support with the installation" + read -rp 'Email: ' email - curl -s --location --request POST 'https://hook.integromat.com/dkwb6i52am93pi30ojeboktvj32iw0fa' \ - --header 'Content-Type: text/plain' \ - --data-raw '{ - "userId": "'"$APPSMITH_INSTALLATION_ID"'", - "event": "Installation Support", - "data": { - "os": "'"$os"'", - "email": "'"$email"'" - } - }' > /dev/null - echo -e "\nExiting for now. Bye! 👋 \n" - exit 1 + curl -s --location --request POST 'https://hook.integromat.com/dkwb6i52am93pi30ojeboktvj32iw0fa' \ + --header 'Content-Type: text/plain' \ + --data-raw '{ + "userId": "'"$APPSMITH_INSTALLATION_ID"'", + "event": "Installation Support", + "data": { + "os": "'"$os"'", + "email": "'"$email"'" + } + }' > /dev/null + echo "" + echo -e "\nWe will reach out to you at the email provided shortly, Exiting for now. Bye! 👋 \n" + exit 0 + fi } echo -e "👋 Thank you for trying out Appsmith! " @@ -378,7 +400,7 @@ curl -s --location --request POST 'https://hook.integromat.com/dkwb6i52am93pi30o if [[ $desired_os -eq 0 ]];then echo "" - echo "This script is currently meant to install Appsmith on Mac OS X | Ubuntu machines." + echo "This script is currently meant to install Appsmith on Mac OS X, Ubuntu, SLES or openSUSE machines." echo_contact_support " if you wish to extend this support." curl -s --location --request POST 'https://hook.integromat.com/dkwb6i52am93pi30ojeboktvj32iw0fa' \ --header 'Content-Type: text/plain' \ @@ -390,15 +412,16 @@ if [[ $desired_os -eq 0 ]];then "error": "OS Not Supported" } }' > /dev/null - bye + exit 1 else echo "🙌 You're on an OS that is supported by this installation script." echo "" fi if [[ $EUID -eq 0 ]]; then + echo "+++++++++++ ERROR ++++++++++++++++++++++" echo "Please do not run this script as root/sudo." - echo_contact_support + echo "++++++++++++++++++++++++++++++++++++++++" curl -s --location --request POST 'https://hook.integromat.com/dkwb6i52am93pi30ojeboktvj32iw0fa' \ --header 'Content-Type: text/plain' \ --data-raw '{ @@ -409,7 +432,7 @@ if [[ $EUID -eq 0 ]]; then "error": "Running as Root" } }' > /dev/null - bye + exit 1 fi check_ports_occupied @@ -425,19 +448,39 @@ if [[ -e "$install_dir" ]]; then echo "The path '$install_dir' is already present. Please run the script again with a different path to install new." echo "If you're trying to update your existing installation, that happens automatically through WatchTower." echo_contact_support " if you're facing problems with the auto-updates." - exit + curl -s --location --request POST 'https://hook.integromat.com/dkwb6i52am93pi30ojeboktvj32iw0fa' \ + --header 'Content-Type: text/plain' \ + --data-raw '{ + "userId": "'"$APPSMITH_INSTALLATION_ID"'", + "event": "Installation Error", + "data": { + "os": "'"$os"'", + "error": "Directory Exists" + } + }' > /dev/null + exit 1 fi # Check is Docker daemon is installed and available. If not, the install & start Docker for Linux machines. We cannot automatically install Docker Desktop on Mac OS if ! is_command_present docker; then - if [[ $package_manager == "apt-get" || $package_manager == "yum" ]]; then + if [[ $package_manager == "apt-get" || $package_manager == "zypper" || $package_manager == "yum" ]]; then install_docker else echo "" echo "+++++++++++ IMPORTANT READ ++++++++++++++++++++++" - echo "Docker Desktop must be installed manually on Mac OS to proceed. Docker can only be installed automatically on Ubuntu / Redhat / Cent OS" + echo "Docker Desktop must be installed manually on Mac OS to proceed. Docker can only be installed automatically on Ubuntu / openSUSE / SLES / Redhat / Cent OS" echo "https://docs.docker.com/docker-for-mac/install/" echo "++++++++++++++++++++++++++++++++++++++++++++++++" + curl -s --location --request POST 'https://hook.integromat.com/dkwb6i52am93pi30ojeboktvj32iw0fa' \ + --header 'Content-Type: text/plain' \ + --data-raw '{ + "userId": "'"$APPSMITH_INSTALLATION_ID"'", + "event": "Installation Error", + "data": { + "os": "'"$os"'", + "error": "Docker not installed" + } + }' > /dev/null exit 1 fi fi @@ -448,7 +491,7 @@ if ! is_command_present docker-compose; then fi # Starting docker service -if [[ $package_manager == "yum" || $package_manager == "apt-get" ]]; then +if [[ $package_manager == "yum" || $package_manager == "zypper" || $package_manager == "apt-get" ]]; then start_docker fi @@ -468,10 +511,11 @@ if confirm y "Is this a fresh installation?"; then # Since the mongo was automatically setup, this must be the first time installation. Generate encryption credentials for this scenario auto_generate_encryption="true" else - read -rp 'Enter your current mongo db host: ' mongo_host - read -rp 'Enter your current mongo root user: ' mongo_root_user - read -srp 'Enter your current mongo password: ' mongo_root_password - read -rp 'Enter your current mongo database name: ' mongo_database + echo 'You are trying to connect to an existing appsmith installation. Abort if you want to install appsmith fresh' + read -rp 'Enter your existing appsmith mongo db host: ' mongo_host + read -rp 'Enter your existing appsmith mongo root user: ' mongo_root_user + read -srp 'Enter your existing appsmith mongo password: ' mongo_root_password + read -rp 'Enter your existing appsmith mongo database name: ' mongo_database # It is possible that this isn't the first installation. echo "" # In this case be more cautious of auto generating the encryption keys. Err on the side of not generating the encryption keys @@ -614,19 +658,17 @@ if [[ $status_code -ne 401 ]]; then echo -e "cd \"$install_dir\" && sudo docker-compose ps -a" echo "For troubleshooting help, please reach out to us via our Discord server: https://discord.com/invite/rBTTVJp" echo "++++++++++++++++++++++++++++++++++++++++" - echo "" - echo "Please share your email to receive help with the installation" - read -rp 'Email: ' email curl -s --location --request POST 'https://hook.integromat.com/dkwb6i52am93pi30ojeboktvj32iw0fa' \ --header 'Content-Type: text/plain' \ --data-raw '{ - "userId": "'"$APPSMITH_INSTALLATION_ID"'", - "event": "Installation Support", - "data": { - "os": "'"$os"'", - "email": "'"$email"'" - } + "userId": "'"$APPSMITH_INSTALLATION_ID"'", + "event": "Installation Error", + "data": { + "os": "'"$os"'", + "error": "Containers not started" + } }' > /dev/null + exit 1 else curl -s --location --request POST 'https://hook.integromat.com/dkwb6i52am93pi30ojeboktvj32iw0fa' \ --header 'Content-Type: text/plain' \ @@ -638,7 +680,7 @@ else } }' > /dev/null - echo "+++++++++++ SUCCESS ++++++++++++++++++++++++++++++" + echo "++++++++++++++++++ SUCCESS ++++++++++++++++++++++" echo "Your installation is complete!" echo "" if [[ -z $custom_domain ]]; then @@ -664,5 +706,4 @@ else } }' > /dev/null fi - echo -e "\nPeace out ✌️\n" From ccea01cb21f35aee640430cd0fe16b2ad5401073 Mon Sep 17 00:00:00 2001 From: Arpit Mohan Date: Thu, 29 Oct 2020 15:44:58 +0530 Subject: [PATCH 3/5] Ensures that the master & release flows pick appropriate server Docker images (#1465) --- .github/workflows/client.yml | 8 +++++++- app/client/README.md | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/client.yml b/.github/workflows/client.yml index 0ce03eb4c9..c2472e9276 100644 --- a/.github/workflows/client.yml +++ b/.github/workflows/client.yml @@ -150,13 +150,19 @@ jobs: - name: Pull server docker container and start it locally shell: bash run: | + DOCKER_IMAGE_NAME=appsmith/appsmith-server:release + if [[ github.ref == 'refs/heads/master' ]] + then + DOCKER_IMAGE_NAME=appsmith/appsmith-server:latest + fi + echo $DOCKER_IMAGE_NAME docker run -d --net=host --name appsmith-internal-server -p 8080:8080 \ --env APPSMITH_MONGODB_URI=mongodb://localhost:27017/appsmith \ --env APPSMITH_REDIS_URL=redis://localhost:6379 \ --env APPSMITH_ENCRYPTION_PASSWORD=password \ --env APPSMITH_ENCRYPTION_SALT=salt \ --env APPSMITH_IS_SELF_HOSTED=false \ - appsmith/appsmith-server:release + $DOCKER_IMAGE_NAME - name: Installing Yarn serve run: | diff --git a/app/client/README.md b/app/client/README.md index 2976e0fbb6..0ae785bd51 100755 --- a/app/client/README.md +++ b/app/client/README.md @@ -1,4 +1,3 @@ - ## Dev Dependencies - `yarn` - `nvm` From 634d294578b1cca582c4f81378e3d530d772c95b Mon Sep 17 00:00:00 2001 From: Arpit Mohan Date: Fri, 30 Oct 2020 15:32:38 +0530 Subject: [PATCH 4/5] Fixing the tests via client.yml in the master branch --- .github/workflows/client.yml | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/client.yml b/.github/workflows/client.yml index c2472e9276..15f53f3993 100644 --- a/.github/workflows/client.yml +++ b/.github/workflows/client.yml @@ -146,23 +146,30 @@ jobs: with: name: build path: app/client/build - - - name: Pull server docker container and start it locally + + - name: Pull release server docker container and start it locally + if: github.ref == 'refs/heads/release' shell: bash run: | - DOCKER_IMAGE_NAME=appsmith/appsmith-server:release - if [[ github.ref == 'refs/heads/master' ]] - then - DOCKER_IMAGE_NAME=appsmith/appsmith-server:latest - fi - echo $DOCKER_IMAGE_NAME docker run -d --net=host --name appsmith-internal-server -p 8080:8080 \ --env APPSMITH_MONGODB_URI=mongodb://localhost:27017/appsmith \ --env APPSMITH_REDIS_URL=redis://localhost:6379 \ --env APPSMITH_ENCRYPTION_PASSWORD=password \ --env APPSMITH_ENCRYPTION_SALT=salt \ --env APPSMITH_IS_SELF_HOSTED=false \ - $DOCKER_IMAGE_NAME + appsmith/appsmith-server:release + + - name: Pull master server docker container and start it locally + if: github.ref == 'refs/heads/master' + shell: bash + run: | + docker run -d --net=host --name appsmith-internal-server -p 8080:8080 \ + --env APPSMITH_MONGODB_URI=mongodb://localhost:27017/appsmith \ + --env APPSMITH_REDIS_URL=redis://localhost:6379 \ + --env APPSMITH_ENCRYPTION_PASSWORD=password \ + --env APPSMITH_ENCRYPTION_SALT=salt \ + --env APPSMITH_IS_SELF_HOSTED=false \ + appsmith/appsmith-server:nightly - name: Installing Yarn serve run: | From b74bec311e8e2fbaf9e94582071fb9c0d86914a0 Mon Sep 17 00:00:00 2001 From: vicky-primathon <67091118+vicky-primathon@users.noreply.github.com> Date: Fri, 30 Oct 2020 16:18:57 +0530 Subject: [PATCH 5/5] Query table scroll issue fixed (#1464) * Query table scroll issue fixed * Table widget horizontal scroll fix --- .../designSystems/appsmith/TableStyledWrappers.tsx | 2 ++ app/client/src/pages/Editor/QueryEditor/Table.tsx | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/client/src/components/designSystems/appsmith/TableStyledWrappers.tsx b/app/client/src/components/designSystems/appsmith/TableStyledWrappers.tsx index 9ab7df05ba..54bcf7d398 100644 --- a/app/client/src/components/designSystems/appsmith/TableStyledWrappers.tsx +++ b/app/client/src/components/designSystems/appsmith/TableStyledWrappers.tsx @@ -29,6 +29,8 @@ export const TableWrapper = styled.div<{ color: ${Colors.THUNDER}; position: relative; background: ${Colors.ATHENS_GRAY_DARKER}; + display: table; + width: 100%; .thead, .tbody { overflow: hidden; diff --git a/app/client/src/pages/Editor/QueryEditor/Table.tsx b/app/client/src/pages/Editor/QueryEditor/Table.tsx index b203296947..7f771b0e17 100644 --- a/app/client/src/pages/Editor/QueryEditor/Table.tsx +++ b/app/client/src/pages/Editor/QueryEditor/Table.tsx @@ -15,7 +15,7 @@ interface TableProps { const StyledTableWrapped = styled(TableWrapper)` min-height: 0px; - height: auto; + height: 100%; .tableWrap { display: flex; flex: 1; @@ -24,9 +24,11 @@ const StyledTableWrapped = styled(TableWrapper)` display: flex; flex: 1; flex-direction: column; - height: auto; + height: 100%; + display: table; + width: 100%; .tbody { - height: auto; + height: 100%; overflow: auto; } }