akveo/ng2-admin

View on GitHub

Showing 228 of 228 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export const DARK_THEME = {
  name: 'dark',
  base: 'dark',
  variables: {
    temperature: {
Severity: Major
Found in src/app/@theme/styles/theme.dark.ts and 1 other location - About 1 wk to fix
src/app/@theme/styles/theme.default.ts on lines 5..314

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 1693.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export const DEFAULT_THEME = {
  name: 'default',
  base: 'default',
  variables: {
    temperature: {
Severity: Major
Found in src/app/@theme/styles/theme.default.ts and 1 other location - About 1 wk to fix
src/app/@theme/styles/theme.dark.ts on lines 5..314

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 1693.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  ngAfterViewInit() {
    this.theme.getJsTheme()
      .pipe(
        delay(1),
        takeWhile(() => this.alive),
src/app/pages/dashboard/traffic/traffic-chart.component.ts on lines 36..159

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 650.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  ngAfterViewInit() {
    this.theme.getJsTheme()
      .pipe(
        delay(1),
        takeWhile(() => this.alive),
Severity: Major
Found in src/app/pages/dashboard/traffic/traffic-chart.component.ts and 1 other location - About 3 days to fix
src/app/pages/e-commerce/profit-card/back-side/stats-area-chart.component.ts on lines 34..157

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 650.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function constructor has 497 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  constructor(private theme: NbThemeService,
              private http: HttpClient) {

    combineLatest([
      this.http.get('assets/map/world.json'),
Severity: Major
Found in src/app/pages/maps/bubble/bubble-map.component.ts - About 2 days to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        {
          title: '2015',
          months: [
            { month: 'Jan', delta: '0.97', down: true, kWatts: '816', cost: '97' },
            { month: 'Feb', delta: '1.83', down: true, kWatts: '806', cost: '95' },
    Severity: Major
    Found in src/app/@core/mock/electricity.service.ts and 1 other location - About 1 day to fix
    src/app/@core/mock/electricity.service.ts on lines 44..60

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 337.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        {
          title: '2017',
          months: [
            { month: 'Jan', delta: '1.34', down: false, kWatts: '789', cost: '91' },
            { month: 'Feb', delta: '0.95', down: false, kWatts: '793', cost: '93' },
    Severity: Major
    Found in src/app/@core/mock/electricity.service.ts and 1 other location - About 1 day to fix
    src/app/@core/mock/electricity.service.ts on lines 9..25

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 337.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

      getThirdLine(eTheme) {
        return {
          type: 'line',
          smooth: true,
          symbolSize: 20,
    src/app/pages/e-commerce/charts-panel/charts/orders-chart.component.ts on lines 175..217

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 231.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

      getSecondLine(eTheme) {
        return         {
          type: 'line',
          smooth: true,
          symbolSize: 20,
    src/app/pages/e-commerce/charts-panel/charts/orders-chart.component.ts on lines 219..261

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 231.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    File bubble-map.component.ts has 533 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import { Component, OnDestroy } from '@angular/core';
    import { HttpClient } from '@angular/common/http';
    import { combineLatest } from 'rxjs';
    import { takeWhile } from 'rxjs/operators';
    import { NbThemeService } from '@nebular/theme';
    Severity: Major
    Found in src/app/pages/maps/bubble/bubble-map.component.ts - About 1 day to fix

      Similar blocks of code found in 3 locations. Consider refactoring.
      Open

                  {
                    value: this.values[2].value,
                    name: this.values[2].name,
                    label: {
                      normal: {
      src/app/pages/e-commerce/earning-card/back-side/earning-pie-chart.component.ts on lines 89..125
      src/app/pages/e-commerce/earning-card/back-side/earning-pie-chart.component.ts on lines 126..162

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 193.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 3 locations. Consider refactoring.
      Open

                  {
                    value: this.values[0].value,
                    name: this.values[0].name,
                    label: {
                      normal: {
      src/app/pages/e-commerce/earning-card/back-side/earning-pie-chart.component.ts on lines 126..162
      src/app/pages/e-commerce/earning-card/back-side/earning-pie-chart.component.ts on lines 163..199

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 193.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 3 locations. Consider refactoring.
      Open

                  {
                    value: this.values[1].value,
                    name: this.values[1].name,
                    label: {
                      normal: {
      src/app/pages/e-commerce/earning-card/back-side/earning-pie-chart.component.ts on lines 89..125
      src/app/pages/e-commerce/earning-card/back-side/earning-pie-chart.component.ts on lines 163..199

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 193.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      File smart-table.service.ts has 429 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import { Injectable } from '@angular/core';
      import { SmartTableData } from '../data/smart-table';
      
      @Injectable()
      export class SmartTableService extends SmartTableData {
      Severity: Minor
      Found in src/app/@core/mock/smart-table.service.ts - About 6 hrs to fix

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                  {
                    type: 'category',
                    axisTick: {
                      alignWithLabel: true,
                    },
        src/app/pages/charts/echarts/echarts-multiple-xaxis.component.ts on lines 43..82

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 151.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                  {
                    type: 'category',
                    axisTick: {
                      alignWithLabel: true,
                    },
        src/app/pages/charts/echarts/echarts-multiple-xaxis.component.ts on lines 83..122

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 151.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Function ngAfterViewInit has 143 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          ngAfterViewInit(): void {
            this.theme.getJsTheme()
              .pipe(
                takeWhile(() => this.alive),
                delay(1),

          Function ngAfterViewInit has 141 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            ngAfterViewInit() {
              this.themeSubscription = this.theme.getJsTheme().subscribe(config => {
          
                const colors: any = config.variables;
                const echarts: any = config.variables.echarts;
          Severity: Major
          Found in src/app/pages/charts/echarts/echarts-multiple-xaxis.component.ts - About 5 hrs to fix

            Function setOptions has 139 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              setOptions(variables) {
                const visitorsPie: any = variables.visitorsPie;
            
                this.option = {
                  tooltip: {

              Function themeSubscription has 139 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  this.themeSubscription = this.theme.getJsTheme().subscribe(config => {
              
                    const colors: any = config.variables;
                    const echarts: any = config.variables.echarts;
              
              
              Severity: Major
              Found in src/app/pages/charts/echarts/echarts-multiple-xaxis.component.ts - About 5 hrs to fix
                Severity
                Category
                Status
                Source
                Language