namirasoft-log 1.3.16 → 1.3.21
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/NamirasoftLogServer.js.map +1 -1
- package/dist/NamirasoftLogServerAlarm.d.ts +8 -5
- package/dist/NamirasoftLogServerAlarm.js +6 -8
- package/dist/NamirasoftLogServerAlarm.js.map +1 -1
- package/dist/NamirasoftLogServerBase.js +1 -1
- package/dist/NamirasoftLogServerBase.js.map +1 -1
- package/dist/NamirasoftLogServerHealthz.js +1 -2
- package/dist/NamirasoftLogServerHealthz.js.map +1 -1
- package/dist/NamirasoftLogServerLog.d.ts +6 -3
- package/dist/NamirasoftLogServerLog.js +4 -5
- package/dist/NamirasoftLogServerLog.js.map +1 -1
- package/dist/NamirasoftLogServerLogGroup.d.ts +7 -4
- package/dist/NamirasoftLogServerLogGroup.js +9 -11
- package/dist/NamirasoftLogServerLogGroup.js.map +1 -1
- package/dist/StreamNamirasoftLog.d.ts +3 -3
- package/dist/StreamNamirasoftLog.js +6 -7
- package/dist/StreamNamirasoftLog.js.map +1 -1
- package/dist/command/AlarmCommand.js +4 -4
- package/dist/command/AlarmCommand.js.map +1 -1
- package/dist/command/AlarmCreateCommand.js +4 -49
- package/dist/command/AlarmCreateCommand.js.map +1 -1
- package/dist/command/{AlarmGetAllCommand.d.ts → AlarmDeleteCommand.d.ts} +1 -1
- package/dist/command/{AlarmAlarmCommand.js → AlarmDeleteCommand.js} +5 -5
- package/dist/command/AlarmDeleteCommand.js.map +1 -0
- package/dist/command/AlarmGetCommand.js.map +1 -1
- package/dist/command/{LogGetAllCommand.d.ts → AlarmListCommand.d.ts} +1 -1
- package/dist/command/{LogGetAllCommand.js → AlarmListCommand.js} +5 -5
- package/dist/command/{LogGetAllCommand.js.map → AlarmListCommand.js.map} +1 -1
- package/dist/command/AlarmUpdateCommand.js +4 -49
- package/dist/command/AlarmUpdateCommand.js.map +1 -1
- package/dist/command/HealthzCommand.js.map +1 -1
- package/dist/command/HealthzGetCommand.js.map +1 -1
- package/dist/command/LogCommand.js +2 -2
- package/dist/command/LogCommand.js.map +1 -1
- package/dist/command/LogCreateCommand.js +1 -10
- package/dist/command/LogCreateCommand.js.map +1 -1
- package/dist/command/LogGetCommand.js.map +1 -1
- package/dist/command/LogGroupCommand.js +2 -2
- package/dist/command/LogGroupCommand.js.map +1 -1
- package/dist/command/LogGroupCreateCommand.js +1 -1
- package/dist/command/LogGroupCreateCommand.js.map +1 -1
- package/dist/command/LogGroupDeleteCommand.js.map +1 -1
- package/dist/command/LogGroupGetCommand.js.map +1 -1
- package/dist/command/{LogGroupGetAllCommand.d.ts → LogGroupListCommand.d.ts} +1 -1
- package/dist/command/{LogGroupGetAllCommand.js → LogGroupListCommand.js} +5 -5
- package/dist/command/LogGroupListCommand.js.map +1 -0
- package/dist/command/LogGroupUpdateCommand.js +1 -1
- package/dist/command/LogGroupUpdateCommand.js.map +1 -1
- package/dist/command/{AlarmAlarmCommand.d.ts → LogListCommand.d.ts} +1 -1
- package/dist/command/{AlarmGetAllCommand.js → LogListCommand.js} +5 -5
- package/dist/command/LogListCommand.js.map +1 -0
- package/dist/index.d.ts +7 -11
- package/dist/index.js +7 -11
- package/dist/index.js.map +1 -1
- package/dist/row/AlarmInputRow.d.ts +4 -0
- package/dist/row/{AlarmRowInput.js → AlarmInputRow.js} +1 -1
- package/dist/row/AlarmInputRow.js.map +1 -0
- package/dist/row/AlarmRow.d.ts +6 -3
- package/dist/row/{LogRowInput.d.ts → LogCreateRow.d.ts} +1 -2
- package/dist/row/{LogRowOutput.js → LogCreateRow.js} +1 -1
- package/dist/row/LogCreateRow.js.map +1 -0
- package/dist/row/LogGroupInputRow.d.ts +4 -0
- package/dist/row/{AlarmRowOutput.js → LogGroupInputRow.js} +1 -1
- package/dist/row/LogGroupInputRow.js.map +1 -0
- package/dist/row/LogGroupRow.d.ts +6 -3
- package/dist/row/LogRow.d.ts +9 -3
- package/package.json +4 -3
- package/src/LogLevel.ts +1 -1
- package/src/NamirasoftLogServer.ts +0 -1
- package/src/NamirasoftLogServerAlarm.ts +9 -13
- package/src/NamirasoftLogServerBase.ts +1 -2
- package/src/NamirasoftLogServerHealthz.ts +1 -3
- package/src/NamirasoftLogServerLog.ts +6 -9
- package/src/NamirasoftLogServerLogGroup.ts +12 -16
- package/src/StreamNamirasoftLog.ts +8 -9
- package/src/command/AlarmCommand.ts +4 -5
- package/src/command/AlarmCreateCommand.ts +4 -50
- package/src/command/{AlarmAlarmCommand.ts → AlarmDeleteCommand.ts} +2 -3
- package/src/command/AlarmGetCommand.ts +0 -1
- package/src/command/{LogGetAllCommand.ts → AlarmListCommand.ts} +2 -3
- package/src/command/AlarmUpdateCommand.ts +4 -50
- package/src/command/HealthzCommand.ts +0 -1
- package/src/command/HealthzGetCommand.ts +0 -1
- package/src/command/LogCommand.ts +2 -3
- package/src/command/LogCreateCommand.ts +1 -11
- package/src/command/LogGetCommand.ts +0 -1
- package/src/command/LogGroupCommand.ts +2 -3
- package/src/command/LogGroupCreateCommand.ts +1 -2
- package/src/command/LogGroupDeleteCommand.ts +0 -1
- package/src/command/LogGroupGetCommand.ts +0 -1
- package/src/command/{LogGroupGetAllCommand.ts → LogGroupListCommand.ts} +2 -3
- package/src/command/LogGroupUpdateCommand.ts +1 -2
- package/src/command/{AlarmGetAllCommand.ts → LogListCommand.ts} +2 -3
- package/src/command/cli.ts +1 -1
- package/src/index.ts +8 -13
- package/src/row/{LogRowOutput.ts → AlarmInputRow.ts} +4 -4
- package/src/row/AlarmRow.ts +7 -5
- package/src/row/{LogRowInput.ts → LogCreateRow.ts} +2 -4
- package/src/row/{LogGroupRowInput.ts → LogGroupInputRow.ts} +3 -4
- package/src/row/LogGroupRow.ts +7 -5
- package/src/row/LogRow.ts +10 -5
- package/dist/command/AlarmAlarmCommand.js.map +0 -1
- package/dist/command/AlarmGetAllCommand.js.map +0 -1
- package/dist/command/LogGroupGetAllCommand.js.map +0 -1
- package/dist/enum/AlarmLevel.d.ts +0 -11
- package/dist/enum/AlarmLevel.js +0 -16
- package/dist/enum/AlarmLevel.js.map +0 -1
- package/dist/row/AlarmRowInput.d.ts +0 -10
- package/dist/row/AlarmRowInput.js.map +0 -1
- package/dist/row/AlarmRowOutput.d.ts +0 -4
- package/dist/row/AlarmRowOutput.js.map +0 -1
- package/dist/row/LogGroupRowInput.d.ts +0 -4
- package/dist/row/LogGroupRowInput.js +0 -3
- package/dist/row/LogGroupRowInput.js.map +0 -1
- package/dist/row/LogGroupRowOutput.d.ts +0 -4
- package/dist/row/LogGroupRowOutput.js +0 -3
- package/dist/row/LogGroupRowOutput.js.map +0 -1
- package/dist/row/LogRowInput.js +0 -3
- package/dist/row/LogRowInput.js.map +0 -1
- package/dist/row/LogRowOutput.d.ts +0 -3
- package/dist/row/LogRowOutput.js.map +0 -1
- package/src/enum/AlarmLevel.ts +0 -33
- package/src/row/AlarmRowInput.ts +0 -33
- package/src/row/AlarmRowOutput.ts +0 -26
- package/src/row/LogGroupRowOutput.ts +0 -26
|
@@ -6,14 +6,14 @@ export class StreamNamirasoftLog implements IStream
|
|
|
6
6
|
{
|
|
7
7
|
server: NamirasoftLogServer;
|
|
8
8
|
log_group_id: string;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
constructor(server: NamirasoftLogServer, log_group_id: string,
|
|
9
|
+
getProductID: () => (string | null);
|
|
10
|
+
getProjectID: () => (string | null);
|
|
11
|
+
constructor(server: NamirasoftLogServer, log_group_id: string, getProductID: () => (string | null), getProjectID: () => (string | null))
|
|
12
12
|
{
|
|
13
13
|
this.server = server;
|
|
14
14
|
this.log_group_id = log_group_id;
|
|
15
|
-
this.
|
|
16
|
-
this.
|
|
15
|
+
this.getProductID = getProductID;
|
|
16
|
+
this.getProjectID = getProjectID;
|
|
17
17
|
}
|
|
18
18
|
write(log: Log, formated: { pre: string[], messages: string[], post: string[] }): void
|
|
19
19
|
{
|
|
@@ -21,10 +21,9 @@ export class StreamNamirasoftLog implements IStream
|
|
|
21
21
|
this.server.log.Create({
|
|
22
22
|
level: log.level.toString(),
|
|
23
23
|
log_group_id: this.log_group_id,
|
|
24
|
-
product_id: this.
|
|
25
|
-
project_id: this.
|
|
26
|
-
message
|
|
27
|
-
stack: ""
|
|
24
|
+
product_id: this.getProductID(),
|
|
25
|
+
project_id: this.getProjectID(),
|
|
26
|
+
message
|
|
28
27
|
});
|
|
29
28
|
}
|
|
30
29
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
/****************************************************************/
|
|
3
2
|
/* */
|
|
4
3
|
/* This is an Auto-Generated File */
|
|
@@ -19,10 +18,10 @@
|
|
|
19
18
|
/* */
|
|
20
19
|
/****************************************************************/
|
|
21
20
|
|
|
22
|
-
import { AlarmAlarmCommand } from "./AlarmAlarmCommand";
|
|
23
21
|
import { AlarmCreateCommand } from "./AlarmCreateCommand";
|
|
24
|
-
import {
|
|
22
|
+
import { AlarmDeleteCommand } from "./AlarmDeleteCommand";
|
|
25
23
|
import { AlarmGetCommand } from "./AlarmGetCommand";
|
|
24
|
+
import { AlarmListCommand } from "./AlarmListCommand";
|
|
26
25
|
import { AlarmUpdateCommand } from "./AlarmUpdateCommand";
|
|
27
26
|
import { BaseNavigatorCommand } from "namirasoft-node-cli";
|
|
28
27
|
|
|
@@ -31,11 +30,11 @@ export class AlarmCommand extends BaseNavigatorCommand
|
|
|
31
30
|
constructor(argv: string[])
|
|
32
31
|
{
|
|
33
32
|
super(argv, {
|
|
34
|
-
"
|
|
33
|
+
"list": AlarmListCommand,
|
|
35
34
|
"get": AlarmGetCommand,
|
|
36
35
|
"create": AlarmCreateCommand,
|
|
37
36
|
"update": AlarmUpdateCommand,
|
|
38
|
-
"
|
|
37
|
+
"delete": AlarmDeleteCommand,
|
|
39
38
|
});
|
|
40
39
|
}
|
|
41
40
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
/****************************************************************/
|
|
3
2
|
/* */
|
|
4
3
|
/* This is an Auto-Generated File */
|
|
@@ -30,51 +29,11 @@ export class AlarmCreateCommand extends BaseFinalCommand
|
|
|
30
29
|
{
|
|
31
30
|
super(argv, [], [
|
|
32
31
|
{
|
|
33
|
-
name: "
|
|
34
|
-
short: "",
|
|
35
|
-
description: "Provides the value of 'log_group_id' in body",
|
|
36
|
-
optional: true,
|
|
37
|
-
args: ["log_group_id"],
|
|
38
|
-
defaults: [""]
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
name: "product_id",
|
|
42
|
-
short: "",
|
|
43
|
-
description: "Provides the value of 'product_id' in body",
|
|
44
|
-
optional: true,
|
|
45
|
-
args: ["product_id"],
|
|
46
|
-
defaults: [""]
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
name: "project_id",
|
|
50
|
-
short: "",
|
|
51
|
-
description: "Provides the value of 'project_id' in body",
|
|
52
|
-
optional: true,
|
|
53
|
-
args: ["project_id"],
|
|
54
|
-
defaults: [""]
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
name: "level",
|
|
58
|
-
short: "",
|
|
59
|
-
description: "Provides the value of 'level' in body",
|
|
60
|
-
optional: true,
|
|
61
|
-
args: ["level"],
|
|
62
|
-
defaults: [""]
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
name: "message",
|
|
66
|
-
short: "",
|
|
67
|
-
description: "Provides the value of 'message' in body",
|
|
68
|
-
optional: true,
|
|
69
|
-
args: ["message"],
|
|
70
|
-
defaults: [""]
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
name: "stack",
|
|
32
|
+
name: "filters",
|
|
74
33
|
short: "",
|
|
75
|
-
description: "Provides the value of '
|
|
34
|
+
description: "Provides the value of 'filters' in body",
|
|
76
35
|
optional: true,
|
|
77
|
-
args: ["
|
|
36
|
+
args: ["filters"],
|
|
78
37
|
defaults: [""]
|
|
79
38
|
},
|
|
80
39
|
{
|
|
@@ -97,12 +56,7 @@ export class AlarmCreateCommand extends BaseFinalCommand
|
|
|
97
56
|
manager.setValue(token, false);
|
|
98
57
|
let server = new NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
99
58
|
let ans = await server.alarm.Create({
|
|
100
|
-
|
|
101
|
-
product_id: this.option_values.product_id,
|
|
102
|
-
project_id: this.option_values.project_id,
|
|
103
|
-
level: this.option_values.level,
|
|
104
|
-
message: this.option_values.message,
|
|
105
|
-
stack: this.option_values.stack,
|
|
59
|
+
filters: this.option_values.filters,
|
|
106
60
|
notification_sender_topic_id: this.option_values.notification_sender_topic_id
|
|
107
61
|
});
|
|
108
62
|
this.app.logger.success(JSON.stringify(ans));
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
/****************************************************************/
|
|
3
2
|
/* */
|
|
4
3
|
/* This is an Auto-Generated File */
|
|
@@ -24,7 +23,7 @@ import { IStorageMemory } from "namirasoft-core";
|
|
|
24
23
|
import { NamirasoftLogServer } from "../NamirasoftLogServer";
|
|
25
24
|
import { TokenManager } from "namirasoft-account";
|
|
26
25
|
|
|
27
|
-
export class
|
|
26
|
+
export class AlarmDeleteCommand extends BaseFinalCommand
|
|
28
27
|
{
|
|
29
28
|
constructor(argv: string[])
|
|
30
29
|
{
|
|
@@ -39,7 +38,7 @@ export class AlarmAlarmCommand extends BaseFinalCommand
|
|
|
39
38
|
let manager = new TokenManager(storage, () => { });
|
|
40
39
|
manager.setValue(token, false);
|
|
41
40
|
let server = new NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
42
|
-
let ans = await server.alarm.
|
|
41
|
+
let ans = await server.alarm.Delete(this.arg_values[0]);
|
|
43
42
|
this.app.logger.success(JSON.stringify(ans));
|
|
44
43
|
}
|
|
45
44
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
/****************************************************************/
|
|
3
2
|
/* */
|
|
4
3
|
/* This is an Auto-Generated File */
|
|
@@ -24,7 +23,7 @@ import { IStorageMemory } from "namirasoft-core";
|
|
|
24
23
|
import { NamirasoftLogServer } from "../NamirasoftLogServer";
|
|
25
24
|
import { TokenManager } from "namirasoft-account";
|
|
26
25
|
|
|
27
|
-
export class
|
|
26
|
+
export class AlarmListCommand extends BaseFinalCommand
|
|
28
27
|
{
|
|
29
28
|
constructor(argv: string[])
|
|
30
29
|
{
|
|
@@ -39,7 +38,7 @@ export class LogGetAllCommand extends BaseFinalCommand
|
|
|
39
38
|
let manager = new TokenManager(storage, () => { });
|
|
40
39
|
manager.setValue(token, false);
|
|
41
40
|
let server = new NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
42
|
-
let ans = await server.
|
|
41
|
+
let ans = await server.alarm.List(this.arg_values[0], this.arg_values[1], this.arg_values[2]);
|
|
43
42
|
this.app.logger.success(JSON.stringify(ans));
|
|
44
43
|
}
|
|
45
44
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
/****************************************************************/
|
|
3
2
|
/* */
|
|
4
3
|
/* This is an Auto-Generated File */
|
|
@@ -30,51 +29,11 @@ export class AlarmUpdateCommand extends BaseFinalCommand
|
|
|
30
29
|
{
|
|
31
30
|
super(argv, ["id"], [
|
|
32
31
|
{
|
|
33
|
-
name: "
|
|
34
|
-
short: "",
|
|
35
|
-
description: "Provides the value of 'log_group_id' in body",
|
|
36
|
-
optional: true,
|
|
37
|
-
args: ["log_group_id"],
|
|
38
|
-
defaults: [""]
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
name: "product_id",
|
|
42
|
-
short: "",
|
|
43
|
-
description: "Provides the value of 'product_id' in body",
|
|
44
|
-
optional: true,
|
|
45
|
-
args: ["product_id"],
|
|
46
|
-
defaults: [""]
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
name: "project_id",
|
|
50
|
-
short: "",
|
|
51
|
-
description: "Provides the value of 'project_id' in body",
|
|
52
|
-
optional: true,
|
|
53
|
-
args: ["project_id"],
|
|
54
|
-
defaults: [""]
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
name: "level",
|
|
58
|
-
short: "",
|
|
59
|
-
description: "Provides the value of 'level' in body",
|
|
60
|
-
optional: true,
|
|
61
|
-
args: ["level"],
|
|
62
|
-
defaults: [""]
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
name: "message",
|
|
66
|
-
short: "",
|
|
67
|
-
description: "Provides the value of 'message' in body",
|
|
68
|
-
optional: true,
|
|
69
|
-
args: ["message"],
|
|
70
|
-
defaults: [""]
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
name: "stack",
|
|
32
|
+
name: "filters",
|
|
74
33
|
short: "",
|
|
75
|
-
description: "Provides the value of '
|
|
34
|
+
description: "Provides the value of 'filters' in body",
|
|
76
35
|
optional: true,
|
|
77
|
-
args: ["
|
|
36
|
+
args: ["filters"],
|
|
78
37
|
defaults: [""]
|
|
79
38
|
},
|
|
80
39
|
{
|
|
@@ -97,12 +56,7 @@ export class AlarmUpdateCommand extends BaseFinalCommand
|
|
|
97
56
|
manager.setValue(token, false);
|
|
98
57
|
let server = new NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
99
58
|
let ans = await server.alarm.Update(this.arg_values[0], {
|
|
100
|
-
|
|
101
|
-
product_id: this.option_values.product_id,
|
|
102
|
-
project_id: this.option_values.project_id,
|
|
103
|
-
level: this.option_values.level,
|
|
104
|
-
message: this.option_values.message,
|
|
105
|
-
stack: this.option_values.stack,
|
|
59
|
+
filters: this.option_values.filters,
|
|
106
60
|
notification_sender_topic_id: this.option_values.notification_sender_topic_id
|
|
107
61
|
});
|
|
108
62
|
this.app.logger.success(JSON.stringify(ans));
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
/****************************************************************/
|
|
3
2
|
/* */
|
|
4
3
|
/* This is an Auto-Generated File */
|
|
@@ -21,15 +20,15 @@
|
|
|
21
20
|
|
|
22
21
|
import { BaseNavigatorCommand } from "namirasoft-node-cli";
|
|
23
22
|
import { LogCreateCommand } from "./LogCreateCommand";
|
|
24
|
-
import { LogGetAllCommand } from "./LogGetAllCommand";
|
|
25
23
|
import { LogGetCommand } from "./LogGetCommand";
|
|
24
|
+
import { LogListCommand } from "./LogListCommand";
|
|
26
25
|
|
|
27
26
|
export class LogCommand extends BaseNavigatorCommand
|
|
28
27
|
{
|
|
29
28
|
constructor(argv: string[])
|
|
30
29
|
{
|
|
31
30
|
super(argv, {
|
|
32
|
-
"
|
|
31
|
+
"list": LogListCommand,
|
|
33
32
|
"get": LogGetCommand,
|
|
34
33
|
"create": LogCreateCommand,
|
|
35
34
|
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
/****************************************************************/
|
|
3
2
|
/* */
|
|
4
3
|
/* This is an Auto-Generated File */
|
|
@@ -68,14 +67,6 @@ export class LogCreateCommand extends BaseFinalCommand
|
|
|
68
67
|
optional: true,
|
|
69
68
|
args: ["message"],
|
|
70
69
|
defaults: [""]
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
name: "stack",
|
|
74
|
-
short: "",
|
|
75
|
-
description: "Provides the value of 'stack' in body",
|
|
76
|
-
optional: true,
|
|
77
|
-
args: ["stack"],
|
|
78
|
-
defaults: [""]
|
|
79
70
|
}
|
|
80
71
|
]);
|
|
81
72
|
}
|
|
@@ -93,8 +84,7 @@ export class LogCreateCommand extends BaseFinalCommand
|
|
|
93
84
|
product_id: this.option_values.product_id,
|
|
94
85
|
project_id: this.option_values.project_id,
|
|
95
86
|
level: this.option_values.level,
|
|
96
|
-
message: this.option_values.message
|
|
97
|
-
stack: this.option_values.stack
|
|
87
|
+
message: this.option_values.message
|
|
98
88
|
});
|
|
99
89
|
this.app.logger.success(JSON.stringify(ans));
|
|
100
90
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
/****************************************************************/
|
|
3
2
|
/* */
|
|
4
3
|
/* This is an Auto-Generated File */
|
|
@@ -22,8 +21,8 @@
|
|
|
22
21
|
import { BaseNavigatorCommand } from "namirasoft-node-cli";
|
|
23
22
|
import { LogGroupCreateCommand } from "./LogGroupCreateCommand";
|
|
24
23
|
import { LogGroupDeleteCommand } from "./LogGroupDeleteCommand";
|
|
25
|
-
import { LogGroupGetAllCommand } from "./LogGroupGetAllCommand";
|
|
26
24
|
import { LogGroupGetCommand } from "./LogGroupGetCommand";
|
|
25
|
+
import { LogGroupListCommand } from "./LogGroupListCommand";
|
|
27
26
|
import { LogGroupUpdateCommand } from "./LogGroupUpdateCommand";
|
|
28
27
|
|
|
29
28
|
export class LogGroupCommand extends BaseNavigatorCommand
|
|
@@ -31,7 +30,7 @@ export class LogGroupCommand extends BaseNavigatorCommand
|
|
|
31
30
|
constructor(argv: string[])
|
|
32
31
|
{
|
|
33
32
|
super(argv, {
|
|
34
|
-
"
|
|
33
|
+
"list": LogGroupListCommand,
|
|
35
34
|
"get": LogGroupGetCommand,
|
|
36
35
|
"create": LogGroupCreateCommand,
|
|
37
36
|
"update": LogGroupUpdateCommand,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
/****************************************************************/
|
|
3
2
|
/* */
|
|
4
3
|
/* This is an Auto-Generated File */
|
|
@@ -33,7 +32,7 @@ export class LogGroupCreateCommand extends BaseFinalCommand
|
|
|
33
32
|
name: "project_id",
|
|
34
33
|
short: "",
|
|
35
34
|
description: "Provides the value of 'project_id' in body",
|
|
36
|
-
optional:
|
|
35
|
+
optional: true,
|
|
37
36
|
args: ["project_id"],
|
|
38
37
|
defaults: [""]
|
|
39
38
|
},
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
/****************************************************************/
|
|
3
2
|
/* */
|
|
4
3
|
/* This is an Auto-Generated File */
|
|
@@ -24,7 +23,7 @@ import { IStorageMemory } from "namirasoft-core";
|
|
|
24
23
|
import { NamirasoftLogServer } from "../NamirasoftLogServer";
|
|
25
24
|
import { TokenManager } from "namirasoft-account";
|
|
26
25
|
|
|
27
|
-
export class
|
|
26
|
+
export class LogGroupListCommand extends BaseFinalCommand
|
|
28
27
|
{
|
|
29
28
|
constructor(argv: string[])
|
|
30
29
|
{
|
|
@@ -39,7 +38,7 @@ export class LogGroupGetAllCommand extends BaseFinalCommand
|
|
|
39
38
|
let manager = new TokenManager(storage, () => { });
|
|
40
39
|
manager.setValue(token, false);
|
|
41
40
|
let server = new NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
42
|
-
let ans = await server.loggroup.
|
|
41
|
+
let ans = await server.loggroup.List(this.arg_values[0], this.arg_values[1], this.arg_values[2]);
|
|
43
42
|
this.app.logger.success(JSON.stringify(ans));
|
|
44
43
|
}
|
|
45
44
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
/****************************************************************/
|
|
3
2
|
/* */
|
|
4
3
|
/* This is an Auto-Generated File */
|
|
@@ -33,7 +32,7 @@ export class LogGroupUpdateCommand extends BaseFinalCommand
|
|
|
33
32
|
name: "project_id",
|
|
34
33
|
short: "",
|
|
35
34
|
description: "Provides the value of 'project_id' in body",
|
|
36
|
-
optional:
|
|
35
|
+
optional: true,
|
|
37
36
|
args: ["project_id"],
|
|
38
37
|
defaults: [""]
|
|
39
38
|
},
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
/****************************************************************/
|
|
3
2
|
/* */
|
|
4
3
|
/* This is an Auto-Generated File */
|
|
@@ -24,7 +23,7 @@ import { IStorageMemory } from "namirasoft-core";
|
|
|
24
23
|
import { NamirasoftLogServer } from "../NamirasoftLogServer";
|
|
25
24
|
import { TokenManager } from "namirasoft-account";
|
|
26
25
|
|
|
27
|
-
export class
|
|
26
|
+
export class LogListCommand extends BaseFinalCommand
|
|
28
27
|
{
|
|
29
28
|
constructor(argv: string[])
|
|
30
29
|
{
|
|
@@ -39,7 +38,7 @@ export class AlarmGetAllCommand extends BaseFinalCommand
|
|
|
39
38
|
let manager = new TokenManager(storage, () => { });
|
|
40
39
|
manager.setValue(token, false);
|
|
41
40
|
let server = new NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
42
|
-
let ans = await server.
|
|
41
|
+
let ans = await server.log.List(this.arg_values[0], this.arg_values[1], this.arg_values[2]);
|
|
43
42
|
this.app.logger.success(JSON.stringify(ans));
|
|
44
43
|
}
|
|
45
44
|
};
|
package/src/command/cli.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
/****************************************************************/
|
|
3
2
|
/* */
|
|
4
3
|
/* This is an Auto-Generated File */
|
|
@@ -37,31 +36,27 @@ export * from "./NamirasoftLogServerLogGroup";
|
|
|
37
36
|
export * from "./StreamConsole";
|
|
38
37
|
export * from "./StreamFile";
|
|
39
38
|
export * from "./StreamNamirasoftLog";
|
|
40
|
-
export * from "./command/AlarmAlarmCommand";
|
|
41
39
|
export * from "./command/AlarmCommand";
|
|
42
40
|
export * from "./command/AlarmCreateCommand";
|
|
43
|
-
export * from "./command/
|
|
41
|
+
export * from "./command/AlarmDeleteCommand";
|
|
44
42
|
export * from "./command/AlarmGetCommand";
|
|
43
|
+
export * from "./command/AlarmListCommand";
|
|
45
44
|
export * from "./command/AlarmUpdateCommand";
|
|
46
45
|
export * from "./command/HealthzCommand";
|
|
47
46
|
export * from "./command/HealthzGetCommand";
|
|
48
47
|
export * from "./command/LogCommand";
|
|
49
48
|
export * from "./command/LogCreateCommand";
|
|
50
|
-
export * from "./command/LogGetAllCommand";
|
|
51
49
|
export * from "./command/LogGetCommand";
|
|
52
50
|
export * from "./command/LogGroupCommand";
|
|
53
51
|
export * from "./command/LogGroupCreateCommand";
|
|
54
52
|
export * from "./command/LogGroupDeleteCommand";
|
|
55
|
-
export * from "./command/LogGroupGetAllCommand";
|
|
56
53
|
export * from "./command/LogGroupGetCommand";
|
|
54
|
+
export * from "./command/LogGroupListCommand";
|
|
57
55
|
export * from "./command/LogGroupUpdateCommand";
|
|
58
|
-
export * from "./
|
|
56
|
+
export * from "./command/LogListCommand";
|
|
57
|
+
export * from "./row/AlarmInputRow";
|
|
59
58
|
export * from "./row/AlarmRow";
|
|
60
|
-
export * from "./row/
|
|
61
|
-
export * from "./row/
|
|
59
|
+
export * from "./row/LogCreateRow";
|
|
60
|
+
export * from "./row/LogGroupInputRow";
|
|
62
61
|
export * from "./row/LogGroupRow";
|
|
63
|
-
export * from "./row/
|
|
64
|
-
export * from "./row/LogGroupRowOutput";
|
|
65
|
-
export * from "./row/LogRow";
|
|
66
|
-
export * from "./row/LogRowInput";
|
|
67
|
-
export * from "./row/LogRowOutput";
|
|
62
|
+
export * from "./row/LogRow";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
/****************************************************************/
|
|
3
2
|
/* */
|
|
4
3
|
/* This is an Auto-Generated File */
|
|
@@ -19,7 +18,8 @@
|
|
|
19
18
|
/* */
|
|
20
19
|
/****************************************************************/
|
|
21
20
|
|
|
22
|
-
export type
|
|
21
|
+
export type AlarmInputRow =
|
|
23
22
|
{
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
filters: (string | null);
|
|
24
|
+
notification_sender_topic_id: string;
|
|
25
|
+
}
|
package/src/row/AlarmRow.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
/****************************************************************/
|
|
3
2
|
/* */
|
|
4
3
|
/* This is an Auto-Generated File */
|
|
@@ -19,7 +18,10 @@
|
|
|
19
18
|
/* */
|
|
20
19
|
/****************************************************************/
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
export type AlarmRow =
|
|
22
|
+
{
|
|
23
|
+
id: number;
|
|
24
|
+
user_id: string;
|
|
25
|
+
filters: (string | null);
|
|
26
|
+
notification_sender_topic_id: string;
|
|
27
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
/****************************************************************/
|
|
3
2
|
/* */
|
|
4
3
|
/* This is an Auto-Generated File */
|
|
@@ -19,12 +18,11 @@
|
|
|
19
18
|
/* */
|
|
20
19
|
/****************************************************************/
|
|
21
20
|
|
|
22
|
-
export type
|
|
21
|
+
export type LogCreateRow =
|
|
23
22
|
{
|
|
24
23
|
log_group_id: (string | null);
|
|
25
24
|
product_id: (string | null);
|
|
26
25
|
project_id: (string | null);
|
|
27
26
|
level: (string | null);
|
|
28
27
|
message: (string | null);
|
|
29
|
-
|
|
30
|
-
}
|
|
28
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
/****************************************************************/
|
|
3
2
|
/* */
|
|
4
3
|
/* This is an Auto-Generated File */
|
|
@@ -19,8 +18,8 @@
|
|
|
19
18
|
/* */
|
|
20
19
|
/****************************************************************/
|
|
21
20
|
|
|
22
|
-
export type
|
|
21
|
+
export type LogGroupInputRow =
|
|
23
22
|
{
|
|
24
|
-
project_id: string;
|
|
23
|
+
project_id: (string | null);
|
|
25
24
|
name: string;
|
|
26
|
-
}
|
|
25
|
+
}
|
package/src/row/LogGroupRow.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
/****************************************************************/
|
|
3
2
|
/* */
|
|
4
3
|
/* This is an Auto-Generated File */
|
|
@@ -19,7 +18,10 @@
|
|
|
19
18
|
/* */
|
|
20
19
|
/****************************************************************/
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
export type LogGroupRow =
|
|
22
|
+
{
|
|
23
|
+
id: string;
|
|
24
|
+
user_id: string;
|
|
25
|
+
project_id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
}
|
package/src/row/LogRow.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
/****************************************************************/
|
|
3
2
|
/* */
|
|
4
3
|
/* This is an Auto-Generated File */
|
|
@@ -19,7 +18,13 @@
|
|
|
19
18
|
/* */
|
|
20
19
|
/****************************************************************/
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
export type LogRow =
|
|
22
|
+
{
|
|
23
|
+
user_id: (string | null);
|
|
24
|
+
log_group_id: (string | null);
|
|
25
|
+
product_id: (string | null);
|
|
26
|
+
project_id: (string | null);
|
|
27
|
+
level: (string | null);
|
|
28
|
+
message: (string | null);
|
|
29
|
+
datetime: (Date | null);
|
|
30
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AlarmAlarmCommand.js","sourceRoot":"","sources":["../../src/command/AlarmAlarmCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,6DAAuD;AACvD,qDAAiD;AACjD,gEAA6D;AAC7D,2DAAkD;AAElD,MAAa,iBAAkB,SAAQ,sCAAgB;IAEnD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IAC5B,CAAC;IACc,IAAI;;YAEf,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;YAC3C,IAAI,KAAK,IAAI,IAAI;gBACb,MAAM,IAAI,KAAK,CAAC,+GAA+G,CAAC,CAAC;YACrI,IAAI,OAAO,GAAG,IAAI,gCAAc,EAAE,CAAC;YACnC,IAAI,OAAO,GAAG,IAAI,iCAAY,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;YACnD,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YAC/B,IAAI,MAAM,GAAG,IAAI,yCAAmB,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACrF,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAA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