Skip to content

Commit

Permalink
RANGER-4138 Build ranger-react UI and backbone UI code base in webapp
Browse files Browse the repository at this point in the history
Signed-off-by: Madhan Neethiraj <[email protected]>
  • Loading branch information
fimugdha authored and mneethiraj committed Oct 27, 2023
1 parent de049b9 commit 7a22b82
Show file tree
Hide file tree
Showing 6 changed files with 439 additions and 680 deletions.
1,086 changes: 416 additions & 670 deletions security-admin/pom.xml

Large diffs are not rendered by default.

File renamed without changes.
11 changes: 7 additions & 4 deletions security-admin/src/main/webapp/react-webapp/src/views/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ class Header extends Component {

render() {
const userProps = getUserProfile();
const apiUrl = getBaseUrl() + "apidocs/index.html";
const apiUrl = getBaseUrl() + "apidocs/swagger.html";
const backboneUrl = getBaseUrl() + "backbone-index.html";
const loginId = (
<span className="login-id">
<i className="fa fa-user-circle fa-lg"></i>
Expand Down Expand Up @@ -118,7 +119,6 @@ class Header extends Component {
Audit
</Nav.Link>
)}

{hasAccessToTab("Security Zone") && (
<React.Fragment>
{!isKeyAdmin() && (
Expand Down Expand Up @@ -150,7 +150,7 @@ class Header extends Component {
)}
</React.Fragment>
)}
<>
<React.Fragment>
{(hasAccessToTab("Users/Groups") ||
isAuditor() ||
isSystemAdmin()) && (
Expand All @@ -173,7 +173,7 @@ class Header extends Component {
)}
</NavDropdown>
)}
</>
</React.Fragment>
</Nav>
<Nav>
<NavDropdown title={loginId} id="user-dropdown" alignRight>
Expand All @@ -184,6 +184,9 @@ class Header extends Component {
>
<i className="fa fa-user"></i> Profile
</NavDropdown.Item>
<a class="dropdown-item" href={backboneUrl}>
<i className="fa fa fa-sign-out"></i> Backbone UI
</a>
<a className="dropdown-item" href={apiUrl} target="_blank">
<i className="fa fa-user"></i> API Documentation
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -607,9 +607,17 @@ export const SideBarBody = (props) => {
Profile
</NavLink>
</li>
{/* <li className="list-group-item">
<a href={backboneUrl}>Backbone Classic UI</a>
</li> */}
<li className="list-group-item">
<a
href={backboneUrl}
onClick={() => {
props.closeCollapse();
localStorage.clear();
}}
>
Backbone Classic UI
</a>
</li>
<li className="list-group-item">
<a
href={apiUrl}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ define(function(require){
return {
userProfile : this.userProfile,
oldUi : localStorage.getItem('setOldUI') == "true" ? false : true ,
swaggerUI : urlString+"/apidocs/swagger.html"
swaggerUI : urlString+"/apidocs/swagger.html",
reactUI : urlString+"/index.html"
};
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,17 @@
</a>
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item" href="#!/userprofile"><i class="fa fa-user m-r-xs"></i> Profile </a>
<a class="dropdown-item" href={{reactUI}}><i class="fa fa-sign-out m-r-xs"></i> React UI </a>
<a class="dropdown-item" href={{swaggerUI}} target='_blank'><i class="fa fa-user m-r-xs"></i> API Documentation </a>
<a class="dropdown-item" href="javascript:;" class="_allowNav" data-id="logout"><i class="fa fa-power-off m-r-xs"></i> Log Out </a>
{{#if oldUi}}
<a class="dropdown-item" href="javascript:;" data-id="oldNewSwitch" data-value="true">
<i class="fa fa-sign-out m-r-xs"></i> Switch to classic UI </a>
{{else}}
<a class="dropdown-item" href="javascript:;" data-id="oldNewSwitch" data-value="false">
<i class="fa fa-sign-out m-r-xs"></i> Switch to latest UI </a>
{{/if}}
<a class="dropdown-item" href="javascript:;" class="_allowNav" data-id="logout"><i class="fa fa-power-off m-r-xs"></i> Log Out </a>
</div>
</li>
</ul>
</div>
</div>

0 comments on commit 7a22b82

Please sign in to comment.