SNIA / Swordfish-basic-web-client

The Swordfish Basic Web Client can connect to one or more Swordfish services (including the Swordfish emulator), and present in a web UI frame the entire Swordfish hierarchy. The basic web client also provides basic capabilities to modify configurable Properties (as specified in the schema), as well an providing a basic interface to add or remove elements from the service through a Web UI.
BSD 3-Clause "New" or "Revised" License
7 stars 6 forks source link

Navigation Links not clickable #16

Open dorado18 opened 6 years ago

dorado18 commented 6 years ago

Hello,

Our Swordfish service returns the following xml response for a StorageService instance:

{
"@Redfish.Copyright": "Copyright 2015-2016 SNIA. All rights reserved.",
"@odata.context": "/redfish/v1/$metadata#StorageService.v1_0_0.StorageService",
"@odata.type": "#StorageService.v1_0_0.StorageService",
"@odata.id": "/redfish/v1/StorageServices/Members('4FDB0851-EE73-C655-0D13-A2A7F8A4F7AA')",
"Id": "4FDB0851-EE73-C655-0D13-A2A7F8A4F7AA",
"Identifier":{
"DurableName": "421F4993-2EAB-7802-9E73-A9E7CF4331SS",
"DurableNameFormat": "UUID"
},
"Status":{
"State": "Enabled",
"HealthRollup": "OK",
"Health": "OK"
},
"StorageGroups":{
"@odata.id": "/redfish/v1/StorageServices/Members('4FDB0851-EE73-C655-0D13-A2A7F8A4F7AA')/StorageGroups"
},
"EndpointGroups":{
"@odata.id": "/redfish/v1/StorageServices/Members('4FDB0851-EE73-C655-0D13-A2A7F8A4F7AA')/EndpointGroups"
},
"ClientEndpointGroups":{
"@odata.id": "/redfish/v1/StorageServices/Members('4FDB0851-EE73-C655-0D13-A2A7F8A4F7AA')/ClientEndpointGroups"
},
"ServerEndpointGroups":{
"@odata.id": "/redfish/v1/StorageServices/Members('4FDB0851-EE73-C655-0D13-A2A7F8A4F7AA')/ServerEndpointGroups"
},
"Volumes":{
"@odata.id": "/redfish/v1/StorageServices/Members('4FDB0851-EE73-C655-0D13-A2A7F8A4F7AA')/Volumes"
},
"StoragePools":{
"@odata.id": "/redfish/v1/StorageServices/Members('4FDB0851-EE73-C655-0D13-A2A7F8A4F7AA')/StoragePools"
},
"Endpoints":{
"@odata.id": "/redfish/v1/StorageServices/Members('4FDB0851-EE73-C655-0D13-A2A7F8A4F7AA')/Endpoints"
},
"ClassesOfService":{
"@odata.id": "/redfish/v1/StorageServices/Members('4FDB0851-EE73-C655-0D13-A2A7F8A4F7AA')/ClassesOfService"
}
}

But the the navigation links StorageGroups, EndpointGroups, etc are not clickable when presented in the browser and so we are unable to continue exploring the model.

Tested with latest Firefox, Chrome and Chromium. Below is an image with Chromium. issue1

ddeel commented 6 years ago

The Swordfish Basic Web Client only supports URLs that are typically found in Redfish and Swordfish, so it does not currently support URLs that include constructs like "Members('4FDB0851-EE73-C655-0D13-A2A7F8A4F7AA')". The DMTF is expected to clarify the URL requirements in the Redfish specification soon in a way that will not allow the "Members()" construct.

GEricson commented 6 years ago

Although most people prefer the readability inherent with the key as a segment approach. It would be a bad thing to not allow the parenthesized key form for multiple reasons: 1) There is existing code that uses the parenthesized key form. 2) The key as segment style only works for simple keys. If a resource is defined with a complex key, the parenthesized style must be used. 3) It is a somewhat common practice to define keys using common names. It is possible that the key value and a property or action name could collide. The parenthesized style avoids that conflict. 4) The form of a URL is left to the server that publishes them. They should be treated as opaque. Specifying one form or the other goes counter to that. It is best to leave the key style used to the server implementation.

ddeel commented 6 years ago

The Swordfish Basic Web Client code could be extended to include support for the more complex form, if someone contributes code that makes it happen without impacting the current functionality. However, it would be wise to wait until the pending Redfish URL clarifications are settled.

GEricson commented 6 years ago

With the exception of the URL to the ServiceRoot (or ServiceContainer), the Swordfish Basic Web Client must not create URLs to resources. In all other cases resource URLs should be discovered and used as opaque strings. It is allowed to append URL segments that identify property, navigation property, action, or function names to the URL of a resource. It is a bug if the Swordfish Basic Web Client is doing more than.

rahlvers commented 6 years ago

This is an enhancement request for the basic web client.