[racktables-users] Re: Simple HTML interface for API-based calls?

  • From: Alexey Andriyanov <alan@xxxxxxxxxx>
  • To: racktables-users@xxxxxxxxxxxxx
  • Date: Sat, 17 Mar 2012 11:25:19 +0400

Hello, Ilya!

Your task is quite simple. Make a subdir (e.g. 'embed') in your DocumentRoot direcory. Copy your RT index.php there. And change it like this:

--- index.php   (revision 5006)
+++ index.php   (working copy)
@@ -43,7 +43,13 @@
                // empties color message buffer).
                $contents = ob_get_contents();
                ob_clean();
-               renderInterfaceHTML ($pageno, $tabno, $contents);
+?><html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
+<head><title><?php echo getTitle ($pageno); ?></title>
+<?php printPageHeaders(); ?>
+</head>
+<body><?php echo $contents; ?></body>
+</html>
+<?php
                break;
        case 'chrome' == $_REQUEST['module']:
                require_once 'inc/init.php';

After that you'll be able to use 'embedded' copy by typing in this address: http://your-rt.domain/embed/


16.03.2012 11:39, Ilya Evseev пишет:
    Hi, RT folks!
Is it possible to get minimal UI without navigation bar, tabbed UI,
bells and whistles?
It would be very useful for two purposes:
1) embedding RT forms into frontend of high-level apps (billing etc.),
2) doing API-to-API calls from high-level app to RT frontend,
with reducing of generated and transferred data, and simplifying parsing.

It seems that the only change needed for that
is commenting of showPathAndSearch() and showTabs()
in renderInterfaceHTML().



--
Best regards,
Alexey

Other related posts: