mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 09:35:39 -05:00
Improvements in blob storage support for SQL Migration. (#15693)
* changing the cutover icon on migration cutover page. * Fixing monitoring table and pending log backups * converting file upload times in utc to local time zones * adding autorefresh to dashboard, migration status and cutover dialogs. * Supporting blob container e2e * vbump extension * Fixing some PR comments * Fixed broken blob container dropdown onChange event * Localizing display string in refresh dialog Fixing some localized strings * Fixing var declaration * making a class readonly for 250px width * removing refresh interval dialog and replacing it with hardcoded values. * Fixing summary page IR information. * surfacing test connection error * Clearing intervals on view closed to remove auto refresh.
This commit is contained in:
@@ -122,6 +122,25 @@ export function filterMigrations(databaseMigrations: MigrationContext[], statusF
|
||||
return filteredMigration;
|
||||
}
|
||||
|
||||
export function convertByteSizeToReadableUnit(size: number): string {
|
||||
const units = ['B', 'KB', 'MB', 'GB', 'TB'];
|
||||
for (let i = 1; i < units.length; i++) {
|
||||
const higherUnit = size / 1024;
|
||||
if (higherUnit < 0.1) {
|
||||
return `${size.toFixed(2)} ${units[i - 1]}`;
|
||||
}
|
||||
size = higherUnit;
|
||||
}
|
||||
return size.toString();
|
||||
}
|
||||
|
||||
export function convertIsoTimeToLocalTime(isoTime: string): Date {
|
||||
let isoDate = new Date(isoTime);
|
||||
return new Date(isoDate.getTime() + (isoDate.getTimezoneOffset() * 60000));
|
||||
}
|
||||
|
||||
export type SupportedAutoRefreshIntervals = -1 | 15000 | 30000 | 60000 | 180000 | 300000;
|
||||
|
||||
export function selectDropDownIndex(dropDown: DropDownComponent, index: number): void {
|
||||
if (index >= 0 && dropDown.values && index <= dropDown.values.length - 1) {
|
||||
const value = dropDown.values[index];
|
||||
|
||||
Reference in New Issue
Block a user