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

Fixes #7462 - new UI for network interfaces #1888

Closed
wants to merge 1 commit into from
Closed

Fixes #7462 - new UI for network interfaces #1888

wants to merge 1 commit into from

Conversation

tstrachota
Copy link
Member

Editing network interfaces moved into a modal window. Some screenshots of the new UI are at:
https://tstrachota.fedorapeople.org/screenshots/nics_ui/

Bits of host form related to NICs are initially hidden and copied into a modal window on edit button click. This allows reusing validation error notices rendered by rails.

@tstrachota
Copy link
Member Author

@ares @GregSutcliffe

@@ -0,0 +1,7 @@

<div style="display: none;" id="interfaceHidden<%= local_assigns[:id] %>" interface-id="<%= local_assigns[:id] %>">
Copy link
Member

Choose a reason for hiding this comment

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

nitpick: use class=hide

@ares
Copy link
Member

ares commented Nov 3, 2014

Could you please add some space between green button "Add Interface" and horizontal line below?

@ares
Copy link
Member

ares commented Nov 3, 2014

I'm not sure whether this issue is introduced by this PR but when I try to add new interface to existing host and fill in only identifier, it allows me to save the host, I see error but the interface is not created. Same applies to new host.

@tstrachota
Copy link
Member Author

Updated:

  • spacing around + Add interface button
  • link up/down status icons
  • background of invalid interface's row is now light red
  • red title and message when there's a validation error in one of the interfaces
  • changed class of interface edit button

Screenshots updated too.

@tstrachota
Copy link
Member Author

@ares the issue you came across with is an error somewhere in validations (it's in development branch too). NICs with blank mac addresses are just removed.

@ares
Copy link
Member

ares commented Nov 4, 2014

@tstrachota definitely much nicer! Last thing I doubt is the warning icon in edit button (sorry for potential bad hint, I didn't image varying width of button), let's see what others think. Don't worry about the validation issue then, validations may change later and it's not part of this PR.

@ares
Copy link
Member

ares commented Nov 4, 2014

@tstrachota
Copy link
Member Author

@ares I'm not fond of the varying size too. We can remove the icon. No strong opinion from my side here.

@ohadlevy
Copy link
Member

ohadlevy commented Nov 4, 2014

IMHO the background color on error is too much. Can we just mark the tr border red (similar to other errors in input fields)?

I think the icon next to edit on error is not needed.maybe change the btn class instead of an icon for f its needed?

@tstrachota
Copy link
Member Author

@ohadlevy
Copy link
Member

ohadlevy commented Nov 5, 2014

yes, I wonder if we should have the warning (above the table) wrapped in a
warning box?

@tstrachota
Copy link
Member Author

@ohadlevy
Copy link
Member

ohadlevy commented Nov 6, 2014

looks better!, does the buttons look better when you pull-right them?
+1 from my side.

@tstrachota
Copy link
Member Author

Buttons on right seem too far from the rest of the content to me.

@@ -0,0 +1,86 @@

<% @interfaces_invalid = @host.interfaces.any?{ |i| !i.valid? } %>
Copy link
Member

Choose a reason for hiding this comment

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

nitpick: could you please use interfaces_invalid without @ so we don't risk any conflict in future?

@ares
Copy link
Member

ares commented Nov 7, 2014

@tstrachota I'm happy with the code, could you please squash before I'll reapply and test it?

@tstrachota
Copy link
Member Author

@ares done

<tr class="<%= 'has-error' unless interface.valid? %>" id="interface<%= interface.object_id %>" data-interface-id="<%= interface.object_id %>">
<td class="status hidden-xs" align="center"><%= link_status(interface) %></td>
<td class="identifier ellipsis"><%= interface.identifier %></td>
<td class="type hidden-xs"><%= interface.class.humanized_name %></td>
Copy link
Member

Choose a reason for hiding this comment

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

missing N_()

@ares
Copy link
Member

ares commented Nov 10, 2014

Merged as 3154d77, thanks @tstrachota!

@ares ares closed this Nov 10, 2014
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.

4 participants