// Returns true if the node is enabled, only makes sense for form controls.
// Element must be in a ready state.
340963
func (e *Element) IsEnabled() (bool, error) {
	e.lock.RLock()
	defer e.lock.RUnlock()

	if !e.ready {
		return false, &ElementNotReadyErr{}
	}
	disabled, ok := e.attributes["disabled"]
	// if the attribute doesn't exist, it's enabled.
	if !ok {
		return true, nil
	}
	if disabled == "true" || disabled == "" {
		return false, nil
	}
	return true, nil
}
1236647
func GetNodeCondition(status *v1.NodeStatus, conditionType v1.NodeConditionType) (int, *v1.NodeCondition) {
	if status == nil {
		return -1, nil
	}
	for i := range status.Conditions {
		if status.Conditions[i].Type == conditionType {
			return i, &status.Conditions[i]
		}
	}
	return -1, nil
}
537633
func isMasterNode(node *v1.Node) bool {
	if val, ok := node.Labels[nodeLabelRole]; ok && val == "master" {
		return true
	}

	return false
}
1062312
func (j *resizeJob) nodesArePending() bool {
	for _, complete := range j.IDs {
		if !complete {
			return true
		}
	}
	return false
}
935425
func (nd *Node) IsActive() bool {
	return nd != nil && nd.active.Get() && nd.partitionGeneration.Get() >= -1
}
9348
func (c *UIConfig) Enabled() bool {
	c.l.RLock()
	defer c.l.RUnlock()
	return c.enabled
}
217606
func CheckNodeAffinity(pv *v1.PersistentVolume, nodeLabels map[string]string) error {
	return checkVolumeNodeAffinity(pv, nodeLabels)
}
401362
func (s *ResultStatus) TxIndexEnabled() bool {
	if s == nil {
		return false
	}
	return s.NodeInfo.Other.TxIndex == "on"
}
823082
func (remote *RemoteDebugger) ResolveNode(nodeID int) (map[string]interface{}, error) {
	return remote.SendRequest("DOM.resolveNode", Params{
		"nodeId": nodeID,
	})
}
909432
func isNode(node interface{}) bool {
	if node == nil {
		return false
	}
	val := reflect.ValueOf(node)
	if !val.IsValid() {
		return false
	}
	switch val.Kind() {
	case reflect.Map:
		return true
	case reflect.Ptr:
		val = val.Elem()
	}
	_, ok := node.(ast.Node)
	return ok
}
659158
func InvalidNode(n *api.Node) bool {
	return n == nil ||
		n.Status.State == api.NodeStatus_DOWN ||
		n.Spec.Availability == api.NodeAvailabilityDrain
}
96802
func (bi *blockIndex) NodeStatus(node *blockNode) blockStatus {
	bi.RLock()
	status := node.status
	bi.RUnlock()
	return status
}
470305
func (p *Plugin) IsEnabled() bool {
	p.mu.RLock()
	defer p.mu.RUnlock()

	return p.PluginObj.Enabled
}
923012
func (sm StatusDetail) Element() *etree.Element {
	el := etree.NewElement("samlp:StatusDetail")
	for _, child := range sm.Children {
		el.AddChild(child)
	}
	return el
}
1183408
func (l *ModuleLevels) IsEnabledFor(module string, level api.Level) bool {
	return level <= l.GetLevel(module)
}
796050
func (e *Element) IsDocument() (bool, error) {
	e.lock.RLock()
	defer e.lock.RUnlock()

	if !e.ready {
		return false, &ElementNotReadyErr{}
	}
	return (e.nodeType == int(DOCUMENT_NODE)), nil
}
428775
func inputSelector(n *html.Node) bool {
	return n.Type == html.ElementNode && (n.Data == "input" || n.Data == "select" || n.Data == "textarea" || n.Data == "button")
}