mirror of https://github.com/apache/cloudstack.git
ui,api: fix api resourcename and user/project event resource (#6315)
For user and project dashborad event resource details were not showing as shown in admin dashboard. API, UI shows name of the resource as event resourcename. Changed it to displaytext of the resource for consistency Signed-off-by: Abhishek Kumar <abhishek.kumar@shapeblue.com>
This commit is contained in:
parent
e53ed9e350
commit
f8920b9312
|
|
@ -54,7 +54,7 @@ public class EventJoinDaoImpl extends GenericDaoBase<EventJoinVO, Long> implemen
|
|||
EntityManager entityMgr;
|
||||
|
||||
private String getResourceName(Object obj) {
|
||||
String[] possibleMethods = {"getDisplayName", "getHostName","getName", "getAccountName", "getUsername"};
|
||||
String[] possibleMethods = {"getDisplayName", "getDisplayText", "getHostName", "getName", "getAccountName", "getUsername"};
|
||||
for (String possibleMethodName : possibleMethods) {
|
||||
try {
|
||||
Method m = obj.getClass().getMethod(possibleMethodName);
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@
|
|||
:color="getEventColour(event)">
|
||||
<span :style="{ color: '#999' }"><small>{{ $toLocaleDate(event.created) }}</small></span><br/>
|
||||
<span :style="{ color: '#666' }"><small><router-link :to="{ path: '/event/' + event.id }">{{ event.type }}</router-link></small></span><br/>
|
||||
<resource-label :resourceType="event.resourcetype" :resourceId="event.resourceid" :resourceName="event.resourcename" />
|
||||
<span :style="{ color: '#aaa' }">({{ event.username }}) {{ event.description }}</span>
|
||||
</a-timeline-item>
|
||||
</a-timeline>
|
||||
|
|
@ -102,12 +103,14 @@ import store from '@/store'
|
|||
|
||||
import ChartCard from '@/components/widgets/ChartCard'
|
||||
import UsageDashboardChart from '@/views/dashboard/UsageDashboardChart'
|
||||
import ResourceLabel from '@/components/widgets/ResourceLabel'
|
||||
|
||||
export default {
|
||||
name: 'UsageDashboard',
|
||||
components: {
|
||||
ChartCard,
|
||||
UsageDashboardChart
|
||||
UsageDashboardChart,
|
||||
ResourceLabel
|
||||
},
|
||||
props: {
|
||||
resource: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue