这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions console/src/components/Services/EventTrigger/Add/AddTrigger.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,9 @@ class AddTrigger extends Component {
return (
<div
key={i}
className={styles.display_inline + ' ' + styles.add_mar_right}
className={styles.noPadd + ' col-md-4'}
>
<div className="checkbox">
<div className={'checkbox '}>
<label>
{inputHtml}
{column}
Expand All @@ -295,7 +295,7 @@ class AddTrigger extends Component {
</OverlayTrigger>{' '}
</h4>
{selectedOperations.update ? (
<div>{getColumnList('update')}</div>
<div className={styles.clearBoth + ' ' + styles.listenColumnWrapper}> {getColumnList('update')} </div>
) : (
<div>
<div
Expand Down Expand Up @@ -671,12 +671,12 @@ class AddTrigger extends Component {
' ' +
styles.add_mar_bottom +
' ' +
styles.add_mar_top
styles.add_mar_top + ' ' + styles.wd100
}
>
{tableName ? advancedColumnSection : null}
<div
className={styles.add_mar_bottom + ' ' + styles.add_mar_top}
className={styles.add_mar_bottom + ' ' + styles.add_mar_top + ' ' + styles.wd100}
>
<h4 className={styles.subheading_text}>Retry Logic</h4>
<div
Expand Down Expand Up @@ -725,7 +725,7 @@ class AddTrigger extends Component {
</div>
</div>
<div
className={styles.add_mar_bottom + ' ' + styles.add_mar_top}
className={styles.add_mar_bottom + ' ' + styles.add_mar_top + ' ' + styles.wd100}
>
<h4 className={styles.subheading_text}>Headers</h4>
{heads}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ modifyHeadersCollapsedHeadings {
flex-direction: row;
align-items: center;
flex: 1;
margin: 5px 0;
margin: 10px 0;
input
{
margin-top: 0;
Expand Down Expand Up @@ -295,9 +295,13 @@ modifyHeadersCollapsedHeadings {
}

.tooltipIcon{
padding-left: 5px;
padding-left: 5px;
}

.cursorPointer {
cursor: pointer;
}
}

.addPaddSmall {
padding-left: 5px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,12 @@ class OperationEditor extends React.Component {
type="checkbox"
className={styles.opsCheckboxDisabled}
checked={Boolean(
definition.update.columns.find(c => c === col)
definition.update.columns.find(c => c === col.name)
)}
disabled
/>
{col}
{col.name}
<small className={styles.addPaddSmall}> ({col.type})</small>
</div>
))
) : (
Expand Down Expand Up @@ -147,11 +148,12 @@ class OperationEditor extends React.Component {
}`}
checked={Boolean(
modifyTrigger.definition.update.columns.find(
c => c === col
c => c === col.name
)
)}
/>
{col}
{col.name}
<small className={styles.addPaddSmall}> ({col.type})</small>
</div>
))
) : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,25 @@
width: 40%;
}
}

.clearBoth
{
clear: both;
}
.wd100
{
width: 100%;
float: left;
clear: both;
}
.noPadd
{
padding-left: 0;
padding-right: 0;
}
.listenColumnWrapper
{
max-width: 700px;
}
.aceBlock {
max-height: 300px;
position: relative;
Expand Down
9 changes: 6 additions & 3 deletions console/src/components/Services/EventTrigger/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,12 @@ const escapeRegExp = string => {
return string.replace(/([.*+?^${}()|[\]\\])/g, '\\$1');
};

const getTableColumns = (tableSchema) => {
const getTableColumns = tableSchema => {
if (tableSchema) {
return tableSchema.columns.map(colObj => colObj.column_name);
return tableSchema.columns.map(colObj => ({
name: colObj.column_name,
type: colObj.udt_name,
}));
}
return [];
};
Expand All @@ -136,5 +139,5 @@ export {
getEdForm,
getIngForm,
escapeRegExp,
getTableColumns
getTableColumns,
};