pgreco / rpms / ipa

Forked from forks/areguera/rpms/ipa 4 years ago
Clone
Blob Blame History Raw
From 18b0b887439376c3788a97954982a17763450bfb Mon Sep 17 00:00:00 2001
From: Martin Basti <mbasti@redhat.com>
Date: Tue, 22 Sep 2015 14:01:43 +0200
Subject: [PATCH] WebUI: add API browser is experimental warning

---
 install/ui/src/freeipa/widgets/APIBrowserWidget.js | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/install/ui/src/freeipa/widgets/APIBrowserWidget.js b/install/ui/src/freeipa/widgets/APIBrowserWidget.js
index 149a22fff4902a0f3ffb57d2b0e1aa904c973174..14876f463c843e21b87fe76a3677fc7549e00941 100644
--- a/install/ui/src/freeipa/widgets/APIBrowserWidget.js
+++ b/install/ui/src/freeipa/widgets/APIBrowserWidget.js
@@ -159,6 +159,15 @@ widgets.APIBrowserWidget = declare([Stateful, Evented], {
         }
     },
 
+    _render_experimental_warning: function() {
+        var el = $('<div/>', {
+            'class': 'alert alert-warning',
+            'style': 'margin-top: 20px; display: inline-block;',
+            text: "Please be aware that the API may change and the API browser is an experimental feature."
+        }).append($('<span/>', {'class': 'fa fa-warning'}));
+        return el;
+    },
+
     /**
      * Search metadata for object of given type and name. Display it if found.
      * Display default view otherwise.
@@ -255,6 +264,8 @@ widgets.APIBrowserWidget = declare([Stateful, Evented], {
         if (!widget.el) widget.render();
         if (this.current_details_w !== widget) {
             this.details_el.empty();
+            // show warning that API and API browser are experimental
+            this.details_el.append(this._render_experimental_warning())
             this.details_el.append(widget.el);
         }
 
-- 
2.4.3