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`
299299
300300 .ant-select .ant-select-selector {
301301 padding: 0 0 0 8px;
302+ margin: 0;
302303 }
303304
304305 .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: {
195195 onCopy ?: ( comp : T ) => void ;
196196 onMove : ( fromIndex : number , toIndex : number ) => void ;
197197 content : ( comp : T , index : number ) => React . ReactNode | JSX . Element ;
198- itemTitle : ( comp : T ) => string ;
198+ itemTitle : ( comp : T ) => JSX . Element | string ;
199199 popoverTitle : ( comp : T ) => string ;
200200 dataIndex : ( comp : T ) => string ;
201201 // 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: {
346346 } }
347347 items = { columnOptionItems }
348348 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+ } }
350356 popoverTitle = { ( column ) => {
351357 const columnView = column . getView ( ) ;
352358 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";
55
66const ErrorMsg = styled . div `
77 padding: 8px;
8+ height: 100%;
9+ display: flex;
10+ align-items: center;
11+ justify-content: center;
812` ;
913
1014const ErrorView = ( props : { msg : string ; onReload : ( ) => void } ) => {
1115 return (
1216 < 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 >
2026 </ ErrorMsg >
2127 ) ;
2228} ;
Original file line number Diff line number Diff line change @@ -212,3 +212,27 @@ export const CertValidationFormItem = (props: { datasource: Datasource }) => {
212212 </ >
213213 ) ;
214214} ;
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 {
1616 CertValidationFormItem ,
1717 DatasourceNameFormInputItem ,
1818 encryptedPlaceholder ,
19+ ForwardCookiesFormItem ,
1920 GeneralSettingFormSectionLabel ,
2021} from "../form" ;
2122import { DatasourceFormProps } from "./datasourceFormRegistry" ;
@@ -143,6 +144,7 @@ export const GraphqlDatasourceForm = (props: DatasourceFormProps) => {
143144 < FormSection size = { props . size } >
144145 < AdvancedSettingFormSectionLabel />
145146 < CertValidationFormItem datasource = { props . datasource } />
147+ < ForwardCookiesFormItem datasource = { props . datasource } />
146148 </ FormSection >
147149 </ DatasourceForm >
148150 ) ;
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import { Rule } from "antd/lib/form";
22import { HttpConfig } from "api/datasourceApi" ;
33import {
44 DatasourceForm ,
5- FormCheckboxItem ,
65 FormInputItem ,
76 FormKeyValueItem ,
87 FormSection ,
@@ -17,6 +16,7 @@ import {
1716 CertValidationFormItem ,
1817 DatasourceNameFormInputItem ,
1918 encryptedPlaceholder ,
19+ ForwardCookiesFormItem ,
2020 GeneralSettingFormSectionLabel ,
2121} from "../form" ;
2222import { DatasourceFormProps } from "./datasourceFormRegistry" ;
@@ -155,21 +155,7 @@ export const HttpDatasourceForm = (props: DatasourceFormProps) => {
155155 < FormSection size = { props . size } >
156156 < AdvancedSettingFormSectionLabel />
157157 < 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 } />
173159 </ FormSection >
174160
175161 { /*<KeyValueFormItem label={"Extra body values"} />*/ }
You can’t perform that action at this time.
0 commit comments