namirasoft-infra 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/NamirasoftInfraServer.d.ts +16 -0
- package/dist/NamirasoftInfraServer.js +17 -1
- package/dist/NamirasoftInfraServer.js.map +1 -1
- package/dist/NamirasoftInfraServerMetric.d.ts +19 -0
- package/dist/NamirasoftInfraServerMetric.js +72 -0
- package/dist/NamirasoftInfraServerMetric.js.map +1 -0
- package/dist/NamirasoftInfraServerMetricCategory.d.ts +17 -0
- package/dist/NamirasoftInfraServerMetricCategory.js +56 -0
- package/dist/NamirasoftInfraServerMetricCategory.js.map +1 -0
- package/dist/NamirasoftInfraServerMetricField.d.ts +18 -0
- package/dist/NamirasoftInfraServerMetricField.js +64 -0
- package/dist/NamirasoftInfraServerMetricField.js.map +1 -0
- package/dist/NamirasoftInfraServerMetricTag.d.ts +18 -0
- package/dist/NamirasoftInfraServerMetricTag.js +64 -0
- package/dist/NamirasoftInfraServerMetricTag.js.map +1 -0
- package/dist/NamirasoftInfraServerMonitor.d.ts +20 -0
- package/dist/NamirasoftInfraServerMonitor.js +72 -0
- package/dist/NamirasoftInfraServerMonitor.js.map +1 -0
- package/dist/NamirasoftInfraServerMonitorCategory.d.ts +17 -0
- package/dist/NamirasoftInfraServerMonitorCategory.js +56 -0
- package/dist/NamirasoftInfraServerMonitorCategory.js.map +1 -0
- package/dist/NamirasoftInfraServerMonitorField.d.ts +18 -0
- package/dist/NamirasoftInfraServerMonitorField.js +64 -0
- package/dist/NamirasoftInfraServerMonitorField.js.map +1 -0
- package/dist/NamirasoftInfraServerMonitorTag.d.ts +18 -0
- package/dist/NamirasoftInfraServerMonitorTag.js +64 -0
- package/dist/NamirasoftInfraServerMonitorTag.js.map +1 -0
- package/dist/command/MetricCategoryCommand.d.ts +4 -0
- package/dist/command/MetricCategoryCommand.js +21 -0
- package/dist/command/MetricCategoryCommand.js.map +1 -0
- package/dist/command/MetricCategoryCreateCommand.d.ts +5 -0
- package/dist/command/MetricCategoryCreateCommand.js +58 -0
- package/dist/command/MetricCategoryCreateCommand.js.map +1 -0
- package/dist/command/MetricCategoryDeleteCommand.d.ts +5 -0
- package/dist/command/MetricCategoryDeleteCommand.js +38 -0
- package/dist/command/MetricCategoryDeleteCommand.js.map +1 -0
- package/dist/command/MetricCategoryGetCommand.d.ts +5 -0
- package/dist/command/MetricCategoryGetCommand.js +38 -0
- package/dist/command/MetricCategoryGetCommand.js.map +1 -0
- package/dist/command/MetricCategoryListCommand.d.ts +5 -0
- package/dist/command/MetricCategoryListCommand.js +38 -0
- package/dist/command/MetricCategoryListCommand.js.map +1 -0
- package/dist/command/MetricCommand.d.ts +4 -0
- package/dist/command/MetricCommand.js +25 -0
- package/dist/command/MetricCommand.js.map +1 -0
- package/dist/command/MetricCreateCommand.d.ts +5 -0
- package/dist/command/MetricCreateCommand.js +139 -0
- package/dist/command/MetricCreateCommand.js.map +1 -0
- package/dist/command/MetricDeleteCommand.d.ts +5 -0
- package/dist/command/MetricDeleteCommand.js +38 -0
- package/dist/command/MetricDeleteCommand.js.map +1 -0
- package/dist/command/MetricFieldCommand.d.ts +4 -0
- package/dist/command/MetricFieldCommand.js +23 -0
- package/dist/command/MetricFieldCommand.js.map +1 -0
- package/dist/command/MetricFieldCreateCommand.d.ts +5 -0
- package/dist/command/MetricFieldCreateCommand.js +67 -0
- package/dist/command/MetricFieldCreateCommand.js.map +1 -0
- package/dist/command/MetricFieldDeleteCommand.d.ts +5 -0
- package/dist/command/MetricFieldDeleteCommand.js +38 -0
- package/dist/command/MetricFieldDeleteCommand.js.map +1 -0
- package/dist/command/MetricFieldGetCommand.d.ts +5 -0
- package/dist/command/MetricFieldGetCommand.js +38 -0
- package/dist/command/MetricFieldGetCommand.js.map +1 -0
- package/dist/command/MetricFieldListCommand.d.ts +5 -0
- package/dist/command/MetricFieldListCommand.js +38 -0
- package/dist/command/MetricFieldListCommand.js.map +1 -0
- package/dist/command/MetricFieldUpdateCommand.d.ts +5 -0
- package/dist/command/MetricFieldUpdateCommand.js +67 -0
- package/dist/command/MetricFieldUpdateCommand.js.map +1 -0
- package/dist/command/MetricGetCommand.d.ts +5 -0
- package/dist/command/MetricGetCommand.js +38 -0
- package/dist/command/MetricGetCommand.js.map +1 -0
- package/dist/command/MetricListCommand.d.ts +5 -0
- package/dist/command/MetricListCommand.js +38 -0
- package/dist/command/MetricListCommand.js.map +1 -0
- package/dist/command/MetricResultCommand.d.ts +5 -0
- package/dist/command/MetricResultCommand.js +38 -0
- package/dist/command/MetricResultCommand.js.map +1 -0
- package/dist/command/MetricTagCommand.d.ts +4 -0
- package/dist/command/MetricTagCommand.js +23 -0
- package/dist/command/MetricTagCommand.js.map +1 -0
- package/dist/command/MetricTagCreateCommand.d.ts +5 -0
- package/dist/command/MetricTagCreateCommand.js +67 -0
- package/dist/command/MetricTagCreateCommand.js.map +1 -0
- package/dist/command/MetricTagDeleteCommand.d.ts +5 -0
- package/dist/command/MetricTagDeleteCommand.js +38 -0
- package/dist/command/MetricTagDeleteCommand.js.map +1 -0
- package/dist/command/MetricTagGetCommand.d.ts +5 -0
- package/dist/command/MetricTagGetCommand.js +38 -0
- package/dist/command/MetricTagGetCommand.js.map +1 -0
- package/dist/command/MetricTagListCommand.d.ts +5 -0
- package/dist/command/MetricTagListCommand.js +38 -0
- package/dist/command/MetricTagListCommand.js.map +1 -0
- package/dist/command/MetricTagUpdateCommand.d.ts +5 -0
- package/dist/command/MetricTagUpdateCommand.js +67 -0
- package/dist/command/MetricTagUpdateCommand.js.map +1 -0
- package/dist/command/MetricUpdateCommand.d.ts +5 -0
- package/dist/command/MetricUpdateCommand.js +139 -0
- package/dist/command/MetricUpdateCommand.js.map +1 -0
- package/dist/command/MonitorCategoryCommand.d.ts +4 -0
- package/dist/command/MonitorCategoryCommand.js +21 -0
- package/dist/command/MonitorCategoryCommand.js.map +1 -0
- package/dist/command/MonitorCategoryCreateCommand.d.ts +5 -0
- package/dist/command/MonitorCategoryCreateCommand.js +58 -0
- package/dist/command/MonitorCategoryCreateCommand.js.map +1 -0
- package/dist/command/MonitorCategoryDeleteCommand.d.ts +5 -0
- package/dist/command/MonitorCategoryDeleteCommand.js +38 -0
- package/dist/command/MonitorCategoryDeleteCommand.js.map +1 -0
- package/dist/command/MonitorCategoryGetCommand.d.ts +5 -0
- package/dist/command/MonitorCategoryGetCommand.js +38 -0
- package/dist/command/MonitorCategoryGetCommand.js.map +1 -0
- package/dist/command/MonitorCategoryListCommand.d.ts +5 -0
- package/dist/command/MonitorCategoryListCommand.js +38 -0
- package/dist/command/MonitorCategoryListCommand.js.map +1 -0
- package/dist/command/MonitorCommand.d.ts +4 -0
- package/dist/command/MonitorCommand.js +25 -0
- package/dist/command/MonitorCommand.js.map +1 -0
- package/dist/command/MonitorCreateCommand.d.ts +5 -0
- package/dist/command/MonitorCreateCommand.js +382 -0
- package/dist/command/MonitorCreateCommand.js.map +1 -0
- package/dist/command/MonitorDeleteCommand.d.ts +5 -0
- package/dist/command/MonitorDeleteCommand.js +38 -0
- package/dist/command/MonitorDeleteCommand.js.map +1 -0
- package/dist/command/MonitorFieldCommand.d.ts +4 -0
- package/dist/command/MonitorFieldCommand.js +23 -0
- package/dist/command/MonitorFieldCommand.js.map +1 -0
- package/dist/command/MonitorFieldCreateCommand.d.ts +5 -0
- package/dist/command/MonitorFieldCreateCommand.js +67 -0
- package/dist/command/MonitorFieldCreateCommand.js.map +1 -0
- package/dist/command/MonitorFieldDeleteCommand.d.ts +5 -0
- package/dist/command/MonitorFieldDeleteCommand.js +38 -0
- package/dist/command/MonitorFieldDeleteCommand.js.map +1 -0
- package/dist/command/MonitorFieldGetCommand.d.ts +5 -0
- package/dist/command/MonitorFieldGetCommand.js +38 -0
- package/dist/command/MonitorFieldGetCommand.js.map +1 -0
- package/dist/command/MonitorFieldListCommand.d.ts +5 -0
- package/dist/command/MonitorFieldListCommand.js +38 -0
- package/dist/command/MonitorFieldListCommand.js.map +1 -0
- package/dist/command/MonitorFieldUpdateCommand.d.ts +5 -0
- package/dist/command/MonitorFieldUpdateCommand.js +67 -0
- package/dist/command/MonitorFieldUpdateCommand.js.map +1 -0
- package/dist/command/MonitorGetCommand.d.ts +5 -0
- package/dist/command/MonitorGetCommand.js +38 -0
- package/dist/command/MonitorGetCommand.js.map +1 -0
- package/dist/command/MonitorListCommand.d.ts +5 -0
- package/dist/command/MonitorListCommand.js +38 -0
- package/dist/command/MonitorListCommand.js.map +1 -0
- package/dist/command/MonitorResultCommand.d.ts +5 -0
- package/dist/command/MonitorResultCommand.js +38 -0
- package/dist/command/MonitorResultCommand.js.map +1 -0
- package/dist/command/MonitorTagCommand.d.ts +4 -0
- package/dist/command/MonitorTagCommand.js +23 -0
- package/dist/command/MonitorTagCommand.js.map +1 -0
- package/dist/command/MonitorTagCreateCommand.d.ts +5 -0
- package/dist/command/MonitorTagCreateCommand.js +67 -0
- package/dist/command/MonitorTagCreateCommand.js.map +1 -0
- package/dist/command/MonitorTagDeleteCommand.d.ts +5 -0
- package/dist/command/MonitorTagDeleteCommand.js +38 -0
- package/dist/command/MonitorTagDeleteCommand.js.map +1 -0
- package/dist/command/MonitorTagGetCommand.d.ts +5 -0
- package/dist/command/MonitorTagGetCommand.js +38 -0
- package/dist/command/MonitorTagGetCommand.js.map +1 -0
- package/dist/command/MonitorTagListCommand.d.ts +5 -0
- package/dist/command/MonitorTagListCommand.js +38 -0
- package/dist/command/MonitorTagListCommand.js.map +1 -0
- package/dist/command/MonitorTagUpdateCommand.d.ts +5 -0
- package/dist/command/MonitorTagUpdateCommand.js +67 -0
- package/dist/command/MonitorTagUpdateCommand.js.map +1 -0
- package/dist/command/MonitorUpdateCommand.d.ts +5 -0
- package/dist/command/MonitorUpdateCommand.js +382 -0
- package/dist/command/MonitorUpdateCommand.js.map +1 -0
- package/dist/command/cli.js +16 -0
- package/dist/command/cli.js.map +1 -1
- package/dist/enum/MetricCallerType.d.ts +5 -0
- package/dist/enum/MetricCallerType.js +10 -0
- package/dist/enum/MetricCallerType.js.map +1 -0
- package/dist/enum/MetricIntervalUnit.d.ts +5 -0
- package/dist/enum/MetricIntervalUnit.js +10 -0
- package/dist/enum/MetricIntervalUnit.js.map +1 -0
- package/dist/enum/MonitorCallerType.d.ts +5 -0
- package/dist/enum/MonitorCallerType.js +10 -0
- package/dist/enum/MonitorCallerType.js.map +1 -0
- package/dist/enum/MonitorDockerContainerConnectionType.d.ts +4 -0
- package/dist/enum/MonitorDockerContainerConnectionType.js +9 -0
- package/dist/enum/MonitorDockerContainerConnectionType.js.map +1 -0
- package/dist/enum/MonitorHTTPBodyEncoding.d.ts +5 -0
- package/dist/enum/MonitorHTTPBodyEncoding.js +10 -0
- package/dist/enum/MonitorHTTPBodyEncoding.js.map +1 -0
- package/dist/enum/MonitorHeartbeatIntervalUnit.d.ts +5 -0
- package/dist/enum/MonitorHeartbeatIntervalUnit.js +10 -0
- package/dist/enum/MonitorHeartbeatIntervalUnit.js.map +1 -0
- package/dist/enum/MonitorHeartbeatRetryIntervalUnit.d.ts +5 -0
- package/dist/enum/MonitorHeartbeatRetryIntervalUnit.js +10 -0
- package/dist/enum/MonitorHeartbeatRetryIntervalUnit.js.map +1 -0
- package/dist/enum/MonitorKubernetesPodControllerType.d.ts +5 -0
- package/dist/enum/MonitorKubernetesPodControllerType.js +10 -0
- package/dist/enum/MonitorKubernetesPodControllerType.js.map +1 -0
- package/dist/enum/MonitorRequestTimeoutUnit.d.ts +4 -0
- package/dist/enum/MonitorRequestTimeoutUnit.js +9 -0
- package/dist/enum/MonitorRequestTimeoutUnit.js.map +1 -0
- package/dist/enum/MonitorType.d.ts +10 -0
- package/dist/enum/MonitorType.js +15 -0
- package/dist/enum/MonitorType.js.map +1 -0
- package/dist/index.d.ts +84 -0
- package/dist/index.js +84 -0
- package/dist/index.js.map +1 -1
- package/dist/meta/MetricCategoryMetaTable.d.ts +15 -0
- package/dist/meta/MetricCategoryMetaTable.js +39 -0
- package/dist/meta/MetricCategoryMetaTable.js.map +1 -0
- package/dist/meta/MetricFieldMetaTable.d.ts +16 -0
- package/dist/meta/MetricFieldMetaTable.js +39 -0
- package/dist/meta/MetricFieldMetaTable.js.map +1 -0
- package/dist/meta/MetricMetaTable.d.ts +24 -0
- package/dist/meta/MetricMetaTable.js +47 -0
- package/dist/meta/MetricMetaTable.js.map +1 -0
- package/dist/meta/MetricTagMetaTable.d.ts +16 -0
- package/dist/meta/MetricTagMetaTable.js +39 -0
- package/dist/meta/MetricTagMetaTable.js.map +1 -0
- package/dist/meta/MonitorCategoryMetaTable.d.ts +15 -0
- package/dist/meta/MonitorCategoryMetaTable.js +39 -0
- package/dist/meta/MonitorCategoryMetaTable.js.map +1 -0
- package/dist/meta/MonitorFieldMetaTable.d.ts +16 -0
- package/dist/meta/MonitorFieldMetaTable.js +39 -0
- package/dist/meta/MonitorFieldMetaTable.js.map +1 -0
- package/dist/meta/MonitorMetaTable.d.ts +51 -0
- package/dist/meta/MonitorMetaTable.js +74 -0
- package/dist/meta/MonitorMetaTable.js.map +1 -0
- package/dist/meta/MonitorTagMetaTable.d.ts +16 -0
- package/dist/meta/MonitorTagMetaTable.js +39 -0
- package/dist/meta/MonitorTagMetaTable.js.map +1 -0
- package/dist/meta/NamirasoftInfraMetaDatabase.d.ts +16 -0
- package/dist/meta/NamirasoftInfraMetaDatabase.js +16 -0
- package/dist/meta/NamirasoftInfraMetaDatabase.js.map +1 -1
- package/dist/row/MetricCategoryRow.d.ts +8 -0
- package/dist/row/MetricCategoryRow.js +3 -0
- package/dist/row/MetricCategoryRow.js.map +1 -0
- package/dist/row/MetricFieldRow.d.ts +9 -0
- package/dist/row/MetricFieldRow.js +3 -0
- package/dist/row/MetricFieldRow.js.map +1 -0
- package/dist/row/MetricInputRow.d.ts +15 -0
- package/dist/row/MetricInputRow.js +3 -0
- package/dist/row/MetricInputRow.js.map +1 -0
- package/dist/row/MetricRow.d.ts +19 -0
- package/dist/row/MetricRow.js +3 -0
- package/dist/row/MetricRow.js.map +1 -0
- package/dist/row/MetricTagRow.d.ts +9 -0
- package/dist/row/MetricTagRow.js +3 -0
- package/dist/row/MetricTagRow.js.map +1 -0
- package/dist/row/MonitorCategoryRow.d.ts +8 -0
- package/dist/row/MonitorCategoryRow.js +3 -0
- package/dist/row/MonitorCategoryRow.js.map +1 -0
- package/dist/row/MonitorFieldRow.d.ts +9 -0
- package/dist/row/MonitorFieldRow.js +3 -0
- package/dist/row/MonitorFieldRow.js.map +1 -0
- package/dist/row/MonitorInputRow.d.ts +48 -0
- package/dist/row/MonitorInputRow.js +3 -0
- package/dist/row/MonitorInputRow.js.map +1 -0
- package/dist/row/MonitorRow.d.ts +52 -0
- package/dist/row/MonitorRow.js +3 -0
- package/dist/row/MonitorRow.js.map +1 -0
- package/dist/row/MonitorTagRow.d.ts +9 -0
- package/dist/row/MonitorTagRow.js +3 -0
- package/dist/row/MonitorTagRow.js.map +1 -0
- package/package.json +1 -1
- package/src/NamirasoftInfraServer.ts +25 -1
- package/src/NamirasoftInfraServerMetric.ts +78 -0
- package/src/NamirasoftInfraServerMetricCategory.ts +64 -0
- package/src/NamirasoftInfraServerMetricField.ts +71 -0
- package/src/NamirasoftInfraServerMetricTag.ts +71 -0
- package/src/NamirasoftInfraServerMonitor.ts +79 -0
- package/src/NamirasoftInfraServerMonitorCategory.ts +64 -0
- package/src/NamirasoftInfraServerMonitorField.ts +71 -0
- package/src/NamirasoftInfraServerMonitorTag.ts +71 -0
- package/src/command/MetricCategoryCommand.ts +38 -0
- package/src/command/MetricCategoryCreateCommand.ts +65 -0
- package/src/command/MetricCategoryDeleteCommand.ts +45 -0
- package/src/command/MetricCategoryGetCommand.ts +45 -0
- package/src/command/MetricCategoryListCommand.ts +45 -0
- package/src/command/MetricCommand.ts +42 -0
- package/src/command/MetricCreateCommand.ts +146 -0
- package/src/command/MetricDeleteCommand.ts +45 -0
- package/src/command/MetricFieldCommand.ts +40 -0
- package/src/command/MetricFieldCreateCommand.ts +74 -0
- package/src/command/MetricFieldDeleteCommand.ts +45 -0
- package/src/command/MetricFieldGetCommand.ts +45 -0
- package/src/command/MetricFieldListCommand.ts +45 -0
- package/src/command/MetricFieldUpdateCommand.ts +74 -0
- package/src/command/MetricGetCommand.ts +45 -0
- package/src/command/MetricListCommand.ts +45 -0
- package/src/command/MetricResultCommand.ts +45 -0
- package/src/command/MetricTagCommand.ts +40 -0
- package/src/command/MetricTagCreateCommand.ts +74 -0
- package/src/command/MetricTagDeleteCommand.ts +45 -0
- package/src/command/MetricTagGetCommand.ts +45 -0
- package/src/command/MetricTagListCommand.ts +45 -0
- package/src/command/MetricTagUpdateCommand.ts +74 -0
- package/src/command/MetricUpdateCommand.ts +146 -0
- package/src/command/MonitorCategoryCommand.ts +38 -0
- package/src/command/MonitorCategoryCreateCommand.ts +65 -0
- package/src/command/MonitorCategoryDeleteCommand.ts +45 -0
- package/src/command/MonitorCategoryGetCommand.ts +45 -0
- package/src/command/MonitorCategoryListCommand.ts +45 -0
- package/src/command/MonitorCommand.ts +42 -0
- package/src/command/MonitorCreateCommand.ts +389 -0
- package/src/command/MonitorDeleteCommand.ts +45 -0
- package/src/command/MonitorFieldCommand.ts +40 -0
- package/src/command/MonitorFieldCreateCommand.ts +74 -0
- package/src/command/MonitorFieldDeleteCommand.ts +45 -0
- package/src/command/MonitorFieldGetCommand.ts +45 -0
- package/src/command/MonitorFieldListCommand.ts +45 -0
- package/src/command/MonitorFieldUpdateCommand.ts +74 -0
- package/src/command/MonitorGetCommand.ts +45 -0
- package/src/command/MonitorListCommand.ts +45 -0
- package/src/command/MonitorResultCommand.ts +45 -0
- package/src/command/MonitorTagCommand.ts +40 -0
- package/src/command/MonitorTagCreateCommand.ts +74 -0
- package/src/command/MonitorTagDeleteCommand.ts +45 -0
- package/src/command/MonitorTagGetCommand.ts +45 -0
- package/src/command/MonitorTagListCommand.ts +45 -0
- package/src/command/MonitorTagUpdateCommand.ts +74 -0
- package/src/command/MonitorUpdateCommand.ts +389 -0
- package/src/command/cli.ts +16 -0
- package/src/enum/MetricCallerType.ts +26 -0
- package/src/enum/MetricIntervalUnit.ts +26 -0
- package/src/enum/MonitorCallerType.ts +26 -0
- package/src/enum/MonitorDockerContainerConnectionType.ts +25 -0
- package/src/enum/MonitorHTTPBodyEncoding.ts +26 -0
- package/src/enum/MonitorHeartbeatIntervalUnit.ts +26 -0
- package/src/enum/MonitorHeartbeatRetryIntervalUnit.ts +26 -0
- package/src/enum/MonitorKubernetesPodControllerType.ts +26 -0
- package/src/enum/MonitorRequestTimeoutUnit.ts +25 -0
- package/src/enum/MonitorType.ts +31 -0
- package/src/index.ts +84 -0
- package/src/meta/MetricCategoryMetaTable.ts +60 -0
- package/src/meta/MetricFieldMetaTable.ts +61 -0
- package/src/meta/MetricMetaTable.ts +77 -0
- package/src/meta/MetricTagMetaTable.ts +61 -0
- package/src/meta/MonitorCategoryMetaTable.ts +60 -0
- package/src/meta/MonitorFieldMetaTable.ts +61 -0
- package/src/meta/MonitorMetaTable.ts +131 -0
- package/src/meta/MonitorTagMetaTable.ts +61 -0
- package/src/meta/NamirasoftInfraMetaDatabase.ts +24 -0
- package/src/row/MetricCategoryRow.ts +29 -0
- package/src/row/MetricFieldRow.ts +30 -0
- package/src/row/MetricInputRow.ts +37 -0
- package/src/row/MetricRow.ts +41 -0
- package/src/row/MetricTagRow.ts +30 -0
- package/src/row/MonitorCategoryRow.ts +29 -0
- package/src/row/MonitorFieldRow.ts +30 -0
- package/src/row/MonitorInputRow.ts +70 -0
- package/src/row/MonitorRow.ts +74 -0
- package/src/row/MonitorTagRow.ts +30 -0
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseFinalCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { IStorageMemoryDedicated } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftInfraServer } from "../NamirasoftInfraServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class MonitorCreateCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, [], [
|
|
31
|
+
{
|
|
32
|
+
name: "workspace_id",
|
|
33
|
+
short: "",
|
|
34
|
+
description: "Provides the value of 'workspace_id' in body",
|
|
35
|
+
optional: false,
|
|
36
|
+
args: ["workspace_id"],
|
|
37
|
+
defaults: [""]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "project_id",
|
|
41
|
+
short: "",
|
|
42
|
+
description: "Provides the value of 'project_id' in body",
|
|
43
|
+
optional: false,
|
|
44
|
+
args: ["project_id"],
|
|
45
|
+
defaults: [""]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "environment_id",
|
|
49
|
+
short: "",
|
|
50
|
+
description: "Provides the value of 'environment_id' in body",
|
|
51
|
+
optional: false,
|
|
52
|
+
args: ["environment_id"],
|
|
53
|
+
defaults: [""]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: "topic_id",
|
|
57
|
+
short: "",
|
|
58
|
+
description: "Provides the value of 'topic_id' in body",
|
|
59
|
+
optional: false,
|
|
60
|
+
args: ["topic_id"],
|
|
61
|
+
defaults: [""]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: "name",
|
|
65
|
+
short: "",
|
|
66
|
+
description: "Provides the value of 'name' in body",
|
|
67
|
+
optional: false,
|
|
68
|
+
args: ["name"],
|
|
69
|
+
defaults: [""]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "caller_type",
|
|
73
|
+
short: "",
|
|
74
|
+
description: "Provides the value of 'caller_type' in body",
|
|
75
|
+
optional: false,
|
|
76
|
+
args: ["caller_type"],
|
|
77
|
+
defaults: [""]
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: "caller_server_id",
|
|
81
|
+
short: "",
|
|
82
|
+
description: "Provides the value of 'caller_server_id' in body",
|
|
83
|
+
optional: true,
|
|
84
|
+
args: ["caller_server_id"],
|
|
85
|
+
defaults: [""]
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: "caller_kubernetes_id",
|
|
89
|
+
short: "",
|
|
90
|
+
description: "Provides the value of 'caller_kubernetes_id' in body",
|
|
91
|
+
optional: true,
|
|
92
|
+
args: ["caller_kubernetes_id"],
|
|
93
|
+
defaults: [""]
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: "up_side_down",
|
|
97
|
+
short: "",
|
|
98
|
+
description: "Provides the value of 'up_side_down' in body",
|
|
99
|
+
optional: false,
|
|
100
|
+
args: ["up_side_down"],
|
|
101
|
+
defaults: [""]
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: "heartbeat_interval_value",
|
|
105
|
+
short: "",
|
|
106
|
+
description: "Provides the value of 'heartbeat_interval_value' in body",
|
|
107
|
+
optional: false,
|
|
108
|
+
args: ["heartbeat_interval_value"],
|
|
109
|
+
defaults: [""]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: "heartbeat_interval_unit",
|
|
113
|
+
short: "",
|
|
114
|
+
description: "Provides the value of 'heartbeat_interval_unit' in body",
|
|
115
|
+
optional: false,
|
|
116
|
+
args: ["heartbeat_interval_unit"],
|
|
117
|
+
defaults: [""]
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: "retries",
|
|
121
|
+
short: "",
|
|
122
|
+
description: "Provides the value of 'retries' in body",
|
|
123
|
+
optional: false,
|
|
124
|
+
args: ["retries"],
|
|
125
|
+
defaults: [""]
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
name: "heartbeat_retry_interval_value",
|
|
129
|
+
short: "",
|
|
130
|
+
description: "Provides the value of 'heartbeat_retry_interval_value' in body",
|
|
131
|
+
optional: false,
|
|
132
|
+
args: ["heartbeat_retry_interval_value"],
|
|
133
|
+
defaults: [""]
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: "heartbeat_retry_interval_unit",
|
|
137
|
+
short: "",
|
|
138
|
+
description: "Provides the value of 'heartbeat_retry_interval_unit' in body",
|
|
139
|
+
optional: false,
|
|
140
|
+
args: ["heartbeat_retry_interval_unit"],
|
|
141
|
+
defaults: [""]
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
name: "request_timeout_value",
|
|
145
|
+
short: "",
|
|
146
|
+
description: "Provides the value of 'request_timeout_value' in body",
|
|
147
|
+
optional: false,
|
|
148
|
+
args: ["request_timeout_value"],
|
|
149
|
+
defaults: [""]
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: "request_timeout_unit",
|
|
153
|
+
short: "",
|
|
154
|
+
description: "Provides the value of 'request_timeout_unit' in body",
|
|
155
|
+
optional: false,
|
|
156
|
+
args: ["request_timeout_unit"],
|
|
157
|
+
defaults: [""]
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
name: "type",
|
|
161
|
+
short: "",
|
|
162
|
+
description: "Provides the value of 'type' in body",
|
|
163
|
+
optional: false,
|
|
164
|
+
args: ["type"],
|
|
165
|
+
defaults: [""]
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
name: "http_url",
|
|
169
|
+
short: "",
|
|
170
|
+
description: "Provides the value of 'http_url' in body",
|
|
171
|
+
optional: true,
|
|
172
|
+
args: ["http_url"],
|
|
173
|
+
defaults: [""]
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
name: "http_method",
|
|
177
|
+
short: "",
|
|
178
|
+
description: "Provides the value of 'http_method' in body",
|
|
179
|
+
optional: true,
|
|
180
|
+
args: ["http_method"],
|
|
181
|
+
defaults: [""]
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
name: "http_header",
|
|
185
|
+
short: "",
|
|
186
|
+
description: "Provides the value of 'http_header' in body",
|
|
187
|
+
optional: true,
|
|
188
|
+
args: ["http_header"],
|
|
189
|
+
defaults: [""]
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
name: "http_body_encoding",
|
|
193
|
+
short: "",
|
|
194
|
+
description: "Provides the value of 'http_body_encoding' in body",
|
|
195
|
+
optional: true,
|
|
196
|
+
args: ["http_body_encoding"],
|
|
197
|
+
defaults: [""]
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
name: "http_body",
|
|
201
|
+
short: "",
|
|
202
|
+
description: "Provides the value of 'http_body' in body",
|
|
203
|
+
optional: true,
|
|
204
|
+
args: ["http_body"],
|
|
205
|
+
defaults: [""]
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
name: "http_ignore_ssl_tls",
|
|
209
|
+
short: "",
|
|
210
|
+
description: "Provides the value of 'http_ignore_ssl_tls' in body",
|
|
211
|
+
optional: true,
|
|
212
|
+
args: ["http_ignore_ssl_tls"],
|
|
213
|
+
defaults: [""]
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
name: "ping_host",
|
|
217
|
+
short: "",
|
|
218
|
+
description: "Provides the value of 'ping_host' in body",
|
|
219
|
+
optional: true,
|
|
220
|
+
args: ["ping_host"],
|
|
221
|
+
defaults: [""]
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
name: "ping_max_packets",
|
|
225
|
+
short: "",
|
|
226
|
+
description: "Provides the value of 'ping_max_packets' in body",
|
|
227
|
+
optional: true,
|
|
228
|
+
args: ["ping_max_packets"],
|
|
229
|
+
defaults: [""]
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
name: "ping_packdet_size",
|
|
233
|
+
short: "",
|
|
234
|
+
description: "Provides the value of 'ping_packdet_size' in body",
|
|
235
|
+
optional: true,
|
|
236
|
+
args: ["ping_packdet_size"],
|
|
237
|
+
defaults: [""]
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
name: "port_host",
|
|
241
|
+
short: "",
|
|
242
|
+
description: "Provides the value of 'port_host' in body",
|
|
243
|
+
optional: true,
|
|
244
|
+
args: ["port_host"],
|
|
245
|
+
defaults: [""]
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
name: "port_port",
|
|
249
|
+
short: "",
|
|
250
|
+
description: "Provides the value of 'port_port' in body",
|
|
251
|
+
optional: true,
|
|
252
|
+
args: ["port_port"],
|
|
253
|
+
defaults: [""]
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
name: "database_credentail_id",
|
|
257
|
+
short: "",
|
|
258
|
+
description: "Provides the value of 'database_credentail_id' in body",
|
|
259
|
+
optional: true,
|
|
260
|
+
args: ["database_credentail_id"],
|
|
261
|
+
defaults: [""]
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
name: "database_query",
|
|
265
|
+
short: "",
|
|
266
|
+
description: "Provides the value of 'database_query' in body",
|
|
267
|
+
optional: true,
|
|
268
|
+
args: ["database_query"],
|
|
269
|
+
defaults: [""]
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
name: "in_memory_store_credentail_id",
|
|
273
|
+
short: "",
|
|
274
|
+
description: "Provides the value of 'in_memory_store_credentail_id' in body",
|
|
275
|
+
optional: true,
|
|
276
|
+
args: ["in_memory_store_credentail_id"],
|
|
277
|
+
defaults: [""]
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
name: "message_broker_credentail_id",
|
|
281
|
+
short: "",
|
|
282
|
+
description: "Provides the value of 'message_broker_credentail_id' in body",
|
|
283
|
+
optional: true,
|
|
284
|
+
args: ["message_broker_credentail_id"],
|
|
285
|
+
defaults: [""]
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
name: "docker_container_connection_type",
|
|
289
|
+
short: "",
|
|
290
|
+
description: "Provides the value of 'docker_container_connection_type' in body",
|
|
291
|
+
optional: true,
|
|
292
|
+
args: ["docker_container_connection_type"],
|
|
293
|
+
defaults: [""]
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
name: "docker_container_deamon",
|
|
297
|
+
short: "",
|
|
298
|
+
description: "Provides the value of 'docker_container_deamon' in body",
|
|
299
|
+
optional: true,
|
|
300
|
+
args: ["docker_container_deamon"],
|
|
301
|
+
defaults: [""]
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
name: "docker_container_id_or_name",
|
|
305
|
+
short: "",
|
|
306
|
+
description: "Provides the value of 'docker_container_id_or_name' in body",
|
|
307
|
+
optional: true,
|
|
308
|
+
args: ["docker_container_id_or_name"],
|
|
309
|
+
defaults: [""]
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
name: "kubernetes_pod_controller_type",
|
|
313
|
+
short: "",
|
|
314
|
+
description: "Provides the value of 'kubernetes_pod_controller_type' in body",
|
|
315
|
+
optional: true,
|
|
316
|
+
args: ["kubernetes_pod_controller_type"],
|
|
317
|
+
defaults: [""]
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
name: "kubernetes_pod_controller_name",
|
|
321
|
+
short: "",
|
|
322
|
+
description: "Provides the value of 'kubernetes_pod_controller_name' in body",
|
|
323
|
+
optional: true,
|
|
324
|
+
args: ["kubernetes_pod_controller_name"],
|
|
325
|
+
defaults: [""]
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
name: "description",
|
|
329
|
+
short: "",
|
|
330
|
+
description: "Provides the value of 'description' in body",
|
|
331
|
+
optional: false,
|
|
332
|
+
args: ["description"],
|
|
333
|
+
defaults: [""]
|
|
334
|
+
}
|
|
335
|
+
]);
|
|
336
|
+
}
|
|
337
|
+
override async exec()
|
|
338
|
+
{
|
|
339
|
+
let token = this.app.storage.getNSAToken();
|
|
340
|
+
if (token == null)
|
|
341
|
+
throw new Error("Token is not available. Please login first using:\nns-infra account config \nor \nns-infra account login.");
|
|
342
|
+
let storage = new IStorageMemoryDedicated();
|
|
343
|
+
let token_manager = new TokenManager(storage, () => { });
|
|
344
|
+
token_manager.setValue(token, false);
|
|
345
|
+
let url = this.app.storage.getItem("ns-infra-server-url");
|
|
346
|
+
let server = new NamirasoftInfraServer(url, token_manager, e => this.app.logger.error(e.message));
|
|
347
|
+
let ans = await server.monitor.Create({
|
|
348
|
+
workspace_id: this.option_values.workspace_id,
|
|
349
|
+
project_id: this.option_values.project_id,
|
|
350
|
+
environment_id: this.option_values.environment_id,
|
|
351
|
+
topic_id: this.option_values.topic_id,
|
|
352
|
+
name: this.option_values.name,
|
|
353
|
+
caller_type: this.option_values.caller_type,
|
|
354
|
+
caller_server_id: this.option_values.caller_server_id,
|
|
355
|
+
caller_kubernetes_id: this.option_values.caller_kubernetes_id,
|
|
356
|
+
up_side_down: this.option_values.up_side_down,
|
|
357
|
+
heartbeat_interval_value: this.option_values.heartbeat_interval_value,
|
|
358
|
+
heartbeat_interval_unit: this.option_values.heartbeat_interval_unit,
|
|
359
|
+
retries: this.option_values.retries,
|
|
360
|
+
heartbeat_retry_interval_value: this.option_values.heartbeat_retry_interval_value,
|
|
361
|
+
heartbeat_retry_interval_unit: this.option_values.heartbeat_retry_interval_unit,
|
|
362
|
+
request_timeout_value: this.option_values.request_timeout_value,
|
|
363
|
+
request_timeout_unit: this.option_values.request_timeout_unit,
|
|
364
|
+
type: this.option_values.type,
|
|
365
|
+
http_url: this.option_values.http_url,
|
|
366
|
+
http_method: this.option_values.http_method,
|
|
367
|
+
http_header: this.option_values.http_header,
|
|
368
|
+
http_body_encoding: this.option_values.http_body_encoding,
|
|
369
|
+
http_body: this.option_values.http_body,
|
|
370
|
+
http_ignore_ssl_tls: this.option_values.http_ignore_ssl_tls,
|
|
371
|
+
ping_host: this.option_values.ping_host,
|
|
372
|
+
ping_max_packets: this.option_values.ping_max_packets,
|
|
373
|
+
ping_packdet_size: this.option_values.ping_packdet_size,
|
|
374
|
+
port_host: this.option_values.port_host,
|
|
375
|
+
port_port: this.option_values.port_port,
|
|
376
|
+
database_credentail_id: this.option_values.database_credentail_id,
|
|
377
|
+
database_query: this.option_values.database_query,
|
|
378
|
+
in_memory_store_credentail_id: this.option_values.in_memory_store_credentail_id,
|
|
379
|
+
message_broker_credentail_id: this.option_values.message_broker_credentail_id,
|
|
380
|
+
docker_container_connection_type: this.option_values.docker_container_connection_type,
|
|
381
|
+
docker_container_deamon: this.option_values.docker_container_deamon,
|
|
382
|
+
docker_container_id_or_name: this.option_values.docker_container_id_or_name,
|
|
383
|
+
kubernetes_pod_controller_type: this.option_values.kubernetes_pod_controller_type,
|
|
384
|
+
kubernetes_pod_controller_name: this.option_values.kubernetes_pod_controller_name,
|
|
385
|
+
description: this.option_values.description
|
|
386
|
+
});
|
|
387
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
388
|
+
}
|
|
389
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseFinalCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { IStorageMemoryDedicated } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftInfraServer } from "../NamirasoftInfraServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class MonitorDeleteCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["id"], []);
|
|
31
|
+
}
|
|
32
|
+
override async exec()
|
|
33
|
+
{
|
|
34
|
+
let token = this.app.storage.getNSAToken();
|
|
35
|
+
if (token == null)
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-infra account config \nor \nns-infra account login.");
|
|
37
|
+
let storage = new IStorageMemoryDedicated();
|
|
38
|
+
let token_manager = new TokenManager(storage, () => { });
|
|
39
|
+
token_manager.setValue(token, false);
|
|
40
|
+
let url = this.app.storage.getItem("ns-infra-server-url");
|
|
41
|
+
let server = new NamirasoftInfraServer(url, token_manager, e => this.app.logger.error(e.message));
|
|
42
|
+
let ans = await server.monitor.Delete(this.arg_values[0]);
|
|
43
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseNavigatorCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { MonitorFieldCreateCommand } from "./MonitorFieldCreateCommand";
|
|
23
|
+
import { MonitorFieldDeleteCommand } from "./MonitorFieldDeleteCommand";
|
|
24
|
+
import { MonitorFieldGetCommand } from "./MonitorFieldGetCommand";
|
|
25
|
+
import { MonitorFieldListCommand } from "./MonitorFieldListCommand";
|
|
26
|
+
import { MonitorFieldUpdateCommand } from "./MonitorFieldUpdateCommand";
|
|
27
|
+
|
|
28
|
+
export class MonitorFieldCommand extends BaseNavigatorCommand
|
|
29
|
+
{
|
|
30
|
+
constructor(argv: string[])
|
|
31
|
+
{
|
|
32
|
+
super(argv, {
|
|
33
|
+
"list": MonitorFieldListCommand,
|
|
34
|
+
"get": MonitorFieldGetCommand,
|
|
35
|
+
"create": MonitorFieldCreateCommand,
|
|
36
|
+
"update": MonitorFieldUpdateCommand,
|
|
37
|
+
"delete": MonitorFieldDeleteCommand,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseFinalCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { IStorageMemoryDedicated } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftInfraServer } from "../NamirasoftInfraServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class MonitorFieldCreateCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, [], [
|
|
31
|
+
{
|
|
32
|
+
name: "entity_id",
|
|
33
|
+
short: "",
|
|
34
|
+
description: "Provides the value of 'entity_id' in body",
|
|
35
|
+
optional: false,
|
|
36
|
+
args: ["entity_id"],
|
|
37
|
+
defaults: [""]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "field_id",
|
|
41
|
+
short: "",
|
|
42
|
+
description: "Provides the value of 'field_id' in body",
|
|
43
|
+
optional: false,
|
|
44
|
+
args: ["field_id"],
|
|
45
|
+
defaults: [""]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "value",
|
|
49
|
+
short: "",
|
|
50
|
+
description: "Provides the value of 'value' in body",
|
|
51
|
+
optional: true,
|
|
52
|
+
args: ["value"],
|
|
53
|
+
defaults: [""]
|
|
54
|
+
}
|
|
55
|
+
]);
|
|
56
|
+
}
|
|
57
|
+
override async exec()
|
|
58
|
+
{
|
|
59
|
+
let token = this.app.storage.getNSAToken();
|
|
60
|
+
if (token == null)
|
|
61
|
+
throw new Error("Token is not available. Please login first using:\nns-infra account config \nor \nns-infra account login.");
|
|
62
|
+
let storage = new IStorageMemoryDedicated();
|
|
63
|
+
let token_manager = new TokenManager(storage, () => { });
|
|
64
|
+
token_manager.setValue(token, false);
|
|
65
|
+
let url = this.app.storage.getItem("ns-infra-server-url");
|
|
66
|
+
let server = new NamirasoftInfraServer(url, token_manager, e => this.app.logger.error(e.message));
|
|
67
|
+
let ans = await server.monitor_field.Create({
|
|
68
|
+
entity_id: this.option_values.entity_id,
|
|
69
|
+
field_id: this.option_values.field_id,
|
|
70
|
+
value: this.option_values.value
|
|
71
|
+
});
|
|
72
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
73
|
+
}
|
|
74
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseFinalCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { IStorageMemoryDedicated } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftInfraServer } from "../NamirasoftInfraServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class MonitorFieldDeleteCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["id"], []);
|
|
31
|
+
}
|
|
32
|
+
override async exec()
|
|
33
|
+
{
|
|
34
|
+
let token = this.app.storage.getNSAToken();
|
|
35
|
+
if (token == null)
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-infra account config \nor \nns-infra account login.");
|
|
37
|
+
let storage = new IStorageMemoryDedicated();
|
|
38
|
+
let token_manager = new TokenManager(storage, () => { });
|
|
39
|
+
token_manager.setValue(token, false);
|
|
40
|
+
let url = this.app.storage.getItem("ns-infra-server-url");
|
|
41
|
+
let server = new NamirasoftInfraServer(url, token_manager, e => this.app.logger.error(e.message));
|
|
42
|
+
let ans = await server.monitor_field.Delete(this.arg_values[0]);
|
|
43
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseFinalCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { IStorageMemoryDedicated } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftInfraServer } from "../NamirasoftInfraServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class MonitorFieldGetCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["id"], []);
|
|
31
|
+
}
|
|
32
|
+
override async exec()
|
|
33
|
+
{
|
|
34
|
+
let token = this.app.storage.getNSAToken();
|
|
35
|
+
if (token == null)
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-infra account config \nor \nns-infra account login.");
|
|
37
|
+
let storage = new IStorageMemoryDedicated();
|
|
38
|
+
let token_manager = new TokenManager(storage, () => { });
|
|
39
|
+
token_manager.setValue(token, false);
|
|
40
|
+
let url = this.app.storage.getItem("ns-infra-server-url");
|
|
41
|
+
let server = new NamirasoftInfraServer(url, token_manager, e => this.app.logger.error(e.message));
|
|
42
|
+
let ans = await server.monitor_field.Get(this.arg_values[0]);
|
|
43
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
44
|
+
}
|
|
45
|
+
};
|