Allon Mureinik has posted comments on this change.
Change subject: webadmin: Display the single status of domains in main tab.
......................................................................
Patch Set 1: Looks good to me, but someone else must approve
(3 inline comments)
minor comments (inline), please tend to them when you rebase.
....................................................
File backend/manager/dbscripts/create_views.sql
Line 302: storage_domain_static
Line 303: INNER JOIN
Line 304: storage_domain_dynamic ON storage_domain_static.id =
storage_domain_dynamic.id
Line 305: INNER JOIN
Line 306: (SELECT storage_id, count(storage_id) > 1 as
is_multi_domain,
please align the from and group by under the SELECT for better readability
Line 307: max(status) AS status
Line 308: FROM storage_pool_iso_map
Line 309: GROUP BY storage_id) AS status_table ON
storage_domain_static.id=status_table.storage_id;
Line 310:
....................................................
Commit Message
Line 7: webadmin: Display the single status of domains in main tab.
Line 8:
Line 9: Create a new view (storage_domains_for_search) which contains storage
Line 10: domains specifically entries used by search, the view contains the
Line 11: status per storage domain, for domains (ISO) that attached to more
than one pool,
s/attached/are attached/
Line 12: a null value will be displayed in the status field.
Line 13:
Line 14: Search now uses the new created domains view described above.
Line 15:
....................................................
File
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/MainTabStorageView.java
Line 81: TextColumnWithTooltip<storage_domains>
crossDataCenterStatusColumn =
Line 82: new TextColumnWithTooltip<storage_domains>() {
Line 83: @Override
Line 84: public String getValue(storage_domains object) {
Line 85: if
(object.getstorage_domain_type().equals(StorageDomainType.ISO)) {
since this is an enum, you can use == with better performance than equals.
Also, a question: if an ISO domain is connected to a single pool, you do have a
regular status for it.
Are you sure we want to use the shared status?
Line 86: return
EnumTranslator.createAndTranslate(object.getstorage_domain_shared_status());
Line 87: } else {
Line 88: return
EnumTranslator.createAndTranslate(object.getstatus());
Line 89: }
--
To view, visit http://gerrit.ovirt.org/8258
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If18c028dfcb985fd96f302b53401c1082a349416
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Asaf Shakarchi <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches