mirror of
https://github.com/UnickSoft/graphonline.git
synced 2025-07-03 08:15:38 +00:00
Added test cgi page
This commit is contained in:
parent
1f4a8a258a
commit
0f608b4af1
@ -45,7 +45,8 @@
|
||||
array('link' => SiteRoot('admin/page_editor_add'), 'name' => 'Добавить', 'label' => 'Добавить новую страницу'),
|
||||
array('link' => SiteRoot('admin/page_saved_graph'), 'name' => 'Статистика', 'label' => 'Статистика сохранений'),
|
||||
array('link' => SiteRoot('admin/page_example_graph'), 'name' => 'Примеры', 'label' => 'Примеры графов'),
|
||||
array('link' => SiteRoot('admin/page_vote'), 'name' => 'Голосование', 'label' => 'Результаты голосования')
|
||||
array('link' => SiteRoot('admin/page_vote'), 'name' => 'Голосование', 'label' => 'Результаты голосования'),
|
||||
array('link' => SiteRoot('admin/page_test_graphcgi'), 'name' => 'Тестирование CGI', 'label' => 'Тестирования GraphCGI')
|
||||
)
|
||||
);
|
||||
|
||||
|
24
i/js/admin/page_test_graphcgi.js
Normal file
24
i/js/admin/page_test_graphcgi.js
Normal file
@ -0,0 +1,24 @@
|
||||
$(document).ready(function ()
|
||||
{
|
||||
document.getElementById('run_test').onclick = function ()
|
||||
{
|
||||
$('#response').text("start");
|
||||
|
||||
var xml = $('#graph').val();
|
||||
console.log(xml);
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/cgi-bin/" + $('#cginame').val() + "?" + $('#params').val(),
|
||||
data: xml,
|
||||
dataType: "text",
|
||||
})
|
||||
.done(function( msg )
|
||||
{
|
||||
console.log(msg);
|
||||
$('#response').text(msg);
|
||||
});
|
||||
|
||||
return true;
|
||||
}
|
||||
});
|
3
src/admin/page_test_graphcgi.php
Normal file
3
src/admin/page_test_graphcgi.php
Normal file
@ -0,0 +1,3 @@
|
||||
<?php
|
||||
|
||||
?>
|
45
tpl/admin/page_test_graphcgi.php
Normal file
45
tpl/admin/page_test_graphcgi.php
Normal file
@ -0,0 +1,45 @@
|
||||
|
||||
<?php IncludeCom('dev/bootstrap3')?>
|
||||
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="<?= Root('i/css/home.css')?>" />
|
||||
<link rel="stylesheet" type="text/css" href="<?= Root('i/css/jquery-ui.theme.css')?>" />
|
||||
<link rel="stylesheet" type="text/css" href="<?= Root('i/css/jquery-ui.css')?>" />
|
||||
<!--
|
||||
<link rel="stylesheet" type="text/css" href="<?= Root('i/css/jquery-ui.structure.css')?>" />
|
||||
-->
|
||||
<link rel="stylesheet" type="text/css" href="<?= Root('i/css/jquery.feedback_me.css')?>" />
|
||||
<script src="<?= Root('i/js/admin/page_test_graphcgi.js')?>"></script>
|
||||
|
||||
</head>
|
||||
|
||||
<h1>Тестирование GraphCGI</h1>
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<label for="inputName" class="col-lg-2 control-label">CGI name</label>
|
||||
<input type="text" autocomplete="on" name="cginame" id="cginame" value="GraphCGI.exe">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="inputName" class="col-lg-2 control-label">Get parametrs</label>
|
||||
<input type="text" autocomplete="on" name="params" id="params" value="dsp=cgiInput&start=1&finish=3&report=xml" size="50" >
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="inputName" class="col-lg-2 control-label">Graph</label>
|
||||
<input type="text" autocomplete="on" name="graph" id="graph" value="<?= Post("graph")?>" size="100">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="col-lg-offset-2 col-lg-6">
|
||||
<button type="submit" class="btn btn-primary" id="run_test">Test</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div id="response">
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user