Skip to content

Commit

Permalink
feature/datamanager-config-and-async (#758)
Browse files Browse the repository at this point in the history
* DataManager load data async; Configuration files can be added to the mock data

* remove file

* remove setting unused config

* Config Manager add diff mode

* plugin no frontend

* plugin no frontend

* support search

* remove dm config update message

* Fix plugin menu active status error

* handle config display

* children sort

* search with label, close laod async

* update code

* add log in checker switch

* recover

* fix get children with no virtual base config

* fix add config error

* fix add config error

* preload update

* update tests

* update tests
  • Loading branch information
yumiguan authored Jul 13, 2023
1 parent e78d1ad commit 753b416
Show file tree
Hide file tree
Showing 29 changed files with 1,545 additions and 373 deletions.
6 changes: 6 additions & 0 deletions frontend/src/api/datamanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ export const getGroupDetail = (groupId) => {
})
}

export const getGroupChildren = (groupId) => {
return axios({
url: '/api/group/' + groupId + '?childrenOnly=true'
})
}

export const createGroup = (name, parentId) => {
return axios({
url: '/api/group',
Expand Down
23 changes: 22 additions & 1 deletion frontend/src/components/DocumentTree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,30 @@ export default {
searchRefreshDataListTimer: null,
realSearchStr: '',
searchByIdResult: '',
selectLimit: 200
selectLimit: 500,
originAsync: false
}
},
created() {
this.originAsync = this.isLoadTreeAsync
},
computed: {
isSelectableStatus () {
return this.$store.state.dataManager.isSelectableStatus
},
isLoadTreeAsync: {
get () {
return this.$store.state.dataManager.isLoadTreeAsync
},
set (val) {
this.$store.dispatch('commitAndupdateConfigByKey', {
'command': 'setIsTreeLoadAsync',
'isShowMessage': false,
val
})
this.$store.dispatch('loadDataMap')
}
},
groupListOpenNode: {
get () {
return this.$store.state.dataManager.groupListOpenNode
Expand All @@ -72,6 +89,10 @@ export default {
clearTimeout(this.searchRefreshDataListTimer)
this.searchRefreshDataListTimer = setTimeout(() => {
if (newValue !== oldValue) {
// When originAsync is true, and searchStr is not empty, close isLoadTreeAsync
if (this.originAsync == true) {
this.isLoadTreeAsync = newValue === ''
}
this.realSearchStr = this.searchStr
clearTimeout(this.searchRefreshDataListTimer)
}
Expand Down
1 change: 0 additions & 1 deletion frontend/src/components/DocumentTreeDialogDelete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
<p class="text-center data-list-dialog-delete-advanced-selection my-1">Delete Leaf only</p>
</v-col>
</v-row>
</v-radio-group>

</v-expansion-panel-content>
</v-expansion-panel>
Expand Down
Loading

0 comments on commit 753b416

Please sign in to comment.