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 conflict text #189

Merged
merged 2 commits into from
Jul 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions frontend/src/components/DocumentTreeNode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
</a>
<DropdownMenu slot="list" style="min-width:60px">
<DropdownItem align="left" name="delete">Delete</DropdownItem>
<DropdownItem align="left" name="copy">Copy</DropdownItem>
<DropdownItem align="left" name="paste" :disabled="hasCopyTarget">Paste</DropdownItem>
<DropdownItem align="left" name="copy" :disabled="true">Copy</DropdownItem>
<DropdownItem align="left" name="paste" :disabled="true">Paste</DropdownItem>
<DropdownItem align="left" name="addGroup" :disabled="data.type === 'data'">Add group</DropdownItem>
<DropdownItem align="left" name="addData" :disabled="data.type === 'data'">Add data</DropdownItem>
</DropdownMenu>
Expand Down
37 changes: 13 additions & 24 deletions frontend/src/views/datamanager/DataDetailConflict.vue
Original file line number Diff line number Diff line change
@@ -1,28 +1,17 @@
<template>
<div v-if="information && information.length">
<Row v-for="(value, index) in information" :key="index" style="padding-top:10px;word-break:break-all">
<Col span="2" offset="1">
<p>NO.{{index + 1}}</p>
<p>{{value.data.name}}</p>
</Col>
<Col span="20" offset="1">
<Row>
<Col span="7">
<b>Name</b>
</Col>
<Col span="16" offset="1">
<b>Path</b>
</Col>
</Row>
<Row v-for="item in value.conflict_data" :key="item.id" style="padding-bottom:10px">
<Col span="7">
<span>{{item.name}}</span>
</Col>
<Col span="16" offset="1">
<span>{{item.abs_parent_path}}</span>
</Col>
</Row>
</Col>
<div v-if="information && information.length" style="margin:0px 5px 10px 10px">
<Row v-for="(value, index) in information" :key="index" style="margin-top:10px;word-break:break-all;border:1px solid #ddd;">
<Row style="background-color:#f8f8f9;padding:5px 0px 5px 0px">
<Col span="18">
<b style="padding:0px 5px 0px 10px">{{index + 1}}. {{value.data.name}}</b>
</Col>
<Col span="5" offset="1" align="right">
<p style="padding:0px 10px 0px 5px"><b>{{value.conflict_data.length}}</b> conflicts</p>
</Col>
</Row>
<Row v-for="item in value.conflict_data" :key="item.id" style="padding:5px 0px 5px 0px">
<p style="padding:0px 10px 0px 30px"><b>Path</b>: {{item.abs_parent_path}}</p>
</Row>
</Row>
</div>
<div v-else class="data-detail-empty">
Expand Down
23 changes: 13 additions & 10 deletions frontend/src/views/datamanager/DataDetailFolder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,22 @@
</tab-pane>
<tab-pane label="Conflict" name="conflict">
<div class="data-detail">
<Row style="padding-top:10px">
<Col span="9" offset="1" >
Result of data <b>{{nodeInfo.name}}</b>
<Row type="flex" justify="end" style="padding-top:10px">
<Col span="18" style="padding:0px 5px 0px 10px">
<b v-if="conflictInfo">
<Icon type="md-information-circle" />
Group {{conflictCheckNode.name}} has {{conflictInfo.length}} conflicts
</b>
</Col>
<Col span="11" align="right">
<Col span="6" align="right" style="padding:0px 5px 0px 5px">
<Button type="primary" size="small" :loading="isLoadConflictInfo" @click="getConflictInfo" style="margin-right:5px">
<span v-if="isLoadConflictInfo">Loading</span>
<span v-else>Start check</span>
</Button>
<Button size="small" :disabled="isLoadConflictInfo" @click="deleteConflictInfo">
<span>Clear</span>
</Button>
</Col>
<Col span="3" align="right">
<Button type="primary" size="small" :loading="isLoadConflictInfo" @click="getConflictInfo">
<span v-if="isLoadConflictInfo">Loading...</span>
<span v-else>Start checking</span>
</Button>
</Col>
</Row>
<DataDetailConflict :information="conflictInfo" />
</div>
Expand All @@ -42,6 +43,7 @@ export default {
return {
currentTab: "information",
isLoadConflictInfo: false,
conflictCheckNode: {},
unshowInfoKey: ['children']
}
},
Expand Down Expand Up @@ -70,6 +72,7 @@ export default {
},
methods: {
getConflictInfo() {
this.conflictCheckNode = this.nodeInfo
this.isLoadConflictInfo = true
this.$store.commit('clearConflictInfo')
this.$store.dispatch('loadConflict', this.nodeInfo)
Expand Down