Compare commits

...

52 Commits

Author SHA1 Message Date
hardiknai-techm
9acf9485cb host fix 2021-05-11 20:52:54 +05:30
hardiknai-techm
9751f0dd81 resolve merge conflict 2021-05-11 20:37:53 +05:30
hardiknai-techm
e0c8f32a7e Merge branch 'move_add_Database_Panel_to_react' of https://github.com/Azure/cosmos-explorer into move_add_Database_Panel_to_react 2021-05-10 23:41:51 +05:30
hardiknai-techm
46eda44fd7 snapshort update 2021-05-10 23:41:13 +05:30
Steve Faulkner
ab0dd728b9 Update snapshot 2021-05-10 13:09:13 -05:00
hardiknai-techm
c50543c341 address comment 2021-05-10 21:56:23 +05:30
hardiknai-techm
a675124bdc Merge branch 'master' of https://github.com/Azure/cosmos-explorer into move_add_Database_Panel_to_react 2021-05-10 17:56:04 +05:30
hardiknai-techm
05eae478d0 resolve master merge conflict 2021-05-10 17:55:26 +05:30
hardiknai-techm
6b0e972564 resolve merge conflict 2021-05-07 12:53:48 +05:30
hardiknai-techm
8075072f76 correct base on some suggestion 2021-05-07 12:51:53 +05:30
Steve Faulkner
0e0e6a2257 more 2021-05-05 19:31:07 -05:00
Steve Faulkner
4299b86c55 Revert "Pane cleanup"
This reverts commit b169fba45b.
2021-05-05 19:29:56 -05:00
Steve Faulkner
b169fba45b Pane cleanup 2021-05-05 19:26:23 -05:00
Steve Faulkner
2b576d6b8a Remove core-js 2021-05-05 19:22:53 -05:00
Steve Faulkner
0c009caea6 Fix test 2021-05-05 19:15:26 -05:00
Steve Faulkner
33048b2c98 Fixes 2021-05-05 19:00:23 -05:00
Steve Faulkner
3d4a24b2fd rename 2021-05-05 18:42:30 -05:00
Steve Faulkner
2ad0236c73 Fix 2021-05-05 18:41:37 -05:00
Steve Faulkner
c180d6a0cd Merge with mater 2021-05-05 18:31:54 -05:00
Steve Faulkner
dd747ee1ee Resolve conflict 2021-05-05 15:23:37 -05:00
hardiknai-techm
5485a0d3c6 resolve merge conflict 2021-05-04 13:03:01 +05:30
hardiknai-techm
7b6975761f resolve format and compile issue 2021-04-29 08:41:14 +05:30
hardiknai-techm
ed44c8640a Merge branch 'master' of https://github.com/Azure/cosmos-explorer into move_add_Database_Panel_to_react 2021-04-29 08:36:37 +05:30
hardiknai-techm
ade9049d80 update snapshrot test case 2021-04-28 20:36:04 +05:30
hardiknai-techm
6a3f50651e marge master conflict 2021-04-28 19:58:09 +05:30
hardiknai-techm
8de3edd0f8 remove div wrapper class 2021-04-24 15:49:10 +05:30
hardiknai-techm
9f0d5658c7 Merge branch 'genericRightPaneComponent' of https://github.com/Azure/cosmos-explorer into move_add_Database_Panel_to_react 2021-04-24 13:41:03 +05:30
hardiknai-techm
28bbba5522 addDatabasePane provide backward compatibility 2021-04-24 13:39:13 +05:30
hardiknai-techm
42552bad07 addDatabasePane provide backward compatibility 2021-04-24 13:32:00 +05:30
hardiknai-techm
0aeb16fb96 resolve master branch conflict 2021-04-24 11:10:38 +05:30
hardiknai-techm
3e011f939d resolve conflict master branch 2021-04-23 19:13:13 +05:30
hardiknai-techm
43aafde25f revert knockout component 2021-04-19 18:43:10 +05:30
hardiknai-techm
9aafadf346 resolve master merge conflict 2021-04-19 17:52:28 +05:30
hardiknai-techm
ba25eea41e update sanpshort test case 2021-04-16 15:59:48 +05:30
hardiknai-techm
e17fe25292 Some panel use GenenricRightPanel and Some panel use RightPanelForm 2021-04-16 15:53:44 +05:30
hardiknai-techm
9494c9cd55 Merge branch 'master' of https://github.com/Azure/cosmos-explorer into genericRightPaneComponent 2021-04-16 14:55:40 +05:30
hardiknai-techm
5c9ab15b3a remove genericRightPaneComponent and create RightPaneWrapper with form 2021-04-15 11:47:05 +05:30
hardiknai-techm
57d8df6608 npm install perfomr due to error 2021-04-07 10:30:51 +05:30
hardiknai-techm
2dc33c0333 remove AddDatabasePane knowckout.js code 2021-04-07 05:39:29 +05:30
hardiknai-techm
dfa97936ed resolve master merge conflict 2021-04-07 05:33:29 +05:30
hardiknai-techm
6a12ba27d9 functional component convert and use fluent ui 2021-04-07 05:21:09 +05:30
hardiknai-techm
f9ffff3c11 functional component convert and use fluent ui 2021-04-07 05:17:31 +05:30
hardiknai-techm
538b2700ef added snapshort test 2021-04-05 15:44:22 +05:30
hardiknai-techm
f468a0c36e default auto scale selected 2021-04-05 11:28:21 +05:30
hardiknai-techm
fb7526a0d0 api call with string autoPilotMaxThroughput 2021-04-05 09:09:38 +05:30
hardiknai-techm
63afb5dd6c format and compile 2021-03-31 18:36:12 +05:30
hardiknai-techm
6a1f8ce822 format and compile 2021-03-31 18:24:25 +05:30
hardiknai-techm
3b09a19ce5 resolve merge master conflict 2021-03-31 17:08:50 +05:30
hardiknai-techm
299c765e7b resolve autoscale save option 2021-03-31 17:02:03 +05:30
hardiknai-techm
8d206c39b1 remove knockout component 2021-03-30 20:16:55 +05:30
hardiknai-techm
b68e601e02 Merge branch 'master' of https://github.com/Azure/cosmos-explorer into move_add_Database_Panel_to_react 2021-03-29 16:21:23 +05:30
Your Name
201310eea4 migrate AddDatabase component 2021-03-24 12:40:20 +05:30
2 changed files with 44 additions and 28 deletions

9
package-lock.json generated
View File

@@ -2277,6 +2277,15 @@
}
}
},
"@fluentui/react-window-provider": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/@fluentui/react-window-provider/-/react-window-provider-1.0.2.tgz",
"integrity": "sha512-fGSgL3Vp/+6t1Ysfz21FWZmqsU+iFVxOigvHnm5uKVyyRPwtaabv/F6kQ2y5isLMI2YmJaUd2i0cDJKu8ggrvw==",
"requires": {
"@uifabric/set-version": "^7.0.24",
"tslib": "^1.10.0"
}
},
"@fluentui/set-version": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/@fluentui/set-version/-/set-version-8.1.0.tgz",

View File

@@ -58,18 +58,16 @@ export interface AddCollectionPanelState {
errorMessage: string;
showErrorDetails: boolean;
isExecuting: boolean;
newDatabaseThroughput: number;
isNewDatabaseAutoscale: boolean;
collectionThroughput: number;
isCollectionAutoscale: boolean;
isCostAcknowledged: boolean;
}
export class AddCollectionPanel extends React.Component<AddCollectionPanelProps, AddCollectionPanelState> {
private newDatabaseThroughput: number;
private isNewDatabaseAutoscale: boolean;
private collectionThroughput: number;
private isCollectionAutoscale: boolean;
private isCostAcknowledged: boolean;
constructor(props: AddCollectionPanelProps) {
super(props);
this.state = {
createNewDatabase: userContext.apiType !== "Tables" && !this.props.databaseId,
newDatabaseId: "",
@@ -88,6 +86,11 @@ export class AddCollectionPanel extends React.Component<AddCollectionPanelProps,
errorMessage: "",
showErrorDetails: false,
isExecuting: false,
newDatabaseThroughput: undefined,
isNewDatabaseAutoscale: true,
collectionThroughput: undefined,
isCollectionAutoscale: true,
isCostAcknowledged: false,
};
}
@@ -213,12 +216,14 @@ export class AddCollectionPanel extends React.Component<AddCollectionPanelProps,
this.isFreeTierAccount() && !this.props.explorer.isFirstResourceCreated()
}
isDatabase={true}
isAutoscaleSelected={this.isNewDatabaseAutoscale}
throughput={this.newDatabaseThroughput}
isAutoscaleSelected={this.state.isNewDatabaseAutoscale}
throughput={this.state.newDatabaseThroughput}
isSharded={this.state.isSharded}
setThroughputValue={(throughput: number) => (this.newDatabaseThroughput = throughput)}
setIsAutoscale={(isAutoscale: boolean) => (this.isNewDatabaseAutoscale = isAutoscale)}
onCostAcknowledgeChange={(isAcknowledge: boolean) => (this.isCostAcknowledged = isAcknowledge)}
setThroughputValue={(throughput: number) => this.setState({ newDatabaseThroughput: throughput })}
setIsAutoscale={(isAutoscale: boolean) => this.setState({ isNewDatabaseAutoscale: isAutoscale })}
onCostAcknowledgeChange={(isAcknowledge: boolean) =>
this.setState({ isCostAcknowledged: isAcknowledge })
}
/>
)}
</Stack>
@@ -444,13 +449,13 @@ export class AddCollectionPanel extends React.Component<AddCollectionPanelProps,
this.isFreeTierAccount() && !this.props.explorer.isFirstResourceCreated()
}
isDatabase={false}
isAutoscaleSelected={this.isCollectionAutoscale}
throughput={this.collectionThroughput}
isAutoscaleSelected={this.state.isCollectionAutoscale}
throughput={this.state.collectionThroughput}
isSharded={this.state.isSharded}
setThroughputValue={(throughput: number) => (this.collectionThroughput = throughput)}
setIsAutoscale={(isAutoscale: boolean) => (this.isCollectionAutoscale = isAutoscale)}
setThroughputValue={(throughput: number) => this.setState({ collectionThroughput: throughput })}
setIsAutoscale={(isAutoscale: boolean) => this.setState({ isCollectionAutoscale: isAutoscale })}
onCostAcknowledgeChange={(isAcknowledged: boolean) => {
this.isCostAcknowledged = isAcknowledged;
this.setState({ isCostAcknowledged: isAcknowledged });
}}
/>
)}
@@ -895,9 +900,11 @@ export class AddCollectionPanel extends React.Component<AddCollectionPanelProps,
return false;
}
const throughput = this.state.createNewDatabase ? this.newDatabaseThroughput : this.collectionThroughput;
if (throughput > CollectionCreation.DefaultCollectionRUs100K && !this.isCostAcknowledged) {
const errorMessage = this.isNewDatabaseAutoscale
const throughput = this.state.createNewDatabase
? this.state.newDatabaseThroughput
: this.state.collectionThroughput;
if (throughput > CollectionCreation.DefaultCollectionRUs100K && !this.state.isCostAcknowledged) {
const errorMessage = this.state.isNewDatabaseAutoscale
? "Please acknowledge the estimated monthly spend."
: "Please acknowledge the estimated daily spend.";
this.setState({ errorMessage });
@@ -980,8 +987,8 @@ export class AddCollectionPanel extends React.Component<AddCollectionPanelProps,
},
collection: {
id: this.state.collectionId,
throughput: this.collectionThroughput,
isAutoscale: this.isCollectionAutoscale,
throughput: this.state.collectionThroughput,
isAutoscale: this.state.isCollectionAutoscale,
partitionKey,
uniqueKeyPolicy,
collectionWithDedicatedThroughput: this.state.enableDedicatedThroughput,
@@ -999,16 +1006,16 @@ export class AddCollectionPanel extends React.Component<AddCollectionPanelProps,
let offerThroughput: number;
let autoPilotMaxThroughput: number;
if (this.state.createNewDatabase) {
if (this.isNewDatabaseAutoscale) {
autoPilotMaxThroughput = this.newDatabaseThroughput;
if (this.state.isNewDatabaseAutoscale) {
autoPilotMaxThroughput = this.state.newDatabaseThroughput;
} else {
offerThroughput = this.newDatabaseThroughput;
offerThroughput = this.state.newDatabaseThroughput;
}
} else if (!databaseLevelThroughput) {
if (this.isCollectionAutoscale) {
autoPilotMaxThroughput = this.collectionThroughput;
if (this.state.isCollectionAutoscale) {
autoPilotMaxThroughput = this.state.collectionThroughput;
} else {
offerThroughput = this.collectionThroughput;
offerThroughput = this.state.collectionThroughput;
}
}