Skip to content

Commit 56fd791

Browse files
Pearl1594dhslove
authored andcommitted
Image Store: View Access status of the image store and view events (apache#8467)
1 parent 127d27b commit 56fd791

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

api/src/main/java/com/cloud/event/EventTypes.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,7 @@ public class EventTypes {
404404
public static final String EVENT_IMAGE_STORE_DATA_MIGRATE = "IMAGE.STORE.MIGRATE.DATA";
405405
public static final String EVENT_IMAGE_STORE_RESOURCES_MIGRATE = "IMAGE.STORE.MIGRATE.RESOURCES";
406406
public static final String EVENT_IMAGE_STORE_OBJECT_DOWNLOAD = "IMAGE.STORE.OBJECT.DOWNLOAD";
407+
public static final String EVENT_UPDATE_IMAGE_STORE_ACCESS_STATE = "IMAGE.STORE.ACCESS.UPDATED";
407408

408409
// Configuration Table
409410
public static final String EVENT_CONFIGURATION_VALUE_EDIT = "CONFIGURATION.VALUE.EDIT";
@@ -1174,6 +1175,7 @@ public class EventTypes {
11741175

11751176
entityEventDetails.put(EVENT_IMAGE_STORE_DATA_MIGRATE, ImageStore.class);
11761177
entityEventDetails.put(EVENT_IMAGE_STORE_OBJECT_DOWNLOAD, ImageStore.class);
1178+
entityEventDetails.put(EVENT_UPDATE_IMAGE_STORE_ACCESS_STATE, ImageStore.class);
11771179
entityEventDetails.put(EVENT_LIVE_PATCH_SYSTEMVM, "SystemVMs");
11781180

11791181
//Security

server/src/main/java/com/cloud/storage/StorageManagerImpl.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3269,6 +3269,8 @@ public ImageStore migrateToObjectStore(String name, String url, String providerN
32693269
}
32703270

32713271
@Override
3272+
@ActionEvent(eventType = EventTypes.EVENT_UPDATE_IMAGE_STORE_ACCESS_STATE,
3273+
eventDescription = "image store access updated")
32723274
public ImageStore updateImageStoreStatus(Long id, Boolean readonly) {
32733275
// Input validation
32743276
ImageStoreVO imageStoreVO = _imageStoreDao.findById(id);

ui/src/components/view/ListView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@
343343
<template v-if="column.key === 'softwareversion'">
344344
<span> {{ record.softwareversion ? record.softwareversion : 'N/A' }} </span>
345345
</template>
346-
<template v-if="column.key === 'access'">
346+
<template v-if="column.key === 'readonly'">
347347
<status :text="record.readonly ? 'ReadOnly' : 'ReadWrite'" displayText />
348348
</template>
349349
<template v-if="column.key === 'requiresupgrade'">

0 commit comments

Comments
 (0)