-
-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ui): nodes table display issues (#780)
Fixes #766
- Loading branch information
1 parent
84550f2
commit f02d8b6
Showing
7 changed files
with
43 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,7 +70,6 @@ | |
/> | ||
|
||
<nodes-table | ||
:nodes="nodes" | ||
:node-actions="node_actions" | ||
:socket="socket" | ||
v-on="$listeners" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,57 @@ | ||
import draggable from 'vuedraggable' | ||
import { ManagedItems } from '@/modules/ManagedItems' | ||
import { Settings } from '@/modules/Settings' | ||
import ColumnFilter from '@/components/nodes-table/ColumnFilter.vue' | ||
import ExpandedNode from '@/components/nodes-table/ExpandedNode.vue' | ||
import { mapGetters } from 'vuex' | ||
|
||
export default { | ||
props: { | ||
nodeActions: Array, | ||
nodes: Array, | ||
socket: Object | ||
}, | ||
components: { | ||
draggable, | ||
ColumnFilter, | ||
ExpandedNode | ||
}, | ||
watch: {}, | ||
computed: { | ||
...mapGetters(['nodes']) | ||
}, | ||
data: function () { | ||
return { | ||
settings: new Settings(localStorage), | ||
managedNodes: new ManagedItems( | ||
this.nodes || [], | ||
{ | ||
id: { type: 'number', label: 'ID', groupable: false }, | ||
manufacturer: { type: 'string', label: 'Manufacturer' }, | ||
productDescription: { type: 'string', label: 'Product' }, | ||
productLabel: { type: 'string', label: 'Product code' }, | ||
name: { type: 'string', label: 'Name' }, | ||
loc: { type: 'string', label: 'Location' }, | ||
isSecure: { type: 'boolean', label: 'Secure' }, | ||
isBeaming: { type: 'boolean', label: 'Beaming' }, | ||
failed: { type: 'boolean', label: 'Failed' }, | ||
status: { type: 'string', label: 'Status' }, | ||
interviewStage: { type: 'string', label: 'Interview stage' }, | ||
lastActive: { type: 'date', label: 'Last Active', groupable: false } | ||
}, | ||
localStorage, | ||
'nodes_' | ||
), | ||
managedNodes: null, | ||
nodesProps: { | ||
id: { type: 'number', label: 'ID', groupable: false }, | ||
manufacturer: { type: 'string', label: 'Manufacturer' }, | ||
productDescription: { type: 'string', label: 'Product' }, | ||
productLabel: { type: 'string', label: 'Product code' }, | ||
name: { type: 'string', label: 'Name' }, | ||
loc: { type: 'string', label: 'Location' }, | ||
isSecure: { type: 'boolean', label: 'Secure' }, | ||
isBeaming: { type: 'boolean', label: 'Beaming' }, | ||
failed: { type: 'boolean', label: 'Failed' }, | ||
status: { type: 'string', label: 'Status' }, | ||
interviewStage: { type: 'string', label: 'Interview stage' }, | ||
lastActive: { type: 'date', label: 'Last Active', groupable: false } | ||
}, | ||
expanded: [], | ||
headersMenu: false | ||
} | ||
}, | ||
methods: { | ||
loadSetting (key, defaultVal) { | ||
return this.settings.load(key, defaultVal) | ||
}, | ||
storeSetting (key, val) { | ||
this.settings.store(key, val) | ||
}, | ||
toggleExpanded (item) { | ||
this.expanded = this.expanded.includes(item) | ||
? this.expanded.filter(i => i !== item) | ||
: [...this.expanded, item] | ||
} | ||
}, | ||
watch: {}, | ||
computed: {} | ||
mounted () { | ||
this.managedNodes = new ManagedItems( | ||
this.nodes, | ||
this.nodesProps, | ||
localStorage, | ||
'nodes_' | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters