File tree Expand file tree Collapse file tree 7 files changed +50
-25
lines changed
openblocks-design/src/components Expand file tree Collapse file tree 7 files changed +50
-25
lines changed Original file line number Diff line number Diff line change @@ -299,6 +299,7 @@ const SelectWrapper = styled.div`
299
299
300
300
.ant-select .ant-select-selector {
301
301
padding: 0 0 0 8px;
302
+ margin: 0;
302
303
}
303
304
304
305
.ant-select:not(.ant-select-customize-input) .ant-select-selector {
Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ function Option<T extends ConstructorToComp<MultiCompConstructor>>(props: {
195
195
onCopy ?: ( comp : T ) => void ;
196
196
onMove : ( fromIndex : number , toIndex : number ) => void ;
197
197
content : ( comp : T , index : number ) => React . ReactNode | JSX . Element ;
198
- itemTitle : ( comp : T ) => string ;
198
+ itemTitle : ( comp : T ) => JSX . Element | string ;
199
199
popoverTitle : ( comp : T ) => string ;
200
200
dataIndex : ( comp : T ) => string ;
201
201
// unique value for deduplication
Original file line number Diff line number Diff line change @@ -346,7 +346,13 @@ function ColumnPropertyView<T extends MultiBaseComp<TableChildrenType>>(props: {
346
346
} }
347
347
items = { columnOptionItems }
348
348
optionToolbar = { columnOptionToolbar }
349
- itemTitle = { ( column ) => column . getView ( ) . title }
349
+ itemTitle = { ( column ) => {
350
+ const columnView = column . getView ( ) ;
351
+ if ( columnView . hide ) {
352
+ return < span style = { { color : GreyTextColor } } > { columnView . title } </ span > ;
353
+ }
354
+ return columnView . title ;
355
+ } }
350
356
popoverTitle = { ( column ) => {
351
357
const columnView = column . getView ( ) ;
352
358
return columnView . isCustom ? trans ( "table.customColumn" ) : columnView . dataIndex ;
Original file line number Diff line number Diff line change @@ -5,18 +5,24 @@ import styled from "styled-components";
5
5
6
6
const ErrorMsg = styled . div `
7
7
padding: 8px;
8
+ height: 100%;
9
+ display: flex;
10
+ align-items: center;
11
+ justify-content: center;
8
12
` ;
9
13
10
14
const ErrorView = ( props : { msg : string ; onReload : ( ) => void } ) => {
11
15
return (
12
16
< ErrorMsg >
13
- { trans ( "errorBoundary.encounterError" ) }
14
- < a type = "button" onClick = { props . onReload } >
15
- { trans ( "errorBoundary.clickToReload" ) }
16
- </ a >
17
- < br />
18
- { trans ( "errorBoundary.errorMsg" ) }
19
- { props . msg }
17
+ < div >
18
+ { trans ( "errorBoundary.encounterError" ) }
19
+ < a type = "button" onClick = { props . onReload } >
20
+ { trans ( "errorBoundary.clickToReload" ) }
21
+ </ a >
22
+ < br />
23
+ { trans ( "errorBoundary.errorMsg" ) }
24
+ { props . msg }
25
+ </ div >
20
26
</ ErrorMsg >
21
27
) ;
22
28
} ;
Original file line number Diff line number Diff line change @@ -212,3 +212,27 @@ export const CertValidationFormItem = (props: { datasource: Datasource }) => {
212
212
</ >
213
213
) ;
214
214
} ;
215
+
216
+ export const ForwardCookiesFormItem = ( props : { datasource : Datasource } ) => {
217
+ const datasourceConfig = props . datasource ?. datasourceConfig as HttpConfig ;
218
+
219
+ return (
220
+ < >
221
+ < FormSelectItem
222
+ open = { false }
223
+ mode = { "tags" }
224
+ name = { "forwardCookies" }
225
+ label = { trans ( "httpQuery.forwardCookies" ) }
226
+ options = { [ ] }
227
+ initialValue = { datasourceConfig ?. forwardCookies }
228
+ labelWidth = { 142 }
229
+ />
230
+ < FormCheckboxItem
231
+ name = { "forwardAllCookies" }
232
+ label = { trans ( "httpQuery.forwardAllCookies" ) }
233
+ initialValue = { datasourceConfig ?. forwardAllCookies }
234
+ labelWidth = { 142 }
235
+ />
236
+ </ >
237
+ ) ;
238
+ } ;
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import {
16
16
CertValidationFormItem ,
17
17
DatasourceNameFormInputItem ,
18
18
encryptedPlaceholder ,
19
+ ForwardCookiesFormItem ,
19
20
GeneralSettingFormSectionLabel ,
20
21
} from "../form" ;
21
22
import { DatasourceFormProps } from "./datasourceFormRegistry" ;
@@ -143,6 +144,7 @@ export const GraphqlDatasourceForm = (props: DatasourceFormProps) => {
143
144
< FormSection size = { props . size } >
144
145
< AdvancedSettingFormSectionLabel />
145
146
< CertValidationFormItem datasource = { props . datasource } />
147
+ < ForwardCookiesFormItem datasource = { props . datasource } />
146
148
</ FormSection >
147
149
</ DatasourceForm >
148
150
) ;
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import { Rule } from "antd/lib/form";
2
2
import { HttpConfig } from "api/datasourceApi" ;
3
3
import {
4
4
DatasourceForm ,
5
- FormCheckboxItem ,
6
5
FormInputItem ,
7
6
FormKeyValueItem ,
8
7
FormSection ,
@@ -17,6 +16,7 @@ import {
17
16
CertValidationFormItem ,
18
17
DatasourceNameFormInputItem ,
19
18
encryptedPlaceholder ,
19
+ ForwardCookiesFormItem ,
20
20
GeneralSettingFormSectionLabel ,
21
21
} from "../form" ;
22
22
import { DatasourceFormProps } from "./datasourceFormRegistry" ;
@@ -155,21 +155,7 @@ export const HttpDatasourceForm = (props: DatasourceFormProps) => {
155
155
< FormSection size = { props . size } >
156
156
< AdvancedSettingFormSectionLabel />
157
157
< CertValidationFormItem datasource = { props . datasource } />
158
- < FormSelectItem
159
- open = { false }
160
- mode = { "tags" }
161
- name = { "forwardCookies" }
162
- label = { trans ( "httpQuery.forwardCookies" ) }
163
- options = { [ ] }
164
- initialValue = { datasourceConfig ?. forwardCookies }
165
- labelWidth = { 142 }
166
- />
167
- < FormCheckboxItem
168
- name = { "forwardAllCookies" }
169
- label = { trans ( "httpQuery.forwardAllCookies" ) }
170
- initialValue = { datasourceConfig ?. forwardAllCookies }
171
- labelWidth = { 142 }
172
- />
158
+ < ForwardCookiesFormItem datasource = { props . datasource } />
173
159
</ FormSection >
174
160
175
161
{ /*<KeyValueFormItem label={"Extra body values"} />*/ }
You can’t perform that action at this time.
0 commit comments