Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
CloWM UI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Looking for advice? Join the
Matrix channel for GitLab users in Bielefeld
!
Show more breadcrumbs
Computational Metagenomics
CloWM
CloWM UI
Commits
b326e239
Verified
Commit
b326e239
authored
2 years ago
by
Daniel Göbel
Browse files
Options
Downloads
Patches
Plain Diff
Filter Buckets by their name
#8
parent
35aae1b8
No related branches found
No related tags found
1 merge request
!14
Filter Buckets and objects by their name
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/BucketView.vue
+6
-2
6 additions, 2 deletions
src/components/BucketView.vue
src/views/object-storage/BucketsView.vue
+37
-14
37 additions, 14 deletions
src/views/object-storage/BucketsView.vue
with
43 additions
and
16 deletions
src/components/BucketView.vue
+
6
−
2
View file @
b326e239
...
@@ -17,7 +17,7 @@ import CopyObjectModal from "@/components/Modals/CopyObjectModal.vue";
...
@@ -17,7 +17,7 @@ import CopyObjectModal from "@/components/Modals/CopyObjectModal.vue";
import
PermissionModal
from
"
@/components/Modals/PermissionModal.vue
"
;
import
PermissionModal
from
"
@/components/Modals/PermissionModal.vue
"
;
import
ObjectDetailModal
from
"
@/components/Modals/ObjectDetailModal.vue
"
;
import
ObjectDetailModal
from
"
@/components/Modals/ObjectDetailModal.vue
"
;
import
CreateFolderModal
from
"
@/components/Modals/CreateFolderModal.vue
"
;
import
CreateFolderModal
from
"
@/components/Modals/CreateFolderModal.vue
"
;
import
DeleteModal
from
"
@/components/Modals/DeleteModal.vue
"
import
DeleteModal
from
"
@/components/Modals/DeleteModal.vue
"
;
import
{
import
{
S3Client
,
S3Client
,
DeleteObjectCommand
,
DeleteObjectCommand
,
...
@@ -526,7 +526,11 @@ watch(
...
@@ -526,7 +526,11 @@ watch(
modal-label=
"some-label"
modal-label=
"some-label"
:object-name-delete=
"objectState.potentialObjectToDelete"
:object-name-delete=
"objectState.potentialObjectToDelete"
:back-modal-id=
"undefined"
:back-modal-id=
"undefined"
@
confirm-delete=
"objectState.deleteFolder ? confirmedDeleteFolder(objectState.potentialObjectToDelete) : confirmedDeleteObject(objectState.potentialObjectToDelete)"
@
confirm-delete=
"
objectState.deleteFolder
? confirmedDeleteFolder(objectState.potentialObjectToDelete)
: confirmedDeleteObject(objectState.potentialObjectToDelete)
"
/>
/>
<!-- Navbar Breadcrumb -->
<!-- Navbar Breadcrumb -->
<nav
aria-label=
"breadcrumb"
class=
"fs-2"
>
<nav
aria-label=
"breadcrumb"
class=
"fs-2"
>
...
...
This diff is collapsed.
Click to expand it.
src/views/object-storage/BucketsView.vue
+
37
−
14
View file @
b326e239
...
@@ -18,11 +18,13 @@ const authStore = useAuthStore();
...
@@ -18,11 +18,13 @@ const authStore = useAuthStore();
const
bucketsState
=
reactive
({
const
bucketsState
=
reactive
({
buckets
:
[],
buckets
:
[],
permissions
:
{},
permissions
:
{},
filterString
:
""
,
potentialDeleteBucketName
:
""
,
potentialDeleteBucketName
:
""
,
loading
:
true
,
loading
:
true
,
}
as
{
}
as
{
buckets
:
BucketOut
[];
buckets
:
BucketOut
[];
loading
:
boolean
;
loading
:
boolean
;
filterString
:
string
;
permissions
:
Record
<
string
,
BucketPermission
>
;
permissions
:
Record
<
string
,
BucketPermission
>
;
potentialDeleteBucketName
:
string
;
potentialDeleteBucketName
:
string
;
});
});
...
@@ -63,6 +65,14 @@ const currentPermission: ComputedRef<BucketPermission | undefined> = computed(
...
@@ -63,6 +65,14 @@ const currentPermission: ComputedRef<BucketPermission | undefined> = computed(
}
}
);
);
const
filteredBuckets
:
ComputedRef
<
BucketOut
[]
>
=
computed
(()
=>
{
return
bucketsState
.
filterString
.
length
>
0
?
bucketsState
.
buckets
.
filter
((
bucket
)
=>
bucket
.
name
.
includes
(
bucketsState
.
filterString
)
)
:
bucketsState
.
buckets
;
});
function
addBucket
(
bucket
:
BucketOut
)
{
function
addBucket
(
bucket
:
BucketOut
)
{
bucketsState
.
buckets
.
push
(
bucket
);
bucketsState
.
buckets
.
push
(
bucket
);
}
}
...
@@ -143,25 +153,38 @@ onMounted(() => {
...
@@ -143,25 +153,38 @@ onMounted(() => {
placeholder=
"Search Buckets"
placeholder=
"Search Buckets"
aria-label=
"Search Buckets"
aria-label=
"Search Buckets"
aria-describedby=
"buckets-search-wrapping"
aria-describedby=
"buckets-search-wrapping"
disabled
v-model.trim=
"bucketsState.filterString"
/>
/>
</div>
</div>
<div
class=
"list-group mt-3"
>
<div
class=
"list-group mt-3"
>
<div
v-if=
"!bucketsState.loading"
>
<div
v-if=
"!bucketsState.loading"
>
<bucket-list-item
<div
v-if=
"filteredBuckets.length > 0"
>
v-for=
"bucket in bucketsState.buckets"
<bucket-list-item
:key=
"bucket.name"
v-for=
"bucket in filteredBuckets"
:active=
"
:key=
"bucket.name"
route.params.bucketName != null &&
:active=
"
route.params.bucketName === bucket.name
route.params.bucketName != null &&
"
route.params.bucketName === bucket.name
:bucket=
"bucket"
"
:loading=
"false"
:bucket=
"bucket"
:permission=
"bucketsState.permissions[bucket.name]"
:loading=
"false"
@
delete-bucket=
"deleteBucket"
:permission=
"bucketsState.permissions[bucket.name]"
@
permission-deleted=
"(bucketName) => bucketDeleted(bucketName)"
@
delete-bucket=
"deleteBucket"
/>
@
permission-deleted=
"(bucketName) => bucketDeleted(bucketName)"
/>
</div>
<div
v-else
class=
"text-center fs-2 mt-5"
>
<bootstrap-icon
icon=
"search"
class=
"mb-2"
:width=
"56"
:height=
"56"
style=
"color: var(--bs-secondary)"
fill=
"currentColor"
/><br
/>
Could not find any Buckets
</div>
</div>
</div>
<div
v-else
>
<div
v-else
>
<bucket-list-item
<bucket-list-item
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment