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
visualize serverless function in topology #8233
visualize serverless function in topology #8233
Conversation
const { | ||
metadata: { labels }, | ||
} = item?.obj; | ||
const isServerlessFunction = labels && labels['boson.dev/function']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const isServerlessFunction = labels && labels['boson.dev/function']; | |
const isServerlessFunction = labels?.['boson.dev/function']; |
and better put label boson.dev/function
in a const as it has been used multiple places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -0,0 +1,3 @@ | |||
.odc-serverless-function-label { | |||
margin-left: var(--pf-global--spacer--md); | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: add a new line here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
||
const ServerlessFunctionLabel: React.FC = () => ( | ||
<Label variant="filled" className="odc-serverless-function-label" color="purple"> | ||
Function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
localize the string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
const { | ||
metadata: { labels }, | ||
} = getResource(element); | ||
const isServerlessFunction = labels && labels['boson.dev/function']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
const isServerlessFunction = labels && labels['boson.dev/function']; | |
const isServerlessFunction = labels?.['boson.dev/function']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
8c452b2
to
cde48d7
Compare
@vikram-raj |
cde48d7
to
2664b0d
Compare
@openshift/team-devconsole-ux @serenamarie125 are we still putting the |
/assign @invincibleJai |
/retest |
e697f24
to
d7a2680
Compare
/approve |
Looks good cc @vikram-raj |
@nemesis09 tests are failing because |
d7a2680
to
f4fac6d
Compare
updated |
f4fac6d
to
e10db17
Compare
e10db17
to
aff7d46
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified the changes. and it works as expected
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: christianvogt, nemesis09, vikram-raj 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 |
/retest |
Story:
https://issues.redhat.com/browse/ODC-5480
Problem/Description:
Serverless functions should be visually identifiable on topology
Solution:
use distinct icon and background color to distinctly identify serverless function in topology
Screens:
Topology
Topology List View
Test Coverage:
Browser Conformation: