chore: more 'datasource' -> 'dataset' renaming (#11055)
* chore: more 'datasource' -> 'dataset' renaming * fix build * explicitely setting disabled to false to avoid cypress confusion * fix tests * RAT
This commit is contained in:
parent
6f619829d2
commit
3d7b805755
|
|
@ -1,5 +1,6 @@
|
||||||
# Note: these patterns are applied to single files or directories, not full paths
|
# Note: these patterns are applied to single files or directories, not full paths
|
||||||
.gitignore
|
.gitignore
|
||||||
|
docs/README.md
|
||||||
.gitattributes
|
.gitattributes
|
||||||
.gitkeep
|
.gitkeep
|
||||||
.coverage
|
.coverage
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ import { FORM_DATA_DEFAULTS, NUM_METRIC } from './visualizations/shared.helper';
|
||||||
describe('Datasource control', () => {
|
describe('Datasource control', () => {
|
||||||
const newMetricName = `abc${Date.now()}`;
|
const newMetricName = `abc${Date.now()}`;
|
||||||
|
|
||||||
it('should allow edit datasource', () => {
|
it('should allow edit dataset', () => {
|
||||||
let numScripts = 0;
|
let numScripts = 0;
|
||||||
|
|
||||||
cy.login();
|
cy.login();
|
||||||
|
|
@ -40,7 +40,7 @@ describe('Datasource control', () => {
|
||||||
numScripts = nodes.length;
|
numScripts = nodes.length;
|
||||||
});
|
});
|
||||||
|
|
||||||
cy.get('a').contains('Edit Datasource').click();
|
cy.get('a').contains('Edit Dataset').click();
|
||||||
|
|
||||||
// should load additional scripts for the modal
|
// should load additional scripts for the modal
|
||||||
cy.get('script').then(nodes => {
|
cy.get('script').then(nodes => {
|
||||||
|
|
@ -64,7 +64,7 @@ describe('Datasource control', () => {
|
||||||
.type(newMetricName, { force: true });
|
.type(newMetricName, { force: true });
|
||||||
// delete metric
|
// delete metric
|
||||||
cy.get('#datasource_menu').click();
|
cy.get('#datasource_menu').click();
|
||||||
cy.get('a').contains('Edit Datasource').click();
|
cy.get('a').contains('Edit Dataset').click();
|
||||||
cy.get('a[role="tab"]').contains('Metrics').click();
|
cy.get('a[role="tab"]').contains('Metrics').click();
|
||||||
cy.get(`input[value="${newMetricName}"]`)
|
cy.get(`input[value="${newMetricName}"]`)
|
||||||
.closest('tr')
|
.closest('tr')
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ export default class AddSliceContainer extends React.PureComponent<
|
||||||
</Panel.Heading>
|
</Panel.Heading>
|
||||||
<Panel.Body>
|
<Panel.Body>
|
||||||
<div>
|
<div>
|
||||||
<p>{t('Choose a datasource')}</p>
|
<p>{t('Choose a dataset')}</p>
|
||||||
<div style={styleSelectContainer}>
|
<div style={styleSelectContainer}>
|
||||||
<Select
|
<Select
|
||||||
clearable={false}
|
clearable={false}
|
||||||
|
|
@ -116,7 +116,7 @@ export default class AddSliceContainer extends React.PureComponent<
|
||||||
</div>
|
</div>
|
||||||
<span className="text-muted">
|
<span className="text-muted">
|
||||||
{t(
|
{t(
|
||||||
'If the datasource you are looking for is not available in the list, follow the instructions on how to add it in the Superset tutorial.',
|
'If the dataset you are looking for is not available in the list, follow the instructions on how to add it in the Superset tutorial.',
|
||||||
)}{' '}
|
)}{' '}
|
||||||
<a
|
<a
|
||||||
href="https://superset.apache.org/docs/creating-charts-dashboards/first-dashboard#adding-a-new-table"
|
href="https://superset.apache.org/docs/creating-charts-dashboards/first-dashboard#adding-a-new-table"
|
||||||
|
|
|
||||||
|
|
@ -237,6 +237,7 @@ export default function Button(props: ButtonProps) {
|
||||||
const buttonProps = {
|
const buttonProps = {
|
||||||
...props,
|
...props,
|
||||||
bsSize: props.buttonSize,
|
bsSize: props.buttonSize,
|
||||||
|
disabled: props.disabled || false,
|
||||||
placement: props.placement || 'top',
|
placement: props.placement || 'top',
|
||||||
};
|
};
|
||||||
const { tooltip, placement, dropdownItems } = props;
|
const { tooltip, placement, dropdownItems } = props;
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ const KEYS_TO_FILTERS = ['slice_name', 'viz_type', 'datasource_name'];
|
||||||
const KEYS_TO_SORT = [
|
const KEYS_TO_SORT = [
|
||||||
{ key: 'slice_name', label: 'Name' },
|
{ key: 'slice_name', label: 'Name' },
|
||||||
{ key: 'viz_type', label: 'Vis type' },
|
{ key: 'viz_type', label: 'Vis type' },
|
||||||
{ key: 'datasource_name', label: 'Datasource' },
|
{ key: 'datasource_name', label: 'Dataset' },
|
||||||
{ key: 'changed_on', label: 'Recent' },
|
{ key: 'changed_on', label: 'Recent' },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,8 @@ interface ChangeDatasourceModalProps {
|
||||||
const TABLE_COLUMNS = ['name', 'type', 'schema', 'connection', 'creator'];
|
const TABLE_COLUMNS = ['name', 'type', 'schema', 'connection', 'creator'];
|
||||||
const TABLE_FILTERABLE = ['rawName', 'type', 'schema', 'connection', 'creator'];
|
const TABLE_FILTERABLE = ['rawName', 'type', 'schema', 'connection', 'creator'];
|
||||||
const CHANGE_WARNING_MSG = t(
|
const CHANGE_WARNING_MSG = t(
|
||||||
'Changing the datasource may break the chart if the chart relies ' +
|
'Changing the dataset may break the chart if the chart relies ' +
|
||||||
'on columns or metadata that does not exist in the target datasource',
|
'on columns or metadata that does not exist in the target dataset',
|
||||||
);
|
);
|
||||||
|
|
||||||
const ChangeDatasourceModal: FunctionComponent<ChangeDatasourceModalProps> = ({
|
const ChangeDatasourceModal: FunctionComponent<ChangeDatasourceModalProps> = ({
|
||||||
|
|
@ -123,7 +123,7 @@ const ChangeDatasourceModal: FunctionComponent<ChangeDatasourceModalProps> = ({
|
||||||
return (
|
return (
|
||||||
<Modal show={show} onHide={onHide} onEnter={onEnterModal} bsSize="large">
|
<Modal show={show} onHide={onHide} onEnter={onEnterModal} bsSize="large">
|
||||||
<Modal.Header closeButton>
|
<Modal.Header closeButton>
|
||||||
<Modal.Title>{t('Select a datasource')}</Modal.Title>
|
<Modal.Title>{t('Select a dataset')}</Modal.Title>
|
||||||
</Modal.Header>
|
</Modal.Header>
|
||||||
<Modal.Body>
|
<Modal.Body>
|
||||||
<Alert bsStyle="warning">
|
<Alert bsStyle="warning">
|
||||||
|
|
|
||||||
|
|
@ -524,7 +524,7 @@ class DatasourceEditor extends React.PureComponent {
|
||||||
<Field
|
<Field
|
||||||
fieldKey="owners"
|
fieldKey="owners"
|
||||||
label={t('Owners')}
|
label={t('Owners')}
|
||||||
description={t('Owners of the datasource')}
|
description={t('Owners of the dataset')}
|
||||||
control={
|
control={
|
||||||
<SelectAsyncControl
|
<SelectAsyncControl
|
||||||
dataEndpoint="/users/api/read"
|
dataEndpoint="/users/api/read"
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ const DatasourceModal: FunctionComponent<DatasourceModalProps> = ({
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then(({ json }) => {
|
.then(({ json }) => {
|
||||||
addSuccessToast(t('The datasource has been saved'));
|
addSuccessToast(t('The dataset has been saved'));
|
||||||
onDatasourceSave(json);
|
onDatasourceSave(json);
|
||||||
onHide();
|
onHide();
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -221,7 +221,7 @@ function PropertiesModal({ slice, onHide, onSave }: InternalProps) {
|
||||||
/>
|
/>
|
||||||
<p className="help-block">
|
<p className="help-block">
|
||||||
{t(
|
{t(
|
||||||
'Duration (in seconds) of the caching timeout for this chart. Note this defaults to the datasource/table timeout if undefined.',
|
"Duration (in seconds) of the caching timeout for this chart. Note this defaults to the dataset's timeout if undefined.",
|
||||||
)}
|
)}
|
||||||
</p>
|
</p>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
|
|
|
||||||
|
|
@ -183,8 +183,8 @@ class DatasourceControl extends React.PureComponent {
|
||||||
<OverlayTrigger
|
<OverlayTrigger
|
||||||
placement="top"
|
placement="top"
|
||||||
overlay={
|
overlay={
|
||||||
<Tooltip id="toggle-datasource-tooltip">
|
<Tooltip id="toggle-dataset-tooltip">
|
||||||
{t('Expand/collapse datasource configuration')}
|
{t('Expand/collapse dataset configuration')}
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
|
@ -202,7 +202,7 @@ class DatasourceControl extends React.PureComponent {
|
||||||
</OverlayTrigger>
|
</OverlayTrigger>
|
||||||
<TooltipWrapper
|
<TooltipWrapper
|
||||||
label="change-datasource"
|
label="change-datasource"
|
||||||
tooltip={t('more dataset related options')}
|
tooltip={t('More dataset related options')}
|
||||||
trigger={['hover']}
|
trigger={['hover']}
|
||||||
>
|
>
|
||||||
<DropdownButton
|
<DropdownButton
|
||||||
|
|
@ -212,7 +212,7 @@ class DatasourceControl extends React.PureComponent {
|
||||||
id="datasource_menu"
|
id="datasource_menu"
|
||||||
>
|
>
|
||||||
<MenuItem eventKey="3" onClick={this.toggleChangeDatasourceModal}>
|
<MenuItem eventKey="3" onClick={this.toggleChangeDatasourceModal}>
|
||||||
{t('Change Datasource')}
|
{t('Change Dataset')}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
{datasource.type === 'table' && (
|
{datasource.type === 'table' && (
|
||||||
<MenuItem
|
<MenuItem
|
||||||
|
|
@ -226,7 +226,7 @@ class DatasourceControl extends React.PureComponent {
|
||||||
)}
|
)}
|
||||||
{this.props.isEditable && (
|
{this.props.isEditable && (
|
||||||
<MenuItem eventKey="3" onClick={this.toggleEditDatasourceModal}>
|
<MenuItem eventKey="3" onClick={this.toggleEditDatasourceModal}>
|
||||||
{t('Edit Datasource')}
|
{t('Edit Dataset')}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
)}
|
)}
|
||||||
</DropdownButton>
|
</DropdownButton>
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ export const druidTimeSeries = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const datasourceAndVizType = {
|
export const datasourceAndVizType = {
|
||||||
label: t('Datasource & Chart Type'),
|
label: t('Dataset & Chart Type'),
|
||||||
expanded: true,
|
expanded: true,
|
||||||
controlSetRows: [
|
controlSetRows: [
|
||||||
['datasource'],
|
['datasource'],
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ export default function Security({ user }: SecurityProps) {
|
||||||
{user.permissions.datasource_access && (
|
{user.permissions.datasource_access && (
|
||||||
<div>
|
<div>
|
||||||
<h4>
|
<h4>
|
||||||
{t('Datasources')}{' '}
|
{t('Datasets')}{' '}
|
||||||
<Badge>{user.permissions.datasource_access.length}</Badge>
|
<Badge>{user.permissions.datasource_access.length}</Badge>
|
||||||
</h4>
|
</h4>
|
||||||
{user.permissions.datasource_access.map(role => (
|
{user.permissions.datasource_access.map(role => (
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ export default function getClientErrorObject(
|
||||||
{
|
{
|
||||||
code: 1000,
|
code: 1000,
|
||||||
message: t(
|
message: t(
|
||||||
'Issue 1000 - The datasource is too large to query.',
|
'Issue 1000 - The dataset is too large to query.',
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -314,7 +314,7 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
|
||||||
>
|
>
|
||||||
<StyledInputContainer>
|
<StyledInputContainer>
|
||||||
<div className="label">
|
<div className="label">
|
||||||
{t('Datasource Name')}
|
{t('Database Name')}
|
||||||
<span className="required">*</span>
|
<span className="required">*</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="input-container">
|
<div className="input-container">
|
||||||
|
|
@ -322,7 +322,7 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
|
||||||
type="text"
|
type="text"
|
||||||
name="database_name"
|
name="database_name"
|
||||||
value={db ? db.database_name : ''}
|
value={db ? db.database_name : ''}
|
||||||
placeholder={t('Name your datasource')}
|
placeholder={t('Name your dataset')}
|
||||||
onChange={onInputChange}
|
onChange={onInputChange}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -351,10 +351,7 @@ const DatasetList: FunctionComponent<DatasetListProps> = ({
|
||||||
'dataset',
|
'dataset',
|
||||||
'database',
|
'database',
|
||||||
createErrorHandler(errMsg =>
|
createErrorHandler(errMsg =>
|
||||||
t(
|
t('An error occurred while fetching datasets: %s', errMsg),
|
||||||
'An error occurred while fetching dataset datasource values: %s',
|
|
||||||
errMsg,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
paginate: true,
|
paginate: true,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue