107
107
<label class =" pl-0" ></label >
108
108
</div >
109
109
</th >
110
- <th > Name</ th >
111
- <th >Build Name</th >
110
+ <!-- Combined Name / Index Name column -- >
111
+ <th >Name / Index Name</th >
112
112
<th >S3 Path</th >
113
113
<th >Environment</th >
114
114
<th >Indexer Env</th >
115
- <th >Index Name</th >
116
115
<th class =" min-width-9" >Created At</th >
117
116
</tr >
118
117
</thead >
137
136
<label class =" pl-0" ></label >
138
137
</div >
139
138
</td >
140
- <td >{{ snapshot_data._id }}</td >
141
- <td >{{ snapshot_data.build_name }}</td >
142
- <td >{{ getBucketName(snapshot_data) }}</td >
139
+ <!-- Combined Name / Index Name -->
140
+ <td >{{ getCombinedName(snapshot_data) }}</td >
141
+ <!-- Hyperlinked S3 Path -->
142
+ <td >
143
+ <a :href =" getS3Url(snapshot_data)" target =" _blank" >
144
+ {{ getBucketName(snapshot_data) }}
145
+ </a >
146
+ </td >
143
147
<td >{{ snapshot_data.environment }}</td >
144
148
<td >{{ snapshot_data.indexer_env || snapshot_data.conf.indexer.env }}</td >
145
- <td >{{ snapshot_data.index_name }}</td >
146
149
<td class =" min-width-9" >{{ snapshot_data.created_at | moment('MMM Do YYYY, h:mm:ss a') }}</td >
147
150
</tr >
148
151
</template >
161
164
</template >
162
165
163
166
<script >
164
-
165
167
import axios from ' axios'
166
168
import Actionable from ' ./Actionable.vue'
167
169
import AsyncCommandLauncher from ' ./AsyncCommandLauncher.vue'
@@ -194,7 +196,6 @@ export default {
194
196
195
197
// Initialize checkboxes
196
198
$ (' .ui.checkbox' ).checkbox ();
197
-
198
199
},
199
200
data () {
200
201
return {
@@ -365,7 +366,7 @@ export default {
365
366
366
367
this .launchAsyncCommand (cmd, onSuccess, onError);
367
368
},
368
-
369
+ // Returns the S3 bucket path (bucket + base_path)
369
370
getBucketName (snapshot_data ) {
370
371
if (
371
372
snapshot_data .conf &&
@@ -375,6 +376,27 @@ export default {
375
376
) {
376
377
return snapshot_data .conf .repository .settings .bucket + ' /' + snapshot_data .conf .repository .settings .base_path ;
377
378
}
379
+ return ' ' ;
380
+ },
381
+ // Returns AWS URL based on the S3 bucket info.
382
+ getS3Url (snapshot_data ) {
383
+ const settings = snapshot_data .conf ? .repository ? .settings ;
384
+ if (settings && settings .bucket && settings .region && settings .base_path ) {
385
+ const region = settings .region ;
386
+ const bucket = settings .bucket ;
387
+ const base_path = settings .base_path ;
388
+ return ` https://${ region} .console.aws.amazon.com/s3/buckets/${ bucket} ?region=${ region} &bucketType=general&prefix=${ base_path} /&showversions=false` ;
389
+ }
390
+ return ' #' ;
391
+ },
392
+ // Combines the snapshot name (_id) and the index_name.
393
+ getCombinedName (snapshot_data ) {
394
+ const name = snapshot_data ._id ;
395
+ const indexName = snapshot_data .index_name ;
396
+ if (! indexName || name === indexName) {
397
+ return name;
398
+ }
399
+ return ` ${ name} / ${ indexName} ` ;
378
400
},
379
401
validate_snapshots (event ) {
380
402
const self = this ;
0 commit comments