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

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

                Author: ASF GitHub Bot
            Created on: 31/Oct/23 09:29
            Start Date: 31/Oct/23 09:29
    Worklog Time Spent: 10m 
      Work Description: smolnar82 opened a new pull request, #814:
URL: https://github.com/apache/knox/pull/814

   ## What changes were proposed in this pull request?
   
   Testing uncovered some API samples in the existing service definition files 
that needed to be fixed.
   
   Additionally, a general improvement is implemented that adds the missing 
slash at the beginning of the path element if it was missing from the service 
definition sample.
   
   ## How was this patch tested?
   
   Added unit tests and confirmed that API samples are actually changed on the 
UI:
   <img width="886" alt="Screenshot 2023-10-31 at 10 26 44" 
src="https://github.com/apache/knox/assets/34065904/1cc6f3fc-e379-42b1-b518-b29f5262bff0";>
   <img width="890" alt="Screenshot 2023-10-31 at 10 27 09" 
src="https://github.com/apache/knox/assets/34065904/cdfb7433-7659-4237-b1a4-59c1241add52";>
   <img width="891" alt="Screenshot 2023-10-31 at 10 27 21" 
src="https://github.com/apache/knox/assets/34065904/ae0385b2-c497-4759-b0f6-8dc12a31dcda";>
   To see the new-style API service dialog it's essential that you set the 
following property in `gateway-site.xml`:
   ```
       <property>
           <name>knox.homepage.api.services.view.version</name>
           <value>v2</value>
       </property>
   ```




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

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

> Few Service's API links for a topology on knox home page is incorrect
> ---------------------------------------------------------------------
>
>                 Key: KNOX-2958
>                 URL: https://issues.apache.org/jira/browse/KNOX-2958
>             Project: Apache Knox
>          Issue Type: Bug
>          Components: Homepage
>    Affects Versions: 2.0.0
>            Reporter: J.Andreina
>            Assignee: Sandor Molnar
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> *PROBLEM STATEMENT:*
> Service API links via knox in knox homepage is incorrect 
> *BUILDS:*
> knox 2.0
> *STEPS TO REPRODUCE:*
> 1. Create a topology1 with WEBHDFS,cm-api,OOZIE,RESOURCEMANAGER service 
> 2. Login to knox homepage 
> 3. go to topology1
> 4. Click on webhdfs api icon
> 5. Fetch the sample api links
> *CURRENT BEHAVIOUR:*
> 1. cm api url is invalid on knox homepage
> invalid url:
>  Fetch all CM-managed clusters
> curl -iv -X GET "https://knox-host:/gateway/topology1/cm-apiclusters";
> Fetches HDFS service details from cluster named 'c1'
> curl -iv -X GET 
> "https://knox-host:/gateway/topology1/cm-apiclusters/c1/services/HDFS";
> 2. webhdfs api link is incorrect
> incorrect url
> curl -iv -X GET 
> "https://knox-host:/gateway/topology1/webhdfsv1/testPath?op=LISTSTATUS";
> 3. Oozie api link is incorrect . Should have "/" after oozie
> incorrect url
>  curl -iv -X GET "https://knox-host:/gateway/topology1/oozieoozie/versions";
> 4. Resource manager api link is invalid . Should not have ws in the url
> incorrect url
> curl -iv -X GET 
> "https://knox-host:/gateway/topology1/resourcemanagerws/v1/cluster/metrics";
> *EXPECTED BEHAVIOUR:*
> correct urls as follows
> 1. cm valid url : should have "/" after webhdfs in the url as below
> curl -iv -X GET "https://knox-host:/gateway/topology1/cm-api/v40/clusters";
> 2. webhdfs valid url :
> valid url : should have "/" after webhdfs in the url as below
> curl -iv -X GET 
> "https://knox-host:/gateway/topology1/webhdfs/v1/testPath?op=LISTSTATUS";
> 3. oozie url:
> curl -iku hrt_qa:Password@123 -X GET 
> "https://knox-host:/gateway/topology1/oozie/oozie/versions";
> 4. RM url :
> curl -iv -X GET 
> "https://knox-host:/gateway/topology1/resourcemanager/v1/cluster/metrics";
> *OCCURRENCE:*
> Reproducible
> *IMPACT:*
> Not pointing to the appropriate api link , which causes the user to unable to 
> access the service api via knox.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to