diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-07-22 01:39:09 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-07-22 01:39:09 +0200 |
commit | 26e02b898d3f4e63c942d2742cb920aec9e6489c (patch) | |
tree | cd69d3caf4cb71b7c0310691ffe735cb874a62e9 /components | |
parent | aba499f81e0e260c6bf6410e28203fa0b05264db (diff) | |
download | kube-26e02b898d3f4e63c942d2742cb920aec9e6489c.tar.gz kube-26e02b898d3f4e63c942d2742cb920aec9e6489c.zip |
Display corresponding account information with log entry
Diffstat (limited to 'components')
-rw-r--r-- | components/kube/contents/ui/LogView.qml | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/components/kube/contents/ui/LogView.qml b/components/kube/contents/ui/LogView.qml index f3297ac6..0d01ed6f 100644 --- a/components/kube/contents/ui/LogView.qml +++ b/components/kube/contents/ui/LogView.qml | |||
@@ -50,9 +50,7 @@ Controls.SplitView { | |||
50 | } | 50 | } |
51 | 51 | ||
52 | onCurrentItemChanged: { | 52 | onCurrentItemChanged: { |
53 | if (details.resourceId) { | 53 | details.resourceId = currentItem.currentData.resource |
54 | details.resourceId = currentItem.currentData.resource | ||
55 | } | ||
56 | details.message = currentItem.currentData.message | 54 | details.message = currentItem.currentData.message |
57 | details.timestamp = currentItem.currentData.timestamp | 55 | details.timestamp = currentItem.currentData.timestamp |
58 | } | 56 | } |
@@ -123,9 +121,25 @@ Controls.SplitView { | |||
123 | id: details | 121 | id: details |
124 | property date timestamp | 122 | property date timestamp |
125 | property string message | 123 | property string message |
126 | //TODO get account name from resource id | ||
127 | property string resourceId: "" | 124 | property string resourceId: "" |
125 | property string accountId: "" | ||
126 | property string accountName: "" | ||
128 | color: Kube.Colors.backgroundColor | 127 | color: Kube.Colors.backgroundColor |
128 | Repeater { | ||
129 | model: Kube.AccountsModel { | ||
130 | id: accountsModel | ||
131 | resourceId: details.resourceId | ||
132 | } | ||
133 | Item { | ||
134 | property string account: model.accountId | ||
135 | property string accountName: model.name | ||
136 | onAccountChanged: { | ||
137 | details.accountId = account | ||
138 | details.accountName = name | ||
139 | } | ||
140 | visible: false | ||
141 | } | ||
142 | } | ||
129 | Rectangle { | 143 | Rectangle { |
130 | anchors { | 144 | anchors { |
131 | fill: parent | 145 | fill: parent |
@@ -136,6 +150,22 @@ Controls.SplitView { | |||
136 | anchors.fill: parent | 150 | anchors.fill: parent |
137 | columns: 2 | 151 | columns: 2 |
138 | Kube.Label { | 152 | Kube.Label { |
153 | text: qsTr("Account:") | ||
154 | visible: details.accountName | ||
155 | } | ||
156 | Kube.Label { | ||
157 | text: details.accountName | ||
158 | visible: details.accountName | ||
159 | } | ||
160 | Kube.Label { | ||
161 | text: qsTr("Account Id:") | ||
162 | visible: details.accountId | ||
163 | } | ||
164 | Kube.Label { | ||
165 | text: details.accountId | ||
166 | visible: details.accountId | ||
167 | } | ||
168 | Kube.Label { | ||
139 | text: qsTr("Resource Id:") | 169 | text: qsTr("Resource Id:") |
140 | visible: details.resourceId | 170 | visible: details.resourceId |
141 | } | 171 | } |