* Finish task #68711.

This commit is contained in:
liyuchun
2022-09-19 14:38:07 +08:00
parent ca672078b7
commit b348850046
27 changed files with 1682 additions and 112 deletions
View File
+33
View File
@@ -0,0 +1,33 @@
$(function()
{
if(config.currentMethod == 'create') $('#hostID').change();
$('#hostID').change(function()
{
var hostID = $('#hostID').val();
var link = createLink('executionnode', 'ajaxGetTemplates', 'hostID=' + hostID);
$.get(link, function(data)
{
$('#template').html('').append(data);
$('#templateID').chosen().trigger("chosen:updated");
$('#templateID').change();
});
});
$(document).on("change", '#templateID', function()
{
var templateID = $('#templateID').val();
var link = createLink('executionnode', 'ajaxGetTemplateInfo', 'templateID=' + templateID);
$.get(link, function(data)
{
data = JSON.parse(data);
console.log(data);
$('#osCategory').val(data.osCategoryName);
$('#osType').val(data.osTypeName);
$('#osVersion').val(data.osVersionName);
$('#osLang').val(data.osLangName);
});
});
if(typeof templateID == 'undefined' || !templateID) $('#osCategory').change();
})