Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Comment | File | Size | Author |
---|---|---|---|
#46 | 3022814-46.patch | 57.19 KB | Xiaohua Guan |
| |||
#37 | screenshot 2019-01-09 8.47.38.png | 22.05 KB | Xiaohua Guan |
#34 | screenshot-20190108a.png | 44.29 KB | yas |
Comments
Comment #2
yas@xiahua-guan,
If possible, could you please setup fieldsets as follows?
Instance
- Instance ID
- Instance State
- Instance Type
- AMI ID
- Virtualization
- Reservation
- Owner
- Launch Time
Network
- Public IP
- Private IPs
- Public DNS
- Private DNS
- Security Groups
- Key Pair Name
- VPC ID
- Subnet ID
- Availability Zone
Storage
- Root Device Type
- Root Device
- EBS Optimized
Options
- Monitoring
- AMI Launch Index
- Tenancy
Others (fieldsets closed)
- Authored by
Comment #3
Xiaohua Guan CreditAttribution: Xiaohua Guan commentedComment #4
Xiaohua Guan CreditAttribution: Xiaohua Guan commentedComment #6
Xiaohua Guan CreditAttribution: Xiaohua Guan commentedComment #7
Xiaohua Guan CreditAttribution: Xiaohua Guan commentedComment #8
Xiaohua Guan CreditAttribution: Xiaohua Guan commented@yas
I change the following fields to link.
In detail page
In edit form page
Because security group field is editable in edit form page, I leave the field unchanged.
Comment #9
Xiaohua Guan CreditAttribution: Xiaohua Guan commented@yas
> If possible, could you please setup fieldsets as follows?
It is difficult to setup fieldsets for the detail page. Is it ok to setup for edit form page only?
Comment #10
yas@xiaohua-guan,
Yes, that's fine to setup for edit form page.
Comment #11
Xiaohua Guan CreditAttribution: Xiaohua Guan commentedComment #12
Xiaohua Guan CreditAttribution: Xiaohua Guan commentedComment #14
Xiaohua Guan CreditAttribution: Xiaohua Guan commentedComment #15
Xiaohua Guan CreditAttribution: Xiaohua Guan commentedComment #16
Xiaohua Guan CreditAttribution: Xiaohua Guan commented@yas
> Yes, that's fine to setup for edit form page.
I setup fieldsets for edit form. But because some fields(such as Reservation) don't exist, I arrange the fields by my judgement.
Please confirm them. Thanks.
Comment #18
Xiaohua Guan CreditAttribution: Xiaohua Guan commentedComment #19
yas@xiaohua-guan,
Thank you for the patch!
In the detail page:
In the edit form:
Network
andOptions
?Comment #20
Xiaohua Guan CreditAttribution: Xiaohua Guan commentedComment #21
Xiaohua Guan CreditAttribution: Xiaohua Guan commented@yas
Thanks for your comment.
My reply is below.
> In the detail page:
> Could you please re-order each items like my comment #2 ?
Yes, I reordered.
> In the edit form:
> Also, could you follow the order of my comment #2 ?
Yes, I changed the order.
> Can you switch Network and Options?
Yes, I switched them.
> Key Pair Name: [Key Pair Name] <= Put a colon and a while space in
> between the label and the link
Due to using label element which is the same with the other fields, it would be better separate label and link in different lines.
> And extra, can you add Instance ID above Name in Instance fieldset?
> (maybe we should put this as another issue)
Yes, I added instance id.
Comment #22
yas@xiaohua-guan,
Thank you for the updated patch. I tried and tested it; it looks pretty good. One thing that I noticed is that as for
entity_link_renderer
, it looks quite generic service, therefore I assume that the namespaceDrupal\cloud
is the better place?@baldwinlouie
How do you think about this patch other than my comment above?
Comment #23
baldwinlouie CreditAttribution: baldwinlouie commented@xiaohua-guan, @yas, Looks like a good patch! Below are my comments.
Can "entity_link_renderer" follow the other services and look something like "entity.link_renderer"
Can the "entity_link_renderer" be injected into the class using dependency injection?
Since this is a fairly generic service, can we pass query parameters into the renderViewElement method and have them render with the Url?
We might not need this at the moment, but if someone wants to use the service, it should be able to handle query parameters.
Comment #24
yas@xiaohua-guan,
Could you please refer to the following code for my comment for request #2 ?
The code can show
fieldsets
. Furthermore, I think you can find a way to generalize the class or its logic. Also, I'm afraid that it cannot show the multiple value such asSecurity Groups
? (Maybe still needs to be improved -- by creatingEc2BaseViewBuilder
as the parent class ofInstanceViewBuilder
)cloud/modules/cloud_service_providers/aws_cloud/src/Entity/Ec2/Instance.php
cloud/modules/cloud_service_providers/aws_cloud/src/Entity/Ec2/InstanceViewBuilder.php
Comment #25
yasComment #26
Xiaohua Guan CreditAttribution: Xiaohua Guan commentedComment #27
Xiaohua Guan CreditAttribution: Xiaohua Guan commented@yas @baldwinlouie
Thanks for your advices and code.
> 1. Can "entity_link_renderer" follow the other services and look something like "entity.link_renderer"
Yes, I changed it.
> 2. Can the "entity_link_renderer" be injected into the class using dependency injection?
Yes, I implemented using dependency injection.
> 3. Since this is a fairly generic service, can we pass query parameters into the renderViewElement method and have them render with the Url?
Yes, I added a new parameter the method.
> Could you please refer to the following code for my comment for request #2 ?
Thanks for your code. I implemented just like your sample code. Furthermore, I created a base class to include the base logic.
Please review the patch file 3022814-26.patch. Thanks.
Comment #28
Xiaohua Guan CreditAttribution: Xiaohua Guan commentedComment #29
Xiaohua Guan CreditAttribution: Xiaohua Guan commentedComment #30
Xiaohua Guan CreditAttribution: Xiaohua Guan commentedComment #31
Xiaohua Guan CreditAttribution: Xiaohua Guan commentedComment #32
Xiaohua Guan CreditAttribution: Xiaohua Guan commentedComment #33
Xiaohua Guan CreditAttribution: Xiaohua Guan commented@yas @baldwinlouie
Please review the patch file 3022814-31.patch. Thanks.
Comment #34
yas@xiaohua-guan,
1. In
InstanceEditForm
, I suggest the following:2. In my comment #19 No.3, In the edit form,
Please find the attached screen shot. I searched Google a lot but I couldn't find the solution, though.
3. In
EntityLinkRenderer
, let's align withrenderFormElements
4. In my comment #22,
5. In
EntityLinkFormatter
,FROM:
TO:
Comment #35
yasComment #36
Xiaohua Guan CreditAttribution: Xiaohua Guan commentedComment #37
Xiaohua Guan CreditAttribution: Xiaohua Guan commentedComment #38
Xiaohua Guan CreditAttribution: Xiaohua Guan commented@yas
Thanks for your detailed comments.
I used the code above. Furthermore, because the form element login_username is readonly, I changed the type of the form element to "item".
I modified the code of EntityLinkRenderer. Please see the screenshot.
I fixed it.
I moved entity_link_renderer to the module cloud, and because the field formatter entity_link is also generic one, I moved it to the module cloud too.
I fixed it as you said.
Please review the new patch again. Thanks.
Comment #39
yas@xiaohua-guan,
Thank you for the updated patch, it looks fairly good!
EntityLinkRenderer
intocloud
module?Login Username
in the form.Comment #40
Xiaohua Guan CreditAttribution: Xiaohua Guan commentedComment #41
Xiaohua Guan CreditAttribution: Xiaohua Guan commented@yas
Yes. I moved EntityLinkRenderer to cloud module.
OK, I modified as you said.
Please review the new patch again. Thanks.
Comment #42
Xiaohua Guan CreditAttribution: Xiaohua Guan commentedComment #43
Xiaohua Guan CreditAttribution: Xiaohua Guan commentedComment #44
Xiaohua Guan CreditAttribution: Xiaohua Guan commentedFix some coding standard messages in #42.
Comment #45
Xiaohua Guan CreditAttribution: Xiaohua Guan commentedComment #46
Xiaohua Guan CreditAttribution: Xiaohua Guan commentedComment #47
Xiaohua Guan CreditAttribution: Xiaohua Guan commentedDid some modifications for class Ec2BaseViewBuilder in 3022814-46.patch to adapt to other entity type.
Comment #48
Xiaohua Guan CreditAttribution: Xiaohua Guan commented@yas
Please review the patch file 3022814-46.patch.
Comment #49
yas@xiaohua-guan,
One thing that I noticed is that it shows Monitoring: Off in the Instance detail view page, which is expected Monitoring: Disabled like in Instance Edit Page, that includes explicitly implemented, however it can be refactored later.
I'll merge the updated patch. Thank you for your hard work!
Comment #51
yas