Skip to content
This repository has been archived by the owner on Sep 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #812 from Tharon-C/use-specified-console
Browse files Browse the repository at this point in the history
Either show Guacamole or Legacy remote services not both
  • Loading branch information
Calvin McLean authored Jun 10, 2019
2 parents bd1cb89 + 2588991 commit 1f98da2
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 28 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
### Changed
- Update `psycopg` requirement to version 2.7.3.1
([#795](https://github.com/cyverse/troposphere/pull/795))
- Use feature flag "GUACAMOLE" to alternativly render Guacmole or Legacy remote service links on instance actions not both
([#812](https://github.com/cyverse/troposphere/pull/812))
- Update Dockerfile to use Ubuntu 18.04
([#810](https://github.com/cyverse/troposphere/pull/810))
- Fix typo on shelve instance modal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,36 +243,11 @@ export default React.createClass({
ipAddress = instance.get("ip_address"),
disableWebLinks = !ipAddress || ipAddress === "0.0.0.0";

let links = [
{
label: "Open Old Web Shell",
icon: "console",
href: webShellUrl,
onClick: this.onWebShell,
openInNewWindow: true,
isDisabled: disableWebLinks
}
];

if (webDesktopCapable && featureFlags.WEB_DESKTOP) {
links.push({
label: "Open Old Web Desktop",
icon: "sound-stereo",
onClick: this.onWebDesktop.bind(
this,
this.props.instance,
"web_desktop",
"vnc"
),
openInNewWindow: true,
isDisabled: disableWebLinks
});
}

let links = [];
if (featureFlags.GUACAMOLE) {
links.push({
label: "Open Web Shell",
icon: "text-background",
icon: "console",
onClick: this.onWebDesktop.bind(
this,
this.props.instance,
Expand All @@ -286,7 +261,7 @@ export default React.createClass({
if (webDesktopCapable) {
links.push({
label: "Open Web Desktop",
icon: "sound-dolby",
icon: "sound-stereo",
onClick: this.onWebDesktop.bind(
this,
this.props.instance,
Expand All @@ -297,6 +272,30 @@ export default React.createClass({
isDisabled: disableWebLinks
});
}
} else {
links.push({
label: "Open Web Shell",
icon: "console",
href: webShellUrl,
onClick: this.onWebShell,
openInNewWindow: true,
isDisabled: disableWebLinks
});

if (webDesktopCapable && featureFlags.WEB_DESKTOP) {
links.push({
label: "Open Web Desktop",
icon: "sound-stereo",
onClick: this.onWebDesktop.bind(
this,
this.props.instance,
"web_desktop",
"vnc"
),
openInNewWindow: true,
isDisabled: disableWebLinks
});
}
}

return links;
Expand Down

0 comments on commit 1f98da2

Please sign in to comment.