-
Notifications
You must be signed in to change notification settings - Fork 247
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
Feature/update datamanager #840
Conversation
echoyang7
commented
Apr 12, 2024
- Update datamanager to better adapt the adapter
…into feature/update-datamanager
@@ -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)' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
config生成逻辑
frontend/src/store/datamanager.js
Outdated
@@ -68,14 +70,19 @@ export default { | |||
}, | |||
setGroupListOpenNode (state, groupListOpenNode) { | |||
state.groupListOpenNode = groupListOpenNode | |||
localStorage.setItem('groupListOpenNode', JSON.stringify(groupListOpenNode)) |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
del
tests/test_dm_config.py
Outdated
@@ -142,13 +142,14 @@ def event_server(): | |||
application.server['event'] = server | |||
yield server | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
文件删除
…into feature/update-datamanager
// V2 getGroupMap | ||
export const getMockDataByOpenNodes = (options) => { | ||
return axios({ | ||
url: '/api/search/group?search_str=', |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不是restful的协议吧
lyrebird/mock/context.py
Outdated
except Exception: | ||
logger.error(f'Loading custom data-adapter from {str(path)} failed!\n{traceback.format_exc()}') | ||
raise DataManagerInitException | ||
return None |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不会导致后面出错吗