11 $monLibrary= dirname(__FILE__) .
"/../library";
12 require_once(
"$monLibrary/cu_top.i");
13 require_once(
"$monLibrary/ck_hticket.i");
14 require_once(
"$sharedLibrary/cu_func.i");
15 require_once(
"$monLibrary/monitorView.i");
17 if (!CheckPerm($link, $Hu, basename($_SERVER[
'SCRIPT_NAME']), $_SERVER[
'REMOTE_ADDR'])) {
20 header(
"Location: /hcuadm/hcu_noperm.prg");
24 printMonitorPageTop(
"Trusted Vendor Report", $homecuKendoVersion, $cloudfrontDomainName);
28 font-family: Arial, Helvetica, sans-serif;
29 background-color: #EFEFEF;
31 .k-grid .k-hierarchy-col {
47 .settingStatus .section,
48 .settingStatus .section-clean,
49 .settingStatus .section-dirty {
52 #currentStatus.dirty .section-dirty { 55 #currentStatus.clean .section-clean { 63 .k-tooltip-content { text-align: left;
68 .Clients .k-hierarchy-col {
82 <?php printMonitorPageMiddle(
"Trusted Vendor Report"); ?>
84 <div style=
'font-size:12px;'>
85 <script
id=
"masterpropTempl" type=
"text/x-kendo-template">
86 <div
class=
"tabstrip">
88 <li
class=
"k-state-active">#=trustedid # Properties</li>
93 # for (var i = 0; i < trustedprops.length; i++){ # 95 <td width=
"20%">#=trustedprops[i].vname #</td>
96 <td width=
"20%">#=trustedprops[i].vtype #</td>
97 <td width=
"*">#=trustedprops[i].vdefault #</td>
103 <div
class=
"Clients"></div>
108 <script
id=
"clientpropTempl" type=
"text/x-kendo-template">
109 <div
class=
"k-block">
111 # for (var i = 0; i < trustedprops.length; i++){ # 113 <td>#=trustedprops[i].propname #</td>
114 <td>#=trustedprops[i].propval #</td>
120 <form
id=
"exportForm" action=
"TrustedReport.proxy.data" method=
"POST">
121 <label
for=
"trustedid" class=
"k-label">Enter a Trusted ID:</label>
122 <input
id=
"trustedid" name=
"trustid" class=
"k-textbox" type=
"text" required/>
123 <input
id=
"action" name=
"action" class=
"k-hidden" type=
"hidden" value=
"export_clients"/>
124 <input type=
"submit" id=
"exportBtn" class=
"k-button" value=
"Export"/>
126 <div
id=
"mastergrid"></div>
129 $(document).ready(
function() {
132 $(
"#trustedid").kendoAutoComplete({
135 dataTextField:
"trustedid",
136 dataSource:
new kendo.data.DataSource({
138 read:
function(options) {
139 aggregateData(options,
"read_master");
146 placeholder:
"Start typing...",
149 var value = $(
"#trustedid").val();
150 var data = this.dataSource.view();
151 for( var i = 0, length = data.length; i < length; i++ ) {
152 if( data[i].trustedid === value) {
160 alert(
"Please select a value from the list.");
165 $(
"#mastergrid").kendoGrid({
170 read:
function(options) {
171 aggregateData(options,
"read_master");
176 total:
"homecuCount",
179 trustedid : {type:
"string"},
180 trustedvendor : {type:
"string"},
181 trustedtype : {type:
"string"},
182 trustedprops : {Type : {type:
"string"}, Default : {type:
"string"}}
186 sort: [{field:
"trustedid", dir:
"asc"}]
190 pageSizes: [10, 20, 50],
194 display:
"Showing {0}-{1} from {2} data items" 204 field:
"trustedvendor",
209 field:
"trustedtype",
214 detailTemplate: kendo.template($(
"#masterpropTempl").html()),
215 detailInit:
function(e) {
216 var detailRow = e.detailRow;
217 detailRow.find(
".tabstrip").kendoTabStrip({
219 open: { effects:
"fadeIn" }
222 detailRow.find(
".Clients").kendoGrid({
223 detailTemplate: kendo.template($(
"#clientpropTempl").html()),
224 detailInit:
function(e) {
226 kendo.bind(e.detailRow, e.data);
235 read:
function(options) {
236 aggregateData(options,
"read_clients", e.data.trustedid);
241 total:
"homecuCount",
244 cu : {type:
"string"},
245 trustedid : {type:
"string"},
246 trustedprops : {propname : {type:
"string"}, propval : {type:
"string"}},
247 server: {type:
"string"}
251 sort: [{field:
"cu", dir:
"asc"}]
259 display:
"Showing {0}-{1} from {2} data items" 263 { field:
"server", title:
"Server", width:
"33%"},
264 { field:
"cu", title:
"Client", width:
"34%"},
265 { field:
"trustedid", title:
"Trusted ID", width:
"33%"}
272 function aggregateData(options, action, trustedid) {
273 $.post(
"TrustedReport.proxy.data", {action: action, trustid: trustedid},
function (data) {
274 options.success(data);
283 <?php printMonitorPageBottom(); ?>