Fix/copy changes (#210)
* Added information to setup domain * Fixed incorrect var reference * Updated documentation message * Updated env template * updated template * removed debug echo * Updated Script * Updated Text * Removed option to connect to external mongo for fresh installs Exit script of docker desktop is not installed * Updated docker installation explanation * added a question to skip custom domain if user is installing locally * Inverted script question and * Removed question to determine local installation * Updated Popup CTA to Modal Updated query templates to contain bindings Added a message to display on API / Query errors * updated styles for evaluated value updated styles for auto complete * added spaces to questions Co-authored-by: Nikhil Nandagopal <nikhil@appsmith.com>
This commit is contained in:
parent
b4906aad18
commit
f7cf7e1182
|
|
@ -617,7 +617,7 @@ Cypress.Commands.add("createModal", (modalType, ModalName) => {
|
||||||
.click({ force: true })
|
.click({ force: true })
|
||||||
.get("ul.bp3-menu")
|
.get("ul.bp3-menu")
|
||||||
.children()
|
.children()
|
||||||
.contains("Open Popup")
|
.contains("New Modal")
|
||||||
.click();
|
.click();
|
||||||
cy.get(modalWidgetPage.selectModal).click();
|
cy.get(modalWidgetPage.selectModal).click();
|
||||||
cy.get(modalWidgetPage.createModalButton).click({ force: true });
|
cy.get(modalWidgetPage.createModalButton).click({ force: true });
|
||||||
|
|
|
||||||
|
|
@ -47,13 +47,13 @@ const ContentWrapper = styled.div<{ colorTheme: EditorTheme }>`
|
||||||
-ms-overflow-style: none;
|
-ms-overflow-style: none;
|
||||||
background-color: ${props => THEMES[props.colorTheme].backgroundColor};
|
background-color: ${props => THEMES[props.colorTheme].backgroundColor};
|
||||||
color: ${props => THEMES[props.colorTheme].textColor};
|
color: ${props => THEMES[props.colorTheme].textColor};
|
||||||
padding: 15px;
|
padding: 10px;
|
||||||
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
|
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const CurrentValueWrapper = styled.div`
|
const CurrentValueWrapper = styled.div`
|
||||||
max-height: 150px;
|
max-height: 300px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
::-webkit-scrollbar {
|
::-webkit-scrollbar {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
@ -63,12 +63,14 @@ const CurrentValueWrapper = styled.div`
|
||||||
|
|
||||||
const CodeWrapper = styled.pre<{ colorTheme: EditorTheme }>`
|
const CodeWrapper = styled.pre<{ colorTheme: EditorTheme }>`
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
margin: 0px 0px;
|
||||||
background-color: ${props => THEMES[props.colorTheme].editorBackground};
|
background-color: ${props => THEMES[props.colorTheme].editorBackground};
|
||||||
color: ${props => THEMES[props.colorTheme].editorColor};
|
color: ${props => THEMES[props.colorTheme].editorColor};
|
||||||
overflow: scroll;
|
overflow: scroll;
|
||||||
::-webkit-scrollbar {
|
::-webkit-scrollbar {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
font-size: 14px;
|
||||||
-ms-overflow-style: none;
|
-ms-overflow-style: none;
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
`;
|
`;
|
||||||
|
|
@ -81,17 +83,23 @@ const TypeText = styled.pre<{ colorTheme: EditorTheme }>`
|
||||||
::-webkit-scrollbar {
|
::-webkit-scrollbar {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
font-size: 12px;
|
||||||
|
margin: 5px 0;
|
||||||
-ms-overflow-style: none;
|
-ms-overflow-style: none;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const ErrorText = styled.p`
|
const ErrorText = styled.p`
|
||||||
margin: 10px 0;
|
margin: 5px 0;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
background-color: rgba(235, 87, 87, 0.2);
|
background-color: rgba(235, 87, 87, 0.2);
|
||||||
color: ${props => props.theme.colors.error};
|
color: ${props => props.theme.colors.error};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
const StyledTitle = styled.p`
|
||||||
|
margin: 8px 0;
|
||||||
|
`;
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
theme: EditorTheme;
|
theme: EditorTheme;
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
|
|
@ -123,13 +131,13 @@ const CurrentValueViewer = (props: {
|
||||||
Array.isArray(props.evaluatedValue)
|
Array.isArray(props.evaluatedValue)
|
||||||
) {
|
) {
|
||||||
const reactJsonProps = {
|
const reactJsonProps = {
|
||||||
theme: props.theme === EditorTheme.DARK ? "monokai" : "rjv-default",
|
theme: props.theme === EditorTheme.DARK ? "summerfruit" : "rjv-default",
|
||||||
name: null,
|
name: null,
|
||||||
enableClipboard: false,
|
enableClipboard: false,
|
||||||
displayObjectSize: false,
|
displayObjectSize: false,
|
||||||
displayDataTypes: false,
|
displayDataTypes: false,
|
||||||
style: {
|
style: {
|
||||||
fontSize: "14px",
|
fontSize: "12px",
|
||||||
},
|
},
|
||||||
collapsed: 2,
|
collapsed: 2,
|
||||||
collapseStringsAfterLength: 20,
|
collapseStringsAfterLength: 20,
|
||||||
|
|
@ -145,7 +153,7 @@ const CurrentValueViewer = (props: {
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<p>Current Value:</p>
|
<StyledTitle>Evaluated Value</StyledTitle>
|
||||||
<CurrentValueWrapper>{content}</CurrentValueWrapper>
|
<CurrentValueWrapper>{content}</CurrentValueWrapper>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
);
|
);
|
||||||
|
|
@ -162,9 +170,9 @@ const PopoverContent = (props: PopoverContentProps) => {
|
||||||
{props.hasError && (
|
{props.hasError && (
|
||||||
<ErrorText>{`This value does not evaluate to type "${props.expected}"`}</ErrorText>
|
<ErrorText>{`This value does not evaluate to type "${props.expected}"`}</ErrorText>
|
||||||
)}
|
)}
|
||||||
{props.expected && (
|
{!props.hasError && props.expected && (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<p>Expected type:</p>
|
<StyledTitle>Expected Data Type</StyledTitle>
|
||||||
<TypeText colorTheme={props.theme}>{props.expected}</TypeText>
|
<TypeText colorTheme={props.theme}>{props.expected}</TypeText>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
)}
|
)}
|
||||||
|
|
@ -207,7 +215,7 @@ const EvaluatedValuePopup = (props: Props) => {
|
||||||
expected={props.expected}
|
expected={props.expected}
|
||||||
evaluatedValue={props.evaluatedValue}
|
evaluatedValue={props.evaluatedValue}
|
||||||
hasError={props.hasError}
|
hasError={props.hasError}
|
||||||
theme={props.theme}
|
theme={EditorTheme.DARK}
|
||||||
onMouseLeave={() => {
|
onMouseLeave={() => {
|
||||||
setContentHovered(false);
|
setContentHovered(false);
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -286,6 +286,7 @@ class CodeEditor extends Component<Props, State> {
|
||||||
<DynamicAutocompleteInputWrapper
|
<DynamicAutocompleteInputWrapper
|
||||||
theme={this.props.theme}
|
theme={this.props.theme}
|
||||||
skin={this.props.theme === EditorTheme.DARK ? Skin.DARK : Skin.LIGHT}
|
skin={this.props.theme === EditorTheme.DARK ? Skin.DARK : Skin.LIGHT}
|
||||||
|
isError={hasError}
|
||||||
isActive={(this.state.isFocused && !hasError) || this.state.isOpened}
|
isActive={(this.state.isFocused && !hasError) || this.state.isOpened}
|
||||||
isNotHover={this.state.isFocused || this.state.isOpened}
|
isNotHover={this.state.isFocused || this.state.isOpened}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ export const HintStyles = createGlobalStyle<{ editorTheme: EditorTheme }>`
|
||||||
font-size: 90%;
|
font-size: 90%;
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
max-height: 20em;
|
max-height: 20em;
|
||||||
width: 300px;
|
width: 250px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
background: ${props =>
|
background: ${props =>
|
||||||
props.editorTheme === EditorTheme.DARK ? "#090A0F" : "#ffffff"};
|
props.editorTheme === EditorTheme.DARK ? "#090A0F" : "#ffffff"};
|
||||||
|
|
@ -38,7 +38,7 @@ export const HintStyles = createGlobalStyle<{ editorTheme: EditorTheme }>`
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-size: 14px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
li.CodeMirror-hint-active {
|
li.CodeMirror-hint-active {
|
||||||
|
|
@ -239,15 +239,16 @@ export const DynamicAutocompleteInputWrapper = styled.div<{
|
||||||
theme: Theme;
|
theme: Theme;
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
isNotHover: boolean;
|
isNotHover: boolean;
|
||||||
|
isError: boolean;
|
||||||
}>`
|
}>`
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
position: relative;
|
position: relative;
|
||||||
border: ${props => (props.skin === Skin.DARK ? "1px solid" : "none")};
|
border: 1px solid;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
border-color: ${props =>
|
border-color: ${props =>
|
||||||
props.isActive && props.skin === Skin.DARK
|
!props.isError && props.isActive && props.skin === Skin.DARK
|
||||||
? Colors.ALABASTER
|
? Colors.ALABASTER
|
||||||
: "transparent"};
|
: "transparent"};
|
||||||
> span:first-of-type {
|
> span:first-of-type {
|
||||||
|
|
@ -256,8 +257,10 @@ export const DynamicAutocompleteInputWrapper = styled.div<{
|
||||||
right: 0px;
|
right: 0px;
|
||||||
}
|
}
|
||||||
&:hover {
|
&:hover {
|
||||||
border: ${props =>
|
border-color: ${props =>
|
||||||
props.skin === Skin.DARK ? "1px solid " + Colors.ALABASTER : "none"};
|
!props.isError && props.skin === Skin.DARK
|
||||||
|
? Colors.ALABASTER
|
||||||
|
: "transparent"};
|
||||||
.lightning-menu {
|
.lightning-menu {
|
||||||
background: ${props =>
|
background: ${props =>
|
||||||
!props.isNotHover
|
!props.isNotHover
|
||||||
|
|
|
||||||
|
|
@ -372,11 +372,11 @@ const baseOptions: any = [
|
||||||
value: ActionType.showAlert,
|
value: ActionType.showAlert,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Open Popup",
|
label: "Open Modal",
|
||||||
value: ActionType.showModal,
|
value: ActionType.showModal,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Close Popup",
|
label: "Close Modal",
|
||||||
value: ActionType.closeModal,
|
value: ActionType.closeModal,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
@ -760,7 +760,7 @@ function useModalDropdownList() {
|
||||||
|
|
||||||
let finalList: TreeDropdownOption[] = [
|
let finalList: TreeDropdownOption[] = [
|
||||||
{
|
{
|
||||||
label: "Open Popup",
|
label: "New Modal",
|
||||||
value: "Modal",
|
value: "Modal",
|
||||||
id: "create",
|
id: "create",
|
||||||
className: "t--create-modal-btn",
|
className: "t--create-modal-btn",
|
||||||
|
|
|
||||||
|
|
@ -376,7 +376,7 @@ export const theme: Theme = {
|
||||||
},
|
},
|
||||||
evaluatedValuePopup: {
|
evaluatedValuePopup: {
|
||||||
width: 300,
|
width: 300,
|
||||||
height: 400,
|
height: 500,
|
||||||
},
|
},
|
||||||
drawerWidth: "80%",
|
drawerWidth: "80%",
|
||||||
colors: {
|
colors: {
|
||||||
|
|
|
||||||
|
|
@ -396,7 +396,7 @@ const WidgetConfigResponse: WidgetConfigReducerState = {
|
||||||
text: "Submit",
|
text: "Submit",
|
||||||
buttonStyle: "PRIMARY_BUTTON",
|
buttonStyle: "PRIMARY_BUTTON",
|
||||||
disabledWhenInvalid: true,
|
disabledWhenInvalid: true,
|
||||||
resetFormOnClick: false,
|
resetFormOnClick: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -272,6 +272,11 @@ export function* executeActionSaga(
|
||||||
event.callback({ success: false });
|
event.callback({ success: false });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
AppToaster.show({
|
||||||
|
message:
|
||||||
|
api.name + " failed to execute. Please check it's configuration",
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
if (onSuccess) {
|
if (onSuccess) {
|
||||||
yield put(
|
yield put(
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,9 @@
|
||||||
"insert": "users",
|
"insert": "users",
|
||||||
"documents": [
|
"documents": [
|
||||||
{
|
{
|
||||||
"name": "John Smith",
|
"name": "{{ nameInput.text }}",
|
||||||
"email": [
|
"email": "{{ emailInput.text }}",
|
||||||
"john@appsmith.com"
|
"gender": "{{ genderDropdown.selectedOptionValue }}"
|
||||||
],
|
|
||||||
"gender": "M"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,9 @@
|
||||||
"deletes": [
|
"deletes": [
|
||||||
{
|
{
|
||||||
"q": {
|
"q": {
|
||||||
"id": 10
|
"id": "{{ usersTable.selectedRow.id }}"
|
||||||
}
|
},
|
||||||
|
"limit": 1
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
{
|
{
|
||||||
"find": "users",
|
"find": "users",
|
||||||
"filter": {
|
"filter": {
|
||||||
"id": {
|
"status": "{{ statusDropdown.selectedOptionValue }}"
|
||||||
"$gte": 10
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"sort": {
|
"sort": {
|
||||||
"id": 1
|
"id": 1
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,7 @@
|
||||||
"q": {
|
"q": {
|
||||||
"id": 10
|
"id": 10
|
||||||
},
|
},
|
||||||
"u": {
|
"u": { "$set": { "status": "{{ statusDropdown.selectedOptionValue }}" } }
|
||||||
"name": "Updated Sam",
|
|
||||||
"email": [
|
|
||||||
"updates@appsmith.com"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,8 @@
|
||||||
INSERT INTO users
|
INSERT INTO users
|
||||||
(id, name, gender, avatar, email, address, role)
|
(name, gender, email)
|
||||||
VALUES
|
VALUES
|
||||||
(?, ?, ?, ?, ?, ?, ?);
|
(
|
||||||
|
'{{ nameInput.text }}',
|
||||||
|
'{{ genderDropdown.selectedOptionValue }}',
|
||||||
|
'{{ nameInput.text }}'
|
||||||
|
);
|
||||||
|
|
@ -1 +1 @@
|
||||||
DELETE FROM users WHERE id = ?;
|
DELETE FROM users WHERE id = '{{ usersTable.selectedRow.id }}';
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
SELECT * FROM users ORDER BY id LIMIT 10;
|
SELECT * FROM users where role = '{{ roleDropdown.selectedOptionValue }}' ORDER BY id LIMIT 10;
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
UPDATE users
|
UPDATE users
|
||||||
SET status = 'APPROVED'
|
SET status = 'APPROVED'
|
||||||
WHERE id = 1;
|
WHERE id = '{{ usersTable.selectedRow.id }}';
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,8 @@
|
||||||
INSERT INTO users
|
INSERT INTO users
|
||||||
(id, name, gender, avatar, email, address, role)
|
(name, gender, email)
|
||||||
VALUES
|
VALUES
|
||||||
(?, ?, ?, ?, ?, ?, ?);
|
(
|
||||||
|
'{{ nameInput.text }}',
|
||||||
|
'{{ genderDropdown.selectedOptionValue }}',
|
||||||
|
'{{ nameInput.text }}'
|
||||||
|
);
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
DELETE FROM users WHERE id = ?;
|
DELETE FROM users WHERE id = '{{ usersTable.selectedRow.id }}';
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
SELECT * FROM users ORDER BY id LIMIT 10;
|
SELECT * FROM users where role = '{{ roleDropdown.selectedOptionValue }}' ORDER BY id LIMIT 10;
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
UPDATE users
|
UPDATE users
|
||||||
SET status = 'APPROVED'
|
SET status = 'APPROVED'
|
||||||
WHERE id = 1;
|
WHERE id = '{{ usersTable.selectedRow.id }}';
|
||||||
|
|
|
||||||
|
|
@ -304,6 +304,7 @@ echo "+++++++++++++++++++++++++++++++++++++++++++++++++"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Your application is running on http://localhost"
|
echo "Your application is running on http://localhost"
|
||||||
echo ""
|
echo ""
|
||||||
|
echo "Your application is running on http://localhost"
|
||||||
echo "Need help troubleshooting?"
|
echo "Need help troubleshooting?"
|
||||||
echo "Join our discord server https://discord.com/invite/rBTTVJp"
|
echo "Join our discord server https://discord.com/invite/rBTTVJp"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user