Showing 650 of 1,370 total issues
Function getPaginationUpdater
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const getPaginationUpdater = (types: [string, string, string]) => {
const [requestType, successType, failureType] = types;
return (state: PaginationEntityState = getDefaultPaginationEntityState(), action): PaginationEntityState => {
switch (action.type) {
case requestType:
Function setActive
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setActive(index: number) {
if (this.basePreviousRedirect && index < 0) {
this.dispatchRedirect(this.basePreviousRedirect);
}
if (!this.canGoto(index)) {
Function canActivate
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
canActivate(route: ActivatedRouteSnapshot, routeState: RouterStateSnapshot): Observable<boolean> {
// Reroute user to endpoint/no endpoint screens if there are no connected or registered endpoints
return observableCombineLatest(
this.store.select('auth'),
this.store.select(endpointStatusSelector)
Function ngOnInit
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ngOnInit() {
if (!this.connectionStatus) {
return;
}
Function createEndpointTypeFilter
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private createEndpointTypeFilter(): IListMultiFilterConfig {
return {
key: BaseEndpointsDataSource.typeFilterKey,
label: 'Endpoint Type',
list$: combineLatest([
Function findFreePort
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function findFreePort(beg, ...rest){
const p = rest.slice(0, rest.length - 1), cb = rest[rest.length - 1];
let [end, ip, cnt] = Array.from(p);
if (!ip && end && !/^\d+$/.test(end)) { // deal with method 3
ip = end;
Function createProvider
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private createProvider(cfGuid: string): ActionListConfigProvider<APIResource<IOrganization>> {
const action = CloudFoundryEndpointService.createGetAllOrganizations(cfGuid);
const provider = new ActionListConfigProvider<APIResource<IOrganization>>(this.store, action);
provider.updateListConfig({
Function ngOnInit
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ngOnInit() {
this.connectionStatus.next(0);
const guid = this.kubeEndpointService.baseKube.guid;
this.kubeSummaryLink = `/kubernetes/${guid}/summary`;
Function constructor
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(
store: Store<AppState>,
kubeId: BaseKubeGuid,
) {
const transformEntities: DataFunction<KubernetesNode>[] = [
Function getCaaspNodesData
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getCaaspNodesData(nodes$: Observable<KubernetesNode[]> = this.nodes$): Observable<CaaspNodesData> {
return nodes$.pipe(
map(nodes => {
const info: CaaspNodesData = {
version: 'Unknown',
Function constructor
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(
private store: Store<AppState>,
private route: ActivatedRoute,
private tabNavService: TabNavService,
private router: Router,
Function handleOther
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private handleOther(auth: AuthState) {
this.loggedIn = auth.loggedIn;
this.loggingIn = auth.loggingIn;
this.isLoginFlow = this.isLoginFlow || auth.loggingIn;
this.verifying = auth.verifying;
Function links$
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
map(([favs, layout]) => {
// Get the list of shortcuts for the endpoint for the given endpoint ID
const shortcutsFn = this.definition?.homeCard?.shortcuts;
const allShortcuts = shortcutsFn ? shortcutsFn(this.endpoint.guid) || [] : [];
let shortcuts = allShortcuts;
Function SetStructFieldValue
has 57 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func SetStructFieldValue(value reflect.Value, field reflect.Value, val string) error {
var newVal interface{}
var err error
typ := field.Type()
Method CustomBinder.bindData
has 57 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (b *CustomBinder) bindData(ptr interface{}, data map[string][]string, tag string) error {
typ := reflect.TypeOf(ptr).Elem()
val := reflect.ValueOf(ptr).Elem()
if typ.Kind() != reflect.Struct {
Function configure
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports.configure = function (config) {
config.seleniumAddress = 'http://hub-cloud.browserstack.com/wd/hub';
config.capabilities = defaultCapabilities
config.directConnect = false;
setCapabilties(config.capabilities);
Function navToPage
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function navToPage() {
describe('', () => {
// Allow additional time for navigation
extendE2ETestTime(70000);
Function getAllTheThings
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getAllTheThings(store: Store<GeneralAppState>, guid: string, schemaKey: string) {
const entities = {
[entitySchema.key]: {
[guid]: {
guid,
Function constructor
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(
definition: IStratosEntityDefinition | IStratosEndpointDefinition | IStratosBaseEntityDefinition,
public readonly builders: EntityCatalogBuilders<T, Y, AB> = {}
) {
this.definition = this.populateEntity(definition);
Function generate
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static generate<
B = any,
C extends OrchestratedActionBuilderConfig = OrchestratedActionBuilders
>(
endpointDefinition: StratosEndpointExtensionDefinition,