Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ngOnInit() {
// Create state loading bar
this.loadingService.create({
name: STATE_LOADER,
mode: LoadingMode.Indeterminate,
type: LoadingType.Linear,
color: "accent"
});
// Listen for state transitions
this.transitions.onCreate({}, this.onTransitionStart.bind(this));
this.transitions.onSuccess({}, this.onTransitionSuccess.bind(this));
this.transitions.onError({}, this.onTransitionError.bind(this));
// Fetch the allowed actions
this.accessControlService.getUserAllowedActions()
.then((actionSet: any)=> {
this.allowSearch = this.accessControlService
.hasAction(AccessConstants.GLOBAL_SEARCH_ACCESS,
actionSet.actions);
});
this.$rootScope.previousState;
this.$rootScope.currentState;
// to focus on input element after it appears
$scope.$watch(function() {
return document.querySelector('#search-bar:not(.ng-hide)');
}, function(){
document.getElementById('search-input').focus();
});
// Create state loading bar
this.loadingService = $$angularInjector.get(TdLoadingService);
this.loadingService.create({
name: STATE_LOADER,
mode: LoadingMode.Indeterminate,
type: LoadingType.Linear,
color: "accent"
});
// Listen for state transitions
this.$transitions.onCreate({}, this.onTransitionStart.bind(this));
this.$transitions.onSuccess({}, this.onTransitionSuccess.bind(this));
this.$transitions.onError({}, this.onTransitionError.bind(this));
// Fetch the allowed actions
accessControlService.getUserAllowedActions()
.then((actionSet: any)=> {
this.allowSearch = accessControlService
.hasAction(AccessConstants.GLOBAL_SEARCH_ACCESS,
actionSet.actions);
});
constructor(private catalog: CatalogService,
private dataTable: TdDataTableService,
private dialog: TdDialogService,
private loadingService: TdLoadingService,
private state: StateService,
@Inject("AccessControlService") private accessControlService: AccessControlService,
private snackBarService: MatSnackBar,
private translateService: TranslateService) {
this.loadingService.create({
name: DataSourcesComponent.topOfPageLoader,
mode: LoadingMode.Indeterminate,
type: LoadingType.Linear,
color: 'accent',
});
accessControlService.getUserAllowedActions()
.then((actionSet: any) => this.allowEdit = accessControlService.hasAction(AccessControlService.DATASOURCE_EDIT, actionSet.actions));
}
private createLoader(name: string) {
this.loadingService.create({
name: name,
mode: LoadingMode.Indeterminate,
type: LoadingType.Linear,
color: 'accent',
});
}
constructor(private $$angularInjector: Injector, private http: HttpClient, private loadingService: TdLoadingService, private hostElement: ElementRef) {
this.feedService = this.$$angularInjector.get("FeedService");
this.restUrlService = this.$$angularInjector.get("RestUrlService");
this.hiveService = this.$$angularInjector.get("HiveService");
this.fattableService = this.$$angularInjector.get("FattableService");
this.loadingService.create({
name: ProfileInvalidComponent.topOfPageLoader,
mode: LoadingMode.Indeterminate,
type: LoadingType.Linear,
color: 'accent',
});
}
private createLoader(name: string) {
this.loadingService.create({
name: name,
mode: LoadingMode.Indeterminate,
type: LoadingType.Linear,
color: 'accent',
});
}
/*
constructor(private $$angularInjector: Injector, private http: HttpClient, private loadingService: TdLoadingService, private hostElement: ElementRef) {
this.feedService = this.$$angularInjector.get("FeedService");
this.restUrlService = this.$$angularInjector.get("RestUrlService");
this.hiveService = this.$$angularInjector.get("HiveService");
this.fattableService = this.$$angularInjector.get("FattableService");
this.loadingService.create({
name: ProfileValidComponent.topOfPageLoader,
mode: LoadingMode.Indeterminate,
type: LoadingType.Linear,
color: 'accent',
});
}
constructor(private dataTableService: TdDataTableService, private http: HttpClient,
private state: StateService, private selectionService: SelectionService,
private dialog: MatDialog, private loadingService: TdLoadingService,
private browserService:BrowserService,
private kyloRouterService:KyloRouterService) {
this.columns = this.getColumns();
this.sortBy = this.getSortByColumnName();
this.selectionStrategy = selectionService.getSelectionStrategy();
this.loadingService.create({
name: BrowserComponent.topOfPageLoader,
mode: LoadingMode.Indeterminate,
type: LoadingType.Linear,
color: 'accent',
});
}
this.labelVariance = this.translateService.instant("Profile.Stats.Variance");
this.labelSum = this.translateService.instant("Profile.Stats.Sum");
this.labelLongest = this.translateService.instant("Profile.Stats.Longest");
this.labelShortest = this.translateService.instant("Profile.Stats.Shortest");
this.labelMinCaseSensitive = this.translateService.instant("Profile.Stats.MinCaseSensitive");
this.labelMaxCaseSensitive = this.translateService.instant("Profile.Stats.MaxCaseSensitive");
this.labelMinCaseInsensitive = this.translateService.instant("Profile.Stats.MinCaseInsensitive");
this.labelMaxCaseInsensitive = this.translateService.instant("Profile.Stats.MaxCaseInsensitive");
this.labelTotal = this.translateService.instant("Profile.Stats.Total");
this.labelValid = this.translateService.instant("Profile.Stats.Valid") ;
this.labelInvalid = this.translateService.instant("Profile.Stats.Invalid");
this.labelMissing = this.translateService.instant("Profile.Stats.Missing");
this.loadingService.create({
name: ProfileStatsComponent.topOfPageLoader,
mode: LoadingMode.Indeterminate,
type: LoadingType.Linear,
color: 'accent',
});
/**
* Options for the Relative Statistics chart.
* @type {Object}
*/
this.percOptions = {
chart: {
type: 'multiBarHorizontalChart',
color: () => {
return this.CHART_COLOR;
},
height: 200,
margin: {