-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates to the UI based on UX designs. (#1795)
* Updates to the UI based on UX designs. Fixes #1762 * fix selenium tests Co-authored-by: Fabian Martinez <[email protected]>
- Loading branch information
1 parent
50ca186
commit 0fe2ad9
Showing
26 changed files
with
184 additions
and
323 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
/** | ||
* @license | ||
* Copyright 2021 JBoss Inc | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
import React from "react"; | ||
import {Tab, Tabs, TabTitleText} from '@patternfly/react-core'; | ||
import "./pageheader.css"; | ||
import {PureComponent, PureComponentProps, PureComponentState} from "../baseComponent"; | ||
import {IfAuth, IfFeature} from "../common"; | ||
import {Services} from "../../../services"; | ||
|
||
|
||
/** | ||
* Properties | ||
*/ | ||
// tslint:disable-next-line:no-empty-interface | ||
export interface RootPageHeaderProps extends PureComponentProps { | ||
tabKey: number; | ||
} | ||
|
||
/** | ||
* State | ||
*/ | ||
// tslint:disable-next-line:no-empty-interface | ||
export interface RootPageHeaderState extends PureComponentState { | ||
} | ||
|
||
|
||
/** | ||
* Models the page header for the Artifacts page. | ||
*/ | ||
export class RootPageHeader extends PureComponent<RootPageHeaderProps, RootPageHeaderState> { | ||
|
||
constructor(props: Readonly<RootPageHeaderProps>) { | ||
super(props); | ||
} | ||
|
||
public render(): React.ReactElement { | ||
let tabs: any[] = [ | ||
<Tab eventKey={0} title={<TabTitleText>Artifacts</TabTitleText>} />, | ||
<Tab eventKey={1} title={<TabTitleText>Global Rules</TabTitleText>} /> | ||
]; | ||
if (Services.getConfigService().featureRoleManagement()) { | ||
tabs.push( | ||
<Tab eventKey={2} title={<TabTitleText>Permissions</TabTitleText>} /> | ||
); | ||
} | ||
return ( | ||
<div> | ||
<IfAuth isAdmin={true}> | ||
<Tabs activeKey={this.props.tabKey} onSelect={this.handleTabClick} children={tabs} /> | ||
</IfAuth> | ||
</div> | ||
); | ||
} | ||
|
||
protected initializeState(): RootPageHeaderState { | ||
return {}; | ||
} | ||
|
||
private handleTabClick = (event: React.MouseEvent<HTMLElement, MouseEvent>, eventKey: number | string): void => { | ||
if (eventKey != this.props.tabKey) { | ||
if (eventKey == 0) { | ||
// navigate to artifacts | ||
this.navigateTo(this.linkTo("/artifacts"))(); | ||
} | ||
if (eventKey == 1) { | ||
// navigate to global rules | ||
this.navigateTo(this.linkTo("/rules"))(); | ||
} | ||
if (eventKey == 2) { | ||
// navigate to permissions page | ||
this.navigateTo(this.linkTo("/roles"))(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
ui/src/app/pages/artifactVersion/components/pageheader/pageheader.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
#upload-version-button { | ||
} | ||
|
||
#delete-artifact-button { | ||
margin-left: 10px; | ||
margin-right: 10px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
.ps_artifacts-header { | ||
border-bottom: 1px solid #ddd; | ||
} | ||
|
||
.upload-artifact-modal .pf-c-modal-box__body { | ||
overflow-x: initial; | ||
overflow-y: visible; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
ui/src/app/pages/artifacts/components/pageheader/pageheader.css
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.