403b09
From 476cf3fda5d75c9f1acede6709fd693c4e6a4279 Mon Sep 17 00:00:00 2001
590d18
From: Martin Basti <mbasti@redhat.com>
590d18
Date: Tue, 22 Sep 2015 14:01:43 +0200
403b09
Subject: [PATCH] WebUI: add API browser is tech preview warning
590d18
590d18
---
590d18
 install/ui/src/freeipa/widgets/APIBrowserWidget.js | 11 +++++++++++
590d18
 1 file changed, 11 insertions(+)
590d18
590d18
diff --git a/install/ui/src/freeipa/widgets/APIBrowserWidget.js b/install/ui/src/freeipa/widgets/APIBrowserWidget.js
590d18
index 149a22fff4902a0f3ffb57d2b0e1aa904c973174..14876f463c843e21b87fe76a3677fc7549e00941 100644
590d18
--- a/install/ui/src/freeipa/widgets/APIBrowserWidget.js
590d18
+++ b/install/ui/src/freeipa/widgets/APIBrowserWidget.js
590d18
@@ -159,6 +159,15 @@ widgets.APIBrowserWidget = declare([Stateful, Evented], {
590d18
         }
590d18
     },
590d18
 
403b09
+    _render_techprev_warning: function() {
590d18
+        var el = $('
', {
590d18
+            'class': 'alert alert-warning',
590d18
+            'style': 'margin-top: 20px; display: inline-block;',
403b09
+            text: "Be aware that the IdM API Browser and the API itself are Technology Preview features and might therefore change."
590d18
+        }).append($('', {'class': 'fa fa-warning'}));
590d18
+        return el;
590d18
+    },
590d18
+
590d18
     /**
590d18
      * Search metadata for object of given type and name. Display it if found.
590d18
      * Display default view otherwise.
590d18
@@ -255,6 +264,8 @@ widgets.APIBrowserWidget = declare([Stateful, Evented], {
590d18
         if (!widget.el) widget.render();
590d18
         if (this.current_details_w !== widget) {
590d18
             this.details_el.empty();
403b09
+            // show warning that API and API browser are tech preview
403b09
+            this.details_el.append(this._render_techprev_warning())
590d18
             this.details_el.append(widget.el);
590d18
         }
590d18
 
590d18
-- 
403b09
2.8.2
590d18