pgreco / rpms / ipa

Forked from forks/areguera/rpms/ipa 4 years ago
Clone

Blame SOURCES/1010-WebUI-add-API-browser-is-experimental-warning.patch

590d18
From 18b0b887439376c3788a97954982a17763450bfb Mon Sep 17 00:00:00 2001
590d18
From: Martin Basti <mbasti@redhat.com>
590d18
Date: Tue, 22 Sep 2015 14:01:43 +0200
590d18
Subject: [PATCH] WebUI: add API browser is experimental 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
 
590d18
+    _render_experimental_warning: function() {
590d18
+        var el = $('
', {
590d18
+            'class': 'alert alert-warning',
590d18
+            'style': 'margin-top: 20px; display: inline-block;',
590d18
+            text: "Please be aware that the API may change and the API browser is an experimental feature."
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();
590d18
+            // show warning that API and API browser are experimental
590d18
+            this.details_el.append(this._render_experimental_warning())
590d18
             this.details_el.append(widget.el);
590d18
         }
590d18
 
590d18
-- 
590d18
2.4.3
590d18