-
Notifications
You must be signed in to change notification settings - Fork 25
Homepage UI component #809
Homepage UI component #809
Conversation
35a198c
to
60956be
Compare
screenshot please! 😸 |
@stefanotorresi yes I wanted to see if tests passed first :-D |
b848ad9
to
dc2b785
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.
Thanks @dottorblaster ,
Some initial comments before jumping to the code.
- I think we miss a 1st column like
SAP systems
, after theSID
. This would consume thesapsystems_health
value in the API. - I think
Pacemaker cluster
should be changed toPacemaker clusters
(in plural). As we are showing there all the involved clusters (even though by now it is one hehe) - Code related. I think the values in the database and cluster must be flipped (current 1st column is for database and the 2nd for the clusters, the data is inverted now)
I think you're right @arbulu89, I skipped the |
0f7a82a
to
7dc9241
Compare
Guys, may I suggest a couple of changes in display/layout?
|
@abravosuse this way? 😬 |
Perfect @dottorblaster . Thanks! |
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.
Hey @dottorblaster ,
I did a more thorough review this time.
Some comments added. The unique blocker is that I think you forgot to push some commit. At least the latest image you pasted doesn't match with the code.
We can discuss about everything else.
But it looks good to me.
); | ||
describe('The homepage has the global health component visible', () => { | ||
it('should display the global health chart', () => { | ||
cy.get('#homepage-component').contains('At a glance'); |
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.
I think we could improve this. At least, with the currently discovered facts, check is we have 3 rows with everything on green. It is the less costly thing we can have, but I find it valuable. I think you can get it less than a half hour hehe
return predicate[key] === label; | ||
}, false); | ||
|
||
const getCounters = (data) => |
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.
I think here we should consider to count the unknowns
. Otherwise, if some summary entry has unknonws and passes, we will compute this pass, which is not entirely sure. I wouldn't count them as pass at least.
But it is true that we don't have any box for them. @abravosuse What should we do here?
- Leave as it is. So if we have some unknown at worst, as pass
- Add other box for the unknown
- Not put other box, but not count neither
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.
@arbulu89 for this iteration let's go with the third option: not put other box, but no count neither (I don't want an unknown to be counted as a green). But looking down the road this is how I think it should be:
- distinguish between stopped and unknown as they are different things (given that grey is the sapcontrol color associated to a stopped status, I suggest we keep grey for stopped and choose another one for unknown. OR, stopped is circle grey and unknown is triangle grey).
- add as many boxes as possible statuses
- stablish a clear hegemony among statuses:
I think we all agree that:
- all green > green
- one yellow, rest green > yellow
- one red, rest green/yellow > red
But how stopped or unknown weight in the overall status is something we are going to have to determine component by component. What I mean is that, for example, it's not the same to have an ABAP instance stopped than having the diagnostic agent stopped.
All this to be refined.
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.
@dottorblaster I don't know if you read this thread. I think it is missing to be implemented.
We would need to check before the passing, if there is any unknown
. So simply adding the next should work:
if (any(element, 'unknown')) {
return { ...accumulator, unknown: accumulator.unknown + 1 };
}
At least, we won't have a new passing counter added in this case (unknowns won't be showed in the frontend, but at least neither false passes)
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.
@arbulu89 thanks for the tip, actually I read the thread but I didn't get that detail 😅
documents. | ||
</div> | ||
</section> | ||
<div id="homepage-component"></div> |
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.
Question for @abravosuse : Do you think we should move the current home content to somewhere else?
Like the about page or some additional page. Just asking.
It doesn't need to done in this PR anyway
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.
Yes, I think that eventually we will have to move it somewhere else because the home page should all be about the status of your environment. But I'd rather keep the About page as it it. That way the version info is clearly displayed and there is no confusion about it. Maybe another page under Settings called "Intro" or "First steps". To be refined as well.
7dc9241
to
95bdfa8
Compare
@arbulu89 oh man you're right, I had the code still in my local env, now I pushed it, sorry about that! |
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.
Whoa! Great!
@arbulu89 already raised good points, mainly on the current homepage content and the e2e test.
Apart from those points, we're good I guess 😉
|
||
.health-summary-id { | ||
text-align: left; | ||
} |
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.
not gonna miss this 😇
6c96272
to
f0bd232
Compare
@arbulu89 if you want you can check again, I wanted to page you privately but the major outage is preventing me to do so... 😅 |
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.
LGTM
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.
Hi @dottorblaster ,
Setting the PR as green (I don't think we need more reviews), but there are 2 things that must be fixed. Have a look on my latest 2 comments
return predicate[key] === label; | ||
}, false); | ||
|
||
const getCounters = (data) => |
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.
@dottorblaster I don't know if you read this thread. I think it is missing to be implemented.
We would need to check before the passing, if there is any unknown
. So simply adding the next should work:
if (any(element, 'unknown')) {
return { ...accumulator, unknown: accumulator.unknown + 1 };
}
At least, we won't have a new passing counter added in this case (unknowns won't be showed in the frontend, but at least neither false passes)
{getHealthIcon(sapsystem_health)} | ||
</span> | ||
<span className="health-summary-cell"> | ||
{getHealthIcon(clusters_health)} |
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.
This is still wrong hehe
I think the 2nd must be database_health
and the 3rd clusters_health
29081c0
to
3f2e066
Compare
^ :-))))