Bug 1381575

Summary: Serving static files hosted on the master redirects to the projects page
Product: OpenShift Container Platform Reporter: Samuel Padgett <spadgett>
Component: Management ConsoleAssignee: Samuel Padgett <spadgett>
Status: CLOSED CURRENTRELEASE QA Contact: Yadan Pei <yapei>
Severity: high Docs Contact:
Priority: high    
Version: 3.2.1CC: aos-bugs, erjones, jforrest, jokerman, mmccomas, pweil, spadgett, yapei
Target Milestone: ---   
Target Release: 3.2.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: The download CLI link from the web console would not work if the CLI download was hosted as a web console extension. Consequence: You could not host the download as a web console extension. Fix: Fix the download link so that it will always download from the server. Result: You can host the CLI as a static file using web console extensions.
Story Points: ---
Clone Of: 1377492 Environment:
> openshift version openshift v3.2.1.13-1-gc2a90e1 kubernetes v1.2.0-36-g4a3f9c5 etcd 2.2.5
Last Closed: 2016-12-14 19:44:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1377492    
Bug Blocks:    

Comment 1 Jessica Forrester 2016-10-04 13:14:33 UTC
Was merged to ose 3.2 branch in https://github.com/openshift/ose/pull/378

Comment 3 Yadan Pei 2016-10-08 08:03:48 UTC
Checked against 
openshift v3.2.1.16
kubernetes v1.2.0-36-g4a3f9c5
etcd 2.2.5

with steps:

1. Prepare the static files and CLI download link files

# mkdir /root/testfiles

# echo 1 > /root/testfiles/1.txt

# cat /root/cli-links.js

window.OPENSHIFT_CONSTANTS.CLI = {
  "Mac OS X":        "https://<master>:8443/console/extensions/downloads/1.txt"
};

 

2. Modify your master-config.yaml

assetConfig:
  extensionScripts:
  - /root/cli-links.js
  extensions:
    - name: downloads
      sourceDirectory: /root/testfiles

3. Restart atomic-openshift-master

# systemctl restart atomic-openshift-master

 

4. Logout -> Login web console again

 

5. click "?" dropdown

click "Command Line Tools"

click "Mac OS X"


6. Number 1 is returned on page


Now it returns the correct content of static files, move to VERIFIED