Qi Zhao | 7e52449 | 2017-03-02 15:05:45 -0800 | [diff] [blame^] | 1 | import QtQuick 2.2 |
2 | import QtQuick.Window 2.1 | ||||
3 | import QtQuick.Controls 1.1 | ||||
4 | import QtQuick.Layouts 1.0 | ||||
5 | |||||
6 | ApplicationWindow { | ||||
7 | visible: false | ||||
8 | id: window | ||||
9 | title: "NFD Status" | ||||
10 | minimumWidth: 700 | ||||
11 | minimumHeight: 400 | ||||
12 | |||||
13 | TabView { | ||||
14 | anchors.fill: parent | ||||
15 | anchors.topMargin: 20 | ||||
16 | anchors.bottomMargin: 20 | ||||
17 | anchors.leftMargin: 20 | ||||
18 | anchors.rightMargin: 20 | ||||
19 | |||||
20 | Tab { | ||||
21 | title: "Forwarder" | ||||
22 | TableView { | ||||
23 | anchors.fill: parent | ||||
24 | anchors.topMargin: 20 | ||||
25 | anchors.bottomMargin: 20 | ||||
26 | anchors.leftMargin: 20 | ||||
27 | anchors.rightMargin: 20 | ||||
28 | model: forwarderModel | ||||
29 | TableViewColumn{ | ||||
30 | role: "type" | ||||
31 | title: "Type" | ||||
32 | width: 200 | ||||
33 | } | ||||
34 | TableViewColumn{ | ||||
35 | role: "value" | ||||
36 | title: "Value" | ||||
37 | width: 300 | ||||
38 | } | ||||
39 | } | ||||
40 | } | ||||
41 | Tab { | ||||
42 | title: "FIB" | ||||
43 | TableView { | ||||
44 | anchors.fill: parent | ||||
45 | anchors.topMargin: 20 | ||||
46 | anchors.bottomMargin: 20 | ||||
47 | anchors.leftMargin: 20 | ||||
48 | anchors.rightMargin: 20 | ||||
49 | model: fibModel | ||||
50 | TableViewColumn{ | ||||
51 | role: "prefix" | ||||
52 | title: "NDN prefix" | ||||
53 | width: 300 | ||||
54 | } | ||||
55 | TableViewColumn{ | ||||
56 | role: "faceId" | ||||
57 | title: "Face ID" | ||||
58 | width: 100 | ||||
59 | } | ||||
60 | TableViewColumn{ | ||||
61 | role: "cost" | ||||
62 | title: "Cost" | ||||
63 | width: 100 | ||||
64 | } | ||||
65 | } | ||||
66 | } | ||||
67 | Tab { | ||||
68 | title: "RIB" | ||||
69 | TableView { | ||||
70 | anchors.fill: parent | ||||
71 | anchors.topMargin: 20 | ||||
72 | anchors.bottomMargin: 20 | ||||
73 | anchors.leftMargin: 20 | ||||
74 | anchors.rightMargin: 20 | ||||
75 | model: ribModel | ||||
76 | TableViewColumn{ | ||||
77 | role: "prefix" | ||||
78 | title: "NDN prefix" | ||||
79 | width: 200 | ||||
80 | } | ||||
81 | TableViewColumn{ | ||||
82 | role: "faceId" | ||||
83 | title: "Face ID" | ||||
84 | width: 65 | ||||
85 | } | ||||
86 | TableViewColumn{ | ||||
87 | role: "origin" | ||||
88 | title: "Origin" | ||||
89 | width: 50 | ||||
90 | } | ||||
91 | TableViewColumn{ | ||||
92 | role: "cost" | ||||
93 | title: "Cost" | ||||
94 | width: 50 | ||||
95 | } | ||||
96 | TableViewColumn{ | ||||
97 | role: "childinherit" | ||||
98 | title: "ChildInherit" | ||||
99 | width: 90 | ||||
100 | } | ||||
101 | TableViewColumn{ | ||||
102 | role: "ribcapture" | ||||
103 | title: "RibCapture" | ||||
104 | width: 90 | ||||
105 | } | ||||
106 | TableViewColumn{ | ||||
107 | role: "expiresin" | ||||
108 | title: "Expires in" | ||||
109 | width: 90 | ||||
110 | } | ||||
111 | } | ||||
112 | } | ||||
113 | } | ||||
114 | Connections { | ||||
115 | target: statusViewer; | ||||
116 | onShowStatus: { | ||||
117 | window.show() | ||||
118 | window.raise() | ||||
119 | } | ||||
120 | } | ||||
121 | } |