1001 B · text History 7a88816
import QtQuick
import QtQuick.Layouts
import org.kde.plasma.components as PlasmaComponents3
import org.kde.kirigami as Kirigami

// Anything this widget doesn't draw natively: say what it is and offer
// Grafana's own rendering in the browser.
ColumnLayout {
    id: unsupported

    property var frame: null

    spacing: Kirigami.Units.smallSpacing

    Item { Layout.fillHeight: true }

    PlasmaComponents3.Label {
        Layout.fillWidth: true
        horizontalAlignment: Text.AlignHCenter
        wrapMode: Text.WordWrap
        opacity: 0.6
        text: unsupported.frame ? i18n("“%1” panels aren't drawn here", unsupported.frame.panel.type) : ""
    }

    PlasmaComponents3.Button {
        Layout.alignment: Qt.AlignHCenter
        icon.name: "internet-web-browser"
        text: i18n("View in Grafana")
        onClicked: Qt.openUrlExternally(unsupported.frame.store.api.dashboardUrl(unsupported.frame.uid, unsupported.frame.panel.id))
    }

    Item { Layout.fillHeight: true }
}