Ejemplo n.º 1
0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
*/
$_SERVER['SCRIPT_NAME'] !== "/controller.php" ? require_once __DIR__ . "/classes/Requires.php" : (Links::$pretty = true);
Functions::check_required_parameters(array($_GET['param1']));
//Get recipe
$result = MySQLQueries::get_recipe($_GET['param1']);
$recipe = MySQLConnection::fetch_object($result);
$recipe = Functions::format_dates($recipe);
$interpreters = array("shell", "bash", "perl", "python", "node.js");
Header::set_title("Commando.io - Edit Recipe");
Header::render(array("chosen", "codemirror"));
Navigation::render("recipes");
?>
 
    <div class="container">
           
      <div class="row">
      	<div class="span12">
      		<h1 class="header" style="float: left;"><?php 
echo $recipe->name;
?>
</h1> 
     	 
     		<div style="float: right;">
     	 		<a href="<?php 
echo Links::render("view-recipe", array($recipe->id));
Ejemplo n.º 2
0
$result = MySQLQueries::get_servers();
while ($row = MySQLConnection::fetch_object($result)) {
    if (isset($servers[$row->group_name])) {
        array_push($servers[$row->group_name], $row);
    } else {
        $servers[$row->group_name] = array($row);
    }
}
//Get groups
$groups = array();
$result = MySQLQueries::get_groups();
while ($row = MySQLConnection::fetch_object($result)) {
    $groups[] = $row;
}
Header::set_title("Commando.io - Servers");
Header::render(array("chosen", "code-pretty", "tagsinput"));
Navigation::render("servers");
?>
	<!-- add server modal -->
	<div class="modal fade" id="add-server" style="display: none;">
	  <div class="modal-header">
	    <a class="close" data-dismiss="modal">×</a>
	    <h3>Add Server</h3>
	  </div>
	  <div class="modal-body">
	    <form id="form-add-server" class="well form-horizontal" method="post" action="/actions/add_server.php">
	    	<div class="control-group">
	        	<label class="control-label" for="add-server-label">Server Label</label>
	        	<div class="controls">
	          		<input type="text" class="input-large" id="add-server-label" name="label" placeholder="SERVER-NAME" maxlength="30" />
	          		<p class="help-block">A human readable label. Must be unique.</p>
Ejemplo n.º 3
0
Functions::check_required_parameters(array($_GET['param1']));
//Get execution history record
$execution_history = null;
MongoConnection::connect();
MongoConnection::select_collection("executions");
$results = MongoConnection::find(array("_id" => new MongoId($_GET['param1'])));
MongoConnection::close();
foreach ($results as $result) {
    $result['executed'] = date(DATE_FORMAT, $result['executed']->sec + Functions::timezone_offset_in_seconds());
    $execution_history = $result;
}
if (empty($execution_history)) {
    Error::halt(404, 'not found', 'Execution history ID \'' . $_GET['param1'] . '\' does not exist.');
}
Header::set_title("Commando.io - View Execution History");
Header::render(array("code-pretty"));
Navigation::render("execute");
?>
 
    <div class="container main-container">
           
      <div class="row">
      	<div class="span12">
      		<h1 class="header" style="float: left;"><?php 
echo $execution_history['executed'];
?>
</h1> 
     	 
     	 	<div style="float: right;">
     	 		 <a href="<?php 
echo Links::render("execution-history");
Ejemplo n.º 4
0
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
*/
$_SERVER['SCRIPT_NAME'] !== "/controller.php" ? require_once __DIR__ . "/classes/Requires.php" : (Links::$pretty = true);
$db_version = Functions::get_db_version();
Header::set_title("Commando.io");
Header::render();
Navigation::render();
?>

 	<?php 
if ($db_version !== Version::db) {
    ?>
		<div class="alert alert-error fade in" style="position: fixed; top: 0px; right: 0px; left: 0px; z-index: 99999;">
			<a class="close" data-dismiss="alert">&times;</a>
			<h4 style="line-height: 25px;">Warning! The MySQL schema version running is <u>out of date</u>. Please run <a href="<?php 
    echo Links::render("db-upgrade");
    ?>
">db-upgrade</a> to merge in the latest changes.</h4>
		</div>
	<?php 
}
Ejemplo n.º 5
0
# See the License for the specific language governing permissions and
# limitations under the License.
*/
$_SERVER['SCRIPT_NAME'] !== "/controller.php" ? require_once __DIR__ . "/classes/Requires.php" : (Links::$pretty = true);
//Get settings
$settings = null;
$result = MySQLQueries::get_settings();
$row = MySQLConnection::fetch_object($result);
if (isset($row->data)) {
    $row->data = json_decode($row->data);
}
$settings = $row;
$settings = Functions::format_dates($settings);
$interpreters = array("shell", "bash", "perl", "python", "node.js");
Header::set_title("Commando.io - Settings");
Header::render(array("chosen", "code-pretty"));
Navigation::render("settings");
?>
   
    <div class="container">
           
      <h1 class="header">Settings</h1> 
      
	  <div class="row">
    	<div class="span12">
    		<div class="well">
    			<?php 
if (isset($_GET['param1']) && $_GET['param1'] == "saved") {
    ?>
     
			      	<div class="alert alert-success" id="settings-saved-alert">
Ejemplo n.º 6
0
function admin_header()
{
    header('Content-Type: text/html; charset=' . (getConfig('rss.output.encoding') ? getConfig('rss.output.encoding') : DEFAULT_OUTPUT_ENCODING));
    echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n";
    echo "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\n";
    echo "<head>";
    $header = new Header(admin_title(), LOCATION_ADMIN, null, '', HDR_NONE | HDR_NO_CACHECONTROL | HDR_NO_OUPUTBUFFERING);
    $header->render();
    echo "</head>";
    echo "<body>\n";
    echo "" . "<div id=\"nav\" class=\"frame\">" . "<h1 id=\"top\">" . rss_main_title() . "</h1>";
    $nav = new Navigation();
    $nav->render();
    echo "</div>";
}
Ejemplo n.º 7
0
<?php

//This is the 404 controller
include './views/header.php';
include './views/footer.php';
include './views/404.php';
$header = new Header();
$footer = new Footer();
$view = new Unknown_View();
$header->render();
$view->render();
$footer->render();
Ejemplo n.º 8
0
}
if (empty($file)) {
    Error::halt(404, 'not found', 'File \'' . $_GET['param1'] . '\' does not exist.');
}
$data = null;
if (strpos($file['type'], 'text') !== false || $file['type'] === "application/json") {
    while (!feof($file['data'])) {
        $data .= fread($file['data'], 8192);
    }
}
$file['data'] = $data;
//Calculate Statistics
$file['lines'] = substr_count($file['data'], "\n") + 1;
$file['length'] = Functions::format_bytes($file['length']);
Header::set_title("Commando.io - View File");
Header::render(array("code-pretty", "codemirror"));
Navigation::render("files");
?>
 
    <div class="container main-container" data-id="<?php 
echo $_GET['param1'];
?>
">
           
      <div class="row">
      	<div class="span12">
      		<h1 class="header" style="float: left;"><?php 
echo $file['real_filename'];
?>
</h1>