You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
2.1 KiB

1 year ago
  1. {extend name="admin/layout" /}
  2. {block name="title"}一键部署列表{/block}
  3. {block name="main"}
  4. <div class="container" style="padding-top:70px;">
  5. <div class="col-sm-12 col-md-10 col-lg-8 center-block" style="float: none;">
  6. <div class="panel panel-primary">
  7. <div class="panel-heading"><h3 class="panel-title">一键部署列表</h3></div>
  8. <div class="panel-body">
  9. <div class="list-group">
  10. <div class="list-group-item list-group-item-warning">Linux面板</div>
  11. <div class="list-group-item" style="line-height:35px">列表文件更新时间:<font color="blue">{$deplist_linux_time}</font><a href="javascript:refresh_deplist('Linux')" class="btn btn-success pull-right"><i class="fa fa-refresh"></i>重新获取</a></div>
  12. </div>
  13. <div class="list-group">
  14. <div class="list-group-item list-group-item-warning">Windows面板</div>
  15. <div class="list-group-item" style="line-height:35px">列表文件更新时间:<font color="blue">{$deplist_win_time}</font><a href="javascript:refresh_deplist('Windows')" class="btn btn-success pull-right"><i class="fa fa-refresh"></i>重新获取</a></div>
  16. </div>
  17. </div>
  18. </div>
  19. <script src="//cdn.staticfile.org/layer/3.5.1/layer.js"></script>
  20. <script>
  21. function refresh_deplist(os){
  22. var confirm = layer.confirm('是否确定从宝塔官方获取最新一键部署列表?', {
  23. btn: ['确定','取消']
  24. }, function(){
  25. layer.close(confirm)
  26. var ii = layer.msg('正在获取一键部署列表,请稍候...', {icon: 16, shade:0.1, time: 0});
  27. $.ajax({
  28. type : 'GET',
  29. url : '/admin/refresh_deplist?os='+os,
  30. dataType : 'json',
  31. success : function(data) {
  32. layer.close(ii)
  33. if(data.code == 0){
  34. layer.alert(data.msg, {icon:1}, function(){window.location.reload()});
  35. }else{
  36. layer.alert(data.msg, {icon:2});
  37. }
  38. },
  39. error:function(data){
  40. layer.close(ii)
  41. layer.msg('服务器错误', {icon:2});
  42. }
  43. });
  44. }, function(){
  45. layer.close(confirm)
  46. });
  47. }
  48. </script>
  49. {/block}