Showing 1,395 of 1,395 total issues
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)
Method portalProxy.DoRegisterEndpoint
has 55 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (p *portalProxy) DoRegisterEndpoint(cnsiName string, apiEndpoint string, skipSSLValidation bool, clientId string, clientSecret string, ssoAllowed bool, subType string, fetchInfo interfaces.InfoFunc) (interfaces.CNSIRecord, error) {
if len(cnsiName) == 0 || len(apiEndpoint) == 0 {
return interfaces.CNSIRecord{}, interfaces.NewHTTPShadowError(
http.StatusBadRequest,
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 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;
}
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 jsonFilter
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public jsonFilter(jsonString: string): string {
let filtered = jsonString;
try {
const cfEvent: FireHoseItem = JSON.parse(jsonString);
switch (cfEvent.eventType) {
Function constructor
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(public applicationService: ApplicationService) {
const chartConfigBuilder = getMetricsChartConfigBuilder<IMetricApplication>(result => `Instance ${result.metric.instance_index}`);
this.instanceMetricConfigs = [
chartConfigBuilder(
new FetchApplicationChartMetricsAction(
Function constructStatusObservables
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private constructStatusObservables() {
this.isFetchingApp$ = this.entityService.isFetchingEntity$;
this.isUpdatingApp$ = this.entityService.entityObs$.pipe(map(a => {
const updatingRoot = a.entityRequestInfo.updating[rootUpdatingKey] || { busy: false };
Function generateCFServiceBindingEntity
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function generateCFServiceBindingEntity(endpointDefinition: StratosEndpointExtensionDefinition) {
const definition: IStratosEntityDefinition = {
type: serviceBindingEntityType,
schema: {
default: cfEntityFactory(serviceBindingEntityType),
Function newEntityState
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function newEntityState<T = StateEntity>(state: StateEntities<T>, action: ChangeCfUserRole, add: boolean): StateEntities<T> {
const apiResource: APIResource<T> = state[action.guid];
if (!apiResource) {
return state;
}
Function uaaSetupReducer
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function uaaSetupReducer(state: UAASetupState = defaultState, action) {
switch (action.type) {
case SETUP_GET_SCOPES:
case SETUP_SAVE_CONFIG:
return {
Function ngOnInit
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ngOnInit() {
this.route.params.forEach((params: Params) => {
const repo = params.repo;
const chartName = params.chartName;
Function constructor
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(
public pageHeaderService: PageHeaderService,
private store: Store<DashboardOnlyAppState>,
private breakpointObserver: BreakpointObserver,
private router: Router,
Function doRegister
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private doRegister(reg: KubeConfigImportAction, next: KubeConfigImportAction[]) {
const obs$ = this.registerEndpoint(
reg.cluster.name,
reg.cluster.cluster.server,
reg.cluster.cluster['insecure-skip-tls-verify'],
Function getAuthDataForConnect
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public getAuthDataForConnect(resolver: ComponentFactoryResolver, injector: Injector, fb: FormBuilder, user: KubeConfigFileUser)
: ConnectEndpointData | null {
let data = null;
Function setupInputSub
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private setupInputSub() {
this.stopInputSub();
this.sub = combineLatest(
this.timeObservable,
this.dateObservable
Function setupObservables
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private setupObservables() {
this.update$ = stratosEntityCatalog.endpoint.store.getEntityMonitor(this.config.guid).getUpdatingSection(ConnectEndpoint.UpdatingKey)
.pipe(filter(update => !!update));
this.fetchingInfo$ = stratosEntityCatalog.endpoint.store.getEntityMonitor(this.config.guid).entityRequest$.pipe(
Function init
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private init(config: ConnectEndpointConfig) {
const endpoint = entityCatalog.getEndpoint(config.type, config.subType);
// Populate the valid auth types for the endpoint that we want to connect to
// Remove SSO if not allowed on this endpoint
Function deleteWarn
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public deleteWarn() {
// Namespace vs Pod definition in different places
const defn = (this.data.definition?.definition || this.data.definition) as KubeResourceEntityDefinition;
this.sidePanelService.hide();
const confirmation = new ConfirmationDialogConfig(
Function getFolderSource
has 12 return statements (exceeds 4 allowed). Open
Open
func getFolderSource(clientWebSocket *websocket.Conn, tempDir string, msg SocketMessage) (StratosProject, string, error) {
// The msg data is JSON for the Folder info
info := FolderSourceInfo{
WaitAfterUpload: false,
}