axsh/wakame-vdc

View on GitHub
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js

Summary

Maintainability
F
1 mo
Test Coverage

Function resourceManagePanel has 1247 lines of code (exceeds 25 allowed). Consider refactoring.
Open

DcmgrGUI.prototype.resourceManagePanel = function(){
  // ボタン名
  var create_button_name = $.i18n.prop('create_button');
  var close_button_name = $.i18n.prop('close_button');
  var update_button_name = $.i18n.prop('update_button');

File resource_manage_panel.js has 1249 lines of code (exceeds 250 allowed). Consider refactoring.
Open

DcmgrGUI.prototype.resourceManagePanel = function(){
  // ボタン名
  var create_button_name = $.i18n.prop('create_button');
  var close_button_name = $.i18n.prop('close_button');
  var update_button_name = $.i18n.prop('update_button');

Function resourceManagePanel has a Cognitive Complexity of 90 (exceeds 5 allowed). Consider refactoring.
Open

DcmgrGUI.prototype.resourceManagePanel = function(){
  // ボタン名
  var create_button_name = $.i18n.prop('create_button');
  var close_button_name = $.i18n.prop('close_button');
  var update_button_name = $.i18n.prop('update_button');

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function callback has 215 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    callback: function(){
        var is_accid = '';
        var is_uuid = '';
        // jqGridの定義(追加ドライブ)
    jQuery("#list").jqGrid({

Function callback has 98 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    callback: function(){      
    var f = $('#fm');
    f.validate({
                // バリデーション定義
            errorClass : 'valid-error',

Function callback has 96 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    callback: function(){      
    var f = $('#fm');
    f.validate({
                // バリデーション定義
            errorClass : 'valid-error',

Function callback has 74 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    callback: function(){
        // バリデーション定義
    var f = $('#fm');
    f.validate({
            errorClass : 'valid-error',

Function callback has 65 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    callback: function(){
        // アカウント選択時、全ストレージノード情報をajaxで取得      
        $('#selaccount_account').bind('change',function() {
                var f = $('#fm');
                var acc = $('#selaccount_account').get(0);

Function callback has 57 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    callback: function(){
        // バリデーション定義
    var f = $('#fm');
    f.validate({
            errorClass : 'valid-error',

Function callback has 53 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    callback: function(){
        // アカウント選択時、全マシンイメージ情報をajaxで取得      
        $('#selaccount_account').bind('change',function() {
                var f = $('#fm');
                var acc = $('#selaccount_account').get(0);

Function callback has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    callback: function(){
        // バリデーション定義
    var f = $('#fm');
    f.validate({
            errorClass : 'valid-error',

Function create_button_name has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  create_resource_sn_buttons[create_button_name] = function() {
    // フォーム全部をバリデーション
    var f = $('#fm');
    var valid = f.validate().form();
    if(valid) {

Function create_button_name has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  create_resource_is_buttons[create_button_name] = function() {
    // フォーム全部をバリデーション 
    var f = $('#fm');
    var valid = f.validate().form();
    if(valid) {

Function callback has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    callback: function(){
        // バリデーション定義
    var f = $('#fm');
    f.validate({
            errorClass : 'valid-error',

Function create_button_name has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  create_resource_hn_buttons[create_button_name] = function() {
    // フォーム全部をバリデーション
    var f = $('#fm');
    var valid = f.validate().form();
    if(valid) {

Function create_button_name has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  create_resource_wmi_buttons[create_button_name] = function() { 
    // フォーム全部をバリデーション
    var f = $('#fm');
    var valid = f.validate().form();
    if(valid) {

Function update_button_name has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  edit_and_delete_resource_is_buttons[update_button_name] = function() {
    // フォーム全体をバリデーション
    var f = $('#fm');
    var valid = f.validate().form();
    if(valid) {

Function update_button_name has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  edit_and_delete_resource_hn_buttons[update_button_name] = function() {
    // フォーム全部をバリデーション
    var f = $('#fm');
    var valid = f.validate().form();
    if(valid) {

Function success has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

                success: function(json,status) {
                             // 一覧情報をセーブ、ホストノードIDの一覧セレクトを作成
                 var sel = $('#hostid');
                             $.data(acc,'host_nodes',json.host_node);
                             sel.children().remove();

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

  edit_and_delete_resource_hn_buttons[delete_button_name] = function() { 
   // 値を取り込んでリクエスト送信 
    var hostid = $(this).find('#hostid').val();
    var request = new DcmgrGUI.Request;
    // 送信中はマスキング
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 466..490
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 988..1013
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1354..1378

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

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

  delete_resource_sn_buttons[delete_button_name] = function() {
    // 値を取り込んでリクエスト送信 
    var storageid = $(this).find('#storageid').val();
    var request = new DcmgrGUI.Request;
    // 送信中はマスキング
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 128..153
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 988..1013
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1354..1378

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

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

  delete_resource_wmi_buttons[delete_button_name] = function() {
   // 値を取り込んでリクエスト送信 
    var imageid = $(this).find('#imageid').val();
    var request = new DcmgrGUI.Request;
    // 送信中はマスキング
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 128..153
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 466..490
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 988..1013

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

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

  edit_and_delete_resource_is_buttons[delete_button_name] = function() {
    // 値を取り込んでリクエスト送信 
    var specid = $(this).find('#specid').val();
    var request = new DcmgrGUI.Request;
    // 送信中葉マスキング
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 128..153
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 466..490
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1354..1378

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

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

        request.post({
            "url": '/dialog/create_is_exec',
            "data": data,
            success: function(json,status) {
                    // メッセージボックスにて結果表示
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 175..194
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1037..1057

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

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

       request.post({
            "url": '/dialog/edit_hn_exec',
            "data": data,
            success: function(json,status) {
                    // メッセージボックスにて結果表示
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 618..636
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1037..1057

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

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

        request.post({
            "url": '/dialog/edit_is_exec',
            "data": data,
            success: function(json,status) {
                    // メッセージボックス表示にて結果表示
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 175..194
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 618..636

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

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

        datatype: function(postdata) {
                var request = new DcmgrGUI.Request;
                    var data = 'account_id=' + is_accid +'&uuid=' + is_uuid;
                    for (var key in postdata) {
                        data = data + '&' + key + "=" + postdata[key];
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 727..742

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

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

        datatype: function(postdata) {
                var request = new DcmgrGUI.Request;
                    var data = 'account_id=' + is_accid +'&uuid=' + is_uuid;
                    for (var key in postdata) {
                        data = data + '&' + key + "=" + postdata[key];
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 822..837

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

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

                             if (json.host_node.total > 0) {
                                for(var i = 0;i < json.host_node.total;i++)
                                {
                                    var rec = json.host_node.results[i].result;
                                    var html = '<option value="' + rec.uuid + '">' + rec.id +'</option>';
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 516..539
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 906..922
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1124..1147
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1404..1423

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

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

                             if (json.storage_node.total > 0) {
                                for(var i = 0;i < json.storage_node.total;i++)
                                {
                                    var rec = json.storage_node.results[i].result;
                                    var html = '<option value="' + rec.uuid + '">' + rec.id + '</option>';
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 252..276
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 906..922
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1124..1147
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1404..1423

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

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

                             if (json.instance_spec.total > 0) {
                                for(var i = 0;i < json.instance_spec.total;i++)
                                {
                                    var rec = json.instance_spec.results[i].result;
                                    var html = '<option value="' + rec.uuid + '">' + rec.id +'</option>';
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 252..276
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 516..539
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1124..1147
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1404..1423

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

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

                             if (json.instance_spec.total > 0) {
                                for(var i = 0;i < json.instance_spec.total;i++)
                                {
                                    var rec = json.instance_spec.results[i].result;
                                    var html = '<option value="' + rec.uuid + '">' + rec.id +'</option>';
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 252..276
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 516..539
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 906..922
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1404..1423

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

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

                             if (json.image.total > 0) {
                                for(var i = 0;i < json.image.total;i++)
                                {
                                    var rec = json.image.results[i].result;
                                    var html = '<option value="' + rec.uuid + '">' + rec.id + '</option>';
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 252..276
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 516..539
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 906..922
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1124..1147

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

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

                request2.get({
                    "url": '/dialog/get_is_vifs_list',
                    "data": data2,
                    success: function(json,status) {
                                        // グリッド内容を一端クリアして、取得情報をセット
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 936..948

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

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

                request.get({
                    "url": '/dialog/get_is_drives_list',
                    "data": data,
                    success: function(json,status) {
                                        // グリッド内容を一端クリアして、取得情報をセット
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 954..966

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

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

            'cpu_cores' : {
                required: $.i18n.prop('validate_errmsg_required',[$.i18n.prop('item_cpu_cores')]),
                            digits: $.i18n.prop('validate_errmsg_digits'),
                min: $.validator.format($.i18n.prop('validate_errmsg_min'))
            },
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/groups_panel.js on lines 253..257
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 92..96
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 102..106
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 224..228
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 229..233
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 421..425
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 426..430
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 674..678
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 679..683
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 684..688
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1091..1095
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1096..1100
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1276..1280
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/users_panel.js on lines 288..292

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

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

            'memory_size' : {
                required: $.i18n.prop('validate_errmsg_required',[$.i18n.prop('item_memory_size')]),
                            digits: $.i18n.prop('validate_errmsg_digits'),
                min: $.validator.format($.i18n.prop('validate_errmsg_min'))
            }
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/groups_panel.js on lines 253..257
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 92..96
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 97..101
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 224..228
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 229..233
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 421..425
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 426..430
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 674..678
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 679..683
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 684..688
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1091..1095
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1096..1100
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1276..1280
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/users_panel.js on lines 288..292

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

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

            'disk_space' : {
                required: $.i18n.prop('validate_errmsg_required',[$.i18n.prop('item_disk_space')]),
                            digits: $.i18n.prop('validate_errmsg_digits'),
                min: $.validator.format($.i18n.prop('validate_errmsg_min'))
            },
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/groups_panel.js on lines 253..257
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 92..96
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 97..101
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 102..106
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 224..228
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 229..233
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 421..425
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 674..678
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 679..683
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 684..688
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1091..1095
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1096..1100
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1276..1280
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/users_panel.js on lines 288..292

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

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

            'memory_size' : {
                required: $.i18n.prop('validate_errmsg_required',[$.i18n.prop('item_memory_size')]),
                            digits: $.i18n.prop('validate_errmsg_digits'),
                min: $.validator.format($.i18n.prop('validate_errmsg_min'))
            },
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/groups_panel.js on lines 253..257
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 92..96
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 97..101
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 102..106
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 224..228
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 229..233
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 421..425
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 426..430
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 674..678
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 679..683
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1091..1095
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1096..1100
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1276..1280
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/users_panel.js on lines 288..292

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

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

            'cpu_cores' : {
                required: $.i18n.prop('validate_errmsg_required',[$.i18n.prop('item_cpu_cores')]),
                            digits: $.i18n.prop('validate_errmsg_digits'),
                min: $.validator.format($.i18n.prop('validate_errmsg_min'))
            },
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/groups_panel.js on lines 253..257
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 92..96
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 97..101
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 102..106
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 224..228
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 229..233
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 421..425
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 426..430
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 674..678
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 679..683
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 684..688
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1096..1100
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1276..1280
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/users_panel.js on lines 288..292

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

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

            'hostid' : {
                required: $.i18n.prop('validate_errmsg_required',[$.i18n.prop('item_hostid')]),
                            AN: $.i18n.prop('validate_errmsg_AN'),
                maxlength: $.validator.format($.i18n.prop('validate_errmsg_maxlength'))
            },
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/groups_panel.js on lines 253..257
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 97..101
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 102..106
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 224..228
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 229..233
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 421..425
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 426..430
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 674..678
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 679..683
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 684..688
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1091..1095
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1096..1100
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1276..1280
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/users_panel.js on lines 288..292

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

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

            'image_location' : {
                required: '<BR>' + $.i18n.prop('validate_errmsg_required',[$.i18n.prop('item_image_location')]),
                            relativePATH: '<BR>' + $.i18n.prop('validate_errmsg_PATH'),
                maxlength: '<BR>' + $.i18n.prop('validate_errmsg_maxlength')
            },
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 435..439
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 440..444

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

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

            'snapshot_base_path' : {
                required: '<BR>' + $.i18n.prop('validate_errmsg_required',[$.i18n.prop('item_snapshot_base_path')]),
                            PATH: '<BR>' + $.i18n.prop('validate_errmsg_PATH'),
                maxlength: '<BR>' + $.i18n.prop('validate_errmsg_maxlength')
            }
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 435..439
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1284..1288

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

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

            'storageid' : {
                required: $.i18n.prop('validate_errmsg_required',[$.i18n.prop('item_storageid')]),
                            AN: $.i18n.prop('validate_errmsg_AN'),
                maxlength: $.validator.format($.i18n.prop('validate_errmsg_maxlength'))
            },
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/groups_panel.js on lines 253..257
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 92..96
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 97..101
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 102..106
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 224..228
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 229..233
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 426..430
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 674..678
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 679..683
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 684..688
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1091..1095
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1096..1100
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1276..1280
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/users_panel.js on lines 288..292

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

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

            'cpu_cores' : {
                required: $.i18n.prop('validate_errmsg_required',[$.i18n.prop('item_cpu_cores')]),
                            digits: $.i18n.prop('validate_errmsg_digits'),
                min: $.validator.format($.i18n.prop('validate_errmsg_min'))
            },
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/groups_panel.js on lines 253..257
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 92..96
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 97..101
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 102..106
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 224..228
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 229..233
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 421..425
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 426..430
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 674..678
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 684..688
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1091..1095
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1096..1100
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1276..1280
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/users_panel.js on lines 288..292

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

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

            'specid' : {
                required: $.i18n.prop('validate_errmsg_required',[$.i18n.prop('item_specid')]),
                            AN: $.i18n.prop('validate_errmsg_AN'),
                maxlength: $.validator.format($.i18n.prop('validate_errmsg_maxlength'))
            },
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/groups_panel.js on lines 253..257
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 92..96
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 97..101
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 102..106
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 224..228
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 229..233
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 421..425
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 426..430
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 679..683
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 684..688
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1091..1095
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1096..1100
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1276..1280
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/users_panel.js on lines 288..292

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

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

            'cpu_cores' : {
                required: $.i18n.prop('validate_errmsg_required',[$.i18n.prop('item_cpu_cores')]),
                            digits: $.i18n.prop('validate_errmsg_digits'),
                min: $.validator.format($.i18n.prop('validate_errmsg_min'))
            },
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/groups_panel.js on lines 253..257
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 92..96
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 97..101
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 102..106
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 229..233
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 421..425
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 426..430
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 674..678
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 679..683
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 684..688
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1091..1095
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1096..1100
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1276..1280
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/users_panel.js on lines 288..292

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

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

            'memory_size' : {
                required: $.i18n.prop('validate_errmsg_required',[$.i18n.prop('item_memory_size')]),
                            digits: $.i18n.prop('validate_errmsg_digits'),
                min: $.validator.format($.i18n.prop('validate_errmsg_min'))
            }
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/groups_panel.js on lines 253..257
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 92..96
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 97..101
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 102..106
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 224..228
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 421..425
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 426..430
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 674..678
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 679..683
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 684..688
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1091..1095
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1096..1100
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1276..1280
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/users_panel.js on lines 288..292

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

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

            'memory_size' : {
                required: $.i18n.prop('validate_errmsg_required',[$.i18n.prop('item_memory_size')]),
                            digits: $.i18n.prop('validate_errmsg_digits'),
                min: $.validator.format($.i18n.prop('validate_errmsg_min'))
            },
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/groups_panel.js on lines 253..257
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 92..96
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 97..101
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 102..106
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 224..228
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 229..233
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 421..425
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 426..430
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 674..678
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 679..683
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 684..688
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1091..1095
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1276..1280
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/users_panel.js on lines 288..292

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

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

            'base_path' : {
                required: '<BR>' + $.i18n.prop('validate_errmsg_required',[$.i18n.prop('item_base_path')]),
                            PATH: '<BR>' + $.i18n.prop('validate_errmsg_PATH'),
                maxlength: '<BR>' + $.i18n.prop('validate_errmsg_maxlength')
            },
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 440..444
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1284..1288

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

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

            'imageid' : {
                required: $.i18n.prop('validate_errmsg_required',[$.i18n.prop('item_imageid')]),
                            AN: $.i18n.prop('validate_errmsg_AN'),
                maxlength: $.validator.format($.i18n.prop('validate_errmsg_maxlength'))
            },
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/groups_panel.js on lines 253..257
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 92..96
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 97..101
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 102..106
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 224..228
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 229..233
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 421..425
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 426..430
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 674..678
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 679..683
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 684..688
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1091..1095
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1096..1100
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/users_panel.js on lines 288..292

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

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 data ='account_id=' + account_id 
          +'&disk_space=' + disk_space
                  +'&ipaddr='  + ipaddr 
                  +'&transport_type=' + transport_type
                  +'&storage_type=' + storage_type
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/network_panel.js on lines 279..286

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

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

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

            'quota_weight' : {
                            number: $.i18n.prop('validate_errmsg_number'),
                GT: $.validator.format($.i18n.prop('validate_errmsg_plus_number'))
            }
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 689..692

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

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

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

            'quota_weight' : {
                            number: $.i18n.prop('validate_errmsg_number'),
                GT: $.validator.format($.i18n.prop('validate_errmsg_plus_number'))
            }
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1101..1104

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

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 data ='account_id=' + account_id 
          +'&cpu_cores=' + cpu_cores
                  +'&memory_size='  + memory_size 
                  +'&arch=' + arch
                  +'&hypervisor=' + hypervisor
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/users_panel.js on lines 241..246

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

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

  create_resource_is_buttons[close_button_name] = function() {
    $(this).dialog("destroy");
        $(this).remove(); 
  }
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 11..14
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 122..125
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 328..331
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 460..463
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 708..711
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 982..985
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1194..1197
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1348..1351

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

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

  create_resource_sn_buttons[close_button_name] = function() {
    $(this).dialog("destroy");
        $(this).remove(); 
  }
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 11..14
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 122..125
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 460..463
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 587..590
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 708..711
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 982..985
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1194..1197
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1348..1351

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

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

  create_resource_wmi_buttons[close_button_name] = function() {
    $(this).dialog("destroy");
        $(this).remove(); 
  }
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 11..14
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 122..125
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 328..331
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 460..463
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 587..590
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 708..711
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 982..985
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1348..1351

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

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

  delete_resource_sn_buttons[close_button_name] = function() { 
      $(this).dialog("destroy");
        $(this).remove(); 
  };
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 11..14
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 122..125
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 328..331
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 587..590
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 708..711
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 982..985
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1194..1197
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1348..1351

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

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

  edit_and_delete_resource_is_buttons[close_button_name] = function() { 
      $(this).dialog("destroy");
        $(this).remove(); 
  };
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 11..14
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 122..125
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 328..331
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 460..463
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 587..590
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 708..711
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1194..1197
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1348..1351

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

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

  additional_drives_and_IFs_buttons[close_button_name] = function() { 
      $(this).dialog("destroy");
        $(this).remove(); 
  };
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 11..14
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 122..125
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 328..331
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 460..463
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 587..590
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 982..985
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1194..1197
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1348..1351

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

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

  create_resource_hn_buttons[close_button_name] = function() {
    $(this).dialog("destroy");
        $(this).remove(); 
  }
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 122..125
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 328..331
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 460..463
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 587..590
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 708..711
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 982..985
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1194..1197
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1348..1351

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

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

  edit_and_delete_resource_hn_buttons[close_button_name] = function() { 
      $(this).dialog("destroy");
        $(this).remove(); 
  };
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 11..14
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 328..331
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 460..463
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 587..590
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 708..711
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 982..985
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1194..1197
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1348..1351

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

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

  delete_resource_wmi_buttons[close_button_name] = function() { 
      $(this).dialog("destroy");
        $(this).remove(); 
  };
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 11..14
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 122..125
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 328..331
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 460..463
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 587..590
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 708..711
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 982..985
frontend/dcmgr_gui/public/javascripts/dcmgr_gui/resource_manage_panel.js on lines 1194..1197

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

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

There are no issues that match your filters.

Category
Status