- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2022 03:49 AM
Hi all,
I'm still a complete novice when it comes to customising the Portal so could do with a bit of guidance. I have been tasked with removing the button below from the Service Status page of the Portal if the Outage is planned (it must remain for unplanned outages - see below).
I'm not sure if this is edited on the page editor, or there should be a widget for the button. If it is a widget that needs editing - how can I find the name of this widget? Once in there I would suppose it's as easy as adding a condition to the script to not display on planned outages etc.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2022 08:01 AM
Hi,
Great job attempting yourself!
For the outage.type have you verified what the value actually is to ensure your ng-if is correct? In server you use "planned", in HTML you use "Planned Outage". If that's not correct, then none will be correct for it to show at all.
I'd recommend double-checking that to see.
I didn't clone the widget on my end to fully look at this but if the button is within a ng-repeat type iterator, then it should be fine and would be evaluated for each occurrence. You'd just want to make sure your values are lining up right.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2022 07:10 AM
Hello,
In the case your highlight is wrong (just throwing this out there), as you're wanting it removed from the outage, in red, versus planned, in blue.
Anyways, you can find the name of the widget by pressing ctrl+right-click on that widget.
Then, once you have the name, you would need to clone the widget, and customize it. This would most likely require adjustment in the HTML section where you see the button and see if there's perhaps an "ng-if" angular method being used. If so, adjust it to only display if the type is outage versus planned outage.
The goal here would be for you to learn, so hopefully, I've helped guide you Correctly.
If you have specific questions after attempting yourself, let us know?
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2022 06:18 AM
Hi
Thanks for marking my reply as Helpful.
If it ended up also guiding you Correctly, please also mark as Correct.
Thanks and take care! 🙂
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2022 07:55 AM
Thanks Allen,
You've helped me find the widget I need to work on and I've made a copy and done a bit of tinkering however I can't seem to achieve what I want to do.
Essentially as below we have a number of outages. For the 'Planned Outage' one I do not want the button to display 'I'm affected too'.
I've tried to add a condition to the button displaying where if the task type is 'Planned Outage' to not display the button. However if it matches on one it doesn't display for all three.
I've attempted the below in the HTML Template to display if the outage type is not 'Planned Outage', however because the other two match this condition it displays on all three. If I change it so the condition is that the outage type is 'Planned Outage' it will disappear for all three.
<button ng-if="!outage.incident_sys_id && outage.type != 'Planned Outage'" type="button" class="btn btn-primary btn-sm pull-left" ng-click="c.createIncident(outage, $event);">I'm affected too</button>
I've also tried in the server script to add this;
data.hideButton = true;
if(outage.getValue("type") != "planned"){
data.hideButton = false;
}
And then call the result to the HTML template by adding ng-hide="data.hideButton" to the button element.
But I get similar results where if one matches, then it applies to them all. Any ideas where I'm going wrong?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2022 08:01 AM
Hi,
Great job attempting yourself!
For the outage.type have you verified what the value actually is to ensure your ng-if is correct? In server you use "planned", in HTML you use "Planned Outage". If that's not correct, then none will be correct for it to show at all.
I'd recommend double-checking that to see.
I didn't clone the widget on my end to fully look at this but if the button is within a ng-repeat type iterator, then it should be fine and would be evaluated for each occurrence. You'd just want to make sure your values are lining up right.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!