mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Profiler view templates (#1915)
* Initial view template framework * Removing some templates, reordering drop down * Fixing comments and formatting * Adding issue reference for commented code
This commit is contained in:
committed by
GitHub
parent
d2b5043972
commit
1327120024
@@ -15,7 +15,7 @@ export const IProfilerService = createDecorator<IProfilerService>(PROFILER_SERVI
|
||||
|
||||
export type ProfilerSessionID = string;
|
||||
|
||||
export const PROFILER_SESSION_TEMPLATE_SETTINGS = 'profiler.sessionTemplates';
|
||||
export const PROFILER_VIEW_TEMPLATE_SETTINGS = 'profiler.viewTemplates';
|
||||
export const PROFILER_SETTINGS = 'profiler';
|
||||
|
||||
/**
|
||||
@@ -84,7 +84,7 @@ export interface IProfilerService {
|
||||
* @returns An array of session templates that match the provider passed, if passed, and generic ones (no provider specified),
|
||||
* otherwise returns all session templates
|
||||
*/
|
||||
getSessionTemplates(providerId?: string): Array<IProfilerSessionTemplate>;
|
||||
getViewTemplates(providerId?: string): Array<IProfilerViewTemplate>;
|
||||
/**
|
||||
* Launches the dialog for editing the view columns of a profiler session template for the given input
|
||||
* @param input input object that contains the necessary information which will be modified based on used input
|
||||
@@ -93,25 +93,16 @@ export interface IProfilerService {
|
||||
}
|
||||
|
||||
export interface IProfilerSettings {
|
||||
sessionTemplates: Array<IProfilerSessionTemplate>;
|
||||
viewTemplates: Array<IProfilerViewTemplate>;
|
||||
}
|
||||
|
||||
export interface IEventTemplate {
|
||||
export interface IColumnViewTemplate {
|
||||
name: string;
|
||||
optionalColumns: Array<string>;
|
||||
width: string;
|
||||
eventsMapped: Array<string>;
|
||||
}
|
||||
|
||||
export interface IEventViewTemplate {
|
||||
export interface IProfilerViewTemplate {
|
||||
name: string;
|
||||
columns: Array<string>;
|
||||
}
|
||||
|
||||
export interface ISessionViewTemplate {
|
||||
events: Array<IEventViewTemplate>;
|
||||
}
|
||||
|
||||
export interface IProfilerSessionTemplate {
|
||||
name: string;
|
||||
events: Array<IEventTemplate>;
|
||||
view: ISessionViewTemplate;
|
||||
columns: Array<IColumnViewTemplate>;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import { IConnectionManagementService, IConnectionCompletionOptions, ConnectionType, RunQueryOnConnectionMode } from 'sql/parts/connection/common/connectionManagement';
|
||||
import {
|
||||
ProfilerSessionID, IProfilerSession, IProfilerService, IProfilerSessionTemplate,
|
||||
ProfilerSessionID, IProfilerSession, IProfilerService, IProfilerViewTemplate,
|
||||
PROFILER_SETTINGS, IProfilerSettings
|
||||
} from './interfaces';
|
||||
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
||||
@@ -128,13 +128,13 @@ export class ProfilerService implements IProfilerService {
|
||||
}
|
||||
}
|
||||
|
||||
public getSessionTemplates(provider?: string): Array<IProfilerSessionTemplate> {
|
||||
public getViewTemplates(provider?: string): Array<IProfilerViewTemplate> {
|
||||
let config = <IProfilerSettings>this._configurationService.getValue(PROFILER_SETTINGS);
|
||||
|
||||
if (provider) {
|
||||
return config.sessionTemplates;
|
||||
return config.viewTemplates;
|
||||
} else {
|
||||
return config.sessionTemplates;
|
||||
return config.viewTemplates;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user