Skip to content

Commit

Permalink
Add rel to link for external links, IM dashboards plugin (#261)
Browse files Browse the repository at this point in the history
* Change alignment of Snapshot Management panels in pages/Main/Main.tsx

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Unify vertical button alignment across panels, ContentPanel.tsx

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Update jest snapshots, add ROUTE_STYLE variable

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add placeholder restore button to Snapshots panel

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Comment out line 20 rollups_spec.js in cypress/integration/

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove unused code and comment cypress/integration/rollups_spec.js

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Set window.opener to null via anchor tag 'rel' attribute-TransformIndices

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add rel="noopener noreferrer" to external links, update snapshots

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Include version increment to 2.3.0

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove 2.3 version bump

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Signed-off-by: Chris Hesterman <phestech@amazon.com>
(cherry picked from commit c395303)
  • Loading branch information
phestecAMZN authored and github-actions[bot] committed Oct 3, 2022
1 parent dd3643f commit 8047164
Show file tree
Hide file tree
Showing 20 changed files with 34 additions and 25 deletions.
10 changes: 7 additions & 3 deletions opensearch_dashboards.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
"id": "indexManagementDashboards",
"version": "2.2.1.0",
"opensearchDashboardsVersion": "2.2.1",
"configPath": ["opensearch_index_management"],
"requiredPlugins": ["navigation"],
"configPath": [
"opensearch_index_management"
],
"requiredPlugins": [
"navigation"
],
"server": true,
"ui": true
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@
"engines": {
"yarn": "^1.21.1"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default class NewPolicy extends React.Component<NewPolicyProps, NewPolicy
<EuiText size="xs">
<p>
When the new policy will take effect depends on the current state of indices and the states of the new policy.{" "}
<EuiLink href={DOCUMENTATION_URL} target="_blank">
<EuiLink href={DOCUMENTATION_URL} target="_blank" rel="noopener noreferrer">
Learn more <EuiIcon type="popout" size="s" />
</EuiLink>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const DefinePolicy = ({ jsonString, onChange, onAutoIndent, hasJSONError }: Defi
<p>
You can think of policies as state machines. "Actions" are the operations ISM performs when an index is in a certain state.
"Transitions" define when to move from one state to another.{" "}
<EuiLink href={DOCUMENTATION_URL} target="_blank">
<EuiLink href={DOCUMENTATION_URL} target="_blank" rel="noopener noreferrer">
Learn more <EuiIcon type="popout" size="s" />
</EuiLink>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export default class CreatePolicy extends Component<CreatePolicyProps, CreatePol
This ensures that any update to a policy doesn't harm indices that are running under an older version of the policy. To carry
over your edits to these indices, please use the "Change Policy" under "Managed Indices" to reapply the policy after submitting
your edits.{" "}
<EuiLink href={DOCUMENTATION_URL} target="_blank">
<EuiLink href={DOCUMENTATION_URL} target="_blank" rel="noopener noreferrer">
Learn more <EuiIcon type="popout" size="s" />
</EuiLink>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export default class RollupIndices extends Component<RollupIndicesProps, RollupI
"The target index stores rollup results. You can select an existing index or type in a new index name with embedded variables "
}
{
<EuiLink external href={ROLLUP_RESULTS_HELP_TEXT_LINK} target={"_blank"}>
<EuiLink external href={ROLLUP_RESULTS_HELP_TEXT_LINK} target={"_blank"} rel="noopener noreferrer">
Learn more
</EuiLink>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ const CronSchedule = ({
<EuiText color="subdued" size="s" style={{ padding: "5px 0px" }}>
<p style={{ fontWeight: 200, fontSize: "12px" }}>
Use Cron expression to define complex schedule.{" "}
<EuiLink href={CRON_EXPRESSION_DOCUMENTATION_URL} target="_blank">
<EuiLink href={CRON_EXPRESSION_DOCUMENTATION_URL} target="_blank" rel="noopener noreferrer">
Learn more
</EuiLink>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ export default class CreateSnapshotPolicy extends Component<CreateSMPolicyProps,
<EuiText color="subdued" size="s" style={{ padding: "5px 0px" }}>
<p style={{ fontWeight: 200 }}>
Snapshot policies allow you to define an automated snapshot schedule and retention period.{" "}
<EuiLink href={SNAPSHOT_MANAGEMENT_DOCUMENTATION_URL} target="_blank">
<EuiLink href={SNAPSHOT_MANAGEMENT_DOCUMENTATION_URL} target="_blank" rel="noopener noreferrer">
Learn more
</EuiLink>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,12 @@ export default class TransformIndices extends Component<TransformIndicesProps, T
</EuiText>

<EuiText size="xs">
<EuiLink external={true} target="_blank" href="https://opensearch.org/docs/opensearch/query-dsl/index/">
<EuiLink
external={true}
target="_blank"
href="https://opensearch.org/docs/opensearch/query-dsl/index/"
rel="noopener noreferrer"
>
{" "}
Learn more
</EuiLink>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export default class ApplyPolicyModal extends Component<ApplyPolicyModalProps, A
<EuiText size="xs" grow={false}>
<p>
This policy includes a rollover action. Specify a rollover alias.{" "}
<EuiLink href={DOCUMENTATION_URL} target="_blank">
<EuiLink href={DOCUMENTATION_URL} target="_blank" rel="noopener noreferrer">
Learn more <EuiIcon type="popout" size="s" />
</EuiLink>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export default class CreateRepositoryFlyout extends Component<CreateRepositoryPr
<EuiText color="subdued" size="xs" style={{ padding: "5px 0px" }}>
<p style={{ fontWeight: 200 }}>
Define a repository by custom type and settings.{" "}
<EuiLink href={S3_REPOSITORY_DOCUMENTATION_URL} target="_blank">
<EuiLink href={S3_REPOSITORY_DOCUMENTATION_URL} target="_blank" rel="noopener noreferrer">
View sample configurations
</EuiLink>
</p>
Expand Down Expand Up @@ -186,7 +186,7 @@ export default class CreateRepositoryFlyout extends Component<CreateRepositoryPr
<EuiText color="subdued" size="xs" style={{ padding: "5px 0px" }}>
<p style={{ fontWeight: 200 }}>
Define additional settings for this repository.{" "}
<EuiLink href={FS_REPOSITORY_DOCUMENTATION_URL} target="_blank">
<EuiLink href={FS_REPOSITORY_DOCUMENTATION_URL} target="_blank" rel="noopener noreferrer">
Learn more
</EuiLink>
</p>
Expand All @@ -212,7 +212,7 @@ export default class CreateRepositoryFlyout extends Component<CreateRepositoryPr
<p>
To use a custom repository, such as Amazon S3, Azure Blob Storage or similar, install and configure the respective repository
plugin on OpenSearch and then define the repository configuration below.{" "}
<EuiLink href={REPOSITORY_DOCUMENTATION_URL} target="_blank">
<EuiLink href={REPOSITORY_DOCUMENTATION_URL} target="_blank" rel="noopener noreferrer">
Learn more
</EuiLink>
</p>
Expand Down Expand Up @@ -240,7 +240,7 @@ export default class CreateRepositoryFlyout extends Component<CreateRepositoryPr
<EuiText color="subdued" size="xs" style={{ padding: "5px 0px" }}>
<p style={{ fontWeight: 200 }}>
Select a supported repository type. For additional types, install the latest repository plugins and choose Custom configuration.{" "}
<EuiLink href={REPOSITORY_DOCUMENTATION_URL} target="_blank">
<EuiLink href={REPOSITORY_DOCUMENTATION_URL} target="_blank" rel="noopener noreferrer">
Learn more
</EuiLink>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ export default class SnapshotPolicies extends Component<SnapshotPoliciesProps, S
<EuiText color="subdued" size="s" style={{ padding: "5px 0px" }}>
<p style={{ fontWeight: 200 }}>
Define an automated snapshot schedule and retention period with a snapshot policy.{" "}
<EuiLink href={SNAPSHOT_MANAGEMENT_DOCUMENTATION_URL} target="_blank">
<EuiLink href={SNAPSHOT_MANAGEMENT_DOCUMENTATION_URL} target="_blank" rel="noopener noreferrer">
Learn more
</EuiLink>
</p>
Expand Down
2 changes: 1 addition & 1 deletion public/pages/Snapshots/containers/Snapshots/Snapshots.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ export default class Snapshots extends Component<SnapshotsProps, SnapshotsState>
<p style={{ fontWeight: 200 }}>
Snapshots are taken automatically from snapshot policies, or you can initiate manual snapshots to save to a repository. <br />
To restore a snapshot, use the snapshot restore API.{" "}
<EuiLink href={RESTORE_SNAPSHOT_DOCUMENTATION_URL} target="_blank">
<EuiLink href={RESTORE_SNAPSHOT_DOCUMENTATION_URL} target="_blank" rel="noopener noreferrer">
Learn more
</EuiLink>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const ISMTemplates = ({ policy, onChangePolicy }: ISMTemplatesProps) => {
<EuiText color="subdued" size="s" style={{ padding: "5px 0px" }}>
<p style={{ fontWeight: 200 }}>
Specify ISM template patterns that match the index to apply the policy.{" "}
<EuiLink href={DOCUMENTATION_URL} target="_blank">
<EuiLink href={DOCUMENTATION_URL} target="_blank" rel="noopener noreferrer">
Learn more <EuiIcon type="popout" size="s" />
</EuiLink>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const States = ({ onOpenFlyout, policy, onClickEditState, onClickDeleteState, on
You can think of policies as state machines. "Actions" are the operations ISM performs when an index is in a certain state.
<br />
"Transitions" define when to move from one state to another.{" "}
<EuiLink href={STATES_DOCUMENTATION_URL} target="_blank">
<EuiLink href={STATES_DOCUMENTATION_URL} target="_blank" rel="noopener noreferrer">
Learn more <EuiIcon type="popout" size="s" />
</EuiLink>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ const Transition = ({ uiTransition, onChangeTransition }: TransitionProps) => {
title="Cron expression"
helpText="The matching cron expression required to transition to the next state."
learnMore={
<EuiLink href={TRANSITION_DOCUMENTATION_URL} target="_blank">
<EuiLink href={TRANSITION_DOCUMENTATION_URL} target="_blank" rel="noopener noreferrer">
Learn more <EuiIcon type="popout" size="s" />
</EuiLink>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default class CreateAction extends Component<CreateActionProps, CreateAct

<EuiText size="xs" style={{ fontWeight: 200 }}>
Actions are the operations ISM performs when an index is in a certain state.{" "}
<EuiLink href={ACTIONS_DOCUMENTATION_URL} target="_blank">
<EuiLink href={ACTIONS_DOCUMENTATION_URL} target="_blank" rel="noopener noreferrer">
Learn more <EuiIcon type="popout" size="s" />
</EuiLink>
</EuiText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export default class CreateTransition extends Component<CreateTransitionProps, C
<EuiText size="xs" style={{ fontWeight: 200 }}>
Transitions define the conditions that need to be met for a state to change. After all actions in the current state are
completed, the policy starts checking the conditions for transitions.{" "}
<EuiLink href={TRANSITION_DOCUMENTATION_URL} target="_blank">
<EuiLink href={TRANSITION_DOCUMENTATION_URL} target="_blank" rel="noopener noreferrer">
Learn more <EuiIcon type="popout" size="s" />
</EuiLink>
</EuiText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export default class ErrorNotification extends Component<ErrorNotificationProps,
<EuiText color="subdued" size="s" style={{ padding: "5px 0px" }}>
<p style={{ fontWeight: 200 }}>
You can set up an error notification for when a policy execution fails.{" "}
<EuiLink href={ERROR_NOTIFICATION_DOCUMENTATION_URL} target="_blank">
<EuiLink href={ERROR_NOTIFICATION_DOCUMENTATION_URL} target="_blank" rel="noopener noreferrer">
Learn more <EuiIcon type="popout" size="s" />
</EuiLink>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ export default class VisualCreatePolicy extends Component<VisualCreatePolicyProp
<EuiText size="s">
<p>
Policies let you automatically perform administrative operations on indices.{" "}
<EuiLink href={POLICY_DOCUMENTATION_URL} target="_blank">
<EuiLink href={POLICY_DOCUMENTATION_URL} target="_blank" rel="noopener noreferrer">
Learn more <EuiIcon type="popout" size="s" />
</EuiLink>
</p>
Expand Down

0 comments on commit 8047164

Please sign in to comment.