diff --git a/application/classes/controller/welcome.php b/application/classes/controller/welcome.php index 65396ae..4e55cca 100644 --- a/application/classes/controller/welcome.php +++ b/application/classes/controller/welcome.php @@ -11,7 +11,15 @@ * @license http://phptsmadmin.sf.net/license.html */ class Controller_Welcome extends Controller_TemplateDefault { + protected $auth_required = FALSE; + public function action_index() { + if (! Kohana::config('config.client')) + Request::current()->redirect('guide/pta'); + + if (! Auth::instance()->logged_in()) + Request::current()->redirect('login'); + Block::add(array( 'title'=>sprintf('%s: %s (%s)',_('Server'),TSM::name(),TSM::version()), 'body'=>'hello, world!', diff --git a/application/classes/model/actlog.php b/application/classes/model/actlog.php new file mode 100644 index 0000000..9c2af9a --- /dev/null +++ b/application/classes/model/actlog.php @@ -0,0 +1,19 @@ +'ASC', + ); +} +?> diff --git a/application/config/userguide.php b/application/config/userguide.php new file mode 100644 index 0000000..f5c3179 --- /dev/null +++ b/application/config/userguide.php @@ -0,0 +1,38 @@ + array( + + // This should be the path to this modules userguide pages, without the 'guide/'. Ex: '/guide/modulename/' would be 'modulename' + 'pta' => array( + + // Whether this modules userguide pages should be shown + 'enabled' => TRUE, + + // The name that should show up on the userguide index page + 'name' => 'PTA', + + // A short description of this module, shown on the index page + 'description' => 'A TSM Operational Management Interface.', + + // Copyright message, shown in the footer for this module + 'copyright' => '© 2008–2011 phpTSMadmin Development Team', + ), + 'cache' => array( + 'enabled' => FALSE, + ), + 'database' => array( + 'enabled' => FALSE, + ), + 'kohana' => array( + 'enabled' => FALSE, + ), + 'orm' => array( + 'enabled' => FALSE, + ), + 'userguide' => array( + 'enabled' => FALSE, + ), + ) +); diff --git a/application/guide/pta/index.md b/application/guide/pta/index.md new file mode 100644 index 0000000..62bd210 --- /dev/null +++ b/application/guide/pta/index.md @@ -0,0 +1,16 @@ +# About phpTSMadmin (PTA) + +phpTSMadmin is an operational admin interface to help with managing a Tivoli Storage Manager (TSM) server. +This web interface is not designed to replace that interface that you use to manage TSM, but rather to help you understand your TSM environment, so that you can better manage your server(s). + +By default PTA uses TSM's command line interface (CLI) to communicate with the TSM server. While this provides a very simple way to get PTA up and running, it does have performance implications because each query to the TSM server results in a fork-exec to extra the data from TSM. As this is the only method to talk to a TSM v5.x server, it is your only option. For TSM v6.x users, it will be possible to query the DB2 database directly, which should be significantly better. Look out for an update with this feature. + +## Tools used to make PTA available. +phpTSMadmin uses some great open source tools, please make sure you provide feedback/enhancements to the authors of the components you use: + +* The Kohana Framework +* JpGraph +* PHP + +## Information on Development +This web interface has been developed on a CentOS 5.5 server, using PHP 5.3. It has also been tested against TSM v5.x and TSM v6.x servers. diff --git a/application/guide/pta/install.md b/application/guide/pta/install.md new file mode 100644 index 0000000..53b1ff5 --- /dev/null +++ b/application/guide/pta/install.md @@ -0,0 +1,51 @@ +# Installation Instructions + +## Requirements + The requirements below are those used by RedHat Enterprise Linux v5.6 system. It is quite + possible that other versions of these components, or other distributions of Linux will also + work as well. + + If you encounter any problems with other versions, then drop us an email with + the error messages, what you did and what you expected, and if we need to make some code changes + to get it to work, then we'll take a look. + + Minimum components and their version: + + * Apache 2.2.x + * PHP 5.3.x + * TSM Client 5.x (our tests were done on TSM 5.5.x and TSM 6.2.x clients/servers). + +## Installation +These steps assume that you have installed, configured and running: + + * Linux server, + * Apache installed, configured and running, + * PHP installed, configured if necessary and running with apache, + * TSM client installed, configured and working. + +1. Download the latest version. + You can download phpTSMadmin from sourceforge. http://phpTSMadmin.sf.net + +1. Unpack the tar files in an appropriate directory. + cd /var/www/phpTSMadmin (or any other directory that you choose) + tar xzf phpTSMadmin-XXXX.tgz + +1. Configure your webserver. + Find the sample apache config file in the contrib directory. Place that in + your /etc/httpd/conf.d directory. + + Edit the sample apache config file as appropriate and restart your web server. + + Also make sure that in your php.ini configuration file, you have set "memory_limit" to + at leat 16M. If this is set too low, then your grantt charts will fail to be created + and your apache error log will have "Allowed memory size of X bytes exhausted" error + messages. + +1. Copy config.php.example in the application/config directory to application/config/config.php and edit to + suite your environment. + +1. Then, point your browser to your phpTSMadmin URL. + +For help drop me an email phptsmadmin-devel@lists.sourceforge.net. +## Information on Development +This web interface has been developed on a CentOS 5.5 server, using PHP 5.3. It has also been tested against TSM v5.x and TSM v6.x servers. diff --git a/application/guide/pta/menu.md b/application/guide/pta/menu.md new file mode 100644 index 0000000..22f16f4 --- /dev/null +++ b/application/guide/pta/menu.md @@ -0,0 +1,2 @@ +## [PTA]() +- [Installation](install) diff --git a/application/media/guide/css/kodoc.css b/application/media/guide/css/kodoc.css new file mode 100644 index 0000000..8408c95 --- /dev/null +++ b/application/media/guide/css/kodoc.css @@ -0,0 +1,142 @@ +/* @import url('api.css'); */ + +html { background: #FFFFFF; font-size: 70%; } +body { margin: 0; } +ol ol, ol ul, ul ul, ul ol { margin-bottom: 0; } +a img { border: 0; } + +h1 small, +h2 small, +h3 small, +h4 small { font-weight: normal; font-size: 0.7em; } +h5 small, +h6 small { font-weight: normal; font-size: 0.8em; } + +dl dd { margin-left: 0; } + +code { + color:#6BAA3D; + font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; +} + +pre { + background:#FFFFFF; + border-radius:10px; + padding:1.5em; + font-size:0.9em; + margin-top:1.5em; + margin-bottom:1.5em; + overflow:auto; +} + +.highlighted div.line { + font-size:1em; + line-height:1.3 !important; +} + +table { + background:#eee; + border-left: 1px solid #CCC; + border-top: 1px solid #CCC; + margin-bottom:1.5em; + width: 100%; +} + +table td, table th { + padding:0.4em 0.8em; + line-height:1.4286; + border-right: 1px solid #CCC; + border-bottom: 1px solid #CCC; +} + +table th { + background: #ddd; +} + +table tr:nth-child(even) { + background: #fff; +} + +.caps { text-transform: uppercase; font-size: 0.8em; font-weight: normal; } +.status { text-transform: lowercase; font-variant: small-caps; font-weight: bold; color: #911; } +.container .colborder { border-color: #d3d8bc; } + +.note { + padding: 1.5em; + padding-left: 5em; + background: #e8efcf url('../img/lightbulb_48.png') no-repeat 1em center; + border-radius: 0.6em; + overflow: auto; +} + +h1 a.permalink, +h2 a.permalink, +h3 a.permalink, +h4 a.permalink, +h5 a.permalink, +h6 a.permalink { + font-size: 0.6em; + line-height: 100%; + vertical-align: middle; + margin-left: 1em; + padding: 0; + font-weight: normal; + display: none; + position: inherit; +} + +h1:hover a.permalink, +h2:hover a.permalink, +h3:hover a.permalink, +h4:hover a.permalink, +h5:hover a.permalink, +h6:hover a.permalink { + display: inline; +} + + +#header, +#content, +#footer { float: left; clear: both; width: 100%; } + +#header { padding: 20px 0 2em; background: #FAFAFC; } + #logo { display: block; float: left; } + #menu { float: right; margin-top: 12px; background: #050505; -moz-border-radius: 5px; -webkit-border-radius: 5px; } + #menu ul { float: left; margin: 0; padding: 0 0.5em 0 0; } + #menu li { display: block; float: left; margin: 0; padding: 0; } + #menu li.first { padding-left: 0.5em; } + #menu li a { display: block; height: 32px; line-height: 32px; padding: 0 0.8em; border-right: solid 1px #050505; border-left: solid 1px #050505; letter-spacing: 0.05em; text-decoration: none; text-transform: uppercase; color: #FCFCFE; font-size: 90%; } + #menu li.first a { border-left: 0; } + #menu li.last a { border-right: 0; } + #menu li a:hover { background: #353535; color: #FCFCFE; text-shadow: #FFFFFF 0 0 1px; } + +#content { background: #FCFCFE; } + #content .wrapper { min-height: 390px; padding: 1em 0; } + #content div.page-toc { float: right; margin: 1em; margin-top: 0; padding: 1em; background: #fff; border: solid 0.1em #e8efcf; border-radius: 0.6em; } + #content p.intro { padding: 1em 20px; padding-left: 20px; margin: 0 -20px; font-size: 1.2em; } + #content a { color: #004352; } + #content a:hover { color: #00758f; } + #content a:active { text-decoration: none; } + +#breadcrumb { margin: 0 0 1em; padding: 0 0 0.5em; list-style: none; border-bottom: solid 1px #e8efcf; } + #breadcrumb li { display: inline-block; margin: 0; padding: 0 0.4em 0 0; text-transform: uppercase; font-size: 11px; } + #breadcrumb li:before { content: '»'; padding-right: 0.4em; } + #breadcrumb li a { color: #999; text-decoration: none; } + +#topics { } + #topics ul, + #topics ol { list-style-type:none; margin: 0; padding: 0;} + #topics ul li, + #topics ol li { margin:0; padding: 0; margin-left: 1em; } + #topics ul li a.current, + #topics ol li a.current { font-weight: bold; } + #topics span, + #topics a { display: block; padding: 0; margin: 0; } + #topics span { cursor: pointer; } + #topics span.toggle { display: block; float: left; width: 1em; padding-right: 0.4em; margin-left: -1.4em; text-align: center; } + + #topics li span { cursor:pointer; } + +#footer { padding: 1em 0; background: #FAFAFC; color: #050505; text-shadow: #FFFFFF 0.1em 0.1em 1px; font-size: 0.9em; } + #footer a { color: #809397; } + #footer div.last { text-align: right; } diff --git a/application/media/guide/img/logo-small.png b/application/media/guide/img/logo-small.png new file mode 100644 index 0000000..4a75581 Binary files /dev/null and b/application/media/guide/img/logo-small.png differ diff --git a/application/views/userguide/template.php b/application/views/userguide/template.php new file mode 100644 index 0000000..cfd4a19 --- /dev/null +++ b/application/views/userguide/template.php @@ -0,0 +1,108 @@ + + + + + +<?php echo $title ?> | Kohana <?php echo __('User Guide'); ?> + + $media) echo HTML::style($style, array('media' => $media), NULL, TRUE), "\n" ?> + + + + + + + + + +
+
+
+
+ +
+
+
+ +
+
+
+ + + +
+ + + Documentation comments powered by Disqus + +
+
+
+
+ + + + + + + +