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

Implement Monaco editor for Alertmanager YAML editor #3567

Conversation

dtaylor113
Copy link
Contributor

@dtaylor113 dtaylor113 commented Nov 25, 2019

https://jira.coreos.com/browse/CONSOLE-1765

Before

image

After

image

  • Added prop to show/hide the Reload button
  • Added prop to pass in save function
  • Updated Integration tests

@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. component/core Related to console core functionality component/monitoring Related to monitoring labels Nov 25, 2019
@kyoto
Copy link
Member

kyoto commented Nov 28, 2019

Generally LGTM 👍 . Just one issue with the header area layout.

@dtaylor113 dtaylor113 force-pushed the alertmanager-4-4-monaco-yaml-editor branch 2 times, most recently from c3a8d7b to f9cce51 Compare December 2, 2019 15:03
@openshift openshift deleted a comment from openshift-ci-robot Dec 2, 2019
@openshift openshift deleted a comment from openshift-ci-robot Dec 2, 2019
@dtaylor113 dtaylor113 force-pushed the alertmanager-4-4-monaco-yaml-editor branch from f9cce51 to 862cbaa Compare December 2, 2019 20:46
@openshift openshift deleted a comment from openshift-ci-robot Dec 2, 2019
@openshift openshift deleted a comment from openshift-ci-robot Dec 3, 2019
@openshift openshift deleted a comment from openshift-ci-robot Dec 3, 2019
@openshift openshift deleted a comment from openshift-ci-robot Dec 3, 2019
@dtaylor113 dtaylor113 force-pushed the alertmanager-4-4-monaco-yaml-editor branch from 862cbaa to 5f8a13e Compare December 4, 2019 15:56
@openshift openshift deleted a comment from openshift-ci-robot Dec 4, 2019
@openshift openshift deleted a comment from openshift-ci-robot Dec 4, 2019
@spadgett
Copy link
Member

spadgett commented Dec 4, 2019

/test analyze

frontend/public/components/edit-yaml.jsx Outdated Show resolved Hide resolved
@@ -666,7 +666,7 @@ const EditYAML_ = connect(stateToProps)(
});

const { error, success, stale, yaml, height, showSidebar } = this.state;
const { obj, download = true, header } = this.props;
const { obj, download = true, header, showReload = true } = this.props;
Copy link
Member

Choose a reason for hiding this comment

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

Booleans that default to true are confusing. I'd make this noReload.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed to nonK8s, but seems a little wonky specifing {stale && !nonK8s && ( ...

Copy link
Member

Choose a reason for hiding this comment

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

changed to nonK8s, but seems a little wonky specifing {stale && !nonK8s && ( ...

Is stale ever true if this isn't a k8s object? I wonder if the nonK8s check is needed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

for stale the nonK8s check isn't necessary. Still have {!create && !nonK8s && (.. - I just don't like '!non...`.

Copy link
Member

Choose a reason for hiding this comment

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

You could change nonK8s to something like anyYAML or genericYAML. I think that's more clear anyway.

Copy link
Member

Choose a reason for hiding this comment

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

We should be skipping all the logic that checks for schemas, etc., when set.

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 like it, changed to genericYAML -thanks

frontend/integration-tests/views/monitoring.view.ts Outdated Show resolved Hide resolved
frontend/public/components/monitoring/_monitoring.scss Outdated Show resolved Hide resolved
frontend/public/components/monitoring/_monitoring.scss Outdated Show resolved Hide resolved
@spadgett
Copy link
Member

spadgett commented Dec 4, 2019

@alimobrem fyi

@spadgett
Copy link
Member

spadgett commented Dec 4, 2019

We should hide View shortcuts since they won't work here. Instead of a showReload prop, we might want a general prop to indicate this isn't a k8s resource.

@openshift openshift deleted a comment from openshift-ci-robot Dec 4, 2019
@dtaylor113 dtaylor113 force-pushed the alertmanager-4-4-monaco-yaml-editor branch from 5f8a13e to 245f36e Compare December 4, 2019 20:06
@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 4, 2019
@dtaylor113 dtaylor113 force-pushed the alertmanager-4-4-monaco-yaml-editor branch from 245f36e to 35a02d6 Compare December 4, 2019 20:17
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 4, 2019
@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 4, 2019
@spadgett spadgett added this to the v4.4 milestone Dec 4, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dtaylor113, spadgett

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 4, 2019
@openshift openshift deleted a comment from openshift-ci-robot Dec 4, 2019
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

22 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit da59cde into openshift:master Dec 5, 2019
@dtaylor113 dtaylor113 deleted the alertmanager-4-4-monaco-yaml-editor branch April 27, 2020 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. component/core Related to console core functionality component/monitoring Related to monitoring lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants