浏览代码

improved: improve instance conntry layout alerts #37

Roberto Berto 5 年之前
父节点
当前提交
f2a05db4c2
共有 3 个文件被更改,包括 14 次插入5 次删除
  1. 2 2
      vycenter/config/templates/config/instance_conntry.html
  2. 10 1
      vycenter/s/main.css
  3. 2 2
      vycenter/vycenter/templates/base.html

+ 2 - 2
vycenter/config/templates/config/instance_conntry.html

@@ -7,9 +7,9 @@
 
 {% if instance %}
     {% if connected == True %}
-        <div style="background-color: rgb(87, 87, 182); margin-bottom: 20px; padding: 2px 5px;">Instance connected</div>
+        <div class="alert-ok">Instance connected</div>
     {% else %}
-        <div style  ="background-color: rgb(184, 78, 78); margin-bottom: 20px; padding: 2px 5px;">Instance not connected</div>
+        <div class="alert-nok">Instance not connected</div>
     {% endif %}
 
     <table border="1" width="100%">

+ 10 - 1
vycenter/s/main.css

@@ -111,4 +111,13 @@ input[type=submit] {
 
 .margin-topbottom {
   margin: 20px 0;  
-}
+}
+
+.alert-nok {
+  background-color: rgb(184, 78, 78); margin: 20px 0; padding: 2px 10px;
+}
+.alert-ok {
+  background-color: #EACD65; margin: 20px 0;  padding: 2px 10px;
+}
+
+

+ 2 - 2
vycenter/vycenter/templates/base.html

@@ -8,7 +8,7 @@
 
     <!-- Bootstrap CSS -->
     <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
-    <link rel="stylesheet" href="{% static "main.css" %}?x1">
+    <link rel="stylesheet" href="{% static "main.css" %}?v3">
 
     <title>{% block header_title %}{% endblock %} - VyControl</title>
   </head>
@@ -22,7 +22,7 @@
           
         </div>
         <div class="col-9">
-          <form action="{% url 'config:instance-change' '__none__' %}" method="post" id="instancedefault">
+          <form action="{% url 'config:instance-change' '--none--' %}" method="post" id="instancedefault">
             {% csrf_token %}