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

Update new header for Alias, Index Templates, Policy Managed Indices, Indexes and Transform Jobs #1124

Merged
merged 10 commits into from
Aug 20, 2024

Conversation

tandonks
Copy link
Contributor

Description

New Header UI changes for Alias, Indexes, Templates, Transforms and Policy Managed Indexes for ISM dashboard pages

Issues Resolved

[List any issues this PR will resolve]

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Policy Managed Indexes (NewUI)
Screenshot 2024-08-17 at 1 26 47 AM
Screenshot 2024-08-17 at 1 27 23 AM

Policy Managed Indexes (OldUI)
Screenshot 2024-08-17 at 1 28 10 AM
image


Indexes (NewUI)
image
image
image

Indexes (OldUI)
image
image
image


Index Aliases (NewUI)
image

Index Aliases (OldUI)
image


Templates (NewUI)
image
image
image

Templates (OldUI)
image
image
image


Transforms (NewUI)
image
image
image
image

Transforms (OldUI)
image
image
image
image

<h1>Change policy</h1>
</EuiTitle>
const uiSettings = getUISettings();
const useUpdatedUX = uiSettings.get("home:useNewHomePage");
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this

@@ -192,12 +210,12 @@ export class ChangePolicy extends Component<ChangePolicyProps, ChangePolicyState

<EuiFlexGroup alignItems="center" justifyContent="flexEnd">
<EuiFlexItem grow={false}>
<EuiButtonEmpty onClick={this.onCancel} data-test-subj="changePolicyCancelButton">
<EuiButtonEmpty size={useUpdatedUX ? "s" : "l"} onClick={this.onCancel} data-test-subj="changePolicyCancelButton">
Copy link
Contributor

Choose a reason for hiding this comment

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

use undefined

@@ -45,7 +47,20 @@ export class CreateIndex extends Component<CreateIndexProps> {
render() {
const isEdit = this.isEdit;

return (
const uiSettings = getUISettings();
const useUpdatedUX = uiSettings.get("home:useNewHomePage");
Copy link
Contributor

Choose a reason for hiding this comment

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

remove this

const uiSettings = getUISettings();
const useUpdatedUX = uiSettings.get("home:useNewHomePage");

return !useUpdatedUX ? (
Copy link
Contributor

Choose a reason for hiding this comment

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

remove this

@@ -192,8 +196,79 @@ const TemplateDetail = (props: TemplateDetailProps, ref: Ref<FieldInstance>) =>
</EuiFlexItem>
);

return (
<>
const uiSettings = getUISettings();
Copy link
Contributor

Choose a reason for hiding this comment

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

Pass it as Props for TemplateDetails

<>
<HeaderControl controls={HeaderRight} setMountPoint={setAppRightControls} />
</>
) : null}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can be modified as. :

{isEdit ? (
            <HeaderControl controls={HeaderRight} setMountPoint={setAppRightControls} />
        ) : <HeaderControl controls={descriptionData} setMountPoint={setAppDescriptionControls} />}

const useUpdatedUX = uiSettings.get("home:useNewHomePage");

return useUpdatedUX ? (
<EuiFlexGroup style={{ padding: "0px 5px 16px 5px" }} alignItems="center">
Copy link
Contributor

Choose a reason for hiding this comment

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

confirm this padding

const uiSettings = getUISettings();
const useUpdatedUX = uiSettings.get("home:useNewHomePage");

const size = useUpdatedUX ? "s" : "m";
Copy link
Contributor

Choose a reason for hiding this comment

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

undefined

@tandonks tandonks force-pushed the newUIHeader branch 2 times, most recently from 0161288 to e05899f Compare August 19, 2024 07:55
Signed-off-by: Kshitij Tandon <tandonks@amazon.com>
Signed-off-by: Kshitij Tandon <tandonks@amazon.com>
Signed-off-by: Kshitij Tandon <tandonks@amazon.com>
Signed-off-by: Kshitij Tandon <tandonks@amazon.com>
Signed-off-by: Kshitij Tandon <tandonks@amazon.com>
cr: https://code.amazon.com/reviews/CR-143602949
Signed-off-by: Kshitij Tandon <tandonks@amazon.com>
Signed-off-by: Kshitij Tandon <tandonks@amazon.com>
Signed-off-by: Kshitij Tandon <tandonks@amazon.com>
Signed-off-by: Kshitij Tandon <tandonks@amazon.com>
Signed-off-by: Kshitij Tandon <tandonks@amazon.com>
<EuiFlexGroup justifyContent="spaceBetween" alignItems="center">
{actions.map(({ text, buttonProps = {}, flexItemProps = {}, modal = null, children }, index) => {
let button = children ? (
children
) : (
<EuiButton {...buttonProps} data-test-subj={`${text}Button`}>
<EuiButton {...buttonProps} data-test-subj={`${text}Button`} size={size ? size : "m"}>
Copy link
Member

@SuZhou-Joe SuZhou-Joe Aug 19, 2024

Choose a reason for hiding this comment

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

Just size is good enough, m is the default value of EuiButton size I remember.

@@ -109,6 +109,7 @@ export default class ChangeManagedIndices extends Component<ChangeManagedIndices
// @ts-ignore
onChange={this.props.onChangeManagedIndices}
onSearchChange={this.onManagedIndexSearchChange}
compressed={useUpdatedUX ? true : false}
Copy link
Member

@SuZhou-Joe SuZhou-Joe Aug 19, 2024

Choose a reason for hiding this comment

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

Suggested change
compressed={useUpdatedUX ? true : false}
compressed={useUpdatedUX ? true : undefined}

undefined is preferred, and i just feel that it is totally OK to use a compressed ComboBox no matter the toggle is on or off, Or it can be a huge maintenance effort.

@SuZhou-Joe
Copy link
Member

@tandonks Please split the PR into several smaller PRs next time. It's a big pressure for maintainers to review such a huge PR.

@SuZhou-Joe SuZhou-Joe merged commit da229f8 into opensearch-project:main Aug 20, 2024
13 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/index-management-dashboards-plugin/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/index-management-dashboards-plugin/backport-2.x
# Create a new branch
git switch --create backport/backport-1124-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 da229f8f7f08e0acc9094aa51c6bd407db295e60
# Push it to GitHub
git push --set-upstream origin backport/backport-1124-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/index-management-dashboards-plugin/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-1124-to-2.x.

tandonks added a commit to tandonks/index-management-dashboards-plugin that referenced this pull request Aug 20, 2024
… Indexes and Transform Jobs (opensearch-project#1124)

* wip: changes for new ui

Signed-off-by: Kshitij Tandon <tandonks@amazon.com>

* New UI changes

Signed-off-by: Kshitij Tandon <tandonks@amazon.com>

* Header Changes

Signed-off-by: Kshitij Tandon <tandonks@amazon.com>

* New UI changes

Signed-off-by: Kshitij Tandon <tandonks@amazon.com>

* UTs handel

Signed-off-by: Kshitij Tandon <tandonks@amazon.com>

* Header UI changes

cr: https://code.amazon.com/reviews/CR-143602949
Signed-off-by: Kshitij Tandon <tandonks@amazon.com>

* Updated Change Policy Page

Signed-off-by: Kshitij Tandon <tandonks@amazon.com>

* Fixed bug in alias for new UI

Signed-off-by: Kshitij Tandon <tandonks@amazon.com>

* Fixing a few bugs and addressing comments

Signed-off-by: Kshitij Tandon <tandonks@amazon.com>

* Fixing a few bugs in old UI

Signed-off-by: Kshitij Tandon <tandonks@amazon.com>

---------

Signed-off-by: Kshitij Tandon <tandonks@amazon.com>
SuZhou-Joe pushed a commit that referenced this pull request Aug 20, 2024
… Indexes and Transform Jobs (#1124) (#1137)

* wip: changes for new ui



* New UI changes



* Header Changes



* New UI changes



* UTs handel



* Header UI changes

cr: https://code.amazon.com/reviews/CR-143602949


* Updated Change Policy Page



* Fixed bug in alias for new UI



* Fixing a few bugs and addressing comments



* Fixing a few bugs in old UI



---------

Signed-off-by: Kshitij Tandon <tandonks@amazon.com>
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.

3 participants