vorteil/direktiv

View on GitHub

Showing 1,235 of 1,235 total issues

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

func (s sqlLogNewStore) GetOlder(ctx context.Context, track string, t time.Time) ([]core.LogEntry, error) {
    query := `
        SELECT id, time, tag, data
        FROM fluentbit
        WHERE tag = ? AND time < ?
Severity: Major
Found in pkg/datastore/datastoresql/logstore_new.go and 3 other locations - About 1 hr to fix
pkg/datastore/datastoresql/logstore_new.go on lines 47..62
pkg/datastore/datastoresql/logstore_new.go on lines 64..79
pkg/datastore/datastoresql/logstore_new.go on lines 81..96

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 141.

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 4 locations. Consider refactoring.
Open

func (s sqlLogNewStore) GetOlderInstance(ctx context.Context, track string, t time.Time) ([]core.LogEntry, error) {
    query := `
        SELECT id, time, tag, data
        FROM fluentbit
        WHERE tag LIKE ? AND time < ?
Severity: Major
Found in pkg/datastore/datastoresql/logstore_new.go and 3 other locations - About 1 hr to fix
pkg/datastore/datastoresql/logstore_new.go on lines 30..45
pkg/datastore/datastoresql/logstore_new.go on lines 64..79
pkg/datastore/datastoresql/logstore_new.go on lines 81..96

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 141.

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 4 locations. Consider refactoring.
Open

func (s sqlLogNewStore) GetNewer(ctx context.Context, track string, t time.Time) ([]core.LogEntry, error) {
    query := `
        SELECT id, time, tag, data
        FROM fluentbit
        WHERE tag = ? AND time > ?
Severity: Major
Found in pkg/datastore/datastoresql/logstore_new.go and 3 other locations - About 1 hr to fix
pkg/datastore/datastoresql/logstore_new.go on lines 30..45
pkg/datastore/datastoresql/logstore_new.go on lines 47..62
pkg/datastore/datastoresql/logstore_new.go on lines 81..96

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 141.

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 4 locations. Consider refactoring.
Open

func (s sqlLogNewStore) GetNewerInstance(ctx context.Context, track string, t time.Time) ([]core.LogEntry, error) {
    query := `
        SELECT id, time, tag, data
        FROM fluentbit
        WHERE tag LIKE ? AND time > ?
Severity: Major
Found in pkg/datastore/datastoresql/logstore_new.go and 3 other locations - About 1 hr to fix
pkg/datastore/datastoresql/logstore_new.go on lines 30..45
pkg/datastore/datastoresql/logstore_new.go on lines 47..62
pkg/datastore/datastoresql/logstore_new.go on lines 64..79

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 141.

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 Run has 12 return statements (exceeds 4 allowed).
Open

func Run(circuit *core.Circuit) error {
    config := &core.Config{}
    if err := env.Parse(config); err != nil {
        return fmt.Errorf("parsing env variables: %w", err)
    }
Severity: Major
Found in pkg/flow/server.go - About 1 hr to fix

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

    const deleteNamespace = apiFactory({
      url: ({ namespace }: { namespace: string }) =>
        `/api/v2/namespaces/${namespace}`,
      method: "DELETE",
      schema: NamespaceDeletedSchema,
    Severity: Major
    Found in ui/src/api/namespaces/mutate/deleteNamespace.ts and 4 other locations - About 1 hr to fix
    ui/src/api/notifications/query/get.ts on lines 9..14
    ui/src/api/registries/query/get.ts on lines 9..14
    ui/src/api/syncs/mutate/sync.ts on lines 15..20
    ui/src/api/syncs/query/get.ts on lines 10..15

    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 58.

    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 5 locations. Consider refactoring.
    Open

    const createSync = apiFactory({
      url: ({ namespace }: { namespace: string }) =>
        `/api/v2/namespaces/${namespace}/syncs`,
      method: "POST",
      schema: SyncResponseSchema,
    Severity: Major
    Found in ui/src/api/syncs/mutate/sync.ts and 4 other locations - About 1 hr to fix
    ui/src/api/namespaces/mutate/deleteNamespace.ts on lines 10..15
    ui/src/api/notifications/query/get.ts on lines 9..14
    ui/src/api/registries/query/get.ts on lines 9..14
    ui/src/api/syncs/query/get.ts on lines 10..15

    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 58.

    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 5 locations. Consider refactoring.
    Open

    const getRegistries = apiFactory({
      url: ({ namespace }: { namespace: string }) =>
        `/api/v2/namespaces/${namespace}/registries`,
      method: "GET",
      schema: RegistryListSchema,
    Severity: Major
    Found in ui/src/api/registries/query/get.ts and 4 other locations - About 1 hr to fix
    ui/src/api/namespaces/mutate/deleteNamespace.ts on lines 10..15
    ui/src/api/notifications/query/get.ts on lines 9..14
    ui/src/api/syncs/mutate/sync.ts on lines 15..20
    ui/src/api/syncs/query/get.ts on lines 10..15

    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 58.

    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 5 locations. Consider refactoring.
    Open

    const getSyncs = apiFactory({
      url: ({ namespace }: { namespace: string }) =>
        `/api/v2/namespaces/${namespace}/syncs`,
      method: "GET",
      schema: SyncListSchema,
    Severity: Major
    Found in ui/src/api/syncs/query/get.ts and 4 other locations - About 1 hr to fix
    ui/src/api/namespaces/mutate/deleteNamespace.ts on lines 10..15
    ui/src/api/notifications/query/get.ts on lines 9..14
    ui/src/api/registries/query/get.ts on lines 9..14
    ui/src/api/syncs/mutate/sync.ts on lines 15..20

    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 58.

    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 5 locations. Consider refactoring.
    Open

    const getNotifications = apiFactory({
      url: ({ namespace }: { namespace: string }) =>
        `/api/v2/namespaces/${namespace}/notifications`,
      method: "GET",
      schema: NotificationListSchema,
    Severity: Major
    Found in ui/src/api/notifications/query/get.ts and 4 other locations - About 1 hr to fix
    ui/src/api/namespaces/mutate/deleteNamespace.ts on lines 10..15
    ui/src/api/registries/query/get.ts on lines 9..14
    ui/src/api/syncs/mutate/sync.ts on lines 15..20
    ui/src/api/syncs/query/get.ts on lines 10..15

    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 58.

    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

      actions: {
        setTheme: (theme: ThemeState["storedTheme"]) => void;
        setSystemTheme: (theme: ThemeState["systemTheme"]) => void;
      };
    Severity: Major
    Found in ui/src/util/store/theme.ts and 2 other locations - About 1 hr to fix
    ui/src/util/store/jqPlayground.ts on lines 7..10
    ui/src/util/store/logs.ts on lines 9..12

    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 58.

    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

                  <Button
                    variant="outline"
                    icon
                    data-testid={`filter-clear-${field}`}
                  >
    ui/src/pages/namespace/Events/History/components/Filters/index.tsx on lines 132..138
    ui/src/pages/namespace/Events/History/components/Filters/index.tsx on lines 202..208

    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 58.

    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

                <Input
                  data-testid="queryField"
                  value={query}
                  onChange={(e) => {
                    onChange(e.target.value);
    Severity: Major
    Found in ui/src/pages/namespace/Explorer/Tree/SearchBar.tsx and 1 other location - About 1 hr to fix
    ui/src/pages/namespace/Gateway/Routes/index.tsx on lines 31..38

    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 58.

    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

            <div className="text-sm">
              <div className="text-gray-10 dark:text-gray-dark-10">
                {t("pages.mirror.syncs.detail.header.createdAt")}
              </div>
              {t("pages.mirror.syncs.detail.header.relativeTime", {
    Severity: Major
    Found in ui/src/pages/namespace/Mirror/Detail/Sync/Header/index.tsx and 2 other locations - About 1 hr to fix
    ui/src/pages/namespace/Instances/Detail/Header/index.tsx on lines 70..77
    ui/src/pages/namespace/Instances/Detail/Header/index.tsx on lines 78..85

    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 58.

    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

                  <Button
                    variant="outline"
                    icon
                    data-testid={`clear-filter-${field}`}
                  >
    ui/src/pages/namespace/Events/History/components/Filters/index.tsx on lines 132..138
    ui/src/pages/namespace/Instances/components/Filters/index.tsx on lines 248..254

    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 58.

    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

            <div className="text-sm">
              <div className="text-gray-10 dark:text-gray-dark-10">
                {t("pages.instances.detail.header.finishedAt")}
              </div>
              {t("pages.instances.detail.header.realtiveTime", {
    Severity: Major
    Found in ui/src/pages/namespace/Instances/Detail/Header/index.tsx and 2 other locations - About 1 hr to fix
    ui/src/pages/namespace/Instances/Detail/Header/index.tsx on lines 70..77
    ui/src/pages/namespace/Mirror/Detail/Sync/Header/index.tsx on lines 36..43

    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 58.

    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

                  <Button
                    variant="outline"
                    icon
                    data-testid={`clear-filter-${field}`}
                  >
    ui/src/pages/namespace/Events/History/components/Filters/index.tsx on lines 202..208
    ui/src/pages/namespace/Instances/components/Filters/index.tsx on lines 248..254

    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 58.

    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

            <div className="text-sm">
              <div className="text-gray-10 dark:text-gray-dark-10">
                {t("pages.instances.detail.header.startedAt")}
              </div>
              {t("pages.instances.detail.header.realtiveTime", {
    Severity: Major
    Found in ui/src/pages/namespace/Instances/Detail/Header/index.tsx and 2 other locations - About 1 hr to fix
    ui/src/pages/namespace/Instances/Detail/Header/index.tsx on lines 78..85
    ui/src/pages/namespace/Mirror/Detail/Sync/Header/index.tsx on lines 36..43

    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 58.

    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

      actions: {
        setMaximizedPanel: (layout: LogsPreferencesState["maximizedPanel"]) => void;
        setVerboseLogs: (layout: LogsPreferencesState["verboseLogs"]) => void;
      };
    Severity: Major
    Found in ui/src/util/store/logs.ts and 2 other locations - About 1 hr to fix
    ui/src/util/store/jqPlayground.ts on lines 7..10
    ui/src/util/store/theme.ts on lines 12..15

    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 58.

    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

                    <PopoverTrigger asChild>
                      <Button variant="outline" className="px-2">
                        {moment(filters[field]).format("HH:mm:ss")}
                      </Button>
                    </PopoverTrigger>
    ui/src/pages/namespace/Events/History/components/Filters/index.tsx on lines 160..164

    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 58.

    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

    Severity
    Category
    Status
    Source
    Language