Showing 718 of 1,370 total issues
Function createServiceInstance
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createServiceInstance(createServiceInstance: CreateServiceInstanceState): Observable<RequestInfoState> {
const name = this.createNewInstanceForm.controls.name.value;
const { spaceGuid, cfGuid } = createServiceInstance;
const servicePlanGuid = createServiceInstance.servicePlanGuid;
Function constructCoreObservables
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private constructCoreObservables() {
// First set up all the base observables
this.app$ = this.entityService.waitForEntity$;
const moreWaiting$ = this.app$.pipe(
filter(entityInfo => !!(entityInfo.entity && entityInfo.entity.entity && entityInfo.entity.entity.cfGuid)),
Function appMonitor$
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.appMonitor$ = this.applicationService.appStats$.pipe(map(stats => {
const res = new AppMonitorState();
if (!stats) {
return res;
}
Function constructor
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(
private fb: FormBuilder,
private store: Store<CFAppState>,
private appEnvVarsService: ApplicationEnvVarsHelper,
private activatedRoute: ActivatedRoute
Function createServiceInstanceReducer
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function createServiceInstanceReducer(state: CreateServiceInstanceState = defaultState, action): CreateServiceInstanceState {
switch (action.type) {
case SET_SERVICE_PLAN:
return { ...state, servicePlanGuid: action.servicePlanGuid };
case SET_ORG:
Function apply
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public apply(src: string): string {
// Patch different page title if there is one
const title = this.config.stratosConfig.title || 'Stratos';
src = src.replace(/@@TITLE@@/g, title);
Function constructor
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(
private store: Store<CFAppState>,
private activeRouteCfOrgSpace: ActiveRouteCfOrgSpace,
private cfUserService: CfUserService,
private route: ActivatedRoute
Function breadcrumbs$
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
map(endpoint => {
// check if this is being invoked from the node path
const nodeName = getIdFromRoute(activatedRoute, 'nodeName');
if (!!nodeName) {
Function constructor
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(
private store: Store<any>,
private route: ActivatedRoute,
router: Router,
kubeId: BaseKubeGuid,
Function constructor
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(
store: Store<any>,
repoName: string,
chartName: string,
version: string,
Function failRequest
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function failRequest(state, action: IFailedRequestAction) {
if (isNullOrUndefined(action.apiAction.guid)) {
return state;
}
const apiAction = action.apiAction as BaseEntityRequestAction;
Function orderEndpoints
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private orderEndpoints(endpoints: EndpointModel[], favorites: IUserFavoritesGroups, showMode: boolean): EndpointModel[] {
const processed = {};
const result = [];
const epMap = {};
endpoints.forEach(ep => epMap[ep.guid] = ep);
Function data
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@Input() set data(usageData: ISimpleUsageChartData) {
if (usageData) {
const {
total,
used = 0,
Function constructCoreObservables
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private constructCoreObservables() {
this.endpoint$ = this.kubeEndpointEntityService.waitForEntity$;
this.connected$ = this.endpoint$.pipe(
map(p => p.entity.connectionStatus === 'connected')
Method MetricsSpecification.createMetadata
has 55 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (m *MetricsSpecification) createMetadata(metricEndpoint *url.URL, httpClient http.Client, auth *MetricsAuth) (string, error) {
basicMetricRequest := fmt.Sprintf("%s/api/v1/query?query=firehose_total_metrics_received", metricEndpoint)
req, err := http.NewRequest("GET", basicMetricRequest, nil)
if err != nil {
msg := "Failed to create request for the Metrics Endpoint: %v"
Function KubeDashboardLogin
has 55 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func KubeDashboardLogin(c echo.Context, p interfaces.PortalProxy) error {
log.Debug("kubeDashboardLogin request")
endpointGUID := c.Param("guid")
userGUID := c.Get("user_id").(string)
Function findDatabaseConfig
has 55 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func findDatabaseConfig(vcapServices map[string][]VCAPService, db *DatabaseConfig, env *env.VarSet) bool {
var service VCAPService
configs := findDatabaseConfigurations(vcapServices)
log.Infof("Found %d database service instances", len(configs))
for _, s := range configs {
Function reporter
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports.reporter = function () {
var total = 0;
var skipped = 0;
const ansi = {
Function validateSpecificDateStartDateTime
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
validateSpecificDateStartDateTime(): ValidatorFn {
return (control: AbstractControl): { [key: string]: any, } => {
if (!this.editSpecificDateForm) {
return null;
}
Function validateSpecificDateEndDateTime
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
validateSpecificDateEndDateTime(): ValidatorFn {
return (control: AbstractControl): { [key: string]: any, } => {
if (!this.editSpecificDateForm) {
return null;
}