#40: Support for remote Windows mounts - partial
This commit is contained in:
10
src/App.js
10
src/App.js
@@ -102,6 +102,9 @@ class App extends IPCContainer {
|
|||||||
const noConsoleSupported = this.props.LocationsLookup[selectedVersion] &&
|
const noConsoleSupported = this.props.LocationsLookup[selectedVersion] &&
|
||||||
this.props.LocationsLookup[selectedVersion].no_console_supported;
|
this.props.LocationsLookup[selectedVersion].no_console_supported;
|
||||||
|
|
||||||
|
const remoteSupported = this.props.LocationsLookup[selectedVersion] &&
|
||||||
|
this.props.LocationsLookup[selectedVersion].supports_remote;
|
||||||
|
|
||||||
const showConfig = !missingDependencies &&
|
const showConfig = !missingDependencies &&
|
||||||
this.props.DisplayConfiguration &&
|
this.props.DisplayConfiguration &&
|
||||||
!this.props.RebootRequired &&
|
!this.props.RebootRequired &&
|
||||||
@@ -124,7 +127,7 @@ class App extends IPCContainer {
|
|||||||
|
|
||||||
const infoDisplay = this.createModalConditionally(this.props.DisplayInfo, <InfoDetails/>, true);
|
const infoDisplay = this.createModalConditionally(this.props.DisplayInfo, <InfoDetails/>, true);
|
||||||
const rebootDisplay = this.createModalConditionally(this.props.RebootRequired, <Reboot />);
|
const rebootDisplay = this.createModalConditionally(this.props.RebootRequired, <Reboot />);
|
||||||
const configDisplay = this.createModalConditionally(showConfig, <Configuration version={selectedVersion} />);
|
const configDisplay = this.createModalConditionally(showConfig, <Configuration version={selectedVersion} remoteSupported={remoteSupported} />);
|
||||||
const dependencyDisplay = this.createModalConditionally(showDependencies, <DependencyList/>);
|
const dependencyDisplay = this.createModalConditionally(showDependencies, <DependencyList/>);
|
||||||
const downloadDisplay = this.createModalConditionally(this.props.DownloadActive, <DownloadProgress/>);
|
const downloadDisplay = this.createModalConditionally(this.props.DownloadActive, <DownloadProgress/>);
|
||||||
const errorDisplay = this.createModalConditionally(this.props.DisplayError, <ErrorDetails/>, true);
|
const errorDisplay = this.createModalConditionally(this.props.DisplayError, <ErrorDetails/>, true);
|
||||||
@@ -138,7 +141,7 @@ class App extends IPCContainer {
|
|||||||
let key = 0;
|
let key = 0;
|
||||||
mainContent.push((
|
mainContent.push((
|
||||||
<div key={'rvd_' + key++}
|
<div key={'rvd_' + key++}
|
||||||
style={{height: '32%'}}>
|
style={{'paddingBottom': '8px'}}>
|
||||||
<ReleaseVersionDisplay downloadDisabled={!downloadEnabled}
|
<ReleaseVersionDisplay downloadDisabled={!downloadEnabled}
|
||||||
version={selectedVersion}/>
|
version={selectedVersion}/>
|
||||||
</div>
|
</div>
|
||||||
@@ -146,11 +149,10 @@ class App extends IPCContainer {
|
|||||||
|
|
||||||
if (allowMount) {
|
if (allowMount) {
|
||||||
mainContent.push((
|
mainContent.push((
|
||||||
<div key={'md_' + key++}>
|
|
||||||
<MountItems allowConfig={allowConfig}
|
<MountItems allowConfig={allowConfig}
|
||||||
allowSiaPrime={allowSiaPrime}
|
allowSiaPrime={allowSiaPrime}
|
||||||
|
key={'md_' + key++}
|
||||||
noConsoleSupported={noConsoleSupported}/>
|
noConsoleSupported={noConsoleSupported}/>
|
||||||
</div>
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ export default connect(mapStateToProps, mapDispatchToProps)(props => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid>
|
<Grid noScroll>
|
||||||
<Text colSpan={columns=>columns / 3}
|
<Text colSpan={columns=>columns / 3}
|
||||||
rowSpan={4}
|
rowSpan={4}
|
||||||
text={'Release'}
|
text={'Release'}
|
||||||
|
|||||||
@@ -3,14 +3,6 @@ import './Grid.css';
|
|||||||
import GridComponent from './GridComponent/GridComponent';
|
import GridComponent from './GridComponent/GridComponent';
|
||||||
|
|
||||||
export default class extends Component {
|
export default class extends Component {
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
window.addEventListener("resize", this.updateSizeAsync);
|
|
||||||
this.checkSizeInterval = setInterval(()=> {
|
|
||||||
this.updateSize()
|
|
||||||
}, 2000);
|
|
||||||
}
|
|
||||||
|
|
||||||
checkSizeInterval;
|
checkSizeInterval;
|
||||||
|
|
||||||
state = {
|
state = {
|
||||||
@@ -58,6 +50,10 @@ export default class extends Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
window.addEventListener("resize", this.updateSizeAsync);
|
||||||
|
this.checkSizeInterval = setInterval(()=> {
|
||||||
|
this.updateSize()
|
||||||
|
}, 2000);
|
||||||
this.updateSizeAsync();
|
this.updateSizeAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,15 +104,18 @@ export default class extends Component {
|
|||||||
.filter(i => i !== null);
|
.filter(i => i !== null);
|
||||||
}
|
}
|
||||||
|
|
||||||
const style = {
|
let style = {
|
||||||
style: {
|
style: {
|
||||||
gridTemplateColumns: '4px '.repeat(dimensions.columns).trim(),
|
gridTemplateColumns: '4px '.repeat(dimensions.columns).trim(),
|
||||||
gridTemplateRows: '4px '.repeat(dimensions.rows).trim(),
|
gridTemplateRows: '4px '.repeat(dimensions.rows).trim(),
|
||||||
gridAutoColumns: '4px',
|
gridAutoColumns: '4px',
|
||||||
gridAutoRows: '4px'
|
gridAutoRows: '4px',
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
if (this.props.noScroll) {
|
||||||
|
style['style'].overflowX = 'visible';
|
||||||
|
style['style'].overflowY = 'visible';
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
ref='GridOwner'
|
ref='GridOwner'
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ class Configuration extends IPCContainer {
|
|||||||
return {
|
return {
|
||||||
advanced: template[key] ? template[key].advanced : false,
|
advanced: template[key] ? template[key].advanced : false,
|
||||||
label: key,
|
label: key,
|
||||||
|
remote: template[key] ? template[key].remote : false,
|
||||||
value: config[key],
|
value: config[key],
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
@@ -141,7 +142,6 @@ class Configuration extends IPCContainer {
|
|||||||
objectLookup[obj.label] = list2.ItemList;
|
objectLookup[obj.label] = list2.ItemList;
|
||||||
}
|
}
|
||||||
const objectLookupCopy = JSON.parse(JSON.stringify(objectLookup));
|
const objectLookupCopy = JSON.parse(JSON.stringify(objectLookup));
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
ItemList: list.ItemList,
|
ItemList: list.ItemList,
|
||||||
ObjectLookup: objectLookup,
|
ObjectLookup: objectLookup,
|
||||||
@@ -207,6 +207,22 @@ class Configuration extends IPCContainer {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
showRemoteConfigItem = (item, itemList) => {
|
||||||
|
if (item.advanced &&
|
||||||
|
item.remote &&
|
||||||
|
this.props.remoteSupported &&
|
||||||
|
(item.label !== 'IsRemoteMount')) {
|
||||||
|
const isRemoteMount = JSON.parse(itemList.find(s=>s.label === 'IsRemoteMount').value);
|
||||||
|
const enableRemoteMount = JSON.parse(itemList.find(s=>s.label === 'EnableRemoteMount').value);
|
||||||
|
return (item.label === 'RemoteHostNameOrIp') ?
|
||||||
|
isRemoteMount :
|
||||||
|
(item.label === 'EnableRemoteMount') ?
|
||||||
|
!isRemoteMount :
|
||||||
|
enableRemoteMount;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let confirmSave = null;
|
let confirmSave = null;
|
||||||
if ((this.state.ChangedItems.length > 0) || this.state.ChangedObjectLookup) {
|
if ((this.state.ChangedItems.length > 0) || this.state.ChangedObjectLookup) {
|
||||||
@@ -228,7 +244,7 @@ class Configuration extends IPCContainer {
|
|||||||
const configurationItems = this.state.ItemList
|
const configurationItems = this.state.ItemList
|
||||||
.map((k, i) => {
|
.map((k, i) => {
|
||||||
return (
|
return (
|
||||||
((this.state.ShowAdvanced && k.advanced) || !k.advanced) ?
|
(!k.advanced || (this.state.ShowAdvanced && k.advanced)) ?
|
||||||
<ConfigurationItem advanced={k.advanced}
|
<ConfigurationItem advanced={k.advanced}
|
||||||
changed={e=>this.handleItemChanged(e, i)}
|
changed={e=>this.handleItemChanged(e, i)}
|
||||||
grouping={'Settings'}
|
grouping={'Settings'}
|
||||||
@@ -249,7 +265,7 @@ class Configuration extends IPCContainer {
|
|||||||
{
|
{
|
||||||
this.state.ObjectLookup[key].map((k, i) => {
|
this.state.ObjectLookup[key].map((k, i) => {
|
||||||
return (
|
return (
|
||||||
((this.state.ShowAdvanced && k.advanced) || !k.advanced) ?
|
(!k.advanced || (this.state.ShowAdvanced && k.advanced && !k.remote) || this.showRemoteConfigItem(k, this.state.ObjectLookup[key])) ?
|
||||||
<ConfigurationItem advanced={k.advanced}
|
<ConfigurationItem advanced={k.advanced}
|
||||||
changed={e=>this.handleObjectItemChanged(e, key, i)}
|
changed={e=>this.handleObjectItemChanged(e, key, i)}
|
||||||
grouping={key}
|
grouping={key}
|
||||||
|
|||||||
Reference in New Issue
Block a user