Skip to content
This repository was archived by the owner on Jun 11, 2021. It is now read-only.

Commit

Permalink
Merge pull request #5315 from mat007/DESKTOP-1875-remove-web-preview
Browse files Browse the repository at this point in the history
Remove container web preview for security reasons
  • Loading branch information
mat007 authored Sep 25, 2019
2 parents e9968d5 + 6554c5c commit e27deab
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 102 deletions.
14 changes: 1 addition & 13 deletions src/components/ContainerHome.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import _ from 'underscore';
import $ from 'jquery';
import React from 'react/addons';
import ContainerProgress from './ContainerProgress.react';
import ContainerHomePreview from './ContainerHomePreview.react';
import ContainerHomeLogs from './ContainerHomeLogs.react';
import ContainerHomeFolders from './ContainerHomeFolders.react';
import {shell} from 'electron';
Expand Down Expand Up @@ -36,10 +35,6 @@ var ContainerHome = React.createClass({
shell.openExternal('https://github.com/kitematic/kitematic/issues/new');
},

showWeb: function () {
return _.keys(this.props.ports).length > 0;
},

showFolders: function () {
return this.props.container.Mounts && this.props.container.Mounts.length > 0 && this.props.container.State.Running;
},
Expand Down Expand Up @@ -118,19 +113,13 @@ var ContainerHome = React.createClass({
var logWidget = (
<ContainerHomeLogs container={this.props.container}/>
);
var webWidget;
if (this.showWeb()) {
webWidget = (
<ContainerHomePreview ports={this.props.ports} defaultPort={this.props.defaultPort} />
);
}
var folderWidget;
if (this.showFolders()) {
folderWidget = (
<ContainerHomeFolders container={this.props.container} />
);
}
if (logWidget && !webWidget && !folderWidget) {
if (logWidget && !folderWidget) {
body = (
<div className="details-panel home">
<div className="content">
Expand All @@ -148,7 +137,6 @@ var ContainerHome = React.createClass({
{logWidget}
</div>
<div className="right">
{webWidget}
{folderWidget}
</div>
</div>
Expand Down
50 changes: 0 additions & 50 deletions src/components/ContainerHomePreview.react.js

This file was deleted.

39 changes: 0 additions & 39 deletions src/components/ContainerHomeWebPreview.react.js

This file was deleted.

0 comments on commit e27deab

Please sign in to comment.