Skip to content

Commit

Permalink
Ccs-4183-bugfixes2 (#602)
Browse files Browse the repository at this point in the history
* address UI issue on Pre-live url

* use icon and tooltip when product version metata is missing for the pre-live url
  • Loading branch information
xdavidson committed May 24, 2021
1 parent 7d0e7f0 commit d1c485b
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions pantheon-bundle/frontend/src/app/contentDisplay.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component } from "react"
import { CopyIcon } from "@patternfly/react-icons";
import { CopyIcon, InfoCircleIcon } from "@patternfly/react-icons";
import {
Card, Text, TextContent, TextVariants, Level, LevelItem, Button, Divider, Title
Card, Text, TextContent, TextVariants, Level, LevelItem, Button, Divider, Title, Tooltip
} from "@patternfly/react-core"

import { Versions } from "@app/versions"
Expand Down Expand Up @@ -119,8 +119,7 @@ class ContentDisplay extends Component<any, IModuleDisplayState | IAssemblyDispl
</LevelItem>
<LevelItem />
<LevelItem>
{this.state.lastPublishDate.trim() !== "" && this.state.lastPublishDate !== "-"
&& this.state.variantUUID !== ""
{this.state.variantUUID !== ""
&& this.state.portalUrl !== ""
&& this.state.portalUrlType === "LIVE"
&& <span><a href={this.state.portalUrl} target="_blank">View on Customer Portal <i className="fa pf-icon-arrow" /></a> </span>
Expand All @@ -132,8 +131,7 @@ class ContentDisplay extends Component<any, IModuleDisplayState | IAssemblyDispl
}
</LevelItem>
<LevelItem>
{this.state.lastPublishDate.trim() !== "" && this.state.lastPublishDate !== "-"
&& this.state.variantUUID !== ""
{this.state.variantUUID !== ""
&& this.state.portalUrl !== ""
&& this.state.portalUrlType === "LIVE"
&& <span><a id="permanentURL" onClick={this.copyToClipboard} onMouseLeave={this.mouseLeave}>Copy permanent URL <CopyIcon /></a></span>
Expand All @@ -146,7 +144,7 @@ class ContentDisplay extends Component<any, IModuleDisplayState | IAssemblyDispl
{this.state.variantUUID !== ""
&& this.state.portalUrl !== ""
&& this.state.portalUrlType === "ERROR"
&& <span>No URL; {this.state.portalUrl}</span>
&& <span><div><Tooltip position="top" content={<div>NO URL; {this.state.portalUrl}</div>}><InfoCircleIcon /></Tooltip></div></span>
}

<span>&emsp;{this.state.copySuccess !== "" && this.state.copySuccess}</span>
Expand Down

0 comments on commit d1c485b

Please sign in to comment.