Jian Li
Committed by Gerrit Code Review

Update css for swagger 2.4.1, add missing resource to fix js error

Change-Id: I91c932ed21564eb862438464642a2f62982e8c71
...@@ -126,6 +126,7 @@ ...@@ -126,6 +126,7 @@
126 max-width: 960px; 126 max-width: 960px;
127 margin-left: auto; 127 margin-left: auto;
128 margin-right: auto; 128 margin-right: auto;
129 + /* JSONEditor specific styling */
129 } 130 }
130 .swagger-section .swagger-ui-wrap b, 131 .swagger-section .swagger-ui-wrap b,
131 .swagger-section .swagger-ui-wrap strong { 132 .swagger-section .swagger-ui-wrap strong {
...@@ -458,6 +459,17 @@ ...@@ -458,6 +459,17 @@
458 .swagger-section .swagger-ui-wrap .required { 459 .swagger-section .swagger-ui-wrap .required {
459 font-weight: bold; 460 font-weight: bold;
460 } 461 }
462 +.swagger-section .swagger-ui-wrap .editor_holder {
463 + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
464 + font-size: 0.9em;
465 +}
466 +.swagger-section .swagger-ui-wrap .editor_holder label {
467 + font-weight: normal!important;
468 + /* JSONEditor uses bold by default for all labels, we revert that back to normal to not give the impression that by default fields are required */
469 +}
470 +.swagger-section .swagger-ui-wrap .editor_holder label.required {
471 + font-weight: bold!important;
472 +}
461 .swagger-section .swagger-ui-wrap input.parameter { 473 .swagger-section .swagger-ui-wrap input.parameter {
462 width: 300px; 474 width: 300px;
463 border: 1px solid #aaa; 475 border: 1px solid #aaa;
...@@ -807,6 +819,9 @@ ...@@ -807,6 +819,9 @@
807 outline: 2px solid black; 819 outline: 2px solid black;
808 outline-color: #cc0000; 820 outline-color: #cc0000;
809 } 821 }
822 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form select[name='parameterContentType'] {
823 + max-width: 300px;
824 +}
810 .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.response div.block pre { 825 .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.response div.block pre {
811 font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; 826 font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
812 padding: 10px; 827 padding: 10px;
...@@ -1121,14 +1136,14 @@ ...@@ -1121,14 +1136,14 @@
1121 font-size: 24px; 1136 font-size: 24px;
1122 padding: 10px 0; 1137 padding: 10px 0;
1123 } 1138 }
1124 -.swagger-section .api-popup-dialog p.error-msg { 1139 +.swagger-section .api-popup-dialog .error-msg {
1125 padding-left: 5px; 1140 padding-left: 5px;
1126 padding-bottom: 5px; 1141 padding-bottom: 5px;
1127 } 1142 }
1128 -.swagger-section .api-popup-dialog button.api-popup-authbtn { 1143 +.swagger-section .api-popup-dialog .api-popup-authbtn {
1129 height: 30px; 1144 height: 30px;
1130 } 1145 }
1131 -.swagger-section .api-popup-dialog button.api-popup-cancel { 1146 +.swagger-section .api-popup-dialog .api-popup-cancel {
1132 height: 30px; 1147 height: 30px;
1133 } 1148 }
1134 .swagger-section .api-popup-scopes { 1149 .swagger-section .api-popup-scopes {
...@@ -1138,14 +1153,14 @@ ...@@ -1138,14 +1153,14 @@
1138 padding: 5px 0; 1153 padding: 5px 0;
1139 line-height: 20px; 1154 line-height: 20px;
1140 } 1155 }
1141 -.swagger-section .api-popup-scopes .api-scope-desc {
1142 - padding-left: 20px;
1143 - font-style: italic;
1144 -}
1145 .swagger-section .api-popup-scopes li input { 1156 .swagger-section .api-popup-scopes li input {
1146 position: relative; 1157 position: relative;
1147 top: 2px; 1158 top: 2px;
1148 } 1159 }
1160 +.swagger-section .api-popup-scopes .api-scope-desc {
1161 + padding-left: 20px;
1162 + font-style: italic;
1163 +}
1149 .swagger-section .api-popup-actions { 1164 .swagger-section .api-popup-actions {
1150 padding-top: 10px; 1165 padding-top: 10px;
1151 } 1166 }
......
...@@ -126,6 +126,7 @@ ...@@ -126,6 +126,7 @@
126 max-width: 960px; 126 max-width: 960px;
127 margin-left: auto; 127 margin-left: auto;
128 margin-right: auto; 128 margin-right: auto;
129 + /* JSONEditor specific styling */
129 } 130 }
130 .swagger-section .swagger-ui-wrap b, 131 .swagger-section .swagger-ui-wrap b,
131 .swagger-section .swagger-ui-wrap strong { 132 .swagger-section .swagger-ui-wrap strong {
...@@ -458,6 +459,17 @@ ...@@ -458,6 +459,17 @@
458 .swagger-section .swagger-ui-wrap .required { 459 .swagger-section .swagger-ui-wrap .required {
459 font-weight: bold; 460 font-weight: bold;
460 } 461 }
462 +.swagger-section .swagger-ui-wrap .editor_holder {
463 + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
464 + font-size: 0.9em;
465 +}
466 +.swagger-section .swagger-ui-wrap .editor_holder label {
467 + font-weight: normal!important;
468 + /* JSONEditor uses bold by default for all labels, we revert that back to normal to not give the impression that by default fields are required */
469 +}
470 +.swagger-section .swagger-ui-wrap .editor_holder label.required {
471 + font-weight: bold!important;
472 +}
461 .swagger-section .swagger-ui-wrap input.parameter { 473 .swagger-section .swagger-ui-wrap input.parameter {
462 width: 300px; 474 width: 300px;
463 border: 1px solid #aaa; 475 border: 1px solid #aaa;
...@@ -807,6 +819,9 @@ ...@@ -807,6 +819,9 @@
807 outline: 2px solid black; 819 outline: 2px solid black;
808 outline-color: #cc0000; 820 outline-color: #cc0000;
809 } 821 }
822 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form select[name='parameterContentType'] {
823 + max-width: 300px;
824 +}
810 .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.response div.block pre { 825 .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.response div.block pre {
811 font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; 826 font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
812 padding: 10px; 827 padding: 10px;
...@@ -1121,14 +1136,14 @@ ...@@ -1121,14 +1136,14 @@
1121 font-size: 24px; 1136 font-size: 24px;
1122 padding: 10px 0; 1137 padding: 10px 0;
1123 } 1138 }
1124 -.swagger-section .api-popup-dialog p.error-msg { 1139 +.swagger-section .api-popup-dialog .error-msg {
1125 padding-left: 5px; 1140 padding-left: 5px;
1126 padding-bottom: 5px; 1141 padding-bottom: 5px;
1127 } 1142 }
1128 -.swagger-section .api-popup-dialog button.api-popup-authbtn { 1143 +.swagger-section .api-popup-dialog .api-popup-authbtn {
1129 height: 30px; 1144 height: 30px;
1130 } 1145 }
1131 -.swagger-section .api-popup-dialog button.api-popup-cancel { 1146 +.swagger-section .api-popup-dialog .api-popup-cancel {
1132 height: 30px; 1147 height: 30px;
1133 } 1148 }
1134 .swagger-section .api-popup-scopes { 1149 .swagger-section .api-popup-scopes {
...@@ -1138,14 +1153,14 @@ ...@@ -1138,14 +1153,14 @@
1138 padding: 5px 0; 1153 padding: 5px 0;
1139 line-height: 20px; 1154 line-height: 20px;
1140 } 1155 }
1141 -.swagger-section .api-popup-scopes .api-scope-desc {
1142 - padding-left: 20px;
1143 - font-style: italic;
1144 -}
1145 .swagger-section .api-popup-scopes li input { 1156 .swagger-section .api-popup-scopes li input {
1146 position: relative; 1157 position: relative;
1147 top: 2px; 1158 top: 2px;
1148 } 1159 }
1160 +.swagger-section .api-popup-scopes .api-scope-desc {
1161 + padding-left: 20px;
1162 + font-style: italic;
1163 +}
1149 .swagger-section .api-popup-actions { 1164 .swagger-section .api-popup-actions {
1150 padding-top: 10px; 1165 padding-top: 10px;
1151 } 1166 }
...@@ -1155,8 +1170,16 @@ ...@@ -1155,8 +1170,16 @@
1155 .swagger-section .auth { 1170 .swagger-section .auth {
1156 float: right; 1171 float: right;
1157 } 1172 }
1158 -.swagger-section #api_information_panel { 1173 +.swagger-section .api-ic {
1159 - position: absolute; 1174 + height: 18px;
1175 + vertical-align: middle;
1176 + display: inline-block;
1177 + background: url(../images/explorer_icons.png) no-repeat;
1178 +}
1179 +.swagger-section .api-ic .api_information_panel {
1180 + position: relative;
1181 + margin-top: 20px;
1182 + margin-left: -5px;
1160 background: #FFF; 1183 background: #FFF;
1161 border: 1px solid #ccc; 1184 border: 1px solid #ccc;
1162 border-radius: 5px; 1185 border-radius: 5px;
...@@ -1167,34 +1190,32 @@ ...@@ -1167,34 +1190,32 @@
1167 color: black; 1190 color: black;
1168 padding: 5px; 1191 padding: 5px;
1169 } 1192 }
1170 -.swagger-section #api_information_panel p .api-msg-enabled { 1193 +.swagger-section .api-ic .api_information_panel p .api-msg-enabled {
1171 color: green; 1194 color: green;
1172 } 1195 }
1173 -.swagger-section #api_information_panel p .api-msg-disabled { 1196 +.swagger-section .api-ic .api_information_panel p .api-msg-disabled {
1174 color: red; 1197 color: red;
1175 } 1198 }
1176 -.swagger-section .api-ic { 1199 +.swagger-section .api-ic:hover .api_information_panel {
1177 - height: 18px; 1200 + position: absolute;
1178 - vertical-align: middle; 1201 + display: block;
1179 - display: inline-block;
1180 - background: url(../images/explorer_icons.png) no-repeat;
1181 } 1202 }
1182 .swagger-section .ic-info { 1203 .swagger-section .ic-info {
1183 background-position: 0 0; 1204 background-position: 0 0;
1184 width: 18px; 1205 width: 18px;
1185 - margin-top: -7px; 1206 + margin-top: -6px;
1186 margin-left: 4px; 1207 margin-left: 4px;
1187 } 1208 }
1188 .swagger-section .ic-warning { 1209 .swagger-section .ic-warning {
1189 background-position: -60px 0; 1210 background-position: -60px 0;
1190 width: 18px; 1211 width: 18px;
1191 - margin-top: -7px; 1212 + margin-top: -6px;
1192 margin-left: 4px; 1213 margin-left: 4px;
1193 } 1214 }
1194 .swagger-section .ic-error { 1215 .swagger-section .ic-error {
1195 background-position: -30px 0; 1216 background-position: -30px 0;
1196 width: 18px; 1217 width: 18px;
1197 - margin-top: -7px; 1218 + margin-top: -6px;
1198 margin-left: 4px; 1219 margin-left: 4px;
1199 } 1220 }
1200 .swagger-section .ic-off { 1221 .swagger-section .ic-off {
...@@ -1220,36 +1241,32 @@ ...@@ -1220,36 +1241,32 @@
1220 font-size: small; 1241 font-size: small;
1221 padding: 14px; 1242 padding: 14px;
1222 } 1243 }
1223 - 1244 +.swagger-section #input_baseUrl {
1224 -.swagger-section #header a#logo { 1245 + width: 200px;
1225 - font-size: 1.6em; 1246 + display: none;
1226 - font-weight: bold;
1227 - text-decoration: none;
1228 - background: transparent url(../images/onos-logo.png) no-repeat left center;
1229 - padding: 20px 0 20px 60px;
1230 - color: white;
1231 } 1247 }
1232 -.swagger-section #header form#api_selector { 1248 +.swagger-section #api_selector {
1233 display: block; 1249 display: block;
1234 clear: none; 1250 clear: none;
1235 float: right; 1251 float: right;
1236 } 1252 }
1237 -.swagger-section #header form#api_selector .input { 1253 +.swagger-section #api_selector .input {
1238 display: block; 1254 display: block;
1239 clear: none; 1255 clear: none;
1240 float: left; 1256 float: left;
1241 margin: 0 10px 0 0; 1257 margin: 0 10px 0 0;
1242 } 1258 }
1243 -.swagger-section #header form#api_selector .input input#input_apiKey { 1259 +.swagger-section #api_selector input {
1260 + font-size: 0.9em;
1261 + padding: 3px;
1262 + margin: 0;
1263 +}
1264 +.swagger-section #input_apiKey {
1244 width: 200px; 1265 width: 200px;
1245 border-radius: 3px; 1266 border-radius: 3px;
1246 border: solid 2px #fff; 1267 border: solid 2px #fff;
1247 } 1268 }
1248 -.swagger-section #header form#api_selector .input input#input_baseUrl { 1269 +.swagger-section #explore {
1249 - width: 200px;
1250 - display: none;
1251 -}
1252 -.swagger-section #header form#api_selector .input a#explore {
1253 display: block; 1270 display: block;
1254 text-decoration: none; 1271 text-decoration: none;
1255 font-weight: bold; 1272 font-weight: bold;
...@@ -1264,10 +1281,17 @@ ...@@ -1264,10 +1281,17 @@
1264 -khtml-border-radius: 4px; 1281 -khtml-border-radius: 4px;
1265 border-radius: 4px; 1282 border-radius: 4px;
1266 } 1283 }
1267 -.swagger-section #header form#api_selector .input a#explore:hover { 1284 +.swagger-section #explore:hover {
1268 background-color: #CE5650; 1285 background-color: #CE5650;
1269 } 1286 }
1270 - 1287 +.swagger-section #header #logo {
1288 + font-size: 1.6em;
1289 + font-weight: bold;
1290 + text-decoration: none;
1291 + background: transparent url(../images/onos-logo.png) no-repeat left center;
1292 + padding: 20px 0 20px 60px;
1293 + color: white;
1294 +}
1271 .swagger-section #header form#api_selector #selector { 1295 .swagger-section #header form#api_selector #selector {
1272 width: 580px; 1296 width: 580px;
1273 height: 28px; 1297 height: 28px;
...@@ -1289,12 +1313,6 @@ ...@@ -1289,12 +1313,6 @@
1289 width: 580px; 1313 width: 580px;
1290 height: 28px; 1314 height: 28px;
1291 } 1315 }
1292 -
1293 -.swagger-section #header form#api_selector .input input {
1294 - font-size: 0.9em;
1295 - padding: 3px;
1296 - margin: 0;
1297 -}
1298 .swagger-section #content_message { 1316 .swagger-section #content_message {
1299 margin: 10px 15px; 1317 margin: 10px 15px;
1300 font-style: italic; 1318 font-style: italic;
...@@ -1305,3 +1323,9 @@ ...@@ -1305,3 +1323,9 @@
1305 text-align: center; 1323 text-align: center;
1306 padding-top: 10px; 1324 padding-top: 10px;
1307 } 1325 }
1326 +.swagger-section .swagger-collapse:before {
1327 + content: "-";
1328 +}
1329 +.swagger-section .swagger-expand:before {
1330 + content: "+";
1331 +}
......