Skip to content

Commit

Permalink
Merge branch 'release' into feat/35290-update-response-tab-ui
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-golovanov committed Nov 12, 2024
2 parents ccacb12 + 8773bdd commit ee36111
Show file tree
Hide file tree
Showing 135 changed files with 2,114 additions and 969 deletions.
2 changes: 1 addition & 1 deletion .github/config.json

Large diffs are not rendered by default.

18 changes: 17 additions & 1 deletion .github/workflows/test-vulnerabilities-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,20 @@ jobs:
"${{ github.event.pull_request.number }}" \
"${{ github.event.pull_request.html_url }}" \
"${{ github.run_id }}"
- name: Check for new vulnerabilities in Scout and Trivy files
if: always()
run: |
# Check if Scout vulnerabilities file is not empty
if [ -s "scout_new_vulnerabilities.csv" ]; then
echo "Scout vulnerabilities detected."
cat scout_new_vulnerabilities.csv
exit 1 # Fail the job if data exists
fi
# Check if Trivy vulnerabilities file is not empty
if [ -s "trivy_new_vulnerabilities.csv" ]; then
echo "Trivy vulnerabilities detected."
cat trivy_new_vulnerabilities.csv
exit 1 # Fail the job if data exists
fi
37 changes: 22 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,10 @@ RUN <<END
exit 1
fi

if ! [ -f server/mongo/server.jar && -f server/pg/server.jar ]; then
if ! [ -f server/mongo/server.jar -a -f server/pg/server.jar ]; then
echo "Missing one or both server.jar files in the right place. Are you using the build script?" >&2
exit 1
fi

mkdir -p ./editor ./rts

# Ensure all *.sh scripts are executable.
find . -name node_modules -prune -or -type f -name '*.sh' -print -exec chmod +x '{}' ';'

# Ensure all custom command-scripts have executable permission
chmod +x /opt/bin/*
END

# Add client UI - Application Layer
Expand All @@ -39,13 +31,28 @@ COPY ./app/client/packages/rts/dist rts/

ENV PATH /opt/bin:/opt/appsmith/utils/node_modules/.bin:/opt/java/bin:/opt/node/bin:$PATH

RUN cd ./utils && npm install --only=prod && npm install --only=prod -g . && cd - \
&& chmod +x /opt/bin/* *.sh /watchtower-hooks/*.sh \
RUN <<END
set -o errexit

cd ./utils
npm install --only=prod
npm install --only=prod -g .
rm -rf utils/node_modules/resolve/test
cd -

# Make all `*.sh` files executable, excluding `node_modules`.
find . \( -name node_modules -prune \) -o \( -type f -name '*.sh' \) -exec chmod +x '{}' +

# Ensure all custom command-scripts have executable permission
chmod +x /opt/bin/* /watchtower-hooks/*.sh

# Disable setuid/setgid bits for the files inside container.
&& find / \( -path /proc -prune \) -o \( \( -perm -2000 -o -perm -4000 \) -print -exec chmod -s '{}' + \) || true \
&& mkdir -p /.mongodb/mongosh /appsmith-stacks \
&& chmod ugo+w /etc /appsmith-stacks \
&& chmod -R ugo+w /var/run /.mongodb /etc/ssl /usr/local/share
find / \( -path /proc -prune \) -o \( \( -perm -2000 -o -perm -4000 \) -exec chmod -s '{}' + \) || true

mkdir -p /.mongodb/mongosh /appsmith-stacks
chmod ugo+w /etc /appsmith-stacks
chmod -R ugo+w /var/run /.mongodb /etc/ssl /usr/local/share
END

LABEL com.centurylinklabs.watchtower.lifecycle.pre-check=/watchtower-hooks/pre-check.sh
LABEL com.centurylinklabs.watchtower.lifecycle.pre-update=/watchtower-hooks/pre-update.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ return WhatTrumpThinks.run().then((res) => { showAlert("Today's Trump quote for
);
agHelper.ValidateToastMessage(
"will be executed automatically on page load",
); //Validating 'Run API on Page Load' is set once api response is mapped
); //Validating 'Run the API on Page Load' is set once api response is mapped
EditorNavigation.SelectEntityByName("Button1", EntityType.Widget);
propPane.EnterJSContext(
"onClick",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe(
cy.xpath(queryLocators.querySettingsTab).click();

cy.get(".label-icon-wrapper")
.contains("Run query on page load")
.contains("Run the query on page load")
.parent()
.then(($el) => {
cy.window().then((win) => {
Expand All @@ -45,7 +45,7 @@ describe(
});

cy.get(".label-icon-wrapper")
.contains("Request confirmation before running query")
.contains("Request confirmation before running this query")
.parent()
.then(($el) => {
cy.window().then((win) => {
Expand Down
46 changes: 23 additions & 23 deletions app/client/cypress/locators/OneClickBindingLocator.ts
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
export default {
connectData: '[data-testId="t--one-click-binding-connect-data"]',
connectData: '[data-testid="t--one-click-binding-connect-data"]',
datasourceDropdownSelector:
"[data-testId='t--one-click-binding-datasource-selector']",
"[data-testid='t--one-click-binding-datasource-selector']",
datasourceDropdownOptionSelector: (query: string) =>
`[data-testId="t--one-click-binding-datasource-trigger"]:contains(${query})`,
`[data-testid="t--one-click-binding-datasource-trigger"]:contains(${query})`,
dropdownOptionSelector: (query: string) =>
`[data-testId="t--one-click-binding-datasource-trigger"]:contains(${query})`,
`[data-testid="t--one-click-binding-datasource-trigger"]:contains(${query})`,
datasourceQueryBindHeaderSelector:
"[data-testId='t--one-click-binding-datasource-selector--bind-to-query']",
"[data-testid='t--one-click-binding-datasource-selector--bind-to-query']",
datasourceGenerateAQuerySelector:
"[data-testId='t--one-click-binding-datasource-selector--generate-a-query']",
"[data-testid='t--one-click-binding-datasource-selector--generate-a-query']",
datasourceOtherActionsSelector:
"[data-testId='t--one-click-binding-datasource-selector--other-actions']",
"[data-testid='t--one-click-binding-datasource-selector--other-actions']",
datasourceQuerySelector: (query?: string) =>
`[data-testId='t--one-click-binding-datasource-selector--query']${
`[data-testid='t--one-click-binding-datasource-selector--query']${
query ? `:contains(${query})` : ""
}`,
datasourceSelector: (datasource?: string) =>
`[data-testId="t--one-click-binding-datasource-selector--datasource"]${
`[data-testid="t--one-click-binding-datasource-selector--datasource"]${
datasource ? `:contains(${datasource})` : ""
}`,
otherActionSelector: (action?: string) =>
`[data-testId='t--one-click-binding-datasource-selector--other-action']${
`[data-testid='t--one-click-binding-datasource-selector--other-action']${
action ? `:contains(${action})` : ""
}`,
tableOrSpreadsheetDropdown:
'[data-testid="t--one-click-binding-table-selector"] .rc-select-selector',
tableOrSpreadsheetDropdownOption: (table?: string) =>
`//div[@data-testId='t--one-click-binding-table-selector--table']//div[text()='${table}']`,
`//div[@data-testid='t--one-click-binding-table-selector--table']//div[text()='${table}']`,
tableOrSpreadsheetSelectedOption: (table?: string) =>
`[data-testid="t--one-click-binding-table-selector"] .rc-select-selection-item${
table ? `:contains(${table})` : ""
}`,
validTableRowData:
'.t--widget-tablewidgetv2 [role="rowgroup"] [role="button"]',
tableError: (error: string) =>
`[data-testId="t--one-click-binding-table-selector--error"]:contains(${error})`,
dateInput: `[data-testId="datepicker-container"] input`,
`[data-testid="t--one-click-binding-table-selector--error"]:contains(${error})`,
dateInput: `[data-testid="datepicker-container"] input`,
dayViewFromDate: ".DayPicker-Day",
loadMore: "[data-testId='t--one-click-binding-datasource--load-more']",
datasourceSearch: `[data-testId="t--one-click-binding-datasource--search"]`,
loadMore: "[data-testid='t--one-click-binding-datasource--load-more']",
datasourceSearch: `[data-testid="t--one-click-binding-datasource--search"]`,
searchableColumn:
'[data-testId="t--one-click-binding-column-searchableColumn"]',
formType: '[data-testId="t--one-click-binding-column-formType"]',
defaultValues: '[data-testId="t--one-click-binding-column-defaultValues"]',
dataIdentifier: '[data-testId="t--one-click-binding-column-dataIdentifier"]',
label: '[data-testId="t--one-click-binding-column-label"]',
value: '[data-testId="t--one-click-binding-column-value"]',
'[data-testid="t--one-click-binding-column-searchableColumn"]',
formType: '[data-testid="t--one-click-binding-column-formType"]',
defaultValues: '[data-testid="t--one-click-binding-column-defaultValues"]',
dataIdentifier: '[data-testid="t--one-click-binding-column-dataIdentifier"]',
label: '[data-testid="t--one-click-binding-column-label"]',
value: '[data-testid="t--one-click-binding-column-value"]',
columnDropdownOption: (column: string, value?: string) =>
`[data-testId='t--one-click-binding-column-${column}--column']${
`[data-testid='t--one-click-binding-column-${column}--column']${
value ? `:contains(${value})` : ""
}`,
columnSelectedOption: (column: string, value?: string) =>
`[data-testId="t--one-click-binding-column-${column}"] .rc-select-selection-item${
`[data-testid="t--one-click-binding-column-${column}"] .rc-select-selection-item${
value ? `:contains(${value})` : ""
}`,
columnSelectorModalTrigger: '[data-testid="t--edit-fields-button"]',
Expand Down
4 changes: 2 additions & 2 deletions app/client/cypress/support/Pages/DataSources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export class DataSources {
_mandatoryMark = "//span[text()='*']";
_deleteDSHostPort = ".t--delete-field";
_dsTabSchema = "[data-testid='t--tab-SCHEMA_TAB']";
private _pageSelectionMenu = "[data-testId='t--page-selection']";
private _pageSelectionMenu = "[data-testid='t--page-selection']";

private _pageSelectMenuItem = ".ads-v2-menu__menu-item";

Expand Down Expand Up @@ -295,7 +295,7 @@ export class DataSources {
_imgFireStoreLogo = "//img[contains(@src, 'firestore.svg')]";
_dsVirtuosoElement = `div .t--schema-virtuoso-container`;
private _dsVirtuosoList = `[data-test-id="virtuoso-item-list"]`;
private _dsSchemaContainer = `[data-testId="datasource-schema-container"]`;
private _dsSchemaContainer = `[data-testid="datasource-schema-container"]`;
private _dsVirtuosoElementTable = (targetTableName: string) =>
`${this._dsSchemaEntityItem}[data-testid='t--entity-item-${targetTableName}']`;
private _dsPageTabListItem = (buttonText: string) =>
Expand Down
2 changes: 1 addition & 1 deletion app/client/cypress/support/Pages/PropertyPane.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export class PropertyPane {
"div.tab-view span:contains('" + type + "')";

_dropdownSelectType = ".t--open-dropdown-Select-type";
_selectorViewLabel = '[data-testId="selector-view-label"]';
_selectorViewLabel = '[data-testid="selector-view-label"]';
_textView = ".text-view";
_selectorView = ".selector-view";
_dropdownOptions =
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -7311,7 +7311,7 @@
"controlType": "OPEN_CONFIG_PANEL",
"buttonConfig": {
"label": "Configure",
"icon": "settings-2-line"
"icon": "settings-v3"
},
"label": "Configure menu items",
"isBindProperty": false,
Expand Down Expand Up @@ -47874,7 +47874,7 @@
"controlType": "OPEN_CONFIG_PANEL",
"buttonConfig": {
"label": "Configure",
"icon": "settings-2-line"
"icon": "settings-v3"
},
"label": "Configure menu items",
"isBindProperty": false,
Expand Down
4 changes: 2 additions & 2 deletions app/client/src/IDE/Components/ToolbarSettingsPopover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ export const ToolbarSettingsPopover = (props: Props) => {
<Popover onOpenChange={handleOpenChange} open={isOpen}>
<PopoverTrigger>
<ToggleButton
data-testId={props.dataTestId}
data-testid={props.dataTestId}
disabled={props.disabled}
icon="settings-2-line"
icon="settings-v3"
isSelected={isOpen}
onClick={handleButtonClick}
size="md"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const Section: React.FC<SectionProps> = ({
<div
className={classNames}
data-fullwidth={isFullWidth.toString()}
data-withoutPadding={withoutPadding.toString()}
data-withoutpadding={withoutPadding.toString()}
{...props}
>
{children}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@
max-width: 800px;
justify-content: center;

&[data-withoutPadding="true"] {
&[data-withoutpadding="true"] {
padding: 0;
}

/* We do not want padding above the first section */
&[data-withoutPadding="false"]:first-child {
&[data-withoutpadding="false"]:first-child {
padding-bottom: var(--ads-v2-spaces-6);
}

/* All other sections expect first will have padding top and bottom */
&[data-withoutPadding="false"]:not(:first-child) {
&[data-withoutpadding="false"]:not(:first-child) {
padding-block: var(--ads-v2-spaces-6);
}

/* We will also render a border below sections expect for the last section */
&[data-withoutPadding="false"]:not(:last-child) {
&[data-withoutpadding="false"]:not(:last-child) {
border-bottom: 1px solid var(--ads-v2-color-border);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ import { getCurrentBasePageId } from "selectors/editorSelectors";
import {
createMessage,
EDIT_DATASOURCE,
EDIT_DATASOURCE_TOOLTIP,
SAVE_DATASOURCE,
SAVE_DATASOURCE_TOOLTIP,
} from "ee/constants/messages";
import { Button } from "@appsmith/ads";
import { Button, Tooltip } from "@appsmith/ads";

interface storeDataSourceProps {
datasourceId?: string;
Expand Down Expand Up @@ -58,19 +60,26 @@ function StoreAsDatasource(props: storeDataSourceProps) {
};

return (
<Button
className="t--store-as-datasource"
data-testid="t--store-as-datasource"
isDisabled={!props.enable}
kind="secondary"
onClick={saveOrEditDatasource}
size="md"
startIcon={props.shouldSave ? "database-2-line" : "pencil-line"}
<Tooltip
content={
props.shouldSave
? createMessage(SAVE_DATASOURCE_TOOLTIP)
: createMessage(EDIT_DATASOURCE_TOOLTIP)
}
>
{props.shouldSave
? createMessage(SAVE_DATASOURCE)
: createMessage(EDIT_DATASOURCE)}
</Button>
<Button
className="t--store-as-datasource"
data-testid="t--store-as-datasource"
isDisabled={!props.enable}
kind="secondary"
onClick={saveOrEditDatasource}
size="md"
>
{props.shouldSave
? createMessage(SAVE_DATASOURCE)
: createMessage(EDIT_DATASOURCE)}
</Button>
</Tooltip>
);
}

Expand Down
Loading

0 comments on commit ee36111

Please sign in to comment.