Turn off "New Database" for Fabric (#1663)
* Turn off "New Database" for Fabric * Fix format
This commit is contained in:
parent
14d7677056
commit
9b032ecae4
|
@ -67,7 +67,7 @@ export function createStaticCommandBarButtons(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (userContext.apiType !== "Tables") {
|
if (userContext.apiType !== "Tables" && configContext.platform !== Platform.Fabric) {
|
||||||
newCollectionBtn.children = [createNewCollectionGroup(container)];
|
newCollectionBtn.children = [createNewCollectionGroup(container)];
|
||||||
const newDatabaseBtn = createNewDatabase(container);
|
const newDatabaseBtn = createNewDatabase(container);
|
||||||
newCollectionBtn.children.push(newDatabaseBtn);
|
newCollectionBtn.children.push(newDatabaseBtn);
|
||||||
|
|
|
@ -114,7 +114,8 @@ export class AddCollectionPanel extends React.Component<AddCollectionPanelProps,
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
createNewDatabase: userContext.apiType !== "Tables" && !this.props.databaseId,
|
createNewDatabase:
|
||||||
|
userContext.apiType !== "Tables" && configContext.platform !== Platform.Fabric && !this.props.databaseId,
|
||||||
newDatabaseId: props.isQuickstart ? this.getSampleDBName() : "",
|
newDatabaseId: props.isQuickstart ? this.getSampleDBName() : "",
|
||||||
isSharedThroughputChecked: this.getSharedThroughputDefault(),
|
isSharedThroughputChecked: this.getSharedThroughputDefault(),
|
||||||
selectedDatabaseId:
|
selectedDatabaseId:
|
||||||
|
@ -274,36 +275,38 @@ export class AddCollectionPanel extends React.Component<AddCollectionPanelProps,
|
||||||
</TooltipHost>
|
</TooltipHost>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
<Stack horizontal verticalAlign="center">
|
{configContext.platform !== Platform.Fabric && (
|
||||||
<div role="radiogroup">
|
<Stack horizontal verticalAlign="center">
|
||||||
<input
|
<div role="radiogroup">
|
||||||
className="panelRadioBtn"
|
<input
|
||||||
checked={this.state.createNewDatabase}
|
className="panelRadioBtn"
|
||||||
aria-label="Create new database"
|
checked={this.state.createNewDatabase}
|
||||||
aria-checked={this.state.createNewDatabase}
|
aria-label="Create new database"
|
||||||
name="databaseType"
|
aria-checked={this.state.createNewDatabase}
|
||||||
type="radio"
|
name="databaseType"
|
||||||
role="radio"
|
type="radio"
|
||||||
id="databaseCreateNew"
|
role="radio"
|
||||||
tabIndex={0}
|
id="databaseCreateNew"
|
||||||
onChange={this.onCreateNewDatabaseRadioBtnChange.bind(this)}
|
tabIndex={0}
|
||||||
/>
|
onChange={this.onCreateNewDatabaseRadioBtnChange.bind(this)}
|
||||||
<span className="panelRadioBtnLabel">Create new</span>
|
/>
|
||||||
|
<span className="panelRadioBtnLabel">Create new</span>
|
||||||
|
|
||||||
<input
|
<input
|
||||||
className="panelRadioBtn"
|
className="panelRadioBtn"
|
||||||
checked={!this.state.createNewDatabase}
|
checked={!this.state.createNewDatabase}
|
||||||
aria-label="Use existing database"
|
aria-label="Use existing database"
|
||||||
aria-checked={!this.state.createNewDatabase}
|
aria-checked={!this.state.createNewDatabase}
|
||||||
name="databaseType"
|
name="databaseType"
|
||||||
type="radio"
|
type="radio"
|
||||||
role="radio"
|
role="radio"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
onChange={this.onUseExistingDatabaseRadioBtnChange.bind(this)}
|
onChange={this.onUseExistingDatabaseRadioBtnChange.bind(this)}
|
||||||
/>
|
/>
|
||||||
<span className="panelRadioBtnLabel">Use existing</span>
|
<span className="panelRadioBtnLabel">Use existing</span>
|
||||||
</div>
|
</div>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
)}
|
||||||
|
|
||||||
{this.state.createNewDatabase && (
|
{this.state.createNewDatabase && (
|
||||||
<Stack className="panelGroupSpacing">
|
<Stack className="panelGroupSpacing">
|
||||||
|
|
Loading…
Reference in New Issue