Two part Get More Done with BigFix webinar coming up next Thursday, 28-May and the second part on Thursday, 11-June, both 1 PM ET/10 AM PT.
Get More Done with BigFix – Your BigFix Console Dashboard Questions Answered in Real Time
The Get More Done with BigFix Webinar series will give you exclusive access to our Team BigFix experts to learn more about BigFix and answer your questions in real time.
Rhonda Studnick Kaiser, Director of Client Experience, is your host and moderator. Please submit agenda suggestions on the BigFix Slack channel or the BigFix Forum.
In these two webinars, John Talbert (@brolly33) from our BigFix Services team will demonstrate how to create a BigFix Console Dashboard and answer your questions on the capability.
If you attended, or watched the playback from the April 8th 2020 Webinar, you might remember a question about “Which relevance statement is false?” for a given Fixlet. Let’s build a console dashboard to help answer it!
Phase one of the dashboard is complete. I posted the file in the slack channel. This forum will not let me upload the .ojo file, so I will instead paste it is as Code/Text here for you.
<?xml version="1.0"?>
<BES>
<Wizard>
<Title>Fixlet Tester (DEV)</Title>
<UIHooks Menu="Fixlet Tester" NavBar="Fixlet Tester (DEV)" LaunchType="Document"></UIHooks>
<DefaultPage>Page1</DefaultPage>
<Page Name="Page1">
<Title>Fixlet Tester (DEV)</Title>
<HTML>
<![CDATA[
<script>
function FindComputerID() {
var out = EvaluateRelevance('id of bes computer whose (name of it as lowercase = "'+ComputerName.value+'" as lowercase) '); //to do: add in an error trap
ComputerID.innerText = out;
};
function GetFixletName() {
var out = EvaluateRelevance('link of bes fixlet whose (name of site of it as lowercase = "'+SiteName.value+'" as lowercase and id of it = '+FixletID.value+')'); //to do: add in an error trap
FixletName.innerHTML = out;
out = EvaluateRelevance('concatenation "<br><br>" of relevance clauses of bes fixlet whose (name of site of it as lowercase = "'+SiteName.value+'" as lowercase and id of it = '+FixletID.value+')'); //to do: add in an error trap
FixletRelevance.innerHTML = out;
};
</script>
<h1>Hello World V1</h1>
This is phase one of the dashboard - please get phase 2 version for a more complete use case result<br>
Created by brolly33 on forum.bigfix.com and bigfix.slack.com<br>
More great info on <a href='https://developer.bigfix.com/other/dashboard-api/'>https://developer.bigfix.com/other/dashboard-api/</a><br>
The Time is <?relevance now?><br><br>
<h5>Computer Section ------------------------ </h5>
My computers are <br>
<?relevance concatenation "<br>" of (links of bes computers)?>
<br><br>
<input id='ComputerName' value='brollytest'></input><br><br>
<button onClick='FindComputerID()'>Get Computer ID</button><br>
<div id='ComputerID'>0</div>
<h5>Fixlet Section ------------------------ </h5>
<input id='SiteName' value='BES Support'></input><br>
<input id='FixletID' value='1'></input><br>
<br><button onClick='GetFixletName()'>Get Fixlet Title</button><br>
<div id='FixletName'>0</div><br>
<table border='1'><tr>
<td><div id='FixletRelevance'>Press the Button ^^ </div></td>
<td><div id='QueryOutput'>Results still In Development</div></td>
</tr></table>
]]>
</HTML>
</Page>
</Wizard>
Adding the XML for the .ojo file for Phase 2 of the dashboard.
We did not have time for questions at the end, so please drop me a line if you had unanswered question on this session.
<?xml version="1.0"?>
<BES>
<Wizard>
<Title>Fixlet Tester (DEV)</Title>
<UIHooks Menu="Fixlet Tester" NavBar="Fixlet Tester (DEV)" LaunchType="Document"></UIHooks>
<DefaultPage>Page1</DefaultPage>
<Page Name="Page1">
<Title>Fixlet Tester (DEV)</Title>
<HTML>
<![CDATA[
<script>
function FindComputerID() {
var out = EvaluateRelevance('id of bes computer whose (name of it as lowercase = "'+ComputerName.value+'" as lowercase) '); //to do: add in an error trap
ComputerID.innerText = out;
};
function GetFixletName() {
var out = EvaluateRelevance('link of bes fixlet whose (name of site of it as lowercase = "'+SiteName.value+'" as lowercase and id of it = '+FixletID.value+')'); //to do: add in an error trap
FixletName.innerHTML = out;
out = EvaluateRelevance('concatenation "<br><br>" of relevance clauses of bes fixlet whose (name of site of it as lowercase = "'+SiteName.value+'" as lowercase and id of it = '+FixletID.value+')'); //to do: add in an error trap
FixletRelevance.innerHTML = out;
out = EvaluateRelevance('concatenation ", " of ("(" & it as html & ")") of relevance clauses of bes fixlet whose (name of site of it as lowercase = "'+SiteName.value+'" as lowercase and id of it = '+FixletID.value+')'); //to do: add in an error trap
rawRelevance.innerHTML = out;
};
function MakeRESTQuery () {
var uri='clientquery';
var options='<BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"><ClientQuery><ApplicabilityRelevance>true</ApplicabilityRelevance>'+
'<QueryText>' + rawRelevance.innerHTML +'</QueryText><UseClientContext>true</UseClientContext>'+
'<Target><ComputerName>' + ComputerName.value + '</ComputerName></Target>'+
'</ClientQuery></BESAPI>';
API.Post (uri,options,function(errMessage, status, body){
QueryID.innerHTML=body;
});
};
function GetRESTQuery () {
var uri='clientqueryresults/' + QueryID.innerText;
var options='';
API.Get(uri,options,function(errMessage, status, body){
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async = false;
xmlDoc.loadXML(body);
if (xmlDoc.getElementsByTagName("Result")[0]) {
var temp = xmlDoc.getElementsByTagName("Result")[0].childNodes[0].nodeValue;
QueryOutput.innerHTML = temp.replace(/, /g , '<br><br>');
} else {QueryOutput.innerText = ' waiting'};
})
};
</script>
<h1>Hello World V2</h1>
This is phase two of the dashboard<br>
Created by brolly33 on forum.bigfix.com and bigfix.slack.com<br>
More great info on <a href='https://developer.bigfix.com/other/dashboard-api/'>https://developer.bigfix.com/other/dashboard-api/</a><br>
The Time is <?relevance now?><br><br>
<h5>Computer Section ------------------------ </h5>
My computers are <br>
<?relevance concatenation "<br>" of (links of bes computers)?>
<br><br>
<input id='ComputerName' value='brollytest'></input><br><br>
<button onClick='FindComputerID()'>1 Get Computer ID</button><br>
<div id='ComputerID'>0</div>
<h5>Fixlet Section ------------------------ </h5>
<input id='SiteName' value='BES Support'></input><br>
<input id='FixletID' value='1'></input><br>
<br><button onClick='GetFixletName()'>2 Get Fixlet Title</button><br>
<div id='FixletName'>0</div><br>
<div id='QueryID'>0</div><br>
<div id='rawRelevance'>0</div><br>
<table border='1'><tr>
<td><div id='FixletRelevance'>Press the Button ^^ </div></td>
<td><div id='QueryOutput'>Make a Query first</div></td>
</tr></table>
<br><button onClick='MakeRESTQuery()'>3 Make REST Query</button>
<button onClick='GetRESTQuery()'>4 Get REST Query Results</button><br>
]]>
</HTML>
</Page>
</Wizard>
</BES>