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
|
||||
.gitignore
|
||||
docs/README.md
|
||||
.gitattributes
|
||||
.gitkeep
|
||||
.coverage
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import { FORM_DATA_DEFAULTS, NUM_METRIC } from './visualizations/shared.helper';
|
|||
describe('Datasource control', () => {
|
||||
const newMetricName = `abc${Date.now()}`;
|
||||
|
||||
it('should allow edit datasource', () => {
|
||||
it('should allow edit dataset', () => {
|
||||
let numScripts = 0;
|
||||
|
||||
cy.login();
|
||||
|
|
@ -40,7 +40,7 @@ describe('Datasource control', () => {
|
|||
numScripts = nodes.length;
|
||||
});
|
||||
|
||||
cy.get('a').contains('Edit Datasource').click();
|
||||
cy.get('a').contains('Edit Dataset').click();
|
||||
|
||||
// should load additional scripts for the modal
|
||||
cy.get('script').then(nodes => {
|
||||
|
|
@ -64,7 +64,7 @@ describe('Datasource control', () => {
|
|||
.type(newMetricName, { force: true });
|
||||
// delete metric
|
||||
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(`input[value="${newMetricName}"]`)
|
||||
.closest('tr')
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ export default class AddSliceContainer extends React.PureComponent<
|
|||
</Panel.Heading>
|
||||
<Panel.Body>
|
||||
<div>
|
||||
<p>{t('Choose a datasource')}</p>
|
||||
<p>{t('Choose a dataset')}</p>
|
||||
<div style={styleSelectContainer}>
|
||||
<Select
|
||||
clearable={false}
|
||||
|
|
@ -116,7 +116,7 @@ export default class AddSliceContainer extends React.PureComponent<
|
|||
</div>
|
||||
<span className="text-muted">
|
||||
{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
|
||||
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 = {
|
||||
...props,
|
||||
bsSize: props.buttonSize,
|
||||
disabled: props.disabled || false,
|
||||
placement: props.placement || 'top',
|
||||
};
|
||||
const { tooltip, placement, dropdownItems } = props;
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ const KEYS_TO_FILTERS = ['slice_name', 'viz_type', 'datasource_name'];
|
|||
const KEYS_TO_SORT = [
|
||||
{ key: 'slice_name', label: 'Name' },
|
||||
{ key: 'viz_type', label: 'Vis type' },
|
||||
{ key: 'datasource_name', label: 'Datasource' },
|
||||
{ key: 'datasource_name', label: 'Dataset' },
|
||||
{ key: 'changed_on', label: 'Recent' },
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ interface ChangeDatasourceModalProps {
|
|||
const TABLE_COLUMNS = ['name', 'type', 'schema', 'connection', 'creator'];
|
||||
const TABLE_FILTERABLE = ['rawName', 'type', 'schema', 'connection', 'creator'];
|
||||
const CHANGE_WARNING_MSG = t(
|
||||
'Changing the datasource may break the chart if the chart relies ' +
|
||||
'on columns or metadata that does not exist in the target datasource',
|
||||
'Changing the dataset may break the chart if the chart relies ' +
|
||||
'on columns or metadata that does not exist in the target dataset',
|
||||
);
|
||||
|
||||
const ChangeDatasourceModal: FunctionComponent<ChangeDatasourceModalProps> = ({
|
||||
|
|
@ -123,7 +123,7 @@ const ChangeDatasourceModal: FunctionComponent<ChangeDatasourceModalProps> = ({
|
|||
return (
|
||||
<Modal show={show} onHide={onHide} onEnter={onEnterModal} bsSize="large">
|
||||
<Modal.Header closeButton>
|
||||
<Modal.Title>{t('Select a datasource')}</Modal.Title>
|
||||
<Modal.Title>{t('Select a dataset')}</Modal.Title>
|
||||
</Modal.Header>
|
||||
<Modal.Body>
|
||||
<Alert bsStyle="warning">
|
||||
|
|
|
|||
|
|
@ -524,7 +524,7 @@ class DatasourceEditor extends React.PureComponent {
|
|||
<Field
|
||||
fieldKey="owners"
|
||||
label={t('Owners')}
|
||||
description={t('Owners of the datasource')}
|
||||
description={t('Owners of the dataset')}
|
||||
control={
|
||||
<SelectAsyncControl
|
||||
dataEndpoint="/users/api/read"
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ const DatasourceModal: FunctionComponent<DatasourceModalProps> = ({
|
|||
},
|
||||
})
|
||||
.then(({ json }) => {
|
||||
addSuccessToast(t('The datasource has been saved'));
|
||||
addSuccessToast(t('The dataset has been saved'));
|
||||
onDatasourceSave(json);
|
||||
onHide();
|
||||
})
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ function PropertiesModal({ slice, onHide, onSave }: InternalProps) {
|
|||
/>
|
||||
<p className="help-block">
|
||||
{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>
|
||||
</FormGroup>
|
||||
|
|
|
|||
|
|
@ -183,8 +183,8 @@ class DatasourceControl extends React.PureComponent {
|
|||
<OverlayTrigger
|
||||
placement="top"
|
||||
overlay={
|
||||
<Tooltip id="toggle-datasource-tooltip">
|
||||
{t('Expand/collapse datasource configuration')}
|
||||
<Tooltip id="toggle-dataset-tooltip">
|
||||
{t('Expand/collapse dataset configuration')}
|
||||
</Tooltip>
|
||||
}
|
||||
>
|
||||
|
|
@ -202,7 +202,7 @@ class DatasourceControl extends React.PureComponent {
|
|||
</OverlayTrigger>
|
||||
<TooltipWrapper
|
||||
label="change-datasource"
|
||||
tooltip={t('more dataset related options')}
|
||||
tooltip={t('More dataset related options')}
|
||||
trigger={['hover']}
|
||||
>
|
||||
<DropdownButton
|
||||
|
|
@ -212,7 +212,7 @@ class DatasourceControl extends React.PureComponent {
|
|||
id="datasource_menu"
|
||||
>
|
||||
<MenuItem eventKey="3" onClick={this.toggleChangeDatasourceModal}>
|
||||
{t('Change Datasource')}
|
||||
{t('Change Dataset')}
|
||||
</MenuItem>
|
||||
{datasource.type === 'table' && (
|
||||
<MenuItem
|
||||
|
|
@ -226,7 +226,7 @@ class DatasourceControl extends React.PureComponent {
|
|||
)}
|
||||
{this.props.isEditable && (
|
||||
<MenuItem eventKey="3" onClick={this.toggleEditDatasourceModal}>
|
||||
{t('Edit Datasource')}
|
||||
{t('Edit Dataset')}
|
||||
</MenuItem>
|
||||
)}
|
||||
</DropdownButton>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ export const druidTimeSeries = {
|
|||
};
|
||||
|
||||
export const datasourceAndVizType = {
|
||||
label: t('Datasource & Chart Type'),
|
||||
label: t('Dataset & Chart Type'),
|
||||
expanded: true,
|
||||
controlSetRows: [
|
||||
['datasource'],
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ export default function Security({ user }: SecurityProps) {
|
|||
{user.permissions.datasource_access && (
|
||||
<div>
|
||||
<h4>
|
||||
{t('Datasources')}{' '}
|
||||
{t('Datasets')}{' '}
|
||||
<Badge>{user.permissions.datasource_access.length}</Badge>
|
||||
</h4>
|
||||
{user.permissions.datasource_access.map(role => (
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ export default function getClientErrorObject(
|
|||
{
|
||||
code: 1000,
|
||||
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>
|
||||
<div className="label">
|
||||
{t('Datasource Name')}
|
||||
{t('Database Name')}
|
||||
<span className="required">*</span>
|
||||
</div>
|
||||
<div className="input-container">
|
||||
|
|
@ -322,7 +322,7 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
|
|||
type="text"
|
||||
name="database_name"
|
||||
value={db ? db.database_name : ''}
|
||||
placeholder={t('Name your datasource')}
|
||||
placeholder={t('Name your dataset')}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -351,10 +351,7 @@ const DatasetList: FunctionComponent<DatasetListProps> = ({
|
|||
'dataset',
|
||||
'database',
|
||||
createErrorHandler(errMsg =>
|
||||
t(
|
||||
'An error occurred while fetching dataset datasource values: %s',
|
||||
errMsg,
|
||||
),
|
||||
t('An error occurred while fetching datasets: %s', errMsg),
|
||||
),
|
||||
),
|
||||
paginate: true,
|
||||
|
|
|
|||
Loading…
Reference in New Issue