WMI remote componente add text _field_wmi_n_

This commit is contained in:
Calvo 2021-07-12 12:17:38 +02:00
parent 922fb81a58
commit 19e9613e3e
1 changed files with 15 additions and 4 deletions

View File

@ -1327,12 +1327,23 @@ function filterByText(selectbox, textbox, textNoData) {
function manageComponentFields(action, type) {
var fieldLines = $("tr[id*=network_component-" + type + "]").length;
var protocol = $("#module_protocol").val();
let textForAdd = "";
if (action === "add") {
let lineNumber = fieldLines + 1;
let textForAdd =
type === "oid-list-pluginRow-snmpRow"
? "_oid_" + lineNumber + "_"
: lineNumber;
switch (type) {
case "oid-list-pluginRow-snmpRow":
textForAdd = "_oid_" + lineNumber + "_";
break;
case "oid-list-wmiRow":
textForAdd = "_field_wmi_" + lineNumber + "_";
break;
default:
textForAdd = lineNumber;
}
$("#network_component-manage-" + type).before(
$("#network_component-" + type + "-row-1")