这是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
21 changes: 19 additions & 2 deletions console/src/components/Services/Data/DataActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const fetchSchemaList = () => (dispatch, getState) => {
schema: 'information_schema',
},
columns: ['schema_name'],
order_by: [{ column: 'schema_name', type: 'asc', nulls: 'last' }],
where: {
schema_name: {
$nin: [
Expand Down Expand Up @@ -85,8 +86,16 @@ const loadSchema = () => (dispatch, getState) => {
name: 'hdb_table',
schema: 'hdb_catalog',
},
columns: ['*.*'],
columns: [
'*.*',
{
name: 'columns',
columns: ['*.*'],
order_by: [{ column: 'column_name', type: 'asc', nulls: 'last' }],
},
],
where: { table_schema: currentSchema },
order_by: [{ column: 'table_name', type: 'asc', nulls: 'last' }],
},
}),
};
Expand Down Expand Up @@ -319,8 +328,16 @@ const fetchTableListBySchema = schemaName => (dispatch, getState) => {
name: 'hdb_table',
schema: 'hdb_catalog',
},
columns: ['*.*'],
columns: [
'*.*',
{
name: 'columns',
columns: ['*.*'],
order_by: [{ column: 'column_name', type: 'asc', nulls: 'last' }],
},
],
where: { table_schema: schemaName },
order_by: [{ column: 'table_name', type: 'asc', nulls: 'last' }],
},
}),
};
Expand Down
9 changes: 8 additions & 1 deletion console/src/components/Services/Data/RawSQL/RawSQL.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ const RawSQL = ({
));
const rows = result.map((row, i) => (
<tr key={i}>
{row.map((columnValue, j) => <td key={j}>{columnValue}</td>)}
{row.map((columnValue, j) => (
<td key={j}>{columnValue}</td>
))}
</tr>
));
return !resultType || resultType === 'command' ? null : (
Expand Down Expand Up @@ -163,6 +165,11 @@ const RawSQL = ({
</Link>{' '}
functionality.
</li>
<li>
Please note that if the migrations are enabled,
<code>down</code>
migrations will not be generated for SQL statements.
</li>
</ul>
</div>
<hr />
Expand Down
6 changes: 6 additions & 0 deletions console/src/components/Services/Data/TableCommon/Table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
padding: 0;
}

.migration_disclaimer {
font-size: 12px;
margin-left: 10px;
margin-top: 10px;
color: rgb(236, 61, 61);
}
.tableContainer {
overflow: auto;
//margin-top: 25px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
relManualAddClicked,
relTypeChange,
addRelViewMigrate,
REL_SET_MANUAL_COLUMNS,
} from './Actions';
import {
fetchTableListBySchema,
Expand Down Expand Up @@ -47,6 +48,10 @@ class AddManualRelationship extends Component {
type: UPDATE_REMOTE_SCHEMA_MANUAL_REL,
data: e.target.value,
});
this.props.dispatch({
type: REL_SET_MANUAL_COLUMNS,
data: [],
});
this.props.dispatch(fetchTableListBySchema(e.target.value));
}
onRelNameChange(e) {
Expand Down