-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbaselineActionReport.bes
More file actions
executable file
·236 lines (198 loc) · 10.6 KB
/
baselineActionReport.bes
File metadata and controls
executable file
·236 lines (198 loc) · 10.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
<script type="text/javascript" src="sortables.js"></script>
<style type="text/css">
a {
text-decoration: none;
}
a:hover {
color: #FF8000;
text-decoration: none;
}
table {
margin: 0;
color: #222;
font: 10pt verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
empty-cells:hide;
}
th {
font: 10pt verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
color: navy;
background-color: #F2F2F2;
border: 1px solid #cccccc;
margin: 0;
padding: 4px 10px 4px 5px;
text-align: left;
}
td {
color: #222;
font: 8pt verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
border-bottom: 1px solid #cccccc;
margin: 0;
padding: 6px 20px 1px 0;
}
td.userinput {
color: #222;
font: 10pt verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
font-weight: bold;
border-bottom: 0px;
margin: 0;
padding: 6px 20px 1px 0;
}
td.errormsg {
color: red;
font: 10pt verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
font-weight: bold;
border-bottom: 0px;
margin: 0;
padding: 6px 20px 1px 0;
}
td.msg {
color: #747170;
font: 10pt verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
font-weight: bold;
border-bottom: 0px;
margin: 0;
padding: 6px 20px 1px 0;
}
/*h3 {
font: 10pt verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
background-color: #747170;
padding: 4px 4px 4px 4px;
color: white;
width: 100%;
}
Sortable tables
table.sortable a.sortheader {
color: black;
text-decoration: underline;
}
table.sortable span.sortarrow, img {
color: black;
text-decoration: none;
border-width: 0px;
}
table.sortable tr.wr_evenRow {
background-color: #ffffff;
}
table.sortable tr.wr_oddRow {
background-color: #dddddd;
} */
</style>
<table>
<tr>
<td class="userinput">
Computer:
</td>
<td class="userinput">
<select id="computerName" name="computerName" size="1">
<option value="default" selected="true" style="background-color: #532900; color: white;">--Select Computer --</option>
<?relevance (html "<option value=%22" & item 1 of it & html "%22>" & item 0 of it & html "</option>") of(preceding text of first "||" of it, following text of first "||" of it) of unique values of ((if (exists name of it) then (name of it as lowercase)
else ( "No name") ) & "||" & id of it as string) of bes computers ?>
</select>
</td>
<td></td>
</tr>
<tr>
<td class="userinput">
Baseline:
</td>
<td class="userinput">
<div id="baselineDiv">
<select id="baselineName" name="baselineName" size="1">
<option value="default" selected="true" style="background-color: #532900; color: white;">--Select Baseline --</option>
<?relevance (html "<option value=%22" & item 1 of it & html "%22>" & item 0 of it & html "</option>") of(preceding text of first "||" of it, following text of first "||" of it) of unique values of(name of it & "||" & id of it as string) of bes fixlets
whose(baseline flag of it=true) ?>
</select>
</div>
</td>
<td class="userinput">
<input id=g enerateButton type="button" value="Generate Report" onclick="search()" />
</td>
</tr>
</table>
<!-- Relevance Summary Section --------------------------------------------------------------------------------------------------------------- -->
<div id="relevanceDiv">
</div>
<!-- Action Result Section --------------------------------------------------------------------------------------------------------------- -->
<div id="actionDiv">
</div>
<!-- Action Details Section --------------------------------------------------------------------------------------------------------------- -->
<div id="actionDetailsDiv" style="position:relative; left:100px">
</div>
<!-- Fixlets Result Section --------------------------------------------------------------------------------------------------------------- -->
<hr />
<div id="resultsDiv">
</div>
<!-- JavaScript Section --------------------------------------------------------------------------------------------------------------- -->
<script type="text/javascript">
function search() {
var divRes = document.getElementById('resultsDiv');
divRes.style.display = 'block';
if (computerName.value == "default") {
divRes.innerHTML = '<table><tr><td class = "errormsg">Please select a computer from the drop list</td></tr></table>';
return;
}
if (baselineName.value == "default") {
divRes.innerHTML = '<table><tr><td class = "errormsg">Please select a baseline from the drop list</td></tr></table>';
return;
}
divRes.innerHTML = 'Searching...';
// Clean up Action Details section
var divActionDetails = document.getElementById('actionDetailsDiv');
divActionDetails.innerHTML = '';
var selObj = document.getElementById('baselineName');
var selIndex = selObj.selectedIndex;
var baselineDesc = selObj.options[selIndex].text;
var selObj2 = document.getElementById('computerName');
var selIndex2 = selObj2.selectedIndex;
var computerNameDesc = selObj2.options[selIndex2].text;
var relevanceSummary = 'if (exists relevant fixlets whose (baseline flag of it = true and id of it is ' + baselineName.value + ') of bes computers whose (id of it is ' + computerName.value + ')) then (html "<hr/><table><tr><td class = %22msg%22>Baseline %22' + baselineDesc + '%22 is <font color=red>Relevant</font> on computer ' + computerNameDesc + '</td></tr></table><br/>") else (html "<hr/><table><tr><td class = %22msg%22>Baseline %22' + baselineDesc + '%22 is <font color=green>Not Relevant</font> on computer ' + computerNameDesc + '</td></tr></table><br/>")';
strResponseSummary = EvaluateRelevance(relevanceSummary);
document.getElementById('relevanceDiv').innerHTML = strResponseSummary;
// Actions taken on the selected baseline against the selected computer
var relevanceAction = 'if (exists bes actions whose (id of source fixlet of it =' + baselineName.value + ') and number of results from (bes computer whose (id of it is ' + computerName.value + ')) of (bes actions whose (id of source fixlet of it = ' + baselineName.value + ')) > 0) then (html "<hr/><table><tr><td class = %22msg%22>Actions taken on computer ' + computerNameDesc + '. Click on row to see details</td></tr></table><table id=%22resultsTable%22 class=%22sortable%22><th>Baseline Action ID</th><th>State</th><th>Issuer</th><th>Time Issued</th><th>Status</th><th>Additional Info</th>" & it & html "</table><br/>") of concatenations of (html "<tr onMouseOver=%22this.style.cursor=%27pointer%27%22 onClick=%22HighLightTR(this,%27#C0C0C0%27,%27#000000%27," & item 0 of it as string & html ");%22>" & item 1 of it & html "</tr>") of (id of action of it, td of (id of action of it as string) & td of state of action of it & td of name of issuer of action of it & td of (year of date (local time zone) of it as string & "-" & month of date (local time zone) of it as two digits as string & "-" & day_of_month of date (local time zone) of it as two digits as string & last 15 of (it as string) ) of time issued of action of it & td of (status of it as string) & td of detailed status of it) of results from(bes computer whose(id of it is ' + computerName.value + ')) of(bes actions whose(id of source fixlet of it = ' + baselineName.value + ')) else (html "<hr/> <table><tr><td class = %22msg%22>No actions have been taken against baseline %22' + baselineDesc + '%22 on computer ' + computerNameDesc + '</td></tr></table><br/>")';
strResponseAction = EvaluateRelevance(relevanceAction);
document.getElementById('actionDiv').innerHTML = strResponseAction;
// Component Fixlets and their relevance against the selected computer
var relevance = '(html "<table><tr><td class = %22msg%22>Component Fixlets and their relevance on computer ' + computerNameDesc + '</td></tr></table><table id=%22resultsTable%22 class=%22sortable%22><th>Fixlet</th><th>Applicability</th>" & it & html "</table>") of concatenations of trs "onMouseOver=%22this.bgColor=%27#C0C0C0%27%22 onMouseOut=%22this.bgColor=%27#FFFFFF%27%22 bgcolor=%22#FFFFFF%22" of (td of name of it & td of (if (it contains "' + computerName.value + '") then (html "<font color=red>Relevant</font>") else (html "<font color=green>Not Relevant</font>")) of concatenation "|" of (ids of elements of applicable computer set of it as string)) of components of component groups of bes fixlets whose (baseline flag of it = true and id of it =' + baselineName.value + ')';
strResponse = EvaluateRelevance(relevance);
document.getElementById('resultsDiv').innerHTML = strResponse;
sortables_init();
}
function getActionDetails(actionId) {
var divActionDetails = document.getElementById('actionDetailsDiv');
divActionDetails.innerHTML = 'Searching...';
var relevanceActionDetails = '(html "<table><tr><td class = %22msg%22>Statuses of Member Actions</td></tr></table><table id=%22resultsTable%22 class=%22sortable%22><th>Member Action ID</th><th>Fixlet</th><th>Status</th>" & it & html "</table><br/>") of concatenations of trs "onMouseOver=%22this.bgColor=%27#C0C0C0%27%22 onMouseOut=%22this.bgColor=%27#FFFFFF%27%22 bgcolor=%22#FFFFFF%22" of (td of (id of action of it as string) & td of name of action of it & td of (status of it as string)) of results from (bes computer whose (id of it is ' + computerName.value + ')) of (elements of member action sets of bes actions whose (id of it is ' + actionId + '))';
strResponseActionDetails = EvaluateRelevance(relevanceActionDetails);
divActionDetails.innerHTML = strResponseActionDetails;
sortables_init();
}
var preEl;
var orgBColor;
var orgTColor;
function HighLightTR(el, backColor, textColor, actionId) {
if (typeof (preEl) != 'undefined') {
preEl.bgColor = orgBColor;
try {
ChangeTextColor(preEl, orgTColor);
// Clear the Action Details section
document.getElementById('actionDetailsDiv').innerHTML = '';
} catch (e) {
alert(e.message);
}
}
orgBColor = el.bgColor;
orgTColor = el.style.color;
el.bgColor = backColor;
try {
ChangeTextColor(el, textColor);
getActionDetails(actionId);
} catch (e) {
alert(e.message);
}
preEl = el;
}
function ChangeTextColor(a_obj, a_color) {
for (i = 0; i < a_obj.cells.length; i++)
a_obj.cells[i].style.color = a_color;
}
</script>