Committed by
Gerrit Code Review
GUI - Temporary coding to provide access to detail pane, with local test data.
Change not to be merged, but provided for Paul to check out the detail pane for theming. Change-Id: I69a1c664ef5e019d3be48a965c335df8a2da8dc1
Showing
1 changed file
with
40 additions
and
6 deletions
... | @@ -1631,8 +1631,6 @@ | ... | @@ -1631,8 +1631,6 @@ |
1631 | mask.style('display',b ? 'block' : 'none'); | 1631 | mask.style('display',b ? 'block' : 'none'); |
1632 | } | 1632 | } |
1633 | 1633 | ||
1634 | - // TODO: use cache of pending messages (key = sid) to reconcile responses | ||
1635 | - | ||
1636 | function sendMessage(evType, payload) { | 1634 | function sendMessage(evType, payload) { |
1637 | var toSend = { | 1635 | var toSend = { |
1638 | event: evType, | 1636 | event: evType, |
... | @@ -1642,6 +1640,11 @@ | ... | @@ -1642,6 +1640,11 @@ |
1642 | asText = JSON.stringify(toSend); | 1640 | asText = JSON.stringify(toSend); |
1643 | wsTraceTx(asText); | 1641 | wsTraceTx(asText); |
1644 | webSock.send(asText); | 1642 | webSock.send(asText); |
1643 | + | ||
1644 | + // Temporary measure for debugging UI behavior ... | ||
1645 | + if (!config.useLiveData) { | ||
1646 | + handleTestSend(toSend); | ||
1647 | + } | ||
1645 | } | 1648 | } |
1646 | 1649 | ||
1647 | function wsTraceTx(msg) { | 1650 | function wsTraceTx(msg) { |
... | @@ -1652,12 +1655,43 @@ | ... | @@ -1652,12 +1655,43 @@ |
1652 | } | 1655 | } |
1653 | function wsTrace(rxtx, msg) { | 1656 | function wsTrace(rxtx, msg) { |
1654 | console.log('[' + rxtx + '] ' + msg); | 1657 | console.log('[' + rxtx + '] ' + msg); |
1655 | - // TODO: integrate with trace view | ||
1656 | - //if (trace) { | ||
1657 | - // trace.output(rxtx, msg); | ||
1658 | - //} | ||
1659 | } | 1658 | } |
1660 | 1659 | ||
1660 | + // NOTE: Temporary hardcoded example for showing detail pane | ||
1661 | + // while we fine- | ||
1662 | + // Probably should not merge this change... | ||
1663 | + function handleTestSend(msg) { | ||
1664 | + if (msg.event === 'requestDetails') { | ||
1665 | + showDetails({ | ||
1666 | + event: 'showDetails', | ||
1667 | + sid: 1001, | ||
1668 | + payload: { | ||
1669 | + "id": "of:0000ffffffffff09", | ||
1670 | + "type": "roadm", | ||
1671 | + "propOrder": [ | ||
1672 | + "Name", | ||
1673 | + "Vendor", | ||
1674 | + "H/W Version", | ||
1675 | + "S/W Version", | ||
1676 | + "-", | ||
1677 | + "Latitude", | ||
1678 | + "Longitude", | ||
1679 | + "Ports" | ||
1680 | + ], | ||
1681 | + "props": { | ||
1682 | + "Name": null, | ||
1683 | + "Vendor": "Linc", | ||
1684 | + "H/W Version": "OE", | ||
1685 | + "S/W Version": "?", | ||
1686 | + "-": "", | ||
1687 | + "Latitude": "40.8", | ||
1688 | + "Longitude": "73.1", | ||
1689 | + "Ports": "2" | ||
1690 | + } | ||
1691 | + } | ||
1692 | + }); | ||
1693 | + } | ||
1694 | + } | ||
1661 | 1695 | ||
1662 | // ============================== | 1696 | // ============================== |
1663 | // Selection stuff | 1697 | // Selection stuff | ... | ... |
-
Please register or login to post a comment