Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/update datamanager #840

Merged

Conversation

echoyang7
Copy link
Collaborator

  • Update datamanager to better adapt the adapter

@echoyang7 echoyang7 requested a review from noO0oOo0ob April 12, 2024 07:39
@@ -63,7 +63,8 @@ export default {
createTypeItems: [
{ value: 'group', text: 'Group' },
{ value: 'data', text: 'Data (HTTP)' },
{ value: 'json', text: 'Data (JSON)' }
{ value: 'json', text: 'Data (JSON)' },
{ value: 'config', text: 'Data (CONFIG)' }
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

config生成逻辑

@@ -68,14 +70,19 @@ export default {
},
setGroupListOpenNode (state, groupListOpenNode) {
state.groupListOpenNode = groupListOpenNode
localStorage.setItem('groupListOpenNode', JSON.stringify(groupListOpenNode))
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

缓存清除

@@ -238,6 +252,34 @@ export default {
},
reloadMockData () {
this.$store.dispatch('loadDataMap')
},
searchGroup (event) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v1、v2

tests/test_dm.py Outdated
@@ -1206,6 +1211,7 @@ def pop_id(node):
return node

group_id, filename = data_manager.export_from_local(snapshot)
print('group_id='+group_id)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

del

@@ -142,13 +142,14 @@ def event_server():
application.server['event'] = server
yield server

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

文件删除

// V2 getGroupMap
export const getMockDataByOpenNodes = (options) => {
return axios({
url: '/api/search/group?search_str=',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

query永远为空吗?


def get(self, search_str=None):
def getV1(self, search_str=None):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不是restful的协议吧

except Exception:
logger.error(f'Loading custom data-adapter from {str(path)} failed!\n{traceback.format_exc()}')
raise DataManagerInitException
return None
Copy link
Collaborator

@noO0oOo0ob noO0oOo0ob Apr 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

del

except Exception:
logger.error(f'Loading custom data-adapter from {str(path)} failed!\n{traceback.format_exc()}')
raise DataManagerInitException
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不会导致后面出错吗

@echoyang7 echoyang7 merged commit 8358a91 into Meituan-Dianping:master Apr 19, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants