Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Euify management edit-index-pattern component. #47448

Closed
wants to merge 10 commits into from

Conversation

sainthkh
Copy link
Contributor

@sainthkh sainthkh commented Oct 7, 2019

Summary

Partially solves #47022.

Migrated Kui and Angular component to Eui and React.

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

@elasticmachine
Copy link
Contributor

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

1 similar comment
@elasticmachine
Copy link
Contributor

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

Comment on lines +27 to +29
setDefault: any;
refreshFields: any;
removePattern: any;
Copy link
Contributor Author

@sainthkh sainthkh Oct 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are angular functions and should be re-written later. So, they should be left as any.

indexPattern and conflictedFields in other components are any type for the same reason.

These any types will be fixed in later PRs.

Comment on lines +32 to +50
<FormattedMessage
id="kbn.management.editIndexPattern.timeFilterLabel.timeFilterDetail"
defaultMessage="This page lists every field in the {indexPatternTitle} index and the field's associated core type as recorded by Elasticsearch. To change a field type, use the Elasticsearch {apiLink}."
values={{
indexPatternTitle: <strong>{indexPattern.title}</strong>,
apiLink: (
<EuiLink
target="_blank"
href="http://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html"
>
<FormattedMessage
id="kbn.management.editIndexPattern.timeFilterLabel.mappingAPILink"
defaultMessage="Mapping API"
/>
<EuiIcon type="link" />
</EuiLink>
),
}}
/>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made it "link to the mapping api" to be a value instead of a separate component. It's because in some languages like Korean and Japanese, link cannot be placed at the end of the explanation text.

I've fixed the language files in the below.

Comment on lines +196 to +198
const text = await testSubjects.getVisibleText('tab-indexedFields');
const index = text.indexOf('(');
return text.substring(index).replace(/\((.*)\)/, '$1');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In EuiTabbedComponent, tab name cannot contain HTML elements. So, tab-count had to be changed to simple tab and we needed to create a substring from the tab name.

@@ -230,13 +232,13 @@ export function SettingsPageProvider({ getService, getPageObjects }) {

async setFieldTypeFilter(type) {
await find.clickByCssSelector(
'select[data-test-subj="indexedFieldTypeFilterDropdown"] > option[label="' + type + '"]'
'select[data-test-subj="indexedFieldTypeFilterDropdown"] > option[value="' + type + '"]'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In EuiSelect, label doesn't exist. So, it is changed to value.

@sainthkh sainthkh marked this pull request as ready for review October 8, 2019 03:54
@sainthkh
Copy link
Contributor Author

sainthkh commented Nov 4, 2019

When you (Kibana team) are ready to handle this, please leave me a comment. I'll come back to handle the conflicts and bugs.

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch (Team:AppArch)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants