- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2023 07:25 AM
We have begun working on the System Status page but we are looking to add filtering functionality. I cloned the Typeahead Search widget and broadcasted the search term when the user submits (remained on same page, blocked the change over to the search results page).
I then cloned the Business Services Status page. In the client controller I added the following code to listen for the broadcast:
<div class="panel-heading"> </div>
<div class="panel-body">
<table class="tb">
<caption class="sr-only">${Business Services} ${Status History}</caption>
<thead>
<th scope="col">
<span class="panel-title title">
${Status History}
</span>
</th>
<th scope="col" ng-repeat="date in ::data.dates" class="date-column">{{::date.month}} {{::date.day}}</th>
</thead>
<tbody>
<tr ng-repeat-start="category in ::c.data.categories" aria-hidden="true">
<th scope="colgroup" class="title category" colspan="6" title="{{::category.label}}" id="{{::category.id}}" ng-bind-html="::category.label"></th>
</tr>
<tr ng-repeat-end ng-repeat="service in ::category.services">
<th scope="row" class="row-header-title">
<small ng-if="::service.subscribed" class="subscribed" title="${Subscribed to updates}" aria-label="${Subscribed to updates}"><i class="fa fa-envelope"></i></small>
<a ng-href="?id=service_status&service={{::service.sys_id}}" ng-bind-html="::service.name"></a>
</th>
<td ng-repeat="n in [0,1,2,3,4] track by $index" class="outage-row">
<span class="fa" ng-class="::service.outages[4-$index].icon"
data-toggle="tooltip"
data-placement="top"
aria-hidden="true"
title="{{::service.outages[4-$index].msg + ' - ' + data.dates[$index].month + ' ' + data.dates[$index].day}}">
</span>
<span class="sr-only">{{::service.outages[4-$index].msg}}</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2023 07:01 PM
Hi @Harry Wilson
Change the replace the ::c.data.categories for data.categories
<tr ng-repeat-start="category in data.categories" aria-hidden="true">
The :: means the code will not update even if you change the variable value,
Also you set the response.data.categories in the $scope $scope.data.categories = response.data.categories;
If my answer helped you, please mark my answer as helpful.
Vanderlei Catione Junior | LinkedIn
Senior ServicePortal Developer / TechLead at The Cloud People
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2023 07:01 PM
Hi @Harry Wilson
Change the replace the ::c.data.categories for data.categories
<tr ng-repeat-start="category in data.categories" aria-hidden="true">
The :: means the code will not update even if you change the variable value,
Also you set the response.data.categories in the $scope $scope.data.categories = response.data.categories;
If my answer helped you, please mark my answer as helpful.
Vanderlei Catione Junior | LinkedIn
Senior ServicePortal Developer / TechLead at The Cloud People
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2023 06:38 AM
This worked! Thank you very much!