Rechercher

Ce contenu n'est pas disponible dans la langue sélectionnée.

C.4. Example User Interface Plug-in Deployment

download PDF

Follow these instructions to create a user interface plug-in that runs a Hello World! program when you sign in to the Red Hat Virtualization Manager Administration Portal.

Deploying a Hello World! Plug-in

  1. Create a plug-in descriptor by creating the following file in the Manager at /usr/share/ovirt-engine/ui-plugins/helloWorld.json:

    {
        "name": "HelloWorld",
        "url": "/ovirt-engine/webadmin/plugin/HelloWorld/start.html",
        "resourcePath": "hello-files"
    }
  2. Create the plug-in host page by creating the following file in the Manager at /usr/share/ovirt-engine/ui-plugins/hello-files/start.html:

    <!DOCTYPE html><html><head>
    <script>
        var api = parent.pluginApi('HelloWorld');
        api.register({
    	UiInit: function() { window.alert('Hello world'); }
        });
        api.ready();
    </script>
    </head><body></body></html>

If you have successfully implemented the Hello World! plug-in, you will see this screen when you sign in to the Administration Portal:

Figure C.1. A Successful Implementation of the Hello World! Plug-in

Successful Implementation notice
Red Hat logoGithubRedditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez leBlog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

© 2024 Red Hat, Inc.