Skip to content

Commit

Permalink
修复前端样式bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
welliamcao committed Dec 4, 2017
1 parent 06e6575 commit 1596029
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 61 deletions.
1 change: 1 addition & 0 deletions OpsManage/templates/apps/apps_playbook.html
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ <h4 class="modal-title" id="myModalLabel">
</div><!-- /.modal -->
</div>


<script type="text/javascript">
{% if playbook.playbook_vars %}
var songResJson=JSON.parse(document.getElementById('playbook_vars').value);
Expand Down
20 changes: 19 additions & 1 deletion OpsManage/templates/apps/apps_playbook_modf.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
{% extends 'index.html' %}
{% block ace-content %}
<!-- ACE Editor -->
<script src="http://cdn.bootcss.com/ace/1.2.4/ace.js"></script>
<script src="http://cdn.bootcss.com/ace/1.2.4/ext-language_tools.js"></script>
<script src="http://cdn.bootcss.com/ace/1.2.4/ext-old_ie.js"></script>
<script src="http://cdn.bootcss.com/ace/1.2.4/theme-monokai.js"></script>
<style type="text/css">
#compile-editor {
/* position: absolute; */
width: 100%;
height: 400px;
}
</style>
{% endblock %}
{% block page-content %}
<div id="page-wrapper">
<div class="row">
Expand Down Expand Up @@ -160,7 +174,11 @@ <h1 class="page-header"><i class="fa fa-wrench"></i><code>Ansible Playbook</cod
<!-- /.col-lg-12 -->
</div>
</div>

<!-- ACE Editor -->
<script src="http://cdn.bootcss.com/ace/1.2.4/ace.js"></script>
<script src="http://cdn.bootcss.com/ace/1.2.4/ext-language_tools.js"></script>
<script src="http://cdn.bootcss.com/ace/1.2.4/ext-old_ie.js"></script>
<script src="http://cdn.bootcss.com/ace/1.2.4/theme-monokai.js"></script>
<script type="text/javascript">
$(function () { $("[data-toggle='tooltip']").tooltip(); });
{% if playbook.playbook_type == 1 %}
Expand Down
16 changes: 15 additions & 1 deletion OpsManage/templates/apps/apps_playbook_online.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
{% extends 'index.html' %}
{% block ace-content %}
<!-- ACE Editor -->
<script src="http://cdn.bootcss.com/ace/1.2.4/ace.js"></script>
<script src="http://cdn.bootcss.com/ace/1.2.4/ext-language_tools.js"></script>
<script src="http://cdn.bootcss.com/ace/1.2.4/ext-old_ie.js"></script>
<script src="http://cdn.bootcss.com/ace/1.2.4/theme-monokai.js"></script>
<style type="text/css">
#compile-editor {
/* position: absolute; */
width: 100%;
height: 400px;
}
</style>
{% endblock %}
{% block page-content %}
<div id="page-wrapper">
<div class="row">
Expand All @@ -23,7 +37,7 @@ <h1 class="page-header"><i class="fa fa-wrench"></i><code>Ansible Playbook</cod
<input class="form-control" name="playbook_name" required>
<p class="help-block">例如系统初始化</p>
</div>
<div id="compile-editor"></div>
<div id="compile-editor" class="ace_editor"></div>
<br>
<button type="reset" class="btn btn-default">撤销</button>
<button type="button" class="btn btn-default" onclick="oBtAnsiblePlaybookOnline(this)">添加</button>
Expand Down
52 changes: 1 addition & 51 deletions OpsManage/templates/assets/assets_search.html
Original file line number Diff line number Diff line change
Expand Up @@ -411,59 +411,9 @@ <h1 class="page-header"><i class="fa fa-search"></i> 设备资产查询</h1>


<script type="text/javascript">





function assetsUpdate(obj, id,ip,type){
var btnObj = $(obj);
var txt= "是否确认更新?";
var option = {
title: "更新主机("+ip+")硬件信息",
btn: parseInt("0011",2),
onOk: function(){
$.ajax({
type: 'POST',
url: '/assets_facts/',
data:{
"ip":ip,
"server_id":id,
"type":type
},
success:function(response){
if (response["code"]=="200"){
window.wxc.xcConfirm(response["msg"], window.wxc.xcConfirm.typeEnum.success);

}
else{
window.wxc.xcConfirm(response["msg"], window.wxc.xcConfirm.typeEnum.error);
}
},
error:function(response){
window.wxc.xcConfirm("请求数据错误!", window.wxc.xcConfirm.typeEnum.error);
},
});
},
onCancel:function(){
},
onClose:function(){
}
}
window.wxc.xcConfirm(txt, "custom", option);
}

(function ($) {
$.fn.extend({
leanModal: function (options) {
var defaults = { top: 100, overlay: 0.5, closeButton: null }; var overlay = $("<div id='lean_overlay'></div>"); $("body").append(overlay); options = $.extend(defaults, options); return this.each(function () {
var o = options; $(this).click(function (e) {
var modal_id = $('#pb'); $("#lean_overlay").click(function () { close_modal(modal_id) }); $(o.closeButton).click(function () { close_modal(modal_id) }); $('.pb-cl').click(function () { close_modal(modal_id) }); var modal_height = $(modal_id).outerHeight(); var modal_width = $(modal_id).outerWidth();
$("#lean_overlay").css({ "display": "block", opacity: 0 }); $("#lean_overlay").fadeTo(200, o.overlay); $(modal_id).css({ "display": "block", "position": "fixed", "opacity": 0, "z-index": 11000, "left": 50 + "%", "margin-left": -(modal_width / 2) + "px", "top": o.top + "px" }); $(modal_id).fadeTo(200, 1); e.preventDefault()
})
}); function close_modal(modal_id) { $("#lean_overlay").fadeOut(200); $(modal_id).css({ "display": "none" }) }
}
})
})(jQuery);

var curpage = 1;
$(document).ready(function () {
Expand Down
29 changes: 21 additions & 8 deletions OpsManage/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,29 @@
<link rel="stylesheet" href="/static/dist/css/bootstrap-datetimepicker.min.css" type="text/css"/>
<script type="text/javascript" src="/static/js/bootstrap-datetimepicker.js"></script>
{% block ace-content %}
<!-- ACE Editor -->
<script src="http://cdn.bootcss.com/ace/1.2.4/ace.js"></script>
<script src="http://cdn.bootcss.com/ace/1.2.4/ext-language_tools.js"></script>
<script src="http://cdn.bootcss.com/ace/1.2.4/ext-old_ie.js"></script>
<script src="http://cdn.bootcss.com/ace/1.2.4/theme-monokai.js"></script>
{% endblock %}

{% endblock %}
<!-- DataTables JavaScript -->
<link rel="stylesheet" href="/static/dist/css/jquery.dataTables.min.css">
<script src="/static/js/jquery.dataTables.min.js"></script>
<style type="text/css">
pre {
overflow: auto;
white-space: normal;
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
border:1px solid #ccc;
padding:5px;
margin:10px;
font-family: Consolas,monospace;
color:#ADFF2F;
background-color:#000000;
}
</style>

</head>

<body>
Expand Down Expand Up @@ -302,7 +315,7 @@ <h1 class="page-header">Dashboard</h1>
</div>
</div>
</div>
<a href="/deploy_order">
<a href="/deploy_order/1/">
<div class="panel-footer">
<span class="pull-left">查看所有</span>
<span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
Expand All @@ -324,7 +337,7 @@ <h1 class="page-header">Dashboard</h1>
</div>
</div>
</div>
<a href="/cron_list">
<a href="/cron_list/1/">
<div class="panel-footer">
<span class="pull-left">查看所有</span>
<span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
Expand Down

0 comments on commit 1596029

Please sign in to comment.