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

UI: Select namespace from Kubeflow dashboard #982

Conversation

andreyvelich
Copy link
Member

@andreyvelich andreyvelich commented Dec 20, 2019

Fixes: #972.

After this PR, when user select namespace from Central Dashboard, in Katib UI user:

  1. Can see experiments only in selected namespace
  2. Can submit yaml experiments only in selected namespace
  3. Can submit experiments by parameters only in selected namespace

Right now, user can see Trial Templates in all namespaces.
/cc @johnugeorge @gaocegege @hougangliu @avdaredevil
Also, in this PR I fixed namespace filter.

katib ui


This change is Reviewable

Copy link

@avdaredevil avdaredevil left a comment

Choose a reason for hiding this comment

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

Looks great, seems like the SDK is used correctly (so it should support realtime update of namespaces, ie. you shouldn't have to navigate to another sub-app and back for the namespace changes to kick in). I've added a few nits. Thanks! 🎉

window.centraldashboard.CentralDashboardEventHandler.init(function (cdeh) {
// Binds a callback that gets invoked anytime the Dashboard's
// namespace is changed
cdeh.onNamespaceSelected = (namespace) => {

Choose a reason for hiding this comment

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

Suggested change
cdeh.onNamespaceSelected = (namespace) => {
cdeh.onNamespaceSelected = (namespace) => {
Suggested change
cdeh.onNamespaceSelected = (namespace) => {
cdeh.onNamespaceSelected = onGlobalNamespaceChange

Copy link
Member Author

Choose a reason for hiding this comment

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

@avdaredevil What do you mean by this change?

})
let isRightNamespace = false
for (const [key, value] of Object.entries(action.yaml.split("\n"))) {
let noSpaceLine = value.replace(/\s/g,'')

Choose a reason for hiding this comment

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

Suggested change
let noSpaceLine = value.replace(/\s/g,'')
const noSpaceLine = value.replace(/\s/g,'')

type: generalActions.SUBMIT_YAML_SUCCESS,
})
let isRightNamespace = false
for (const [key, value] of Object.entries(action.yaml.split("\n"))) {

Choose a reason for hiding this comment

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

Wouldn't the key, in this case, be an index? Since it's not an object, it may make sense to name the vars accordingly?

Suggested change
for (const [key, value] of Object.entries(action.yaml.split("\n"))) {
for (const [index, line] of Object.entries(action.yaml.split("\n"))) {

Sorry if I misinterpreted this line

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it will be the index. I will change it to [index, value]

@andreyvelich
Copy link
Member Author

@avdaredevil Thank you for your review, I will take a look.

@gaocegege
Copy link
Member

/lgtm

Is it ready to merge?

@andreyvelich
Copy link
Member Author

/lgtm

Is it ready to merge?

If @avdaredevil is ok with new changes, yes.

@avdaredevil
Copy link

/lgtm
/approve

Thanks @andreyvelich!

@johnugeorge
Copy link
Member

/approve

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: avdaredevil, johnugeorge

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

@k8s-ci-robot k8s-ci-robot merged commit 59a4880 into kubeflow:master Jan 3, 2020
@andreyvelich andreyvelich deleted the issue-972-kubeflow-dashboard-namespace branch October 6, 2021 00:30
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.

[UI Feature] Select namespace from Kubeflow Central Dashboard
5 participants