mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-24 13:50:29 -04:00
Adding database properties general tab with read-only fields (#23318)
* Initial commit for adding a basic general tab for the database properties * Refactoring for dialog inputs * removed properties nodeType and using database node and additional cleanup, diabling the functionality. * Changes according to STS data fetch * Reuse database Dialog * Undo contract file change * more refactoring * fetched scrollbar fix into this PR * Tabbed panel is being used for horizontal tabs * stying fix for general tab button * final commit for today :) * Updates according to STS changes * missed updates * Refactored updates * moved options as discussed and added collapsible sections... need to fix scroll bar * Fixing the horizontal scroll bar of tabbedpanel
This commit is contained in:
committed by
GitHub
parent
b15217be43
commit
c8ed14f4a3
@@ -2,7 +2,7 @@
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import { ApplicationRoleViewInfo, AuthenticationType, DatabaseRoleViewInfo, LoginViewInfo, SecurablePermissions, SecurableTypeMetadata, ServerRoleViewInfo, User, UserType, UserViewInfo } from './interfaces';
|
||||
import { ApplicationRoleViewInfo, AuthenticationType, DatabaseRoleViewInfo, DatabaseViewInfo, LoginViewInfo, SecurablePermissions, SecurableTypeMetadata, ServerRoleViewInfo, User, UserType, UserViewInfo } from './interfaces';
|
||||
import * as Utils from '../utils';
|
||||
import * as constants from '../constants';
|
||||
import * as contracts from '../contracts';
|
||||
@@ -194,6 +194,8 @@ export class TestObjectManagementService implements IObjectManagementService {
|
||||
obj = this.getApplicationRoleView(isNewObject, objectUrn);
|
||||
} else if (objectType === ObjectManagement.NodeType.DatabaseRole) {
|
||||
obj = this.getDatabaseRoleView(isNewObject, objectUrn);
|
||||
} else if (objectType === ObjectManagement.NodeType.Database) {
|
||||
obj = this.getDatabaseView(isNewObject, objectUrn);
|
||||
} else if (objectType === ObjectManagement.NodeType.ServerLevelLogin) {
|
||||
obj = this.getLoginView(isNewObject, objectUrn);
|
||||
} else if (objectType === ObjectManagement.NodeType.ServerLevelServerRole) {
|
||||
@@ -432,6 +434,38 @@ export class TestObjectManagementService implements IObjectManagementService {
|
||||
};
|
||||
}
|
||||
|
||||
private getDatabaseView(isNewObject: boolean, name: string): DatabaseViewInfo {
|
||||
return isNewObject ? <DatabaseViewInfo>{
|
||||
objectInfo: {
|
||||
name: 'New Database Name',
|
||||
owner: '',
|
||||
collationName: '',
|
||||
compatibilityLevel: '',
|
||||
containmentType: '',
|
||||
recoveryModel: '',
|
||||
azureEdition: '',
|
||||
azureMaxSize: '',
|
||||
azureBackupRedundancyLevel: '',
|
||||
azureServiceLevelObjective: ''
|
||||
}
|
||||
} : <DatabaseViewInfo>{
|
||||
objectInfo: {
|
||||
name: 'Database Properties1',
|
||||
collationName: 'Latin1_General_100_CI_AS_KS_WS',
|
||||
dateCreated: '5/31/2023 8:05:55 AM',
|
||||
lastDatabaseBackup: 'None',
|
||||
lastDatabaseLogBackup: 'None',
|
||||
memoryAllocatedToMemoryOptimizedObjectsInMb: 0,
|
||||
memoryUsedByMemoryOptimizedObjectsInMb: 0,
|
||||
numberOfUsers: 5,
|
||||
owner: 'databaseProperties 1',
|
||||
sizeInMb: 16.00,
|
||||
spaceAvailableInMb: 1.15,
|
||||
status: 'Normal'
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private delayAndResolve(obj?: any): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
setTimeout(() => {
|
||||
|
||||
Reference in New Issue
Block a user