Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sai/options tab db properties #23448

Merged
merged 49 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
ca43ade
Initial commit for adding a basic general tab for the database proper…
ssreerama Jun 5, 2023
ca0ad70
Refactoring for dialog inputs
ssreerama Jun 5, 2023
1a9094a
removed properties nodeType and using database node and additional cl…
ssreerama Jun 6, 2023
84d24c7
Changes according to STS data fetch
ssreerama Jun 8, 2023
54ebf98
Merge branch 'main' into 'sai/databasePropertiesInitial'
ssreerama Jun 8, 2023
8733af8
Reuse database Dialog
ssreerama Jun 8, 2023
10beedc
Undo contract file change
ssreerama Jun 8, 2023
8caf792
more refactoring
ssreerama Jun 8, 2023
09475f1
fetched scrollbar fix into this PR
ssreerama Jun 9, 2023
cfbabdf
Tabbed panel is being used for horizontal tabs
ssreerama Jun 13, 2023
cd2feb5
stying fix for general tab button
ssreerama Jun 13, 2023
8be6593
Merge branch 'main' into 'sai/databasePropertiesInitial'
ssreerama Jun 13, 2023
1cf0f50
Merge branch 'main' into 'sai/databasePropertiesInitial'
ssreerama Jun 13, 2023
86585b1
final commit for today :)
ssreerama Jun 14, 2023
31e4532
Merge branch 'main' into 'sai/databasePropertiesInitial'
ssreerama Jun 14, 2023
552a35e
Updates according to STS changes
ssreerama Jun 14, 2023
1bbc647
missed updates
ssreerama Jun 14, 2023
7a112c7
Refactored updates
ssreerama Jun 19, 2023
38844ce
Merge branch 'main' into 'sai/databasePropertiesInitial'
ssreerama Jun 20, 2023
9465829
moved options as discussed and added collapsible sections... need to …
ssreerama Jun 20, 2023
03217e6
Fixing the horizontal scroll bar of tabbedpanel
ssreerama Jun 21, 2023
8e85839
initial updates
ssreerama Jun 22, 2023
4166a80
Merge branch 'main' into sai/optionsTab_dbProperties
ssreerama Jun 22, 2023
52c1e46
need to fix the error!
ssreerama Jun 22, 2023
6510f2d
rror fixed and options are loading with sample values
ssreerama Jun 22, 2023
163e14e
need to load real values for all felds and map values to dropdown opt…
ssreerama Jun 24, 2023
e150396
Dd loading correctly, need to add validation to recovery field and sa…
ssreerama Jun 25, 2023
63cc8f0
refactor
ssreerama Jun 26, 2023
be6e870
Merge branch 'main' into sai/optionsTab_dbProperties
ssreerama Jun 26, 2023
feba07e
removing nullable property
ssreerama Jun 27, 2023
b124d39
All changes done except recoveryTime validation
ssreerama Jun 27, 2023
cf8aa52
Refactoring
ssreerama Jun 27, 2023
ac33a19
all values are saving as expected, isDirty flag is fixed. Todo: recov…
ssreerama Jun 27, 2023
2238935
added general section for the options tab
ssreerama Jun 28, 2023
ec03c54
modifying pageVerify and userAccess to string array
ssreerama Jun 28, 2023
6505f9b
merge branch 'main' into sai/optionsTab_dbProperties
ssreerama Jun 28, 2023
7ee4dc8
updates to general section of options tb
ssreerama Jun 28, 2023
9c042ec
disabling couple of general properties for MI
ssreerama Jun 29, 2023
4252503
Merge branch 'main' into sai/optionsTab_dbProperties
ssreerama Jun 29, 2023
7199a50
Adding server edition conditions and toggling the UI options
ssreerama Jun 29, 2023
3c6079f
adding numeric validation to the recovey time
ssreerama Jun 29, 2023
5d0cdda
Removing serveInfo logic and using the unsupported options approach f…
ssreerama Jun 29, 2023
925026f
Merge branch 'main' into sai/optionsTab_dbProperties
ssreerama Jul 5, 2023
0c67391
addressing comments and little code refactor
ssreerama Jul 5, 2023
7c1e38e
changes with nullOrUndefined helper method
ssreerama Jul 5, 2023
af85795
replacing dropdowns with checkboxes
ssreerama Jul 5, 2023
5d10356
adding unit test for helper method
ssreerama Jul 6, 2023
463c568
removed commented sample code and added comments
ssreerama Jul 6, 2023
6685847
Merge branch 'main' into sai/optionsTab_dbProperties
ssreerama Jul 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion extensions/mssql/src/objectManagement/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,17 @@ export interface Database extends ObjectManagement.SqlObject {
azureServiceLevelObjective?: string;
azureEdition?: string;
azureMaxSize?: string;
autoCreateIncrementalStatistics: boolean;
ssreerama marked this conversation as resolved.
Show resolved Hide resolved
autoCreateStatistics: boolean;
autoShrink: boolean;
autoUpdateStatistics: boolean;
autoUpdateStatisticsAsynchronously: boolean;
isLedgerDatabase?: boolean;
pageVerify?: string;
targetRecoveryTimeInSec?: number;
databaseReadOnly?: boolean;
encryptionEnabled: boolean;
restrictAccess?: string;
}

export interface DatabaseViewInfo extends ObjectManagement.ObjectViewInfo<Database> {
Expand All @@ -452,12 +463,13 @@ export interface DatabaseViewInfo extends ObjectManagement.ObjectViewInfo<Databa
containmentTypes: string[];
recoveryModels: string[];
files: DatabaseFile[];

isAzureDB: boolean;
azureBackupRedundancyLevels: string[];
azureServiceLevelObjectives: AzureEditionDetails[];
azureEditions: string[];
azureMaxSizes: AzureEditionDetails[];
pageVerifyOptions: string[];
restrictAccessOptions: string[];
}

export interface AzureEditionDetails {
Expand Down
20 changes: 18 additions & 2 deletions extensions/mssql/src/objectManagement/localizedConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,14 +258,17 @@ export const ServerCollationText = localize('objectManagement.serverCollation',
export const ServiceTierText = localize('objectManagement.serviceTier', "Service Tier");
export const StorageSpaceUsageInMBText = localize('objectManagement.storageSpaceUsageInMB', "Storage Space Usage (MB)");
export const VersionText = localize('objectManagement.versionText', "Version");


export const minServerMemoryText = localize('objectManagement.minServerMemoryText', "Minimum Server Memory (MB)");
export const maxServerMemoryText = localize('objectManagement.maxServerMemoryText', "Maximum Server Memory (MB)");

//Database properties Dialog
export const LastDatabaseBackupText = localize('objectManagement.lastDatabaseBackup', "Last Database Backup");
export const LastDatabaseLogBackupText = localize('objectManagement.lastDatabaseLogBackup', "Last Database Log Backup");
export const BackupSectionHeader = localize('objectManagement.databaseProperties.backupSectionHeader', "Backup");
export const AutomaticSectionHeader = localize('objectManagement.databaseProperties.automaticSectionHeader', "Automatic");
export const LedgerSectionHeader = localize('objectManagement.databaseProperties.ledgerSectionHeader', "Ledger");
export const RecoverySectionHeader = localize('objectManagement.databaseProperties.recoverySectionHeader', "Recovery");
export const StateSectionHeader = localize('objectManagement.databaseProperties.stateSectionHeader', "State");
export const DatabaseSectionHeader = localize('objectManagement.databaseProperties.databaseSectionHeader', "Database");
export const NamePropertyText = localize('objectManagement.databaseProperties.name', "Name");
export const StatusText = localize('objectManagement.databaseProperties.status', "Status");
Expand All @@ -277,6 +280,19 @@ export const NumberOfUsersText = localize('objectManagement.databaseProperties.n
export const MemoryAllocatedText = localize('objectManagement.databaseProperties.memoryAllocated', "Memory Allocated To Memory Optimized Objects");
export const MemoryUsedText = localize('objectManagement.databaseProperties.memoryUsed', "Memory Used By Memory Optimized Objects");
export const StringValueInMB = (value: string) => localize('objectManagement.databaseProperties.mbUnitText', "{0} MB", value);
export const AutoCreateIncrementalStatisticsText = localize('objectManagement.databaseProperties.autoCreateIncrementalStatisticsText', "Auto Create Incremental Statistics");
export const AutoCreateStatisticsText = localize('objectManagement.databaseProperties.AutoCreateStatisticsText', "Auto Create Statistics");
export const AutoShrinkText = localize('objectManagement.databaseProperties.autoShrinkText', "Auto Shrink");
export const AutoUpdateStatisticsText = localize('objectManagement.databaseProperties.autoUpdateStatisticsText', "Auto Update Statistics");
export const AutoUpdateStatisticsAsynchronouslyText = localize('objectManagement.databaseProperties.autoUpdateStatisticsAsynchronouslyText', "Auto Update Statistics Asynchronously");
export const IsLedgerDatabaseText = localize('objectManagement.databaseProperties.isLedgerDatabaseText', "Is Ledger Database");
export const PageVerifyText = localize('objectManagement.databaseProperties.pageVerifyText', "Page Verify");
export const TargetRecoveryTimeInSecondsText = localize('objectManagement.databaseProperties.targetRecoveryTimeInSecondsText', "Target Recovery Time (Seconds)");
export const DatabaseReadOnlyText = localize('objectManagement.databaseProperties.databaseReadOnlyText', "Database Read-Only");
export const DatabaseStateText = localize('objectManagement.databaseProperties.databaseStateText', "Database State");
export const EncryptionEnabledText = localize('objectManagement.databaseProperties.encryptionEnabledText', "Encryption Enabled");
export const RestrictAccessText = localize('objectManagement.databaseProperties.restrictAccessText', "Restrict Access");


// Util functions
export function getNodeTypeDisplayName(type: string, inTitle: boolean = false): string {
Expand Down
13 changes: 12 additions & 1 deletion extensions/mssql/src/objectManagement/objectManagementService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,18 @@ export class TestObjectManagementService implements IObjectManagementService {
owner: 'databaseProperties 1',
sizeInMb: 16.00,
spaceAvailableInMb: 1.15,
status: 'Normal'
status: 'Normal',
ssreerama marked this conversation as resolved.
Show resolved Hide resolved
autoCreateIncrementalStatistics: false,
autoCreateStatistics: true,
autoShrink: false,
autoUpdateStatistics: true,
autoUpdateStatisticsAsynchronously: false,
isLedgerDatabase: false,
pageVerify: 'CHECKSUM',
targetRecoveryTimeInSec: 60,
databaseReadOnly: true,
encryptionEnabled: false,
restrictAccess: 'SINGLE_USER',
}
};
}
Expand Down
Loading