mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-27 01:25:36 -05:00
fixing two backup issues - opening context of dialog and footer color (#7025)
This commit is contained in:
@@ -33,6 +33,7 @@ import { ISelectOptionItem } from 'vs/base/browser/ui/selectBox/selectBox';
|
||||
import { KeyCode } from 'vs/base/common/keyCodes';
|
||||
import { ITheme } from 'vs/platform/theme/common/themeService';
|
||||
import { AngularDisposable } from 'sql/base/browser/lifecycle';
|
||||
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';
|
||||
|
||||
export const BACKUP_SELECTOR: string = 'backup-component';
|
||||
|
||||
@@ -558,7 +559,7 @@ export class BackupComponent extends AngularDisposable {
|
||||
private updateTheme(theme: ITheme): void {
|
||||
// set modal footer style
|
||||
let footerHtmlElement: HTMLElement = <HTMLElement>this.modalFooterElement.nativeElement;
|
||||
const backgroundColor = theme.getColor(cr.foreground);
|
||||
const backgroundColor = theme.getColor(SIDE_BAR_BACKGROUND);
|
||||
const border = theme.getColor(cr.contrastBorder) ? theme.getColor(cr.contrastBorder).toString() : null;
|
||||
const footerBorderTopWidth = border ? '1px' : null;
|
||||
const footerBorderTopStyle = border ? 'solid' : null;
|
||||
|
||||
@@ -15,10 +15,11 @@ import { MssqlNodeContext } from 'sql/workbench/parts/dataExplorer/common/mssqlN
|
||||
import { NodeType } from 'sql/workbench/parts/objectExplorer/common/nodeType';
|
||||
import { mssqlProviderName } from 'sql/platform/connection/common/constants';
|
||||
import { localize } from 'vs/nls';
|
||||
import { ObjectExplorerActionsContext } from 'sql/workbench/parts/objectExplorer/browser/objectExplorerActions';
|
||||
import { OEAction } from 'sql/workbench/parts/objectExplorer/browser/objectExplorerActions';
|
||||
import { TreeNodeContextKey } from 'sql/workbench/parts/objectExplorer/common/treeNodeContextKey';
|
||||
import { ConnectionContextKey } from 'sql/workbench/parts/connection/common/connectionContextKey';
|
||||
import { ServerInfoContextKey } from 'sql/workbench/parts/connection/common/serverInfoContextKey';
|
||||
import { ServicesAccessor, IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
new BackupAction().registerTask();
|
||||
|
||||
@@ -47,9 +48,9 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
|
||||
const OE_BACKUP_COMMAND_ID = 'objectExplorer.backup';
|
||||
CommandsRegistry.registerCommand({
|
||||
id: OE_BACKUP_COMMAND_ID,
|
||||
handler: (accessor, args: ObjectExplorerActionsContext) => {
|
||||
const commandService = accessor.get(ICommandService);
|
||||
return commandService.executeCommand(BackupAction.ID, args.connectionProfile);
|
||||
handler: (accessor: ServicesAccessor, actionContext: any) => {
|
||||
const instantiationService = accessor.get(IInstantiationService);
|
||||
return instantiationService.createInstance(OEAction, BackupAction.ID, BackupAction.LABEL).run(actionContext);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -65,6 +65,7 @@ export class BackupAction extends Task {
|
||||
|
||||
const capabilitiesService = accessor.get(ICapabilitiesService);
|
||||
const instantiationService = accessor.get(IInstantiationService);
|
||||
return instantiationService.invokeFunction(showBackup, new ConnectionProfile(capabilitiesService, profile));
|
||||
profile = profile ? profile : new ConnectionProfile(capabilitiesService, profile);
|
||||
return instantiationService.invokeFunction(showBackup, profile);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,6 +61,7 @@ export class RestoreAction extends Task {
|
||||
|
||||
const capabilitiesService = accessor.get(ICapabilitiesService);
|
||||
const instantiationService = accessor.get(IInstantiationService);
|
||||
return instantiationService.invokeFunction(showRestore, new ConnectionProfile(capabilitiesService, profile));
|
||||
profile = profile ? profile : new ConnectionProfile(capabilitiesService, profile);
|
||||
return instantiationService.invokeFunction(showRestore, profile);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user