Formatting is done.
This commit is contained in:
1 parent
1ecec115e4
commit
88c478c533
2 files changed
+25
-9
No files matched your search
@@ -409,7 +409,9 @@ const buildHardwareDetailsPipeline = (monitor, dates, dateString) => {
|
||||
$arrayElemAt: [
|
||||
{
|
||||
$map: {
|
||||
input: { $arrayElemAt: [{ $ifNull: ["$net", []] }, { $subtract: [{ $size: { $ifNull: ["$net", []] } }, 1] }] },
|
||||
input: {
|
||||
$arrayElemAt: [{ $ifNull: ["$net", []] }, { $subtract: [{ $size: { $ifNull: ["$net", []] } }, 1] }],
|
||||
},
|
||||
as: "iface",
|
||||
in: "$$iface.bytes_sent",
|
||||
},
|
||||
@@ -418,7 +420,9 @@ const buildHardwareDetailsPipeline = (monitor, dates, dateString) => {
|
||||
],
|
||||
},
|
||||
tFirst: { $arrayElemAt: ["$updatedAts", 0] },
|
||||
tLast: { $arrayElemAt: [{ $ifNull: ["$updatedAts", []] }, { $subtract: [{ $size: { $ifNull: ["$updatedAts", []] } }, 1] }] },
|
||||
tLast: {
|
||||
$arrayElemAt: [{ $ifNull: ["$updatedAts", []] }, { $subtract: [{ $size: { $ifNull: ["$updatedAts", []] } }, 1] }],
|
||||
},
|
||||
},
|
||||
in: {
|
||||
$cond: [
|
||||
@@ -444,7 +448,9 @@ const buildHardwareDetailsPipeline = (monitor, dates, dateString) => {
|
||||
$arrayElemAt: [
|
||||
{
|
||||
$map: {
|
||||
input: { $arrayElemAt: [{ $ifNull: ["$net", []] }, { $subtract: [{ $size: { $ifNull: ["$net", []] } }, 1] }] },
|
||||
input: {
|
||||
$arrayElemAt: [{ $ifNull: ["$net", []] }, { $subtract: [{ $size: { $ifNull: ["$net", []] } }, 1] }],
|
||||
},
|
||||
as: "iface",
|
||||
in: "$$iface.bytes_recv",
|
||||
},
|
||||
@@ -453,7 +459,9 @@ const buildHardwareDetailsPipeline = (monitor, dates, dateString) => {
|
||||
],
|
||||
},
|
||||
tFirst: { $arrayElemAt: ["$updatedAts", 0] },
|
||||
tLast: { $arrayElemAt: [{ $ifNull: ["$updatedAts", []] }, { $subtract: [{ $size: { $ifNull: ["$updatedAts", []] } }, 1] }] },
|
||||
tLast: {
|
||||
$arrayElemAt: [{ $ifNull: ["$updatedAts", []] }, { $subtract: [{ $size: { $ifNull: ["$updatedAts", []] } }, 1] }],
|
||||
},
|
||||
},
|
||||
in: {
|
||||
$cond: [
|
||||
@@ -479,7 +487,9 @@ const buildHardwareDetailsPipeline = (monitor, dates, dateString) => {
|
||||
$arrayElemAt: [
|
||||
{
|
||||
$map: {
|
||||
input: { $arrayElemAt: [{ $ifNull: ["$net", []] }, { $subtract: [{ $size: { $ifNull: ["$net", []] } }, 1] }] },
|
||||
input: {
|
||||
$arrayElemAt: [{ $ifNull: ["$net", []] }, { $subtract: [{ $size: { $ifNull: ["$net", []] } }, 1] }],
|
||||
},
|
||||
as: "iface",
|
||||
in: "$$iface.packets_sent",
|
||||
},
|
||||
@@ -488,7 +498,9 @@ const buildHardwareDetailsPipeline = (monitor, dates, dateString) => {
|
||||
],
|
||||
},
|
||||
tFirst: { $arrayElemAt: ["$updatedAts", 0] },
|
||||
tLast: { $arrayElemAt: [{ $ifNull: ["$updatedAts", []] }, { $subtract: [{ $size: { $ifNull: ["$updatedAts", []] } }, 1] }] },
|
||||
tLast: {
|
||||
$arrayElemAt: [{ $ifNull: ["$updatedAts", []] }, { $subtract: [{ $size: { $ifNull: ["$updatedAts", []] } }, 1] }],
|
||||
},
|
||||
},
|
||||
in: {
|
||||
$cond: [
|
||||
@@ -566,7 +578,9 @@ const buildHardwareDetailsPipeline = (monitor, dates, dateString) => {
|
||||
$arrayElemAt: [
|
||||
{
|
||||
$map: {
|
||||
input: { $arrayElemAt: [{ $ifNull: ["$net", []] }, { $subtract: [{ $size: { $ifNull: ["$net", []] } }, 1] }] },
|
||||
input: {
|
||||
$arrayElemAt: [{ $ifNull: ["$net", []] }, { $subtract: [{ $size: { $ifNull: ["$net", []] } }, 1] }],
|
||||
},
|
||||
as: "iface",
|
||||
in: "$$iface.err_in",
|
||||
},
|
||||
@@ -575,7 +589,9 @@ const buildHardwareDetailsPipeline = (monitor, dates, dateString) => {
|
||||
],
|
||||
},
|
||||
tFirst: { $arrayElemAt: ["$updatedAts", 0] },
|
||||
tLast: { $arrayElemAt: [{ $ifNull: ["$updatedAts", []] }, { $subtract: [{ $size: { $ifNull: ["$updatedAts", []] } }, 1] }] },
|
||||
tLast: {
|
||||
$arrayElemAt: [{ $ifNull: ["$updatedAts", []] }, { $subtract: [{ $size: { $ifNull: ["$updatedAts", []] } }, 1] }],
|
||||
},
|
||||
},
|
||||
in: {
|
||||
$cond: [
|
||||
|
||||
Reference in new issue
Block a user