| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897 | 
							- <!DOCTYPE html>
 
- <html lang="en">
 
- <head>
 
-     <meta charset="UTF-8">
 
-     <title>Aisky-Sixth</title>
 
-     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
 
-     <!-- 新 Bootstrap4 核心 CSS 文件 -->
 
-     <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.1.0/css/bootstrap.min.css">
 
-     <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
 
-     <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
 
-     <!-- popper.min.js 用于弹窗、提示、下拉菜单 -->
 
-     <script src="https://cdn.bootcss.com/popper.js/1.12.5/umd/popper.min.js"></script>
 
-     <!-- 最新的 Bootstrap4 核心 JavaScript 文件 -->
 
-     <script src="https://cdn.bootcss.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
 
-     <!--可用來建立使用者小圖示-->
 
-     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
 
-     <script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.3.0/socket.io.dev.js"></script>
 
- <!--    <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/socket.io/1.3.6/socket.io.min.js"></script>-->
 
- <!--    <script src="https://cdn.socket.io/4.0.1/socket.io.min.js" integrity="sha384-LzhRnpGmQP+lOvWruF/lgkcqD+WDVt9fU3H4BWmwP5u5LTmkUGafMcpZKNObVMLU" crossorigin="anonymous"></script>-->
 
-     <style>
 
-         body {
 
- 	        margin:0;
 
-         }
 
-         .navbar-dark .navbar-nav .nav-link {
 
-             color: white;
 
-             cursor: pointer;
 
- 	        text-decoration:none;
 
-             width: 130px;
 
-             height: 46px;
 
-         }
 
-         .nav-top {
 
- 	        line-height:40px;
 
- 	        background-color: #C4C4C4;
 
-         }
 
-         .website_title{
 
-             font-family: Roboto;
 
-             font-style: normal;
 
-             font-weight: normal;
 
-             font-size: 30px;
 
-             color: #000000;
 
-         }
 
-         .navbar-nav > li{
 
- 	        float: none;
 
- 	        display: inline-block;
 
- 	        width: 110px;
 
-             margin: 0 auto;
 
-             text-align: center;
 
-         }
 
-         .navbar-nav > li a{
 
-             font-size: 20px;
 
-         }
 
-         .main-page {
 
-             margin-top: 150px;
 
-         }
 
-         .page-title {
 
-             font-family: Roboto;
 
-             font-style: normal;
 
-             font-weight: bold;
 
-             font-size: 36px;
 
-         }
 
-         .flex {
 
-             display: flex;
 
-             flex-direction: row;
 
-             flex-wrap: wrap;
 
-             justify-content: center;
 
-         }
 
-           .set-link {
 
-             display: inline-block;
 
-             width: 350px;
 
-             height: 100px;
 
-             line-height: 100px;
 
-             background: #008CBA;
 
-             border: 1px solid #CFCFCF;
 
-             box-sizing: border-box;
 
-             color: #FFFFFF;
 
-             border-radius: 10px;
 
-             font-size: 36px;
 
-         }
 
-         .fa{
 
-             display: inline-block;
 
-             font: normal normal normal 14px/1 FontAwesome;
 
-             font-size: inherit;
 
-             text-rendering: auto;
 
-             -webkit-font-smoothing: antialiased;
 
-         }
 
-         .fa-user-o:before{
 
-             content: "\f2c0";
 
-         }
 
-         button {
 
-             cursor: pointer;
 
-         }
 
-         @media(max-width:373px){
 
-             .card {
 
-                 margin-right: 0px;
 
-             }
 
-         }
 
-         @media(max-width:577px){
 
-         }
 
-         @media(min-width:576px){
 
-         }
 
-          @media(min-width:768px){
 
-             .navbar-nav > li {
 
-                  margin-left: 0px;
 
-             }
 
-             .navbar-nav .li-block {
 
-                 display:none;
 
-             }
 
-          }
 
-          @media(min-width:991px){
 
-             .navbar-nav > li {
 
-                  margin-left: 20px;
 
-             }
 
-             .navbar-nav .li-block {
 
-                 display:none;
 
-             }
 
-          }
 
-          @media(min-width:1200px){
 
-             .navbar-nav > li {
 
-                  margin-left: 35px;
 
-             }
 
-             .navbar-nav .li-block {
 
-                 display: inline-block;
 
-                 width: 100px;
 
-             }
 
-          }
 
-          @media(min-width:1400px){
 
-             .navbar-nav .li-block {
 
-                 display: inline-block;
 
-                 width: 200px;
 
-             }
 
-          }
 
-          @media(min-width:1689px) {
 
-             .navbar-nav > li {
 
-                  margin-left: 50px;
 
-             }
 
-             .navbar-nav .li-block {
 
-                 display: inline-block;
 
-                 width: 500px;
 
-             }
 
-          }
 
-     </style>
 
- 		<script>
 
-             // // 原本就註解
 
-             // //驗證token,如果不符合或過期就登出回登入頁
 
-             // var str = localStorage.getItem('Hello');
 
-             // $.ajax({
 
-             //     type: "GET",
 
-             //     url: "/auth",
 
-             //     headers: {'Authorization': 'Bearer ' + str},
 
-             //     success: function(result){
 
-             //         console.log(result.identity);
 
-             //     },
 
-             //     error: function(result){
 
-             //         window.location.href='/logout';
 
-             //     }
 
-             // });
 
-             
 
-             $(function(){
 
-                 console.log("OK")
 
-                 var aa = 'AA';
 
-                 // 0429 Rita eval 測試
 
-                 // eval('var ' + aa + 'name = $("input[name=user_loginname]").val();')
 
-                 // console.log(AAname);
 
-                 var namespace = '/test_conn';
 
-                 var url = 'http://127.0.0.1';
 
-                 var port = '5000';
 
-                 // var socket = io.connect(url + ':' + port + namespace);
 
-                 // var item = document.getElementById('python3.8-status');
 
-                 // item.style.width = '0%';
 
-                 // item.innerText = '0%';
 
-                 // timer_python38 = window.setInterval("AddBarIndex('python3.8-status')", 2000);
 
-                 // window.setInterval("abs_update()", 1000);
 
-                 // socket.on('connect', function() {
 
-                 //     socket.emit('connect_event', {data: 'connected!'});
 
-                 //     print("SOCKET CONNECT")
 
-                 // });
 
-                 // socket.on('user-confirm', function(msg) {
 
-                 //     console.log(msg);
 
-                 //     if(msg == 'pass'){
 
-                 //         var item = document.getElementById('python3.8-status');
 
-                 //         item.style.width = '2%';
 
-                 //         item.innerText = '2%';
 
-                 //         timer_python38 = window.setInterval("AddBarIndex('python3.8-status')", 2000);
 
-                 //     };
 
-                 // });
 
-                 // socket.on('stdout', function(msg) {
 
-                 //     if(msg.indexOf('python3.8') != -1){
 
-                 //         ItemInstallSuccess(timer_python38, 'python3.8');
 
-                 //         timer_python3_pip = window.setInterval("AddBarIndex('python3-pip-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('python3-pip') != -1){
 
-                 //         ItemInstallSuccess(timer_python3_pip, 'python3-pip');
 
-                 //         timer_git = window.setInterval("AddBarIndex('git-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('git') != -1){
 
-                 //         ItemInstallSuccess(timer_git, 'git');
 
-                 //         timer_wget = window.setInterval("AddBarIndex('wget-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('wget') != -1){
 
-                 //         ItemInstallSuccess(timer_wget, 'wget');
 
-                 //         timer_grep = window.setInterval("AddBarIndex('grep-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('grep') != -1){
 
-                 //         ItemInstallSuccess(timer_grep, 'grep');
 
-                 //         timer_tasksel = window.setInterval("AddBarIndex('tasksel-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('tasksel') != -1){
 
-                 //         ItemInstallSuccess(timer_tasksel, 'tasksel');
 
-                 //         timer_lamp_server = window.setInterval("AddBarIndex('lamp-server-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('lamp-server') != -1){
 
-                 //         ItemInstallSuccess(timer_lamp_server, 'lamp-server');
 
-                 //         timer_phpMyAdmin510_all_languages = window.setInterval("AddBarIndex('phpMyAdmin-5.1.0-all-languages.tar.gz-status')", 2000);
 
-                 //     };
 
-                 //     // // 原本就註解
 
-                 //     // if(msg.indexOf('phpMyAdmin-5.1.0-all-languages.tar.gz') != -1){
 
-                 //     //     ItemInstallSuccess(timer_phpMyAdmin510_all_languages, 'phpMyAdmin-5.1.0-all-languages.tar.gz');
 
-                 //     //     timer_openssl = window.setInterval("AddBarIndex('openssl-status')", 2000);
 
-                 //     // };
 
-                 //     if(msg.indexOf('install phpmyadmin done') != -1){
 
-                 //         ItemInstallSuccess(timer_phpMyAdmin510_all_languages, 'phpMyAdmin-5.1.0-all-languages.tar.gz');
 
-                 //         timer_openssl = window.setInterval("AddBarIndex('openssl-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('openssl') != -1){
 
-                 //         ItemInstallSuccess(timer_openssl, 'openssl');
 
-                 //         timer_php_common = window.setInterval("AddBarIndex('php-common-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('php-common') != -1){
 
-                 //         ItemInstallSuccess(timer_php_common, 'php-common');
 
-                 //         timer_php_curl = window.setInterval("AddBarIndex('php-curl-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('php-curl') != -1){
 
-                 //         ItemInstallSuccess(timer_php_curl, 'php-curl');
 
-                 //         timer_php_json = window.setInterval("AddBarIndex('php-json-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('php-json') != -1){
 
-                 //         ItemInstallSuccess(timer_php_json, 'php-json');
 
-                 //         timer_php_mbstring = window.setInterval("AddBarIndex('php-mbstring')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('php-mbstring') != -1){
 
-                 //         ItemInstallSuccess(timer_php_mbstring, 'php-mbstring');
 
-                 //         timer_php_mysql = window.setInterval("AddBarIndex('php-mysql')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('php-mysql') != -1){
 
-                 //         ItemInstallSuccess(timer_php_mysql, 'php-mysql');
 
-                 //         timer_php_xml = window.setInterval("AddBarIndex('php-xml-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('php-xml') != -1){
 
-                 //         ItemInstallSuccess(timer_php_xml, 'php-xml');
 
-                 //         timer_php_zip = window.setInterval("AddBarIndex('php-zip-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('php-zip') != -1){
 
-                 //         ItemInstallSuccess(timer_php_zip, 'php-zip');
 
-                 //         timer_php72_mbstring = window.setInterval("AddBarIndex('php7.2-mbstring-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('php7.2-mbstring') != -1){
 
-                 //         ItemInstallSuccess(timer_php72_mbstring, 'php7.2-mbstring');
 
-                 //         timer_php72_xml = window.setInterval("AddBarIndex('php7.2-xml-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('php7.2-xml') != -1){
 
-                 //         ItemInstallSuccess(timer_php72_xml, 'php7.2-xml');
 
-                 //         timer_php72_mysql = window.setInterval("AddBarIndex('php7.2-mysql-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('php7.2-mysql') != -1){
 
-                 //         ItemInstallSuccess(timer_php72_mysql, 'php7.2-mysql');
 
-                 //         timer_php72_common = window.setInterval("AddBarIndex('php7.2-common-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('php7.2-common') != -1){
 
-                 //         ItemInstallSuccess(timer_php72_common, 'php7.2-common');
 
-                 //         timer_php72_curl = window.setInterval("AddBarIndex('php7.2-curl-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('php7.2-curl') != -1){
 
-                 //         ItemInstallSuccess(timer_php72_curl, 'php7.2-curl');
 
-                 //         timer_php72_json = window.setInterval("AddBarIndex('php7.2-json-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('php7.2-json') != -1){
 
-                 //         ItemInstallSuccess(timer_php72_json, 'php7.2-json');
 
-                 //         timer_php72_zip = window.setInterval("AddBarIndex('php7.2-zip-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('php7.2-zip') != -1){
 
-                 //         ItemInstallSuccess(timer_php72_zip, 'php7.2-zip');
 
-                 //         timer_service_apache2 = window.setInterval("AddBarIndex('service-apache2-start-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('service apache2 start') != -1){
 
-                 //         ItemInstallSuccess(timer_service_apache2, 'service-apache2-start');
 
-                 //         timer_setting_mysql = window.setInterval("AddBarIndex('setting-mysql-status')", 2000);
 
-                 //     };
 
-                 //     console.log(msg);
 
-                 //     console.log('test1');
 
-                 // });
 
-                 // socket.on('stderr', function(msg) {
 
-                 //     if(msg.indexOf('python3.8') != -1){
 
-                 //         ItemInstallFail(timer_python38, 'python3.8');
 
-                 //         timer_python3_pip = window.setInterval("AddBarIndex('python3-pip-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('python3-pip') != -1){
 
-                 //         ItemInstallFail(timer_python3_pip, 'python3-pip');
 
-                 //         timer_git = window.setInterval("AddBarIndex('git-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('git') != -1){
 
-                 //         ItemInstallFail(timer_git, 'git');
 
-                 //         timer_wget = window.setInterval("AddBarIndex('wget-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('wget') != -1){
 
-                 //         ItemInstallFail(timer_wget, 'wget');
 
-                 //         timer_grep = window.setInterval("AddBarIndex('grep-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('grep') != -1){
 
-                 //         ItemInstallFail(timer_grep, 'grep');
 
-                 //         timer_tasksel = window.setInterval("AddBarIndex('tasksel-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('tasksel') != -1){
 
-                 //         ItemInstallFail(timer_tasksel, 'tasksel');
 
-                 //         timer_lamp_server = window.setInterval("AddBarIndex('lamp-server-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('lamp-server') != -1){
 
-                 //         ItemInstallFail(timer_lamp_server, 'lamp-server');
 
-                 //         timer_phpMyAdmin = window.setInterval("AddBarIndex('phpMyAdmin-5.1.0-all-languages.tar.gz-status')", 2000);
 
-                 //     };
 
-                 //     // // 原本就註解
 
-                 //     // if(msg.indexOf('phpMyAdmin-5.1.0-all-languages.tar.gz') != -1){
 
-                 //     //     ItemInstallFail(timer_phpMyAdmin, 'phpMyAdmin-5.1.0-all-languages.tar.gz');
 
-                 //     //     timer_openssl = window.setInterval("AddBarIndex('openssl-status')", 2000);
 
-                 //     // };
 
-                 //     if(msg.indexOf('openssl') != -1){
 
-                 //         ItemInstallFail(timer_openssl, 'openssl');
 
-                 //         timer_php_common = window.setInterval("AddBarIndex('php-common-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('php-common') != -1){
 
-                 //         ItemInstallFail(timer_php_common, 'php-common');
 
-                 //         timer_php_curl = window.setInterval("AddBarIndex('php-curl-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('php-curl') != -1){
 
-                 //         ItemInstallFail(timer_php_curl, 'php-curl');
 
-                 //         timer_php_json = window.setInterval("AddBarIndex('php-json-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('php-json') != -1){
 
-                 //         ItemInstallFail(timer_php_json, 'php-json');
 
-                 //         timer_php_mbstring = window.setInterval("AddBarIndex('php-mbstring')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('php-mbstring') != -1){
 
-                 //         ItemInstallFail(timer_php_mbstring, 'php-mbstring');
 
-                 //         timer_php_mysql = window.setInterval("AddBarIndex('php-mysql')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('php-mysql') != -1){
 
-                 //         ItemInstallFail(timer_php_mysql, 'php-mysql');
 
-                 //         timer_php_xml = window.setInterval("AddBarIndex('php-xml-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('php-xml') != -1){
 
-                 //         ItemInstallFail(timer_php_xml, 'php-xml');
 
-                 //         timer_php_zip = window.setInterval("AddBarIndex('php-zip-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('php-zip') != -1){
 
-                 //         ItemInstallFail(timer_php_zip, 'php-zip');
 
-                 //         timer_php72_mbstring = window.setInterval("AddBarIndex('php7.2-mbstring-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('php7.2-mbstring') != -1){
 
-                 //         ItemInstallFail(timer_php72_mbstring, 'php7.2-mbstring');
 
-                 //         timer_php72_xml = window.setInterval("AddBarIndex('php7.2-xml-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('php7.2-xml') != -1){
 
-                 //         ItemInstallFail(timer_php72_xml, 'php7.2-xml');
 
-                 //         timer_php72_mysql = window.setInterval("AddBarIndex('php7.2-mysql-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('php7.2-mysql') != -1){
 
-                 //         ItemInstallFail(timer_php72_mysql, 'php7.2-mysql');
 
-                 //         timer_php72_common = window.setInterval("AddBarIndex('php7.2-common-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('php7.2-common') != -1){
 
-                 //         ItemInstallFail(timer_php72_common, 'php7.2-common');
 
-                 //         timer_php72_curl = window.setInterval("AddBarIndex('php7.2-curl-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('php7.2-curl') != -1){
 
-                 //         ItemInstallFail(timer_php72_curl, 'php7.2-curl');
 
-                 //         timer_php72_json = window.setInterval("AddBarIndex('php7.2-json-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('php7.2-json') != -1){
 
-                 //         ItemInstallFail(timer_php72_json, 'php7.2-json');
 
-                 //         timer_php72_zip = window.setInterval("AddBarIndex('php7.2-zip-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('php7.2-zip') != -1){
 
-                 //         ItemInstallFail(timer_php72_zip, 'php7.2-zip');
 
-                 //         timer_service_apache2 = window.setInterval("AddBarIndex('service-apache2-start-status')", 2000);
 
-                 //     };
 
-                 //     if(msg.indexOf('service apache2 start') != -1){
 
-                 //         ItemInstallFail(timer_service_apache2, 'service-apache2-start');
 
-                 //         timer_setting_mysql = window.setInterval("AddBarIndex('setting-mysql-status')", 2000);
 
-                 //     };
 
-                 //     console.log(msg);
 
-                 //     console.log('test2');
 
-                 // });
 
-             });
 
-         </script>
 
- </head>
 
- <body>
 
-     <nav class="fixed-top">
 
-         <nav class="navbar navbar-expand-md nav-top justify-content-center">
 
-             <div>
 
-                 <span class="website_title">伺服器建置</span>
 
-             </div>
 
-         </nav>
 
-         <nav class="navbar navbar-expand-md bg-dark navbar-dark nav-bottom">
 
-             <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
 
-                 <span class="navbar-toggler-icon"></span>
 
-             </button>
 
-             <div class="collapse navbar-collapse" id="collapsibleNavbar">
 
-                 <ul class="navbar-nav">
 
-                     <li class="nav-item">
 
-                         <a class="nav-link" href="/">首頁</a>
 
-                     </li>
 
-                     <li class="nav-item">
 
-                         <a class="nav-link" href="/incoming_check">進貨檢測</a>
 
-                     </li>
 
-                     <li class="nav-item">
 
-                         <a class="nav-link" href="/burn_program">感測器燒錄</a>
 
-                     </li>
 
-                     <li class="nav-item">
 
-                         <a class="nav-link" href="/modify_permissions">權限設置</a>
 
-                     </li>
 
-                     <li class="nav-item">
 
-                         <a class="nav-link" href="/add_sensor">新增感測器</a>
 
-                     </li>
 
-                     <li class="nav-item">
 
-                         <a class="nav-link" href="/add_server">伺服器建置</a>
 
-                     </li>
 
-                     <li class="li-block"></li>
 
-                     <li class="nav-item">
 
-                         <a class="nav-link" href="#"><i class="fa fa-user-o"></i> {{params.username}}</a>
 
-                     </li>
 
-                     <li class="nav-item">
 
-                         <a class="nav-link" href="/logout">Logout</a>
 
-                     </li>
 
-                 </ul>
 
-             </div>
 
-         </nav>
 
-     </nav>
 
-     <div class="main-page">
 
-         <div class="container">
 
-             <div class="row">
 
-                 <div class="col" style="margin: auto; ">
 
-                     <table  class="table table-bordered" style="font-size:23px;margin-top:30px;">
 
-                         <tbody>
 
-                             <tr>
 
-                                 <td>1.請輸入您的IP位置:</td>
 
-                                 <td><input type="text" name="user_ip" value="60.250.156.232"></td>
 
-                             </tr>
 
-                             <tr>
 
-                                 <td>2.請輸入您的登入帳號:</td>
 
-                                 <td><input type="text" name="user_loginname" value="root"></td>
 
-                             </tr>
 
-                             <tr>
 
-                                 <td>3.請輸入您的username:</td>
 
-                                 <td><input type="text" name="user_username" value="gs1802"></td>
 
-                             </tr>
 
-                             <tr>
 
-                                 <td>4.請輸入您的password:</td>
 
-                                 <td><input type="password" name="user_password" value="g53743001"></td>
 
-                             </tr>
 
-                         </tbody>
 
-                     </table>
 
-                     <div class="text-center">
 
-                         <input type="button" value="建置" name="add_server" style="cursor:pointer;" onclick="AddServer()">
 
-                     </div>
 
-                     <div class="text-center" id="addServer-status" style="margin-top:30px;color:red;visibility:hidden;">
 
-                         <h2>伺服器建置中...</h2>
 
-                     </div>
 
-                     <div>
 
-                         <h1>Item install status</h1>
 
-                         <table  class="table table-bordered" style="font-size:23px;margin-top:30px;">
 
-                             <tbody>
 
-                                 <tr>
 
-                                     <th>Item</th>
 
-                                     <th>Status</th>
 
-                                 </tr>
 
-                                 {% for item in params.L %}
 
-                                     <tr>
 
-                                         <td>{{loop.index}}.{{item}}</td>
 
-                                         <td>
 
-                                             <div class="progress" style="height:35px;">
 
-                                                 <div id="{{item}}-status" name="{{item}}-status" class="progress-bar progress-bar-striped" 
 
-                                                     style="width:0%; height:35px; font-size:20px; color:black; text-align:center;">0%
 
-                                                 </div>
 
-                                             </div>
 
-                                         </td>
 
-                                     </tr>
 
-                                 {% endfor %}
 
- <!--                                <tr>-->
 
- <!--                                    <td>1.pymysql</td>-->
 
- <!--<!–                                    <td><span name="pymysql-status"></span></td>–>-->
 
- <!--                                    <td>-->
 
- <!--                                        <div class="progress" style="height:35px;">-->
 
- <!--                                            <div id="pymysql-status" class="progress-bar progress-bar-striped" style="width:0%;height:35px;font-size:20px;color:black;text-align:center;">0%</div>-->
 
- <!--                                        </div>-->
 
- <!--                                    </td>-->
 
- <!--                                </tr>-->
 
- <!--                                <tr>-->
 
- <!--                                    <td>2.eventlet</td>-->
 
- <!--<!–                                    <td><span name="eventlet-status"></span></td>–>-->
 
- <!--                                    <td>-->
 
- <!--                                        <div class="progress" style="height:35px;">-->
 
- <!--                                            <div id="eventlet-status" class="progress-bar progress-bar-striped" style="width:0%;height:35px;font-size:20px;color:black;text-align:center;">0%</div>-->
 
- <!--                                        </div>-->
 
- <!--                                    </td>-->
 
- <!--                                </tr>-->
 
- <!--                                <tr>-->
 
- <!--                                    <td>3.flask</td>-->
 
- <!--<!–                                    <td><span name="eventlet-status"></span></td>–>-->
 
- <!--                                    <td>-->
 
- <!--                                        <div class="progress" style="height:35px;">-->
 
- <!--                                            <div id="flask-status" class="progress-bar progress-bar-striped" style="width:0%;height:35px;font-size:20px;color:black;text-align:center;">0%</div>-->
 
- <!--                                        </div>-->
 
- <!--                                    </td>-->
 
- <!--                                </tr>-->
 
-                             </tbody>
 
-                         </table>
 
-                     </div>
 
-                 </div>
 
-             </div>
 
-         </div>
 
-     </div>
 
- </body>
 
-     <script>
 
-             // var timer_python38 = 0;
 
-             // var timer_python3_pip = 0;
 
-             // var timer_git = 0;
 
-             // var timer_wget = 0;
 
-             // var timer_grep = 0;
 
-             // var timer_tasksel = 0;
 
-             // var timer_lamp_server = 0;
 
-             // var timer_phpMyAdmin = 0;
 
-             // var timer_openssl = 0;
 
-             // var timer_php_common = 0;
 
-             // var timer_php_curl = 0;
 
-             // var timer_php_json = 0;
 
-             // var timer_php_mbstring = 0;
 
-             // var timer_php_mysql = 0;
 
-             // var timer_php_xml = 0;
 
-             // var timer_php_zip = 0;
 
-             // var timer_php72_mbstring = 0;
 
-             // var timer_php72_xml = 0;
 
-             // var timer_php72_mysql = 0;
 
-             // var timer_php72_common = 0;
 
-             // var timer_php72_curl = 0;
 
-             // var timer_php72_json = 0;
 
-             // var timer_php72_zip = 0;
 
-             // var timer_service_apache2 = 0;
 
-             // var timer_setting_mysql = 0;
 
-             // var timer_paho_mqtt = 0;
 
-             // var timer_mosquitto = 0;
 
-             // var timer_mqtt_server = 0;
 
-             // var timer_watchdog = 0;
 
-             // var timer_golang = 0;
 
-             // var timer_Git_server = 0;
 
-             // var timer_flask = 0;
 
-             // var timer_Flask_SQLAlchemy = 0;
 
-             // var timer_pymysql = 0;
 
-             // var timer_flask_mqtt = 0;
 
-             // var timer_flask_migrate = 0;
 
-             // var timer_flask_jwt_extended = 0;
 
-             // var timer_numpy = 0;
 
-             // var timer_pandas = 0;
 
-             // var timer_opencv_python = 0;
 
-             // var timer_BeautifulSoup4 = 0;
 
-             // var timer_selenium = 0;
 
-             // var timer_geocoder = 0;
 
-             // var timer_AP = 0;
 
-             // var timer_chrony_ntpdate = 0;
 
-             // var timer_deb_ros_packages_and_keyserver = 0;
 
-             // var timer_update = 0;
 
-             // var timer_upgrade = 0;
 
-             // var timer_ros_melodic_desktop_full = 0;
 
-             // var timer_ros_melodic_rqt = 0;
 
-             // var timer_pythonrosdep = 0;
 
-             // var timer_python_rosinstall = 0;
 
-             // var timer_ROS = 0;
 
-             function AddBarIndex(obj){
 
-                 var item = document.getElementById(obj);
 
-                 //因假設元素id內有.或是空格的使用jQuery選擇器會找不到,所以改成用js的節點來設置
 
-                 //[0].style.width 讓width顯示為%值,使用css.('width')會顯示px
 
-                 //var width = obj[0].style.width;
 
-                 var width = item.style.width;
 
-                 // console.log("width: " + width);
 
-                 var current_width = width.substring(0, width.length-1);
 
-                 console.log("current_width: " + current_width);
 
-                 item.style.width = Number(current_width) + 2 + '%';
 
-                 // console.log("item.style.width: " + item.style.width);
 
-                 item.innerText = Number(current_width) + 2 + '%';
 
-                 // console.log("item.innerText: " + item.innerText);
 
-                 if (current_width == 94) {
 
-                     console.log(obj + ' INSTALLATION AddBar Pause');
 
-                     // eval('clearInterval(timer)');
 
-                     clearInterval(timer);
 
-                 }
 
-             };
 
-             function AddServer(){
 
-                 //var item = document.getElementById('python3.8-status');
 
-                 //item.style.width = '2%';
 
-                 //item.innerText = '2%';
 
-                 //timer_python38 = window.setInterval("AddBarIndex('python3.8-status')", 2000);
 
-                 $("#addServer-status").css('visibility','visible');
 
-                 var ip = $("input[name=user_ip]").val();
 
-                 var loginname = $("input[name=user_loginname]").val();
 
-                 var username = $("input[name=user_username]").val();
 
-                 var password = $("input[name=user_password]").val();
 
-                 var json = {"ip":ip, "loginname":loginname, "username":username, "password":password};
 
-                 var abs_update_interval = window.setInterval("abs_update()", 1000);
 
-                 $.post('/add_server', json, function(resText){
 
-                     $("#addServer-status").css('visibility','hidden');
 
-                     if(resText == 'Authentication failed.'){
 
-                         resText = '您輸入的密碼有誤,請重新輸入!';
 
-                         $("input[name=user_ip]").val('');
 
-                         $("input[name=user_username]").val('');
 
-                         $("input[name=user_password]").val('');
 
-                     };
 
-                     clearInterval(abs_update_interval);
 
-                     setTimeout(alert(resText), 1000);
 
-                 }, 'text');
 
-                 // 再次確認所以的狀態寫入狀態條中
 
-                 // for (const key of Object.entries(response)) {
 
-                 //     if (response[key[0]] == 'Install') {
 
-                 //         if (Automatic_Build_System_installation[key[0] + '-installation'] == 'Wait') {
 
-                 //             Automatic_Build_System_installation[key[0] + '-installation'] = 'Install';
 
-                 //             timer = window.setInterval("AddBarIndex('" + key[0] + "-status')", 2000);
 
-                 //         }
 
-                 //     } else if (response[key[0]] == '0') {
 
-                 //         // pass
 
-                 //     } else if (response[key[0]] == 'Error') {
 
-                 //         if (Automatic_Build_System_installation[key[0] + '-installation'] == 'Install') {
 
-                 //             Automatic_Build_System_installation[key[0] + '-installation'] = 'Error';
 
-                 //             ItemInstallFail(timer, key[0]);
 
-                 //         }
 
-                 //     // } else if (response[key[0]] == 'Success') {
 
-                 //     //     if (Automatic_Build_System_installation[key[0] + '-installation'] == 'Install') {
 
-                 //     //         Automatic_Build_System_installation[key[0] + '-installation'] = 'Success';
 
-                 //     //         ItemInstallSuccess(timer, key[0]);
 
-                 //     //     }
 
-                 //     // // ========== Rita 0428 測試保留 ==========
 
-                 //     // } else if (Number(response[key[0]]) !== NaN) {
 
-                 //     //     if (Automatic_Build_System_installation[key[0] + '-installation'] == 'Install') {
 
-                 //     //         Automatic_Build_System_installation[key[0] + '-installation'] = 'Success';
 
-                 //     //         ItemInstallSuccess(timer, key[0], response[key[0]]);
 
-                 //     //     } 
 
-                 //     // // ========== Rita 0428 測試保留 ==========
 
-                 //     } else if (Number(response[key[0]]) !== NaN) {
 
-                 //         if (Automatic_Build_System_installation[key[0] + '-installation'] == 'Install') {
 
-                 //             Automatic_Build_System_installation[key[0] + '-installation'] = response[key[0]];
 
-                 //             ItemInstallSuccess(timer, key[0], response[key[0]]);
 
-                 //         } 
 
-                 //     } else {
 
-                 //         console.log("response[key[0]]: " + response[key[0]]);
 
-                 //     }
 
-                 // }
 
-             };
 
-             Automatic_Build_System_installation = {
 
-                 'python3.8-installation': 'Wait',
 
-                 'python3-pip-installation': 'Wait',
 
-                 'cryptography-installation': 'Wait',
 
-                 'upgrade-installation': 'Wait',
 
-                 'grep-installation': 'Wait',
 
-                 'git-installation': 'Wait',
 
-                 'gitpython-installation': 'Wait',
 
-                 'python3-tk-installation': 'Wait',
 
-                 'wget-installation': 'Wait',
 
-                 'python3-dev-installation': 'Wait',
 
-                 'default-libmysqlclient-dev-installation': 'Wait',
 
-                 'build-essential-installation': 'Wait',
 
-                 'tasksel-installation': 'Wait',
 
-                 'lamp-server-installation': 'Wait',
 
-                 'phpMyAdmin-5.1.0-all-languages.tar.gz-installation': 'Wait',
 
-                 'openssl-installation': 'Wait',
 
-                 'php-common-installation': 'Wait',
 
-                 'php-curl-installation': 'Wait',
 
-                 'php-json-installation': 'Wait',
 
-                 'php-mbstring-installation': 'Wait',
 
-                 'php-mysql-installation': 'Wait',
 
-                 'php-xml-installation': 'Wait',
 
-                 'php-zip-installation': 'Wait',
 
-                 'php7.2-mbstring-installation': 'Wait',
 
-                 'php7.2-xml-installation': 'Wait',
 
-                 'php7.2-mysql-installation': 'Wait',
 
-                 'php7.2-common-installation': 'Wait',
 
-                 'php7.2-curl-installation': 'Wait',
 
-                 'php7.2-json-installation': 'Wait',
 
-                 'php7.2-zip-installation': 'Wait',
 
-                 'apache2-installation': 'Wait',
 
-                 'paho-mqtt-installation': 'Wait',
 
-                 'mosquitto-installation': 'Wait',
 
-                 'mqtt_server_setting-installation': 'Wait',
 
-                 'rclocal/rc.local-installation': 'Wait',
 
-                 'golang-installation': 'Wait',
 
-                 'gogsfile.git-installation': 'Wait',
 
-                 'requirements-installation': 'Wait',
 
-                 'CoffeeProject.git-installation': 'Wait',
 
-                 'BBend-Test-JWT.git-installation': 'Wait',
 
-                 'Coffee_MySQL.sql-installation': 'Wait',
 
-                 'chrony-installation': 'Wait',
 
-                 'ntpdate-installation': 'Wait',
 
-                 '--keyserver-installation': 'Wait',
 
-                 'update-installation': 'Wait',
 
-                 'ros-melodic-desktop-full-installation': 'Wait',
 
-                 'ros-melodic-rqt*-installation': 'Wait',
 
-                 'python-rosdep-installation': 'Wait',
 
-                 'python-rosinstall-installation': 'Wait',
 
-                 'python-rosinstall-generator-installation': 'Wait',
 
-                 'python-wstool-installation': 'Wait',
 
-                 'catkin_make-installation': 'Wait'
 
-             }
 
-             var abs_update_process = 0;
 
-             var timer;
 
-             function abs_update() {
 
-                 if (abs_update_process === 1) {
 
-                     return;
 
-                 }
 
-                 
 
-                 abs_update_process = 1;
 
-                 $.ajax({
 
-                     async:false,
 
-                     type:"GET",
 
-                     url:"/ABS_update",
 
-                     dataType:"JSON",
 
-                     success:function(response){
 
-                         for (const key of Object.entries(response)) {
 
-                             if (response[key[0]] == 'Install') {
 
-                                 if (Automatic_Build_System_installation[key[0] + '-installation'] == 'Wait') {
 
-                                     Automatic_Build_System_installation[key[0] + '-installation'] = 'Install';
 
-                                     timer = window.setInterval("AddBarIndex(\"" + key[0] + "-status\")", 2000);
 
-                                     // eval('var ' + key[0] + '_timer = window.setInterval("AddBarIndex(\"' + key[0] + '-status\")", 2000);')
 
-                                     // alert('!!!')
 
-                                 }
 
-                             } else if (response[key[0]] == '0') {
 
-                                 // pass
 
-                             } else if (response[key[0]] == 'Error') {
 
-                                 if (Automatic_Build_System_installation[key[0] + '-installation'] == 'Install') {
 
-                                     Automatic_Build_System_installation[key[0] + '-installation'] = 'Error';
 
-                                     ItemInstallFail(timer, key[0]);
 
-                                 }
 
-                             // } else if (response[key[0]] == 'Success') {
 
-                             //     if (Automatic_Build_System_installation[key[0] + '-installation'] == 'Install') {
 
-                             //         Automatic_Build_System_installation[key[0] + '-installation'] = 'Success';
 
-                             //         ItemInstallSuccess(timer, key[0]);
 
-                             //     }
 
-                             // // ========== Rita 0428 測試保留 ==========
 
-                             // } else if (Number(response[key[0]]) !== NaN) {
 
-                             //     if (Automatic_Build_System_installation[key[0] + '-installation'] == 'Install') {
 
-                             //         Automatic_Build_System_installation[key[0] + '-installation'] = 'Success';
 
-                             //         ItemInstallSuccess(timer, key[0], response[key[0]]);
 
-                             //     } 
 
-                             // // ========== Rita 0428 測試保留 ==========
 
-                             } else if (Number(response[key[0]]) !== NaN) {
 
-                                 // Automatic_Build_System_installation[key[0] + '-installation'] = response[key[0]];
 
-                                 // ItemInstallSuccess(timer, key[0], response[key[0]]);
 
-                                 if (Automatic_Build_System_installation[key[0] + '-installation'] == 'Install') {
 
-                                     Automatic_Build_System_installation[key[0] + '-installation'] = response[key[0]];
 
-                                     ItemInstallSuccess(timer, key[0], response[key[0]]);
 
-                                 } else if (Automatic_Build_System_installation[key[0] + '-installation'] == 'Wait') {
 
-                                     Automatic_Build_System_installation[key[0] + '-installation'] = response[key[0]];
 
-                                     console.log(key[0] + " : " + response[key[0]]);
 
-                                     ItemInstallSuccess(timer, key[0], response[key[0]]);
 
-                                 }
 
-                             } else {
 
-                                 console.log("response[key[0]]: " + response[key[0]]);
 
-                             }
 
-                         }
 
-                         abs_update_process = 0;
 
-                     },
 
-                     error:function(thrownError){
 
-                         console.log("thrownError: " + thrownError);
 
-                         abs_update_process = 0;
 
-                     }
 
-                 });
 
-             };
 
-             function ItemInstallSuccess(timer_item, item_name, execution_time){
 
-                 eval('clearInterval(' + timer_item + ')');
 
-                 var item = document.getElementById(item_name + '-status');
 
-                 item.style.width = '100%';
 
-                 item.innerText = execution_time + 's';
 
-             };
 
-             function ItemInstallFail(timer_item, item_name){
 
-                 eval('clearInterval(' + timer_item + ')');
 
-                 var item = document.getElementById(item_name + '-status');
 
-                 item.style.width = '0%';
 
-                 item.innerText = 'Fail';
 
-                 item.style.color = 'red';
 
-                 item.style.fontWeight = 'bold';
 
-             };
 
-     </script>
 
- </html>
 
 
  |