scheduler-node-models 1.0.78 → 1.0.81
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/package.json +22 -4
- package/general/emailer.d.ts +0 -1
- package/general/emailer.js +0 -31
- package/general/general.d.ts +0 -12
- package/general/general.js +0 -2
- package/general/index.d.ts +0 -4
- package/general/index.js +0 -20
- package/general/report.d.ts +0 -12
- package/general/report.js +0 -70
- package/general/reportStyle.d.ts +0 -0
- package/general/reportStyle.js +0 -1
- package/general/viewstate.d.ts +0 -5
- package/general/viewstate.js +0 -9
- package/index.d.ts +0 -0
- package/metrics/images.d.ts +0 -22
- package/metrics/images.js +0 -33
- package/metrics/index.d.ts +0 -5
- package/metrics/index.js +0 -21
- package/metrics/mission.d.ts +0 -47
- package/metrics/mission.js +0 -81
- package/metrics/missionSensorOutage.d.ts +0 -11
- package/metrics/missionSensorOutage.js +0 -14
- package/metrics/missionsensor.d.ts +0 -67
- package/metrics/missionsensor.js +0 -128
- package/metrics/outage.d.ts +0 -43
- package/metrics/outage.js +0 -55
- package/metrics/reports/drawSummary.d.ts +0 -24
- package/metrics/reports/drawSummary.js +0 -311
- package/metrics/reports/index.d.ts +0 -5
- package/metrics/reports/index.js +0 -21
- package/metrics/reports/missionDay.d.ts +0 -8
- package/metrics/reports/missionDay.js +0 -23
- package/metrics/reports/missionSummary.d.ts +0 -25
- package/metrics/reports/missionSummary.js +0 -421
- package/metrics/reports/missionType.d.ts +0 -20
- package/metrics/reports/missionType.js +0 -314
- package/metrics/reports/outageDay.d.ts +0 -8
- package/metrics/reports/outageDay.js +0 -23
- package/metrics/systemdata/classifications.d.ts +0 -18
- package/metrics/systemdata/classifications.js +0 -23
- package/metrics/systemdata/communications.d.ts +0 -21
- package/metrics/systemdata/communications.js +0 -40
- package/metrics/systemdata/dcgs.d.ts +0 -19
- package/metrics/systemdata/dcgs.js +0 -29
- package/metrics/systemdata/exploitations.d.ts +0 -18
- package/metrics/systemdata/exploitations.js +0 -23
- package/metrics/systemdata/groundSystems.d.ts +0 -86
- package/metrics/systemdata/groundSystems.js +0 -143
- package/metrics/systemdata/index.d.ts +0 -7
- package/metrics/systemdata/index.js +0 -23
- package/metrics/systemdata/platform.d.ts +0 -124
- package/metrics/systemdata/platform.js +0 -176
- package/metrics/systemdata/systeminfo.d.ts +0 -28
- package/metrics/systemdata/systeminfo.js +0 -64
- package/scheduler/employees/assignment.d.ts +0 -139
- package/scheduler/employees/assignment.js +0 -304
- package/scheduler/employees/balance.d.ts +0 -35
- package/scheduler/employees/balance.js +0 -39
- package/scheduler/employees/companyinfo.d.ts +0 -16
- package/scheduler/employees/companyinfo.js +0 -6
- package/scheduler/employees/contact.d.ts +0 -36
- package/scheduler/employees/contact.js +0 -40
- package/scheduler/employees/employee.d.ts +0 -420
- package/scheduler/employees/employee.js +0 -1862
- package/scheduler/employees/employeename.d.ts +0 -48
- package/scheduler/employees/employeename.js +0 -97
- package/scheduler/employees/index.d.ts +0 -14
- package/scheduler/employees/index.js +0 -30
- package/scheduler/employees/labor.d.ts +0 -31
- package/scheduler/employees/labor.js +0 -39
- package/scheduler/employees/leave.d.ts +0 -58
- package/scheduler/employees/leave.js +0 -73
- package/scheduler/employees/leaverequest.d.ts +0 -105
- package/scheduler/employees/leaverequest.js +0 -226
- package/scheduler/employees/specialty.d.ts +0 -35
- package/scheduler/employees/specialty.js +0 -40
- package/scheduler/employees/variation.d.ts +0 -80
- package/scheduler/employees/variation.js +0 -132
- package/scheduler/employees/web.d.ts +0 -6
- package/scheduler/employees/web.js +0 -2
- package/scheduler/employees/work.d.ts +0 -96
- package/scheduler/employees/work.js +0 -133
- package/scheduler/employees/workday.d.ts +0 -91
- package/scheduler/employees/workday.js +0 -170
- package/scheduler/labor/index.d.ts +0 -2
- package/scheduler/labor/index.js +0 -18
- package/scheduler/labor/laborcode.d.ts +0 -33
- package/scheduler/labor/laborcode.js +0 -55
- package/scheduler/labor/workcode.d.ts +0 -28
- package/scheduler/labor/workcode.js +0 -35
- package/scheduler/reports/chargeStatus.d.ts +0 -66
- package/scheduler/reports/chargeStatus.js +0 -702
- package/scheduler/reports/cofsReports.d.ts +0 -11
- package/scheduler/reports/cofsReports.js +0 -36
- package/scheduler/reports/enterpriseSchedule.d.ts +0 -18
- package/scheduler/reports/enterpriseSchedule.js +0 -159
- package/scheduler/reports/index.d.ts +0 -4
- package/scheduler/reports/index.js +0 -20
- package/scheduler/reports/scheduleReport.d.ts +0 -17
- package/scheduler/reports/scheduleReport.js +0 -311
- package/scheduler/sites/index.d.ts +0 -1
- package/scheduler/sites/index.js +0 -17
- package/scheduler/sites/reports/cofsReport.d.ts +0 -41
- package/scheduler/sites/reports/cofsReport.js +0 -104
- package/scheduler/sites/reports/forecast.d.ts +0 -57
- package/scheduler/sites/reports/forecast.js +0 -205
- package/scheduler/sites/reports/index.d.ts +0 -4
- package/scheduler/sites/reports/index.js +0 -20
- package/scheduler/sites/reports/period.d.ts +0 -11
- package/scheduler/sites/reports/period.js +0 -27
- package/scheduler/sites/reports/section.d.ts +0 -63
- package/scheduler/sites/reports/section.js +0 -174
- package/scheduler/sites/site.d.ts +0 -39
- package/scheduler/sites/site.js +0 -61
- package/scheduler/sites/workcenters/index.d.ts +0 -3
- package/scheduler/sites/workcenters/index.js +0 -19
- package/scheduler/sites/workcenters/position.d.ts +0 -27
- package/scheduler/sites/workcenters/position.js +0 -36
- package/scheduler/sites/workcenters/shift.d.ts +0 -32
- package/scheduler/sites/workcenters/shift.js +0 -47
- package/scheduler/sites/workcenters/workcenter.d.ts +0 -43
- package/scheduler/sites/workcenters/workcenter.js +0 -123
- package/scheduler/teams/company/company.d.ts +0 -99
- package/scheduler/teams/company/company.js +0 -256
- package/scheduler/teams/company/holiday.d.ts +0 -55
- package/scheduler/teams/company/holiday.js +0 -108
- package/scheduler/teams/company/index.d.ts +0 -3
- package/scheduler/teams/company/index.js +0 -19
- package/scheduler/teams/company/modperiod.d.ts +0 -21
- package/scheduler/teams/company/modperiod.js +0 -24
- package/scheduler/teams/contact.d.ts +0 -18
- package/scheduler/teams/contact.js +0 -23
- package/scheduler/teams/index.d.ts +0 -3
- package/scheduler/teams/index.js +0 -19
- package/scheduler/teams/specialty.d.ts +0 -18
- package/scheduler/teams/specialty.js +0 -23
- package/scheduler/teams/team.d.ts +0 -95
- package/scheduler/teams/team.js +0 -351
- package/users/index.d.ts +0 -2
- package/users/index.js +0 -18
- package/users/user.d.ts +0 -130
- package/users/user.js +0 -254
- package/users/web.d.ts +0 -22
- package/users/web.js +0 -2
@@ -1,421 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.MissionSummary = void 0;
|
4
|
-
const exceljs_1 = require("exceljs");
|
5
|
-
const systemdata_1 = require("../systemdata");
|
6
|
-
const mission_1 = require("../mission");
|
7
|
-
const outage_1 = require("../outage");
|
8
|
-
const missionType_1 = require("./missionType");
|
9
|
-
const general_1 = require("../../general");
|
10
|
-
class MissionSummary extends general_1.Report {
|
11
|
-
reportType;
|
12
|
-
start;
|
13
|
-
end;
|
14
|
-
dailyReports;
|
15
|
-
missions;
|
16
|
-
outages;
|
17
|
-
systeminfo;
|
18
|
-
fonts;
|
19
|
-
fills;
|
20
|
-
borders;
|
21
|
-
alignments;
|
22
|
-
constructor(type, start, end, missions, outages, systemInfo, daily) {
|
23
|
-
super();
|
24
|
-
this.reportType = type;
|
25
|
-
this.start = new Date(start);
|
26
|
-
this.end = new Date(end);
|
27
|
-
this.missions = missions;
|
28
|
-
this.outages = outages;
|
29
|
-
this.systeminfo = systemInfo;
|
30
|
-
this.dailyReports = (daily) ? daily : false;
|
31
|
-
this.fonts = new Map();
|
32
|
-
this.fills = new Map();
|
33
|
-
this.borders = new Map();
|
34
|
-
this.alignments = new Map();
|
35
|
-
}
|
36
|
-
create(user) {
|
37
|
-
const workbook = new exceljs_1.Workbook();
|
38
|
-
workbook.creator = user.getFullName();
|
39
|
-
workbook.created = new Date();
|
40
|
-
const delta = Math.floor((this.end.getTime() - this.start.getTime()) / (24 * 3600000));
|
41
|
-
if (delta == 1 && delta > 7) {
|
42
|
-
this.dailyReports = false;
|
43
|
-
}
|
44
|
-
this.createStyles();
|
45
|
-
this.createSummarySheet(workbook, this.start, this.end, this.dailyReports, this.reportType, '');
|
46
|
-
return workbook;
|
47
|
-
}
|
48
|
-
createStyles() {
|
49
|
-
// set fonts
|
50
|
-
this.fonts.set("bold14", { bold: true, size: 14, color: { argb: 'ff000000' } });
|
51
|
-
this.fonts.set("bold12", { bold: true, size: 12, color: { argb: 'ff000000' } });
|
52
|
-
this.fonts.set("nobold10", { bold: false, size: 10, color: { argb: 'ff000000' } });
|
53
|
-
this.fonts.set("bold9", { bold: true, size: 9, color: { argb: 'ff000000' } });
|
54
|
-
this.fonts.set("nobold9", { bold: false, size: 9, color: { argb: 'ff000000' } });
|
55
|
-
this.fonts.set('notnorm', { bold: false, size: 9, color: { argb: 'ff0070c0' } });
|
56
|
-
// set fills
|
57
|
-
this.fills.set('lblhead', { type: 'pattern', pattern: 'solid', fgColor: { argb: 'ffcccccc' } });
|
58
|
-
this.fills.set('plathead', { type: 'pattern', pattern: 'solid', fgColor: { argb: 'ffb8cce4' } });
|
59
|
-
this.fills.set('platlabel', { type: 'pattern', pattern: 'solid', fgColor: { argb: 'ffe5b8b7' } });
|
60
|
-
this.fills.set('platsen', { type: 'pattern', pattern: 'solid', fgColor: { argb: 'ffffffff' } });
|
61
|
-
// set borders
|
62
|
-
this.borders.set('blackthin', {
|
63
|
-
top: { style: 'thin', color: { argb: 'ff000000' } },
|
64
|
-
left: { style: 'thin', color: { argb: 'ff000000' } },
|
65
|
-
bottom: { style: 'thin', color: { argb: 'ff000000' } },
|
66
|
-
right: { style: 'thin', color: { argb: 'ff000000' } }
|
67
|
-
});
|
68
|
-
this.borders.set('blackthinNoRight', {
|
69
|
-
top: { style: 'thin', color: { argb: 'ff000000' } },
|
70
|
-
left: { style: 'thin', color: { argb: 'ff000000' } },
|
71
|
-
bottom: { style: 'thin', color: { argb: 'ff000000' } },
|
72
|
-
right: { style: 'thin', color: { argb: 'ffffffff' } }
|
73
|
-
});
|
74
|
-
this.borders.set('blackthinNoLeft', {
|
75
|
-
top: { style: 'thin', color: { argb: 'ff000000' } },
|
76
|
-
left: { style: 'thin', color: { argb: 'ffffffff' } },
|
77
|
-
bottom: { style: 'thin', color: { argb: 'ff000000' } },
|
78
|
-
right: { style: 'thin', color: { argb: 'ff000000' } }
|
79
|
-
});
|
80
|
-
// set alignments
|
81
|
-
this.alignments.set('center', { horizontal: 'center', vertical: 'middle', wrapText: true });
|
82
|
-
this.alignments.set('leftctr', { horizontal: 'left', vertical: 'middle', wrapText: true });
|
83
|
-
this.alignments.set('rightctr', { horizontal: 'right', vertical: 'middle', wrapText: true });
|
84
|
-
}
|
85
|
-
createSummarySheet(workbook, start, end, bDaily, rptType, label) {
|
86
|
-
const exploitations = ['Primary', 'Shadow/Federated'];
|
87
|
-
// pull the missions for the period and map them by platform and exploitation
|
88
|
-
const missionMap = new Map();
|
89
|
-
this.missions.forEach(msn => {
|
90
|
-
if (msn.useMission(start, end)) {
|
91
|
-
let exp = msn.exploitation;
|
92
|
-
if (exp.toLowerCase() !== 'primary') {
|
93
|
-
exp = 'Shadow/Federated';
|
94
|
-
}
|
95
|
-
const key = exp.toUpperCase() + "|" + msn.platformID;
|
96
|
-
let mtype = missionMap.get(key);
|
97
|
-
if (!mtype) {
|
98
|
-
mtype = new missionType_1.MissionType(exp, msn.platformID);
|
99
|
-
missionMap.set(key, mtype);
|
100
|
-
}
|
101
|
-
mtype.missions.push(new mission_1.Mission(msn));
|
102
|
-
}
|
103
|
-
});
|
104
|
-
// compile composite sensor list
|
105
|
-
const sensors = [];
|
106
|
-
for (const [key, mtype] of missionMap) {
|
107
|
-
const sens = mtype.getSensorList();
|
108
|
-
sens.forEach(sen => {
|
109
|
-
let found = false;
|
110
|
-
sensors.forEach(s => {
|
111
|
-
if (s.toLowerCase() === sen.toLowerCase()) {
|
112
|
-
found = true;
|
113
|
-
}
|
114
|
-
});
|
115
|
-
if (!found) {
|
116
|
-
sensors.push(sen);
|
117
|
-
}
|
118
|
-
});
|
119
|
-
}
|
120
|
-
// pull ground outages for period
|
121
|
-
const outages = [];
|
122
|
-
this.outages.forEach(outage => {
|
123
|
-
if (outage.useOutage(start, end)) {
|
124
|
-
outages.push(new outage_1.Outage(outage));
|
125
|
-
}
|
126
|
-
});
|
127
|
-
if (!label) {
|
128
|
-
label = "Summary";
|
129
|
-
if (Math.floor((end.getTime() - start.getTime()) / (24 * 3600000)) === 1) {
|
130
|
-
label = this.getDateString(start);
|
131
|
-
}
|
132
|
-
}
|
133
|
-
const sheet = workbook.addWorksheet(label);
|
134
|
-
sheet.pageSetup.showGridLines = false;
|
135
|
-
const widths = [8, 7, 4, 7, 8, 8, 8, 8, 8, 8, 8, 8];
|
136
|
-
widths.forEach((width, w) => {
|
137
|
-
sheet.getColumn(w).width = width;
|
138
|
-
});
|
139
|
-
// create headers/labels at top of page
|
140
|
-
sheet.getRow(3).height = 18;
|
141
|
-
let style = {
|
142
|
-
border: this.borders.get('blackthin'),
|
143
|
-
fill: this.fills.get('lblhead'),
|
144
|
-
font: this.fonts.get('bold12'),
|
145
|
-
alignment: this.alignments.get('center')
|
146
|
-
};
|
147
|
-
this.setCell(sheet, 'B3', 'D3', style, 'Summary Period');
|
148
|
-
this.setCell(sheet, 'E3', 'F3', style, 'From:');
|
149
|
-
this.setCell(sheet, 'G3', 'H3', style, 'To:');
|
150
|
-
this.setCell(sheet, 'I3', 'J3', style, 'Execution Time');
|
151
|
-
this.setCell(sheet, 'B4', 'D4', style, '');
|
152
|
-
this.setCell(sheet, 'E4', 'F4', style, this.getDateString(start));
|
153
|
-
this.setCell(sheet, 'G4', 'H4', style, this.getDateString(end));
|
154
|
-
// calculate total execution time
|
155
|
-
let execution = 0;
|
156
|
-
for (const [key, mtype] of missionMap) {
|
157
|
-
execution += (mtype.getExecutedTime(sensors, '')
|
158
|
-
+ mtype.getAdditionalTime(sensors, '')) - mtype.getOverlap();
|
159
|
-
}
|
160
|
-
this.setCell(sheet, 'I4', 'J4', style, this.getTimeString(execution));
|
161
|
-
// summary of exploitation/platforms and sensors
|
162
|
-
style = {
|
163
|
-
border: this.borders.get('blackthin'),
|
164
|
-
fill: this.fills.get('plathead'),
|
165
|
-
font: this.fonts.get('bold9'),
|
166
|
-
alignment: this.alignments.get('leftctr')
|
167
|
-
};
|
168
|
-
this.setCell(sheet, 'B6', 'F7', style, 'SYSTEM');
|
169
|
-
this.setCell(sheet, 'G6', 'J6', style, 'SORTIES');
|
170
|
-
this.setCell(sheet, 'G7', 'G7', style, 'SCHED');
|
171
|
-
this.setCell(sheet, 'H7', 'H7', style, 'EXEC');
|
172
|
-
this.setCell(sheet, 'I7', 'I7', style, 'CANCEL');
|
173
|
-
this.setCell(sheet, 'J7', 'J7', style, 'ABORT');
|
174
|
-
let nRow = 7;
|
175
|
-
exploitations.forEach(exp => {
|
176
|
-
const sensorList = [];
|
177
|
-
this.systeminfo.platforms?.forEach(plat => {
|
178
|
-
plat.sensors.forEach(pSen => {
|
179
|
-
let bUse = false;
|
180
|
-
pSen.exploitations?.forEach(e => {
|
181
|
-
if (e.exploitation.toLowerCase() === exp.toLowerCase()
|
182
|
-
&& (rptType === systemdata_1.GeneralTypes.ALL
|
183
|
-
|| (rptType === systemdata_1.GeneralTypes.GEOINT && e.showOnGEOINT)
|
184
|
-
|| (rptType === systemdata_1.GeneralTypes.MIST && e.showOnMIST)
|
185
|
-
|| (rptType === systemdata_1.GeneralTypes.SYERS && e.showOnGSEG)
|
186
|
-
|| (rptType === systemdata_1.GeneralTypes.XINT && e.showOnXINT))) {
|
187
|
-
bUse = true;
|
188
|
-
}
|
189
|
-
});
|
190
|
-
if (bUse) {
|
191
|
-
let found = false;
|
192
|
-
sensorList.forEach(s => {
|
193
|
-
if (s.toLowerCase() === pSen.id.toLowerCase()) {
|
194
|
-
found = true;
|
195
|
-
}
|
196
|
-
});
|
197
|
-
if (!found) {
|
198
|
-
sensorList.push(pSen.id);
|
199
|
-
}
|
200
|
-
}
|
201
|
-
});
|
202
|
-
});
|
203
|
-
nRow++;
|
204
|
-
const lStyle = {
|
205
|
-
border: this.borders.get('blackthin'),
|
206
|
-
fill: this.fills.get('platlabel'),
|
207
|
-
font: this.fonts.get('nobold9'),
|
208
|
-
alignment: this.alignments.get('leftctr')
|
209
|
-
};
|
210
|
-
const cStyle = {
|
211
|
-
border: this.borders.get('blackthin'),
|
212
|
-
fill: this.fills.get('platlabel'),
|
213
|
-
font: this.fonts.get('nobold9'),
|
214
|
-
alignment: this.alignments.get('center')
|
215
|
-
};
|
216
|
-
const prStyle = {
|
217
|
-
border: this.borders.get('blackthin'),
|
218
|
-
fill: this.fills.get('platsen'),
|
219
|
-
font: this.fonts.get('nobold9'),
|
220
|
-
alignment: this.alignments.get('rightctr')
|
221
|
-
};
|
222
|
-
const prdStyle = {
|
223
|
-
border: this.borders.get('blackthin'),
|
224
|
-
fill: this.fills.get('platsen'),
|
225
|
-
font: this.fonts.get('nobold9'),
|
226
|
-
alignment: this.alignments.get('center'),
|
227
|
-
};
|
228
|
-
this.setCell(sheet, this.getCellID('B', nRow), this.getCellID('F', nRow), lStyle, exp);
|
229
|
-
this.setCell(sheet, this.getCellID('G', nRow), this.getCellID('G', nRow), cStyle, this.getNumberString(this.getTotal('scheduled', exp, missionMap, sensorList), 0));
|
230
|
-
this.setCell(sheet, this.getCellID('H', nRow), this.getCellID('G', nRow), cStyle, this.getNumberString(this.getTotal('executed', exp, missionMap, sensorList), 0));
|
231
|
-
this.setCell(sheet, this.getCellID('I', nRow), this.getCellID('G', nRow), cStyle, this.getNumberString(this.getTotal('cancelled', exp, missionMap, sensorList), 0));
|
232
|
-
this.setCell(sheet, this.getCellID('J', nRow), this.getCellID('G', nRow), cStyle, this.getNumberString(this.getTotal('aborted', exp, missionMap, sensorList), 0));
|
233
|
-
this.systeminfo.platforms?.forEach(plat => {
|
234
|
-
const key = `${exp.toUpperCase()}|${plat.id}`;
|
235
|
-
const mtype = missionMap.get(key);
|
236
|
-
if (plat.use(exp, rptType)) {
|
237
|
-
nRow++;
|
238
|
-
let platCount = -1;
|
239
|
-
this.setCell(sheet, this.getCellID('B', nRow), this.getCellID('C', nRow), prStyle, plat.id);
|
240
|
-
plat.sensors.forEach(pSen => {
|
241
|
-
if (pSen.use(exp, rptType)) {
|
242
|
-
platCount++;
|
243
|
-
if (platCount <= 0) {
|
244
|
-
this.setCell(sheet, this.getCellID('D', nRow + platCount), this.getCellID('F', nRow + platCount), prStyle, pSen.id);
|
245
|
-
}
|
246
|
-
else {
|
247
|
-
this.setCell(sheet, this.getCellID('B', nRow + platCount), this.getCellID('F', nRow + platCount), prStyle, pSen.id);
|
248
|
-
}
|
249
|
-
this.setCell(sheet, this.getCellID('G', nRow + platCount), this.getCellID('G', nRow + platCount), prdStyle, this.getNumberString(this.getTotal('scheduled', exp, missionMap, [pSen.id]), 0));
|
250
|
-
this.setCell(sheet, this.getCellID('H', nRow + platCount), this.getCellID('H', nRow + platCount), prdStyle, this.getNumberString(this.getTotal('executed', exp, missionMap, [pSen.id]), 0));
|
251
|
-
this.setCell(sheet, this.getCellID('I', nRow + platCount), this.getCellID('I', nRow + platCount), prdStyle, this.getNumberString(this.getTotal('cancelled', exp, missionMap, [pSen.id]), 0));
|
252
|
-
this.setCell(sheet, this.getCellID('J', nRow + platCount), this.getCellID('J', nRow + platCount), prdStyle, this.getNumberString(this.getTotal('aborted', exp, missionMap, [pSen.id]), 0));
|
253
|
-
}
|
254
|
-
});
|
255
|
-
nRow += platCount;
|
256
|
-
}
|
257
|
-
});
|
258
|
-
});
|
259
|
-
// create ground systems matrix
|
260
|
-
// displayed ground systems are determined by report type
|
261
|
-
nRow += 2;
|
262
|
-
style = {
|
263
|
-
border: this.borders.get('blackthin'),
|
264
|
-
fill: this.fills.get('plathead'),
|
265
|
-
font: this.fonts.get('bold9'),
|
266
|
-
alignment: this.alignments.get('leftctr')
|
267
|
-
};
|
268
|
-
this.setCell(sheet, this.getCellID('B', nRow), this.getCellID('D', nRow + 1), style, "Ground System/Enclave");
|
269
|
-
this.setCell(sheet, this.getCellID('E', nRow), this.getCellID('H', nRow), style, "HOURS");
|
270
|
-
this.setCell(sheet, this.getCellID('I', nRow), this.getCellID('J', nRow), style, "Outages");
|
271
|
-
this.setCell(sheet, this.getCellID('K', nRow), this.getCellID('K', nRow), style, "Ao%");
|
272
|
-
nRow++;
|
273
|
-
this.setCell(sheet, this.getCellID('E', nRow), this.getCellID('E', nRow), style, "PRE");
|
274
|
-
this.setCell(sheet, this.getCellID('F', nRow), this.getCellID('F', nRow), style, "PLAN");
|
275
|
-
this.setCell(sheet, this.getCellID('G', nRow), this.getCellID('G', nRow), style, "EXEC");
|
276
|
-
this.setCell(sheet, this.getCellID('H', nRow), this.getCellID('H', nRow), style, "POST");
|
277
|
-
this.setCell(sheet, this.getCellID('I', nRow), this.getCellID('I', nRow), style, "#");
|
278
|
-
this.setCell(sheet, this.getCellID('J', nRow), this.getCellID('J', nRow), style, "HOURS");
|
279
|
-
if (this.systeminfo.groundSystems) {
|
280
|
-
this.systeminfo.groundSystems.forEach(gs => {
|
281
|
-
if (rptType === systemdata_1.GeneralTypes.ALL
|
282
|
-
|| (rptType === systemdata_1.GeneralTypes.GEOINT && gs.showOnGEOINT)
|
283
|
-
|| (rptType === systemdata_1.GeneralTypes.SYERS && gs.showOnGSEG)
|
284
|
-
|| (rptType === systemdata_1.GeneralTypes.MIST && gs.showOnMIST)
|
285
|
-
|| (rptType === systemdata_1.GeneralTypes.XINT && gs.showOnXINT)) {
|
286
|
-
let encCount = -1;
|
287
|
-
nRow++;
|
288
|
-
gs.enclaves.forEach(enclave => {
|
289
|
-
let premission = 0;
|
290
|
-
let scheduled = 0;
|
291
|
-
let executed = 0;
|
292
|
-
let postmission = 0;
|
293
|
-
let overlap = 0;
|
294
|
-
let outageNumber = 0;
|
295
|
-
let outageTime = 0;
|
296
|
-
for (const [key, mtype] of missionMap) {
|
297
|
-
premission += mtype.getPremissionTime(sensors, enclave, gs);
|
298
|
-
scheduled += mtype.getScheduledTime(sensors, enclave, gs);
|
299
|
-
executed += mtype.getExecutedTime(sensors, enclave, gs);
|
300
|
-
postmission += mtype.getPostmissionTime(sensors, enclave, gs);
|
301
|
-
overlap += mtype.getOverlap();
|
302
|
-
}
|
303
|
-
if (executed >= overlap && overlap > 0) {
|
304
|
-
executed -= overlap;
|
305
|
-
}
|
306
|
-
else if (executed < overlap) {
|
307
|
-
executed = 0;
|
308
|
-
}
|
309
|
-
encCount++;
|
310
|
-
outageNumber = 0;
|
311
|
-
outageTime = 0;
|
312
|
-
if (gs.enclaves.length === 1) {
|
313
|
-
style = {
|
314
|
-
border: this.borders.get('blackthinNoRight'),
|
315
|
-
fill: this.fills.get('platsen'),
|
316
|
-
font: this.fonts.get('bold9'),
|
317
|
-
alignment: this.alignments.get('center')
|
318
|
-
};
|
319
|
-
this.setCell(sheet, this.getCellID("B", nRow), this.getCellID("C", nRow), style, gs.id);
|
320
|
-
style = {
|
321
|
-
border: this.borders.get('blackthinNoLeft'),
|
322
|
-
fill: this.fills.get('platsen'),
|
323
|
-
font: this.fonts.get('bold9'),
|
324
|
-
alignment: this.alignments.get('center')
|
325
|
-
};
|
326
|
-
this.setCell(sheet, this.getCellID("B", nRow), this.getCellID("C", nRow), style, "");
|
327
|
-
}
|
328
|
-
else {
|
329
|
-
if (encCount === 0) {
|
330
|
-
style = {
|
331
|
-
border: this.borders.get('blackthin'),
|
332
|
-
fill: this.fills.get('platsen'),
|
333
|
-
font: this.fonts.get('bold9'),
|
334
|
-
alignment: this.alignments.get('center')
|
335
|
-
};
|
336
|
-
this.setCell(sheet, this.getCellID("B", nRow), this.getCellID("C", nRow), style, gs.id);
|
337
|
-
style = {
|
338
|
-
border: this.borders.get('blackthin'),
|
339
|
-
fill: this.fills.get('platsen'),
|
340
|
-
font: this.fonts.get('bold9'),
|
341
|
-
alignment: this.alignments.get('rightctr')
|
342
|
-
};
|
343
|
-
this.setCell(sheet, this.getCellID("D", nRow), this.getCellID("D", nRow), style, enclave);
|
344
|
-
}
|
345
|
-
else {
|
346
|
-
style = {
|
347
|
-
border: this.borders.get('blackthin'),
|
348
|
-
fill: this.fills.get('platsen'),
|
349
|
-
font: this.fonts.get('bold9'),
|
350
|
-
alignment: this.alignments.get('rightctr')
|
351
|
-
};
|
352
|
-
this.setCell(sheet, this.getCellID("B", nRow + encCount), this.getCellID("D", nRow + encCount), style, enclave);
|
353
|
-
}
|
354
|
-
}
|
355
|
-
style = {
|
356
|
-
border: this.borders.get('blackthin'),
|
357
|
-
fill: this.fills.get('platsen'),
|
358
|
-
font: this.fonts.get('bold9'),
|
359
|
-
alignment: this.alignments.get('rightctr')
|
360
|
-
};
|
361
|
-
this.setCell(sheet, this.getCellID("E", nRow + encCount), this.getCellID("E", nRow + encCount), style, this.getTimeString(premission));
|
362
|
-
this.setCell(sheet, this.getCellID("F", nRow + encCount), this.getCellID("F", nRow + encCount), style, this.getTimeString(scheduled));
|
363
|
-
this.setCell(sheet, this.getCellID("G", nRow + encCount), this.getCellID("G", nRow + encCount), style, this.getTimeString(executed));
|
364
|
-
this.setCell(sheet, this.getCellID("H", nRow + encCount), this.getCellID("H", nRow + encCount), style, this.getTimeString(postmission));
|
365
|
-
outages.forEach(outage => {
|
366
|
-
if (outage.groundSystem.toLowerCase() === gs.id.toLowerCase()
|
367
|
-
&& outage.classification.toLowerCase() === enclave.toLowerCase()) {
|
368
|
-
outageNumber++;
|
369
|
-
outageTime += outage.outageMinutes;
|
370
|
-
}
|
371
|
-
});
|
372
|
-
let ao = 0.0;
|
373
|
-
if (executed > 0) {
|
374
|
-
ao = ((executed = outageTime) / executed) * 100.0;
|
375
|
-
}
|
376
|
-
if (ao > 0 && ao < 100) {
|
377
|
-
style.font = this.fonts.get("notnorm");
|
378
|
-
}
|
379
|
-
this.setCell(sheet, this.getCellID("I", nRow + encCount), this.getCellID("I", nRow + encCount), style, `${outageNumber}`);
|
380
|
-
this.setCell(sheet, this.getCellID("J", nRow + encCount), this.getCellID("J", nRow + encCount), style, this.getTimeString(outageTime));
|
381
|
-
this.setCell(sheet, this.getCellID("K", nRow + encCount), this.getCellID("K", nRow + encCount), style, ao, '0.00');
|
382
|
-
});
|
383
|
-
nRow += encCount;
|
384
|
-
}
|
385
|
-
});
|
386
|
-
const delta = end.getTime() - start.getTime();
|
387
|
-
if (rptType === systemdata_1.GeneralTypes.ALL && delta > (24 * 3600000)) {
|
388
|
-
this.createSummarySheet(workbook, start, end, false, systemdata_1.GeneralTypes.GEOINT, "GEOINT");
|
389
|
-
}
|
390
|
-
if (bDaily) {
|
391
|
-
let dayStart = new Date(start);
|
392
|
-
while (dayStart.getTime() < end.getTime()) {
|
393
|
-
const dayEnd = new Date((dayStart.getTime() + (24 * 3600000)) - 1000);
|
394
|
-
this.createSummarySheet(workbook, dayStart, dayEnd, false, rptType, '');
|
395
|
-
dayStart = new Date(dayStart.getTime() + (24 * 3600000));
|
396
|
-
}
|
397
|
-
}
|
398
|
-
}
|
399
|
-
}
|
400
|
-
getTotal(type, exploit, missionMap, sensors) {
|
401
|
-
let answer = 0;
|
402
|
-
for (const [key, mtype] of missionMap) {
|
403
|
-
switch (type.toLowerCase()) {
|
404
|
-
case "scheduled":
|
405
|
-
answer += mtype.getScheduled(exploit, sensors);
|
406
|
-
break;
|
407
|
-
case "executed":
|
408
|
-
answer += mtype.getExecuted(exploit, sensors);
|
409
|
-
break;
|
410
|
-
case "cancelled":
|
411
|
-
answer += mtype.getCancelled(exploit, sensors);
|
412
|
-
break;
|
413
|
-
case "aborded":
|
414
|
-
answer += mtype.getAborted(exploit, sensors);
|
415
|
-
break;
|
416
|
-
}
|
417
|
-
}
|
418
|
-
return answer;
|
419
|
-
}
|
420
|
-
}
|
421
|
-
exports.MissionSummary = MissionSummary;
|
@@ -1,20 +0,0 @@
|
|
1
|
-
import { Mission } from "../mission";
|
2
|
-
import { GroundSystem } from "../systemdata";
|
3
|
-
export declare class MissionType {
|
4
|
-
exploitation: string;
|
5
|
-
platform: string;
|
6
|
-
missions: Mission[];
|
7
|
-
constructor(exp: string, platform: string);
|
8
|
-
addMission(msn: Mission): void;
|
9
|
-
getScheduled(exploit: string, sensors: string[]): number;
|
10
|
-
getExecuted(exploit: string, sensors: string[]): number;
|
11
|
-
getCancelled(exploit: string, sensors: string[]): number;
|
12
|
-
getAborted(exploit: string, sensors: string[]): number;
|
13
|
-
getPremissionTime(sensors: string[], enclave: string, gs?: GroundSystem): number;
|
14
|
-
getPostmissionTime(sensors: string[], enclave: string, gs?: GroundSystem): number;
|
15
|
-
getScheduledTime(sensors: string[], enclave: string, gs?: GroundSystem): number;
|
16
|
-
getExecutedTime(sensors: string[], enclave: string, gs?: GroundSystem): number;
|
17
|
-
getAdditionalTime(sensors: string[], enclave: string, gs?: GroundSystem): number;
|
18
|
-
getOverlap(): number;
|
19
|
-
getSensorList(): string[];
|
20
|
-
}
|