Import Splunk Add-On for Unix and Linux version 9.2.0
This commit is contained in:
commit
92ac2630a1
77 changed files with 11487 additions and 0 deletions
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2021 Splunk, Inc. <sales@splunk.com>
|
||||
* SPDX-License-Identifier: LicenseRef-Splunk-8-2021
|
||||
*
|
||||
*/
|
||||
|
||||
define([
|
||||
'splunkjs/ready!', // for splunkjs global
|
||||
'./common'
|
||||
], function (mvc, sdkx_common) {
|
||||
var root = {
|
||||
Entity: splunkjs.Service.Entity,
|
||||
Collection: splunkjs.Service.Collection
|
||||
}
|
||||
|
||||
var utils_namespaceFromProperties = sdkx_common.utils_namespaceFromProperties
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// JS SDK Extension: Monitor Inputs
|
||||
|
||||
var Paths = {
|
||||
monitorInputs: 'data/inputs/monitor'
|
||||
}
|
||||
|
||||
root.MonitorInput = root.Entity.extend({
|
||||
path: function () {
|
||||
return Paths.monitorInputs + '/' + encodeURIComponent(this.name)
|
||||
},
|
||||
|
||||
init: function (service, name, namespace) {
|
||||
this.name = name
|
||||
this._super(service, this.path(), namespace)
|
||||
}
|
||||
})
|
||||
|
||||
root.MonitorInputs = root.Collection.extend({
|
||||
path: function () {
|
||||
return Paths.monitorInputs
|
||||
},
|
||||
|
||||
instantiateEntity: function (props) {
|
||||
var entityNamespace = utils_namespaceFromProperties(props)
|
||||
return new root.MonitorInput(this.service, props.name, entityNamespace)
|
||||
},
|
||||
|
||||
init: function (service, namespace) {
|
||||
this._super(service, this.path(), namespace)
|
||||
}
|
||||
})
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
return root
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue