mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-14 18:46:34 -05:00
deploy BDC wizard improvement for CU1 (#7756)
* unified admin user account (#7485) * azdata changes * spaces * error message * comments * support AD authentication for bdc deployment (#7518) * enable ad authentication * remove export for internal interface * add comments * more changes after testing * update notebooks * escape slash * more comments * Update deploy-bdc-aks.ipynb * Update deploy-bdc-existing-aks.ipynb * Update deploy-bdc-existing-kubeadm.ipynb * AD changes and review feedback (#7618) * enable ad authentication * remove export for internal interface * add comments * more changes after testing * update notebooks * escape slash * more comments * Update deploy-bdc-aks.ipynb * Update deploy-bdc-existing-aks.ipynb * Update deploy-bdc-existing-kubeadm.ipynb * address comments from scenario review (#7546) * support AD authentication for bdc deployment (#7518) * enable ad authentication * remove export for internal interface * add comments * more changes after testing * update notebooks * escape slash * more comments * Update deploy-bdc-aks.ipynb * Update deploy-bdc-existing-aks.ipynb * Update deploy-bdc-existing-kubeadm.ipynb * scenario review feedbacks * more fixes * adjust the display order of resource types * different way to implement left side buttons * revert unwanted changes * rename variable * more fixes for the scenario review feedback (#7589) * fix more issues * add help links * model view readonly text with links * fix size string * address comments * update notebooks * text update * address the feedback of 2nd round of deploy BDC wizard review (#7646) * 2nd review meeting comments * fix the unit test failure * recent changes in azdata * notebook background execution with azdata (#7741) * notebook background execution with azdata * prompt to open notebook in case of failure * fix path quote issue * better temp file handling * expose docker settings (#7751) * add docker settings * new icon for container image
This commit is contained in:
@@ -7,6 +7,7 @@ import * as fs from 'fs';
|
||||
import * as vscode from 'vscode';
|
||||
import * as azdata from 'azdata';
|
||||
import * as cp from 'child_process';
|
||||
import { getErrorMessage } from '../utils';
|
||||
|
||||
/**
|
||||
* Abstract of platform dependencies
|
||||
@@ -22,6 +23,8 @@ export interface IPlatformService {
|
||||
makeDirectory(path: string): Promise<void>;
|
||||
readTextFile(filePath: string): Promise<string>;
|
||||
runCommand(command: string, options?: CommandOptions): Promise<string>;
|
||||
saveTextFile(content: string, path: string): Promise<void>;
|
||||
deleteFile(path: string, ignoreError?: boolean): Promise<void>;
|
||||
}
|
||||
|
||||
export interface CommandOptions {
|
||||
@@ -91,4 +94,24 @@ export class PlatformService implements IPlatformService {
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
saveTextFile(content: string, path: string): Promise<void> {
|
||||
return fs.promises.writeFile(path, content, 'utf8');
|
||||
}
|
||||
|
||||
async deleteFile(path: string, ignoreError: boolean = true): Promise<void> {
|
||||
try {
|
||||
const exists = await this.fileExists(path);
|
||||
if (exists) {
|
||||
fs.promises.unlink(path);
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
if (ignoreError) {
|
||||
console.error('Error occured deleting file: ', getErrorMessage(error));
|
||||
} else {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user