Skip to content

Commit

Permalink
feat: Go to dataset settings from dataset list (#2449)
Browse files Browse the repository at this point in the history
# Description

This PR includes an icon in the dataset list to go to dataset settings

See [#2003](#2003)

**Type of change**

- [x] New feature (non-breaking change which adds functionality)

**Checklist**

- [x] I have merged the original branch into my forked branch
- [x] follows the style guidelines of this project
- [x] I did a self-review of my code
- [x] My changes generate no new warnings
  • Loading branch information
leiyre authored Mar 1, 2023
1 parent bbd686c commit 9829f85
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 1 deletion.
1 change: 1 addition & 0 deletions frontend/assets/icons/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ require('./progress')
require('./refresh')
require('./row-last')
require('./search')
require('./settings')
require('./similarity')
require('./smile-sad')
require('./sort')
Expand Down
27 changes: 27 additions & 0 deletions frontend/assets/icons/settings.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion frontend/components/base/table/BaseTableInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
import "assets/icons/trash-empty";
import "assets/icons/refresh";
import "assets/icons/copy";
import "assets/icons/settings";
import "assets/icons/link";
import "assets/icons/sort";
export default {
Expand Down Expand Up @@ -506,7 +507,7 @@ export default {
right: 2em;
&__button {
position: relative;
margin-left: 2em;
margin-left: 1em;
padding: 0 !important;
display: inline-block;
.svg-icon {
Expand Down
15 changes: 15 additions & 0 deletions frontend/pages/datasets/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ export default {
},
],
actions: [
{
name: "go-to-settings",
icon: "settings",
title: "Go to dataset settings",
tooltip: "Copied",
},
{
name: "copy",
icon: "link",
Expand Down Expand Up @@ -230,6 +236,9 @@ export default {
},
onActionClicked(action, dataset) {
switch (action) {
case "go-to-settings":
this.goToSetting(dataset);
break;
case "copy":
this.copyUrl(dataset);
break;
Expand All @@ -243,6 +252,12 @@ export default {
onSearch(event) {
this.querySearch = event;
},
goToSetting(dataset) {
const { workspace, name } = dataset;
this.$router.push({
path: `/datasets/${workspace}/${name}/settings`,
});
},
copyName(id) {
this.copy(id);
},
Expand Down
3 changes: 3 additions & 0 deletions frontend/static/icons/settings.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9829f85

Please sign in to comment.