Showing 1,395 of 1,395 total issues
Function constructor
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(private store: Store<GeneralEntityAppState>) {
const eventsAndPriority$ = combineLatest([
this.getEventsAndPriorityType(),
this.readEventsSubject.asObservable()
]).pipe(
Method UaaUserInfo.uaa
has 51 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (userInfo *UaaUserInfo) uaa(target string, body []byte) (int, []byte, *http.Header, error) {
log.Debug("uaa request")
// Check session
_, err := userInfo.portalProxy.GetSessionInt64Value(userInfo.echo, "exp")
Method KubeTerminal.cleanup
has 51 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (k *KubeTerminal) cleanup() {
// Use a random initial wait before cleaning up
// If we had more than one backend, this helps to ensure they are not all trying to cleanup at the same time
wait := rand.Intn(30)
log.Debug("Kubernetes Terminal cleanup will start in %d minutes", wait)
Method PgsqlTokenRepository.SaveAuthToken
has 51 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (p *PgsqlTokenRepository) SaveAuthToken(userGUID string, tr interfaces.TokenRecord, encryptionKey []byte) error {
log.Debug("SaveAuthToken")
if userGUID == "" {
msg := "Unable to save Auth Token without a valid User GUID."
log.Debug(msg)
Function constructor
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(
store: Store<CFAppState>,
cfGuid: string,
cellId: string,
listConfig: IListConfig<CfCellApp>,
Function autoscalerTransformArrayToMap
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function autoscalerTransformArrayToMap(policy: AppAutoscalerPolicy) {
const newPolicy: AppAutoscalerPolicyLocal = {
...policy,
enabled: true,
scaling_rules_map: {},
Function createCf
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private createCf() {
const list$ = this.store.select(connectedEndpointsOfTypesSelector(CF_ENDPOINT_TYPE)).pipe(
// Ensure we have endpoints
filter(endpoints => endpoints && !!Object.keys(endpoints).length),
publishReplay(1),
Function setUpManager
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static setUpManager(
paginationMonitor: PaginationMonitor<APIResource>,
rowStateManager: TableRowStateManager
) {
return paginationMonitor.currentPage$.pipe(
Function createChangesObs
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private createChangesObs() {
const changesViaUsername = this.updateChanges.pipe(
switchMap(() => this.store.select(selectCfUsersRolesChangedRoles)),
map(changes => changes
.map(change => ({
Function updateAppSummaryRoutesReducer
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function updateAppSummaryRoutesReducer(state: IRequestEntityTypeState<IAppSummary>, action: APISuccessOrFailedAction) {
let currentState;
let routeGuid;
switch (action.type) {
case RouteEvents.UNMAP_ROUTE_SUCCESS:
Function getOrgRoles
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getOrgRoles(userRolesInOrg: UserRoleInOrg): IUserRole<OrgUserRoleNames>[] {
const roles = [];
if (userRolesInOrg[OrgUserRoleNames.MANAGER]) {
roles.push({
string: UserRoleLabels.org.short[OrgUserRoleNames.MANAGER],
Function createRolesUserDiff
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private createRolesUserDiff(
existingRoles: CfUserRolesSelected,
newRoles: IUserPermissionInOrg,
changes: CfRoleChange[],
user: CfUser,
Function getState
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getState(
orgOrSpace: RoleEntities,
allRoles: { guid: string, roles: ISpaceRoleState | IOrgRoleState }[] = [],
roles?: ISpaceRoleState | IOrgRoleState
): ICfRolesState {
Function constructor
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(
public cfEndpointService: CloudFoundryEndpointService,
public cfSpaceService: CloudFoundrySpaceService,
public cfOrgService: CloudFoundryOrganizationService,
private store: Store<CFAppState>,
Function getSpacePermissions
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private getSpacePermissions(spacePerms: IUserPermissionInSpace, row: APIResource<CfUser>, isOrgLevel = true) {
return getSpaceRoles(spacePerms.permissions).map(perm => {
const updatingKey = RemoveCfUserRole.generateUpdatingKey(
perm.key,
row.metadata.guid
Function setUpBreadcrumbs
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private setUpBreadcrumbs(
cfEndpointService: CloudFoundryEndpointService,
cfOrgService: CloudFoundryOrganizationService
) {
this.breadcrumbs$ = combineLatest(
Function constructor
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(
protected store: Store<CFAppState>,
protected activatedRoute: ActivatedRoute,
protected activeRouteCfOrgSpace: ActiveRouteCfOrgSpace,
) {
Function updateMetricsInfo
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function updateMetricsInfo(state: IRequestEntityTypeState<EndpointModel>, action: MetricsAPIActionSuccess) {
if (action.queryType === MetricAPIQueryTypes.TARGETS) {
const existingEndpoint = state[action.endpointGuid];
return {
...state,
Function getActionDispatcher
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static getActionDispatcher<Y, ABC extends OrchestratedActionBuilders, K extends keyof ABC>(
es: CoreEntityCatalogEntityStore<Y, ABC>,
builder: OrchestratedActionBuilder,
actionKey: string,
): ActionDispatcher<K, ABC> {
Function parseStorePartForLocalStorage
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static parseStorePartForLocalStorage<T = any>(storePart: T, type: LocalStorageSyncTypes): object {
switch (type) {
case LocalStorageSyncTypes.PAGINATION:
const pagination: PaginationState = storePart as unknown as PaginationState;
// Convert each pagination section that we care about into an object with only the properties we care about