Appli complètement fonctionnelle !
This commit is contained in:
parent
73f3b226d2
commit
eb9381f89c
4
ajax.php
4
ajax.php
@ -22,9 +22,9 @@ if (!empty($_POST['action'])) {
|
|||||||
echo ansi2html($session->exec('cd ' . $config['path'] . ' && ' . $gitstatus));
|
echo ansi2html($session->exec('cd ' . $config['path'] . ' && ' . $gitstatus));
|
||||||
} else if ($_POST['action'] == 'push') {
|
} else if ($_POST['action'] == 'push') {
|
||||||
$message = empty($_POST['message']) ? 'FTP' : $_POST['message'];
|
$message = empty($_POST['message']) ? 'FTP' : $_POST['message'];
|
||||||
//echo $session->exec('cd ' . $config['path'] . ' && git add -A && git commit -m "' . $message . '" && git push && ' . $gitstatus);
|
echo ansi2html($session->exec('cd ' . $config['path'] . ' && git add -A && git commit -m "' . $message . '" && git push && ' . $gitstatus));
|
||||||
} else if ($_POST['action'] == 'pull') {
|
} else if ($_POST['action'] == 'pull') {
|
||||||
//echo $session->exec('cd ' . $config['path'] . ' && git pull && ' . $gitstatus);
|
echo ansi2html($session->exec('cd ' . $config['path'] . ' && git pull && ' . $gitstatus));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
12
index.php
12
index.php
@ -35,10 +35,16 @@ global $servers;
|
|||||||
<section id="<?php echo $id; ?>">
|
<section id="<?php echo $id; ?>">
|
||||||
<h3><?php echo $param['title']; ?> <span class="label"></span></h3>
|
<h3><?php echo $param['title']; ?> <span class="label"></span></h3>
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button class="btn" onclick="callRequest('status', '<?php echo $id; ?>');"><i class="icon-refresh"></i> Status</button>
|
<button class="btn" onclick="callRequest('status', '<?php echo $id; ?>');">
|
||||||
<button class="btn" onclick="callRequest('pull', '<?php echo $id; ?>');"><i class="icon-arrow-down"></i> Pull</button>
|
<i class="icon-refresh"></i> Status
|
||||||
|
</button>
|
||||||
|
<button class="btn" onclick="callRequest('pull', '<?php echo $id; ?>');">
|
||||||
|
<i class="icon-arrow-down"></i> Pull
|
||||||
|
</button>
|
||||||
<div class="input-prepend">
|
<div class="input-prepend">
|
||||||
<button class="btn" type="button"><i class="icon-arrow-up"></i> Push</button>
|
<button class="btn" type="button" onclick="callRequest('push', '<?php echo $id; ?>', document.querySelector('#<?php echo $id; ?> input[name=message]').value);">
|
||||||
|
<i class="icon-arrow-up"></i> Push
|
||||||
|
</button>
|
||||||
<input type="text" name="message" placeholder="Commit message">
|
<input type="text" name="message" placeholder="Commit message">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user