axsh/wakame-vdc

View on GitHub

Showing 694 of 1,587 total issues

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

  bt_refresh.element.bind('dcmgrGUI.refresh',function(){
    //Update list element
    c_list.page = c_pagenate.current_page;
    list_request.url = DcmgrGUI.Util.getPagePath('/security_groups/list/',c_list.page);
    list_request.data = DcmgrGUI.Util.getPagenateData(c_pagenate.start,c_pagenate.row);
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/sshkeypair_panel.js on lines 98..109

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

  bt_refresh.element.bind('dcmgrGUI.refresh', function(){
    //Update list element
    c_list.page = c_pagenate.current_page;
    list_request.url = DcmgrGUI.Util.getPagePath('/keypairs/list/', c_list.page);
    list_request.data = DcmgrGUI.Util.getPagenateData(c_pagenate.start,c_pagenate.row);
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/security_group_panel.js on lines 152..163

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

  var bt_create_volume = new DcmgrGUI.Dialog({
    target:'.create_volume',
    width:400,
    height:250,
    title:$.i18n.prop('create_volume_header'),
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/sshkeypair_panel.js on lines 70..83

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

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

    var bt_edit_ssh_keypair = new DcmgrGUI.Dialog({
      target:'.edit_ssh_keypair',
      width:500,
      height:230,
      title:$.i18n.prop('edit_ssh_keypair_header'),
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/backup_panel.js on lines 142..155

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

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

        if @bkst_drv_class.include?(BackupStorage::CommandAPI)
          archive_from_snapshot(@ctx, @snapshot_path) do |cmd_tuple, chksum_path, size_path|
            cmd_tuple2 = invoke_task(@bkst_drv_class,
                                     :upload_command, [nil, bo])

Severity: Major
Found in dcmgr/lib/dcmgr/drivers/local_store/linux_local_store.rb and 1 other location - About 6 hrs to fix
dcmgr/lib/dcmgr/drivers/local_store/linux_local_store.rb on lines 231..301

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

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

        if @bkst_drv_class.include?(BackupStorage::CommandAPI)
          archive_from_snapshot(@ctx, @snapshot_path) do |cmd_tuple, chksum_path, size_path|
            cmd_tuple2 = invoke_task(@bkst_drv_class,
                                     :upload_command, [nil, bo])

Severity: Major
Found in dcmgr/lib/dcmgr/drivers/local_store/linux_local_store.rb and 1 other location - About 6 hrs to fix
dcmgr/lib/dcmgr/drivers/local_store/linux_local_store.rb on lines 141..211

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

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

(function(){
   // Defer initialization until doc ready.
   $(function(){
       app.collections.detailItems = new app.collections.InstanceDetailCollection({
         model: app.models.Instance,
frontend/admin/app/assets/javascripts/admin/controllers/images/detail_controller.js on lines 1..15
frontend/admin/app/assets/javascripts/admin/controllers/load_balancers/detail_controller.js on lines 1..15
frontend/admin/app/assets/javascripts/admin/controllers/notifications/detail_controller.js on lines 1..20
frontend/admin/app/assets/javascripts/admin/controllers/ssh_key_pairs/detail_controller.js on lines 1..15
frontend/admin/app/assets/javascripts/admin/controllers/users/detail_controller.js on lines 1..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 163.

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

(function(){
   // Defer initialization until doc ready.
   $(function(){
       app.collections.detailItems = new app.collections.SshKeyPairDetailCollection({
         model: app.models.SshKeyPair,
frontend/admin/app/assets/javascripts/admin/controllers/images/detail_controller.js on lines 1..15
frontend/admin/app/assets/javascripts/admin/controllers/instances/detail_controller.js on lines 1..15
frontend/admin/app/assets/javascripts/admin/controllers/load_balancers/detail_controller.js on lines 1..15
frontend/admin/app/assets/javascripts/admin/controllers/notifications/detail_controller.js on lines 1..20
frontend/admin/app/assets/javascripts/admin/controllers/users/detail_controller.js on lines 1..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 163.

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

(function(){
   // Defer initialization until doc ready.
   $(function(){
       app.collections.detailItems = new app.collections.UserDetailCollection({
         model: app.models.User,
frontend/admin/app/assets/javascripts/admin/controllers/images/detail_controller.js on lines 1..15
frontend/admin/app/assets/javascripts/admin/controllers/instances/detail_controller.js on lines 1..15
frontend/admin/app/assets/javascripts/admin/controllers/load_balancers/detail_controller.js on lines 1..15
frontend/admin/app/assets/javascripts/admin/controllers/notifications/detail_controller.js on lines 1..20
frontend/admin/app/assets/javascripts/admin/controllers/ssh_key_pairs/detail_controller.js on lines 1..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 163.

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

(function(){
   // Defer initialization until doc ready.
   $(function(){
     app.collections.detailItems = new app.collections.LoadBalancerDetailCollection({
         model: app.models.LoadBalancer,
frontend/admin/app/assets/javascripts/admin/controllers/images/detail_controller.js on lines 1..15
frontend/admin/app/assets/javascripts/admin/controllers/instances/detail_controller.js on lines 1..15
frontend/admin/app/assets/javascripts/admin/controllers/notifications/detail_controller.js on lines 1..20
frontend/admin/app/assets/javascripts/admin/controllers/ssh_key_pairs/detail_controller.js on lines 1..15
frontend/admin/app/assets/javascripts/admin/controllers/users/detail_controller.js on lines 1..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 163.

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

(function(){

  // Defer initialization until doc ready.
  $(function(){

frontend/admin/app/assets/javascripts/admin/controllers/images/detail_controller.js on lines 1..15
frontend/admin/app/assets/javascripts/admin/controllers/instances/detail_controller.js on lines 1..15
frontend/admin/app/assets/javascripts/admin/controllers/load_balancers/detail_controller.js on lines 1..15
frontend/admin/app/assets/javascripts/admin/controllers/ssh_key_pairs/detail_controller.js on lines 1..15
frontend/admin/app/assets/javascripts/admin/controllers/users/detail_controller.js on lines 1..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 163.

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

(function(){
   // Defer initialization until doc ready.
   $(function(){
       app.collections.detailItems = new app.collections.ImageDetailCollection({
         model: app.models.Image,
frontend/admin/app/assets/javascripts/admin/controllers/instances/detail_controller.js on lines 1..15
frontend/admin/app/assets/javascripts/admin/controllers/load_balancers/detail_controller.js on lines 1..15
frontend/admin/app/assets/javascripts/admin/controllers/notifications/detail_controller.js on lines 1..20
frontend/admin/app/assets/javascripts/admin/controllers/ssh_key_pairs/detail_controller.js on lines 1..15
frontend/admin/app/assets/javascripts/admin/controllers/users/detail_controller.js on lines 1..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 163.

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

    'SMTP': {
      title: 'SMTP',
      ui: function (elem, params){
        if(params === undefined) params={port: 25};
        elem.append('Port: <input type="text" class="_tcp_port" width="4" value="'+params['port']+'"></input>');
Severity: Major
Found in frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js and 7 other locations - About 6 hrs to fix
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1253..1265
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1266..1278
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1292..1304
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1305..1317
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1318..1330
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1346..1358
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1359..1371

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

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

    'POSTGRESQL': {
      title: 'PostgreSQL',
      ui: function (elem, params){
        if(params === undefined) params={port: 5432};
        elem.append('Port: <input type="text" class="_tcp_port" width="4" value="'+params['port']+'"></input>');
Severity: Major
Found in frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js and 7 other locations - About 6 hrs to fix
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1253..1265
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1266..1278
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1279..1291
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1292..1304
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1305..1317
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1318..1330
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1346..1358

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

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

    'SUBMISSION': {
      title: 'Submission',
      ui: function (elem, params){
        if(params === undefined) params={port: 587};
        elem.append('Port: <input type="text" class="_tcp_port" width="4" value="'+params['port']+'"></input>');
Severity: Major
Found in frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js and 7 other locations - About 6 hrs to fix
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1253..1265
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1266..1278
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1279..1291
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1292..1304
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1305..1317
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1346..1358
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1359..1371

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

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

    'FTP': {
      title: 'FTP',
      ui: function (elem, params){
        if(params === undefined) params={port: 21};
        elem.append('Port: <input type="text" class="_tcp_port" width="4" value="'+params['port']+'"></input>');
Severity: Major
Found in frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js and 7 other locations - About 6 hrs to fix
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1266..1278
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1279..1291
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1292..1304
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1305..1317
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1318..1330
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1346..1358
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1359..1371

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

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

    'SSH': {
      title: 'SSH',
      ui: function (elem, params){
        if(params === undefined) params={port: 22};
        elem.append('Port: <input type="text" class="_tcp_port" width="4" value="'+params['port']+'"></input>');
Severity: Major
Found in frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js and 7 other locations - About 6 hrs to fix
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1253..1265
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1279..1291
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1292..1304
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1305..1317
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1318..1330
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1346..1358
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1359..1371

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

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

    'IMAP': {
      title: 'IMAP',
      ui: function (elem, params){
        if(params === undefined) params={port: 143};
        elem.append('Port: <input type="text" class="_tcp_port" width="4" value="'+params['port']+'"></input>');
Severity: Major
Found in frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js and 7 other locations - About 6 hrs to fix
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1253..1265
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1266..1278
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1279..1291
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1292..1304
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1318..1330
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1346..1358
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1359..1371

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

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

    'POP3': {
      title: 'POP3',
      ui: function (elem, params){
        if(params === undefined) params={port: 110};
        elem.append('Port: <input type="text" class="_tcp_port" width="4" value="'+params['port']+'"></input>');
Severity: Major
Found in frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js and 7 other locations - About 6 hrs to fix
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1253..1265
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1266..1278
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1279..1291
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1305..1317
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1318..1330
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1346..1358
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1359..1371

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

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

    'MYSQL': {
      title: 'MySQL',
      ui: function (elem, params){
        if(params === undefined) params={port: 3306};
        elem.append('Port: <input type="text" class="_tcp_port" width="4" value="'+params['port']+'"></input>');
Severity: Major
Found in frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js and 7 other locations - About 6 hrs to fix
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1253..1265
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1266..1278
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1279..1291
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1292..1304
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1305..1317
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1318..1330
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/core.js on lines 1359..1371

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

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