mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-14 03:58:33 -05:00
Stricter tslint rules (#9352)
This commit is contained in:
@@ -19,6 +19,7 @@ import { IColorTheme, IWorkbenchThemeService } from 'vs/workbench/services/theme
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import * as themeColors from 'vs/workbench/common/theme';
|
||||
import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
|
||||
export const DASHBOARD_SELECTOR: string = 'dashboard-component';
|
||||
|
||||
@@ -59,7 +60,7 @@ export class DashboardComponent extends AngularDisposable implements OnInit {
|
||||
});
|
||||
if (profile && (!profile.databaseName || Utils.isMaster(profile))) {
|
||||
// Route to the server page as this is the default database
|
||||
this._router.navigate(['server-dashboard']);
|
||||
this._router.navigate(['server-dashboard']).catch(onUnexpectedError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { mssqlProviderName } from 'sql/platform/connection/common/constants';
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
|
||||
export class ServerDashboardPage extends DashboardPage implements OnInit {
|
||||
protected propertiesWidget: WidgetConfig = {
|
||||
@@ -68,6 +69,6 @@ export class ServerDashboardPage extends DashboardPage implements OnInit {
|
||||
this.dashboardService.connectionManagementService.connectionInfo.connectionProfile.databaseName = null;
|
||||
this.init();
|
||||
this._cd.detectChanges();
|
||||
});
|
||||
}).catch(onUnexpectedError);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ import * as nls from 'vs/nls';
|
||||
import { deepClone } from 'vs/base/common/objects';
|
||||
import { RawContextKey, IContextKey } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
|
||||
const DASHBOARD_SETTINGS = 'dashboard';
|
||||
|
||||
@@ -116,7 +117,7 @@ export class DashboardServiceInterface extends CommonServiceInterface {
|
||||
if (this._router.url === '/database-dashboard') {
|
||||
this._updatePage.fire();
|
||||
} else {
|
||||
this._router.navigate(['database-dashboard']);
|
||||
this._router.navigate(['database-dashboard']).catch(onUnexpectedError);
|
||||
}
|
||||
} else {
|
||||
this._notificationService.notify({
|
||||
@@ -134,7 +135,7 @@ export class DashboardServiceInterface extends CommonServiceInterface {
|
||||
);
|
||||
break;
|
||||
case AngularEventType.NAV_SERVER:
|
||||
this._router.navigate(['server-dashboard']);
|
||||
this._router.navigate(['server-dashboard']).catch(onUnexpectedError);
|
||||
break;
|
||||
case AngularEventType.DELETE_WIDGET:
|
||||
this._onDeleteWidget.fire(event.payload.id);
|
||||
|
||||
@@ -24,6 +24,7 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { createAndFillInContextMenuActions } from 'vs/platform/actions/browser/menuEntryActionViewItem';
|
||||
import { ItemContextKey } from 'sql/workbench/contrib/dashboard/browser/widgets/explorer/explorerTreeContext';
|
||||
import { ObjectMetadataWrapper } from 'sql/workbench/contrib/dashboard/browser/widgets/explorer/objectMetadataWrapper';
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
|
||||
export declare type TreeResource = IConnectionProfile | ObjectMetadataWrapper;
|
||||
|
||||
@@ -113,7 +114,7 @@ export class ExplorerController extends TreeDefaults.DefaultController {
|
||||
|
||||
private handleItemDoubleClick(element: IConnectionProfile): void {
|
||||
this.progressService.showWhile(this._connectionService.changeDatabase(element.databaseName).then(result => {
|
||||
this._router.navigate(['database-dashboard']);
|
||||
this._router.navigate(['database-dashboard']).catch(onUnexpectedError);
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -123,7 +124,7 @@ export class ExplorerController extends TreeDefaults.DefaultController {
|
||||
const focus = tree.getFocus();
|
||||
if (focus && !(focus instanceof ObjectMetadataWrapper)) {
|
||||
this._connectionService.changeDatabase(focus.databaseName).then(result => {
|
||||
this._router.navigate(['database-dashboard']);
|
||||
this._router.navigate(['database-dashboard']).catch(onUnexpectedError);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user