Skip to content

Commit 5deaded

Browse files
Merge branch 'master' into feat/fk-select
2 parents ca44bca + 8b49f47 commit 5deaded

File tree

38 files changed

+187
-137
lines changed

38 files changed

+187
-137
lines changed

console/src/components/Services/Settings/Actions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ export const loadAllowedQueries = () => {
482482
},
483483
error => {
484484
console.error(error);
485-
dispatch(showErrorNotification('Fetching allowed queries failed'));
485+
dispatch(showErrorNotification('Fetching allow list failed'));
486486
}
487487
);
488488
};

console/src/components/Services/Settings/AllowedQueries/AddAllowedQuery.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class AddAllowedQuery extends React.Component {
4040
dispatch(addAllowedQueries(fileQueries, isEmptyList, toggle));
4141
} catch (error) {
4242
dispatch(
43-
showErrorNotification('Uploading queries failed', error.message)
43+
showErrorNotification('Uploading operations failed', error.message)
4444
);
4545
}
4646
};
@@ -62,12 +62,12 @@ class AddAllowedQuery extends React.Component {
6262
return (
6363
<div>
6464
<div className={styles.add_mar_bottom_mid}>
65-
<b>Query name:</b>
65+
<b>Operation name:</b>
6666
</div>
6767
<input
6868
type="text"
6969
className={'form-control input-sm ' + styles.inline_block}
70-
placeholder={'query_name'}
70+
placeholder={'operation_name'}
7171
value={manualQuery.name}
7272
onChange={handleNameChange}
7373
/>
@@ -88,13 +88,13 @@ class AddAllowedQuery extends React.Component {
8888
return (
8989
<div>
9090
<div className={styles.add_mar_bottom_mid}>
91-
<b>Query:</b>
91+
<b>Operation:</b>
9292
</div>
9393
<AceEditor
94-
data-test="allowed_query_add"
94+
data-test="allowed_operation_add"
9595
mode="graphql"
9696
theme="github"
97-
name="allowed_query_add"
97+
name="allowed_operation_add"
9898
value={manualQuery.query}
9999
minLines={8}
100100
maxLines={100}
@@ -124,7 +124,7 @@ class AddAllowedQuery extends React.Component {
124124
<div>
125125
<div className={styles.add_mar_bottom_mid}>
126126
<b>Graphql File:</b>
127-
<Tooltip message={'.graphql file with queries'} />
127+
<Tooltip message={'.graphql file with operations'} />
128128
</div>
129129
<input
130130
type="file"
@@ -138,16 +138,16 @@ class AddAllowedQuery extends React.Component {
138138
return (
139139
<div>
140140
<h4 className={styles.subheading_text}>
141-
Add new queries to allow-list
141+
Add new operations to allow-list
142142
</h4>
143143
<div className={styles.subsection}>
144144
<div>
145145
<ExpandableEditor
146-
expandButtonText="Add query manually"
146+
expandButtonText="Add operation manually"
147147
editorExpanded={getManualQueryInput}
148148
collapseCallback={handleManualCollapse}
149-
property="add-allowed-query"
150-
service="add-allowed-query"
149+
property="add-allowed-operation"
150+
service="add-allowed-operation"
151151
saveButtonText="Add"
152152
saveFunc={handleManualSubmit}
153153
/>
@@ -158,8 +158,8 @@ class AddAllowedQuery extends React.Component {
158158
expandButtonText="Upload graphql file"
159159
editorExpanded={getFileUploadInput}
160160
collapseCallback={handleFileUploadCollapse}
161-
property="upload-allowed-queries"
162-
service="upload-allowed-queries"
161+
property="upload-allowed-operations"
162+
service="upload-allowed-operations"
163163
saveButtonText="Upload"
164164
saveFunc={handleFileUploadSubmit}
165165
/>

console/src/components/Services/Settings/AllowedQueries/AllowedQueries.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class AllowedQueries extends React.Component {
2525
className={`${styles.clear_fix} ${styles.padd_left} ${styles.padd_top} ${styles.metadata_wrapper} container-fluid`}
2626
>
2727
<div className={styles.subHeader}>
28-
<h2 className={styles.headerText}>Allowed Queries</h2>
28+
<h2 className={styles.headerText}>Allow List</h2>
2929
<div className={styles.add_mar_top + ' ' + styles.wd60}>
3030
<AllowedQueriesNotes />
3131
<hr />

console/src/components/Services/Settings/AllowedQueries/AllowedQueriesList.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AllowedQueriesList extends React.Component {
2828

2929
const getQueryList = () => {
3030
if (allowedQueries.length === 0) {
31-
return <div>No queries in allow-list yet</div>;
31+
return <div>No operations in allow-list yet</div>;
3232
}
3333

3434
return allowedQueries.map((query, i) => {
@@ -63,25 +63,25 @@ class AllowedQueriesList extends React.Component {
6363
<div>
6464
<div>
6565
<div className={styles.add_mar_bottom_mid}>
66-
<b>Query name:</b>
66+
<b>Operation name:</b>
6767
</div>
6868
<input
6969
type="text"
7070
className={'form-control input-sm ' + styles.inline_block}
7171
value={modifiedQuery.name}
72-
placeholder={'query_name'}
72+
placeholder={'operation_name'}
7373
onChange={handleNameChange}
7474
/>
7575
</div>
7676
<div className={styles.add_mar_top}>
7777
<div className={styles.add_mar_bottom_mid}>
78-
<b>Query:</b>
78+
<b>Operation:</b>
7979
</div>
8080
<AceEditor
81-
data-test="allowed_query_editor"
81+
data-test="allowed_operation_editor"
8282
mode="graphql"
8383
theme="github"
84-
name="allowed_query_editor"
84+
name="allowed_operation_editor"
8585
value={modifiedQuery.query}
8686
minLines={8}
8787
maxLines={100}
@@ -113,7 +113,7 @@ class AllowedQueriesList extends React.Component {
113113
};
114114

115115
const onDelete = () => {
116-
const confirmMessage = `This will delete the query "${queryName}" from the allow-list`;
116+
const confirmMessage = `This will delete the operation "${queryName}" from the allow-list`;
117117
const isOk = getConfirmation(confirmMessage);
118118
if (isOk) {
119119
const isLastQuery = allowedQueries.length === 1;
@@ -127,7 +127,7 @@ class AllowedQueriesList extends React.Component {
127127
<ExpandableEditor
128128
editorExpanded={queryEditorExpanded}
129129
property={`query-${i}`}
130-
service="modify-allowed-query"
130+
service="modify-allowed-operation"
131131
saveFunc={onSubmit}
132132
removeFunc={onDelete}
133133
collapsedClass={styles.display_flex}
@@ -144,7 +144,7 @@ class AllowedQueriesList extends React.Component {
144144
const getDeleteAllBtn = () => {
145145
const handleDeleteAll = () => {
146146
const confirmMessage =
147-
'This will delete all queries from the allow-list';
147+
'This will delete all operations from the allow-list';
148148
const isOk = getConfirmation(confirmMessage, true);
149149
if (isOk) {
150150
dispatch(deleteAllowList());
@@ -165,7 +165,7 @@ class AllowedQueriesList extends React.Component {
165165
return (
166166
<div>
167167
<h4 className={styles.subheading_text}>
168-
Allowed Queries
168+
Allow List
169169
<span className={styles.add_mar_left}>{getDeleteAllBtn()}</span>
170170
</h4>
171171

console/src/components/Services/Settings/AllowedQueries/AllowedQueriesNotes.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ class AllowedQueriesNotes extends React.Component {
88
<div>
99
If GraphQL Engine is started with the{' '}
1010
<code>HASURA_GRAPHQL_ENABLE_ALLOWLIST</code> env var or the{' '}
11-
<code>--enable-allowlist</code> flag set to <i>true</i>, only queries
12-
added to the allow-list will be allowed to be executed.&nbsp;
11+
<code>--enable-allowlist</code> flag set to <i>true</i>, only
12+
operations added to the allow-list will be allowed to be
13+
executed.&nbsp;
1314
<a
1415
href="https://hasura.io/docs/1.0/graphql/manual/deployment/allow-list.html"
1516
target="_blank"
@@ -25,7 +26,7 @@ class AllowedQueriesNotes extends React.Component {
2526
className={styles.ul_left_small + ' ' + styles.add_mar_top_small}
2627
>
2728
<li>
28-
All allowed queries need to have a unique name for reference
29+
All allowed operations need to have a unique name for reference
2930
</li>
3031
</ul>
3132
</div>

console/src/components/Services/Settings/AllowedQueries/utils.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export const parseQueryString = queryString => {
5050
try {
5151
parsedQueryString = parse(queryString);
5252
} catch (ex) {
53-
throw new Error('Parsing query failed');
53+
throw new Error('Parsing operation failed');
5454
}
5555

5656
const queryDefs = parsedQueryString.definitions.filter(
@@ -63,7 +63,7 @@ export const parseQueryString = queryString => {
6363

6464
queryDefs.forEach(queryDef => {
6565
if (!queryDef.name) {
66-
throw new Error(`Query without name found: ${print(queryDef)}`);
66+
throw new Error(`Operation without name found: ${print(queryDef)}`);
6767
}
6868

6969
const query = {
@@ -80,7 +80,7 @@ export const parseQueryString = queryString => {
8080
);
8181
if (duplicateNames.length > 0) {
8282
throw new Error(
83-
`Queries with duplicate names found: ${duplicateNames.join(', ')}`
83+
`Operations with duplicate names found: ${duplicateNames.join(', ')}`
8484
);
8585
}
8686

console/src/components/Services/Settings/Sidebar.tsx

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,7 @@ type SidebarProps = {
1818
metadata: Metadata;
1919
};
2020

21-
type SectionDataKey =
22-
| 'actions'
23-
| 'status'
24-
| 'allowed-queries'
25-
| 'logout'
26-
| 'about';
21+
type SectionDataKey = 'actions' | 'status' | 'allow-list' | 'logout' | 'about';
2722

2823
interface SectionData {
2924
key: SectionDataKey;
@@ -58,10 +53,10 @@ const Sidebar: React.FC<SidebarProps> = ({ location, metadata }) => {
5853
});
5954

6055
sectionsData.push({
61-
key: 'allowed-queries',
62-
link: '/settings/allowed-queries',
63-
dataTestVal: 'allowed-queries-link',
64-
title: 'Allowed Queries',
56+
key: 'allow-list',
57+
link: '/settings/allow-list',
58+
dataTestVal: 'allow-list-link',
59+
title: 'Allow List',
6560
});
6661

6762
const adminSecret = getAdminSecret();

console/src/routes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ const routes = store => {
135135
component={metadataStatusConnector(connect)}
136136
/>
137137
<Route
138-
path="allowed-queries"
138+
path="allow-list"
139139
component={allowedQueriesConnector(connect)}
140140
/>
141141
<Route path="logout" component={logoutConnector(connect)} />

docs/_static/graphiql/graphiql.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1993,7 +1993,7 @@ var GraphiQL = exports.GraphiQL = function (_React$Component) {
19931993
className: 'variable-editor-title',
19941994
style: { cursor: variableOpen ? 'row-resize' : 'n-resize' },
19951995
onMouseDown: this.handleVariableResizeStart },
1996-
'Query Variables'
1996+
'Variables'
19971997
),
19981998
_react2.default.createElement(_VariableEditor.VariableEditor, {
19991999
ref: function ref(n) {
@@ -46452,4 +46452,4 @@ function hasOwnProperty(obj, prop) {
4645246452

4645346453
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
4645446454
},{"./support/isBuffer":243,"_process":229,"inherits":242}]},{},[22])(22)
46455-
});
46455+
});

docs/_static/graphiql/graphiql.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)