有人设法通过 terraforms Insights 为虚拟机启用吗?
我能够创建虚拟机,启用日志记录,但无法启用见解..
我已经看到这个问题:但没有找到明确的答案.. 如何使用 terraform 启用 azure vm 应用程序洞察监控代理
这是我用于测试的完整 terraform 脚本,我直接在 azure 的 Cloud shell 上运行它。
# Configure the Azure provider
provider "azurerm" {
# The "feature" block is required for AzureRM provider 2.x.
features {}
}
variable "prefix" {
default = "tfvmex"
}
resource "azurerm_resource_group" "main" {
name = "${var.prefix}-resources"
location = "West Europe"
}
resource "azurerm_virtual_network" "main" {
name = "${var.prefix}-network"
address_space = ["10.0.0.0/16"]
location = azurerm_resource_group.main.location
resource_group_name = azurerm_resource_group.main.name
}
resource "azurerm_subnet" "internal" …Run Code Online (Sandbox Code Playgroud) logging azure azure-application-insights terraform azure-devops
我有一个多选剑道,由mvc中的控制器填充.
我在下拉列表中有一个选项是selectAll,当我选择该选项时,我清除所有其他选项,现在我想禁用下拉列表(但不是删除"全选"选项的选项).
如果我做
multiselect.enable(false) //i lose the option to delete the selected "Select All"
Run Code Online (Sandbox Code Playgroud)
使用以下代码:当我选择"全选"选项时,我清除所有选择的其他选项和剑道,只需选择所有选项.
if (sel == 'Select All') {
var name_Controller = $(e.item).parent().attr('id');
var name_Controller = name_Controller.substr(0, name_Controller.indexOf('_'));
var t = "#" + name_Controller;
var required = $(t).data("kendoMultiSelect");
required.value(""); // to clean
Run Code Online (Sandbox Code Playgroud)
现在..我如何禁用其他选项,或者知道已经选择的选项的名称,以便执行以下操作:
if(required.contains("Select All")) //dont do nothing
Run Code Online (Sandbox Code Playgroud)
required.val()doenst工作,因为它被用于多个下拉列表,所有下拉列表都自动使用不同的id