[ 
https://issues.apache.org/jira/browse/KNOX-1914?focusedWorklogId=314309&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-314309
 ]

ASF GitHub Bot logged work on KNOX-1914:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 18/Sep/19 13:35
            Start Date: 18/Sep/19 13:35
    Worklog Time Spent: 10m 
      Work Description: smolnar82 commented on pull request #147: KNOX-1914 - 
New admin API to be used by the UI to fetch available service discovery types
URL: https://github.com/apache/knox/pull/147
 
 
   ## What changes were proposed in this pull request?
   
   The Discovery Details section of the Admin UI for working with descriptors 
includes a drop-down list of supported discovery providers (e.g., Ambari, 
ClouderaManager). Currently, this list is statically defined in the Admin UI. 
With my changes in place, the admin UI uses a new API from the Knox server for 
determining the list of supported discovery providers.
   
   ## How was this patch tested?
   
   Running JUnit tests:
   ```
   $ mvn clean -Dshellcheck=true -T1C verify -Prelease,package
   ...
   [INFO] 
------------------------------------------------------------------------
   [INFO] BUILD SUCCESS
   [INFO] 
------------------------------------------------------------------------
   [INFO] Total time: 18:01 min (Wall Clock)
   [INFO] Finished at: 2019-09-18T15:27:07+02:00
   [INFO] Final Memory: 385M/1928M
   [INFO] 
------------------------------------------------------------------------
   ```
   
   Additionally, I tested this feature locally as follows:
   1. Rebuilt the entire project, redeployed the Knox gateway and restarted the 
service
   2. Logged in the admin UI and created a new descriptor called `smolnarTest`
   3. When the descriptor was created I could browse the available service 
discovery types
   
   <img width="1669" alt="Screen Shot 2019-09-18 at 3 10 34 PM" 
src="https://user-images.githubusercontent.com/34065904/65153312-d430e800-da29-11e9-9e51-4d2da6898b68.png";>
   
   I also confirmed the new admin API works with `curl` too:
   ```
   $ curl --header "Accept: application/json" --header "Content-Type: 
application/json" -iku admin:admin-password  -X GET 
'https://localhost:8443/gateway/admin/api/v1/servicediscoveries'
   HTTP/1.1 200 OK
   Date: Wed, 18 Sep 2019 13:08:47 GMT
   Set-Cookie: KNOXSESSIONID=node0omo2sp8auh5v1uwa6e4cir5uu0.node0; 
Path=/gateway/admin; Secure; HttpOnly
   Expires: Thu, 01 Jan 1970 00:00:00 GMT
   Set-Cookie: rememberMe=deleteMe; Path=/gateway/admin; Max-Age=0; 
Expires=Tue, 17-Sep-2019 13:08:47 GMT
   Content-Type: application/json
   Content-Length: 372
   Server: Jetty(9.4.19.v20190610)
   
   {
      "knoxServiceDiscoveries" : {
         "knoxServiceDiscovery" : [ {
            "type" : "Ambari",
            "implementation" : 
"org.apache.knox.gateway.topology.discovery.ambari.AmbariServiceDiscovery"
         }, {
            "type" : "ClouderaManager",
            "implementation" : 
"org.apache.knox.gateway.topology.discovery.cm.ClouderaManagerServiceDiscovery"
         } ]
      }
   }
   ```
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

            Worklog Id:     (was: 314309)
    Remaining Estimate: 0h
            Time Spent: 10m

> Dynamic population of Admin UI service discovery type options
> -------------------------------------------------------------
>
>                 Key: KNOX-1914
>                 URL: https://issues.apache.org/jira/browse/KNOX-1914
>             Project: Apache Knox
>          Issue Type: Bug
>          Components: AdminUI
>    Affects Versions: 1.3.0
>            Reporter: Phil Zampino
>            Assignee: Sandor Molnar
>            Priority: Major
>             Fix For: 1.4.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The Discovery Details section of the Admin UI for working with descriptors 
> includes a drop-down list of supported discovery providers (e.g., Ambari, 
> ClouderaManager). Currently, this list is statically defined in the Admin UI. 
> It should be possible to expose an API from the Knox host for determining the 
> list of supported discovery providers.
> This API could leverage the same Java service loader mechanism that is used 
> by the discovery runtime to load discovery providers.
> This would be nice for two closely-related reasons:
>  # Subsequent additional discovery providers implemented in the Knox project 
> itself won't require further Admin UI changes.
>  # User/Customer discovery provider extensions would get Admin UI support 
> automatically.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to