summaryrefslogtreecommitdiffstats
path: root/views/log/qml/View.qml
diff options
context:
space:
mode:
Diffstat (limited to 'views/log/qml/View.qml')
-rw-r--r--views/log/qml/View.qml72
1 files changed, 50 insertions, 22 deletions
diff --git a/views/log/qml/View.qml b/views/log/qml/View.qml
index 0dbf3b5e..7e95e20f 100644
--- a/views/log/qml/View.qml
+++ b/views/log/qml/View.qml
@@ -46,14 +46,16 @@ Controls.SplitView {
46 root.pendingError = true 46 root.pendingError = true
47 } 47 }
48 48
49 console.log("Message: " + message.message) 49 var error = {
50 console.log("Type: " + message.type) 50 timestamp: new Date(),
51 console.log("SubType: " + message.subtype) 51 message: message.message,
52 console.log("Entities: " + message.entities) 52 details: message.details,
53 53 resource: message.resource,
54 var error = {timestamp: new Date(), message: message.message, details: message.details, resource: message.resource, entities: message.entities} 54 // TODO: if we passed entities as a list, it would get
55 55 // converted to a ListModel, in all likelihood because of
56 console.log("Error: " + JSON.stringify(error)) 56 // ListDelegate, which we should rewrite in C++
57 entities: {elements: message.entities}
58 }
57 59
58 if (logModel.count > 0) { 60 if (logModel.count > 0) {
59 var lastEntry = logModel.get(0) 61 var lastEntry = logModel.get(0)
@@ -88,7 +90,6 @@ Controls.SplitView {
88 90
89 onCurrentItemChanged: { 91 onCurrentItemChanged: {
90 var error = currentItem.currentData.errors.get(0) 92 var error = currentItem.currentData.errors.get(0)
91 console.log("Current error: " + JSON.stringify(error));
92 if (!!error.resource) { 93 if (!!error.resource) {
93 details.resourceId = error.resource 94 details.resourceId = error.resource
94 } 95 }
@@ -100,9 +101,6 @@ Controls.SplitView {
100 details.subtype = "" 101 details.subtype = ""
101 } 102 }
102 103
103 console.log("Setting resource to: " + error.resource)
104 console.log("Setting entities to: " + error.entities)
105
106 details.entities = error.entities 104 details.entities = error.entities
107 } 105 }
108 106
@@ -357,19 +355,49 @@ Controls.SplitView {
357 right: parent.right 355 right: parent.right
358 } 356 }
359 spacing: Kube.Units.largeSpacing 357 spacing: Kube.Units.largeSpacing
358
359 Kube.Heading {
360 id: heading
361 text: qsTr("Failed to send the message.")
362 color: Kube.Colors.warningColor
363 }
364
360 Column { 365 Column {
361 Kube.Heading { 366 spacing: Kube.Units.largeSpacing
362 id: heading 367
363 text: qsTr("Failed to send the message.") 368 Repeater {
364 color: Kube.Colors.warningColor 369 model: Kube.MailListModel {
365 } 370 entityId: entities.elements[0]
366 Kube.Label { 371 }
367 id: subHeadline 372 delegate: Column {
368 text: "Account: " + accountName + "\nMessage-Id: " + entities; 373 id: subHeadline
369 color: Kube.Colors.disabledTextColor 374
370 wrapMode: Text.Wrap 375 Kube.Label {
376 text: qsTr("Account") + ": " + accountName
377 color: Kube.Colors.disabledTextColor
378 wrapMode: Text.Wrap
379 }
380 Kube.Label {
381 text: qsTr("Subject") + ": " + model.subject
382 color: Kube.Colors.disabledTextColor
383 wrapMode: Text.Wrap
384 }
385 Kube.Label {
386 text: qsTr("To") + ": " + model.to
387 color: Kube.Colors.disabledTextColor
388 wrapMode: Text.Wrap
389 }
390 Kube.Label {
391 visible: !!model.cc
392 text: qsTr("Cc") + ": " + model.cc;
393 color: Kube.Colors.disabledTextColor
394 wrapMode: Text.Wrap
395 }
396
397 }
371 } 398 }
372 } 399 }
400
373 Kube.Button { 401 Kube.Button {
374 text: qsTr("Try again") 402 text: qsTr("Try again")
375 onClicked: { 403 onClicked: {