Skip to content
This repository has been archived by the owner on Apr 28, 2020. It is now read-only.

Do not map vm status off to status ok #340

Merged
merged 8 commits into from
Apr 11, 2019

Conversation

yaacov
Copy link
Contributor

@yaacov yaacov commented Apr 10, 2019

Currently we map [VM_STATUS_OFF, VM_STATUS_UNKNOWN] to STATUS_RESULT_OK.

This PR adds mapping for missing statuses to off and warning icon states.

Ref: https://jira.coreos.com/browse/CNV-1466

Screenshot:
Screenshot_2019-04-11 ClusterOverview ClusterOverview – React Cosmos

Screenshot_2019-04-11 Dashboard Inventory InventoryItemStatus InventoryItemStatus – React Cosmos

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1133

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.002%) to 87.322%

Totals Coverage Status
Change from base Build 1342: 0.002%
Covered Lines: 3217
Relevant Lines: 3531

💛 - Coveralls

@coveralls
Copy link

coveralls commented Apr 10, 2019

Pull Request Test Coverage Report for Build 1161

  • 11 of 11 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 87.345%

Totals Coverage Status
Change from base Build 1157: 0.01%
Covered Lines: 3262
Relevant Lines: 3580

💛 - Coveralls

@yaacov
Copy link
Contributor Author

yaacov commented Apr 10, 2019

@suomiy @rawagner hi,
we need to map machine down to something other than ok.

We currently have this statuses:
https://github.com/kubevirt/web-ui-components/blob/master/src/components/Dashboard/Inventory/InventoryItemStatus.js#L47
https://github.com/kubevirt/web-ui-components/blob/master/src/components/Dashboard/Inventory/utils.js#L9

Do you think warning is the right option ? should it be error ? should we create a 5'th status icon for off ? do we have state off somewhere else, do we have a mockup for off state ?

@atiratree
Copy link
Contributor

Do you think warning is the right option ? should it be error ? should we create a 5'th status icon for off ? do we have state off somewhere else, do we have a mockup for off state ?

VM_STATUS_OFF as a warning doesn't make sense to me. I vote for 5th down state. (Better to ask designers though)

VM_STATUS_OTHER will never be resolved because it is used only as a helper status in getSimpleVmStatus so please remove it. Could you please also rename it to VM_SIMPLE_STATUS_OTHER ? so it is not that confusing

VM_STATUS_UNKNOWN makes sense as a warning

@atiratree
Copy link
Contributor

can you do a bit more renaming?

VM_STATUS_ALL -> VM_SIMPLE_STATUS_ALL
VM_STATUS_TO_TEXT -> VM_SIMPLE_STATUS_TO_TEXT

this needs to be also changed in web-ui

@yaacov
Copy link
Contributor Author

yaacov commented Apr 10, 2019

@matthewcarleton hi,

We have vm state off, but we do not have an inventory item state off, shoudl we add it ?

Attached is a demo of inventory state off for VMs:
Screenshot_2019-04-10 ClusterOverview ClusterOverview – React Cosmos(1)

Does this make sense to you ?

@lizsurette
Copy link

We have vm state off, but we do not have an inventory item state off, shoudl we add it ?

FYI @andybraren

@yaacov
Copy link
Contributor Author

yaacov commented Apr 10, 2019

VM_STATUS_ALL -> VM_SIMPLE_STATUS_ALL
VM_STATUS_TO_TEXT -> VM_SIMPLE_STATUS_TO_TEXT

this needs to be also changed in web-ui

@suomiy I will do this a 2 new PR's that we can merge the same time in web-ui and web-ui-components, does that make sense to you ?

@atiratree
Copy link
Contributor

@suomiy I will do this a 2 new PR's that we can merge the same time in web-ui and web-ui-components, does that make sense to you ?

It is up to you. I would put it here as it is a small change and a bit relevant to this PR.

@atiratree
Copy link
Contributor

+ also VM_STATUS_OTHER -> VM_SIMPLE_STATUS_OTHER

@yaacov yaacov changed the title [WIP] Do not map vm status off to status ok Do not map vm status off to status ok Apr 10, 2019
@andybraren
Copy link

@lizsurette @yaacov @suomiy

Yes, we should have an off state for VMs within the Inventory card:
VM_STATUS_OFF -> Off icon (as your screenshot shows)

We'd like for the Inventory card's statuses to be as close as possible to what a user would see if they looked at the VM List page. For that reason, I would prefer to use the same status icon in the Inventory card that VM_STATUS_UNKNOWN shows in the VM List page. If we currently use pficon-warning-triangle-o then that's what we should use in the Inventory card. If we use pficon-unknown then we should use that instead.

@yaacov
Copy link
Contributor Author

yaacov commented Apr 11, 2019

I added the new inventory "off" state looking like the vm "off", only bigger because all the other icons in inventory are big.

@suomiy @rawagner
I tried to use "x2" in the "off" icon but it did not make the icon bigger ( used special class css instead ) am I missing something with the "size" on pficon ?

@yaacov
Copy link
Contributor Author

yaacov commented Apr 11, 2019

@andybraren hi,
do we need some pop up text to appear when we hover over the status icons ?

for example the word "Off" when hovering over the "off" icon ? @suomiy @rawagner ?

@atiratree
Copy link
Contributor

We'd like for the Inventory card's statuses to be as close as possible to what a user would see if they looked at the VM List page. For that reason, I would prefer to use the same status icon in the Inventory card that VM_STATUS_UNKNOWN shows in the VM List page. If we currently use pficon-warning-triangle-o then that's what we should use in the Inventory card. If we use pficon-unknown then we should use that instead.

There is not so much space to show an icon for every state we have, like VM_STATUS_UNKNOWN. I think it makes more sense to show a specific set of generic set of icons (VM_STATUS_OFF should be probably one of them). Then the user can go to the VMs page to inspect what the warnings, etc. mean.

@atiratree
Copy link
Contributor

for example the word "Off" when hovering over the "off" icon ? @suomiy @rawagner ?

My vote is that it is not necessary.

@yaacov
Copy link
Contributor Author

yaacov commented Apr 11, 2019

@suomiy is there a "correct" way to make the off icon size bigger ?

@yaacov
Copy link
Contributor Author

yaacov commented Apr 11, 2019

@suomiy @rawagner I think it's ready, please review.

@atiratree
Copy link
Contributor

@suomiy is there a "correct" way to make the off icon size bigger ?

patternfly icon is just a switch between PatternflyIcon and FontAwesomeIcon components.

Only the FontAwesomeIcon component supports size property, so your only option after that is the css.

Can you please also remove the size property on inProgress icon and apply the css?

@yaacov
Copy link
Contributor Author

yaacov commented Apr 11, 2019

Can you please also remove the size property on inProgress icon and apply the css?

Sure 🍽️

@@ -43,3 +43,7 @@
.kubevirt-inventory__row-status-item-icon--warn {
color: goldenrod;
}

.kubevirt-inventory__row-status-item-icon--off {
font-size: 1.5em;
Copy link
Contributor

Choose a reason for hiding this comment

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

I tried it in cosmos and maybe it could be a tad bigger

@@ -42,13 +42,23 @@ const InProgressStatus = ({ count }) => (

Copy link
Contributor

Choose a reason for hiding this comment

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

InProgressStatus is also type="pf" component. Please try the sizes.

const Status = ({ Component, count, ...props }) => count > 0 && <Component count={count} {...props} />;

export const InventoryItemStatus = ({ ok, warn, error, inProgress }) => (
export const InventoryItemStatus = ({ ok, warn, error, inProgress, off }) => (
Copy link
Contributor

Choose a reason for hiding this comment

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

please showcase this in the fixture

@yaacov yaacov force-pushed the do-not-map-vm_status_off-to-ok branch from 349f0e0 to 61f7b23 Compare April 11, 2019 10:18
@atiratree
Copy link
Contributor

build failing..

@yaacov
Copy link
Contributor Author

yaacov commented Apr 11, 2019

@suomiy I do not understand why I get Ki instead of KiB looking ...

@yaacov
Copy link
Contributor Author

yaacov commented Apr 11, 2019

@suomiy not sure we can merge this ... something is wrong with the KiB units, looking what happen :-(

@atiratree
Copy link
Contributor

@suomiy I do not understand why I get Ki instead of KiB looking ...

it was merged recently. Please rebase on the recent master

@yaacov
Copy link
Contributor Author

yaacov commented Apr 11, 2019

@suomiy I'm rebased on master and get Ki is it the way it suppose to be ?

@yaacov
Copy link
Contributor Author

yaacov commented Apr 11, 2019

ahh... #338

@suomiy it's ok, somehow this snap changes were not part of #338 but we do need them.

@atiratree
Copy link
Contributor

Yes you have it correct. The build is failing on master.

@atiratree
Copy link
Contributor

we merged wrong snapshots before ^^

@atiratree atiratree merged commit 2306c97 into kubevirt:master Apr 11, 2019
@andybraren
Copy link

@suomiy

We'd like for the Inventory card's statuses to be as close as possible to what a user would see if they looked at the VM List page. For that reason, I would prefer to use the same status icon in the Inventory card that VM_STATUS_UNKNOWN shows in the VM List page. If we currently use pficon-warning-triangle-o then that's what we should use in the Inventory card. If we use pficon-unknown then we should use that instead.

There is not so much space to show an icon for every state we have, like VM_STATUS_UNKNOWN. I think it makes more sense to show a specific set of generic set of icons (VM_STATUS_OFF should be probably one of them). Then the user can go to the VMs page to inspect what the warnings, etc. mean.

Acknowledged - this is something we're working on, and likely involves a deeper dive on our end into all of the possible statuses, how to prioritize them, when to show which, etc. In the short term we will very likely propose removing the green "okay" status from the Inventory card entirely (for this and other reasons). We'll share that design proposal soon.

@atiratree
Copy link
Contributor

oki

we will very likely propose removing the green "okay" status

Are you okay with showing no status if okay part is removed? Because I am not sure we have much else to show for example in PVCs. Only pending icon when the pvc is pending.

@andybraren
Copy link

Are you okay with showing no status if okay part is removed? Because I am not sure we have much else to show for example in PVCs. Only pending icon when the pvc is pending.

Yes, that's totally fine. 👍

@mareklibra mareklibra mentioned this pull request Apr 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants