kopia lustrzana https://github.com/OpenDroneMap/WebODM
Added processing node view info page mockup
rodzic
804193b9a1
commit
d383c25e5f
|
@ -421,9 +421,9 @@
|
|||
padding-left: 16px;
|
||||
background: url(../img/icon-deletelink.svg) 0 1px no-repeat; }
|
||||
.admin-area a.deletelink:link, .admin-area a.deletelink:visited {
|
||||
color: #CC3434; }
|
||||
color: #fff; }
|
||||
.admin-area a.deletelink:focus, .admin-area a.deletelink:hover {
|
||||
color: #993333;
|
||||
color: #fff;
|
||||
text-decoration: none; }
|
||||
.admin-area .object-tools {
|
||||
font-size: 10px;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -658,11 +658,11 @@
|
|||
}
|
||||
|
||||
a.deletelink:link, a.deletelink:visited {
|
||||
color: #CC3434;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
a.deletelink:focus, a.deletelink:hover {
|
||||
color: #993333;
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,424 +1,258 @@
|
|||
@import url('widgets.css');
|
||||
|
||||
@import url("widgets.css");
|
||||
/* FORM ROWS */
|
||||
|
||||
.form-row {
|
||||
.admin-area {
|
||||
/* FORM LABELS */
|
||||
/* RADIO BUTTONS */
|
||||
/* ALIGNED FIELDSETS */
|
||||
/* WIDE FIELDSETS */
|
||||
/* COLLAPSED FIELDSETS */
|
||||
/* MONOSPACE TEXTAREAS */
|
||||
/* SUBMIT ROW */
|
||||
/* CUSTOM FORM FIELDS */
|
||||
/* INLINES */
|
||||
/* RELATED FIELD ADD ONE / LOOKUP */ }
|
||||
.admin-area .form-row {
|
||||
overflow: hidden;
|
||||
padding: 10px;
|
||||
font-size: 13px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.form-row img, .form-row input {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.form-row label input[type="checkbox"] {
|
||||
border-bottom: 1px solid #eee; }
|
||||
.admin-area .form-row img, .admin-area .form-row input {
|
||||
vertical-align: middle; }
|
||||
.admin-area .form-row label input[type="checkbox"] {
|
||||
margin-top: 0;
|
||||
vertical-align: 0;
|
||||
}
|
||||
|
||||
form .form-row p {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* FORM LABELS */
|
||||
|
||||
label {
|
||||
vertical-align: 0; }
|
||||
.admin-area form .form-row p {
|
||||
padding-left: 0; }
|
||||
.admin-area .hidden {
|
||||
display: none; }
|
||||
.admin-area label {
|
||||
font-weight: normal;
|
||||
color: #666;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.required label, label.required {
|
||||
font-size: 13px; }
|
||||
.admin-area .required label, .admin-area label.required {
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
/* RADIO BUTTONS */
|
||||
|
||||
form ul.radiolist li {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
form ul.radiolist label {
|
||||
color: #333; }
|
||||
.admin-area form ul.radiolist li {
|
||||
list-style-type: none; }
|
||||
.admin-area form ul.radiolist label {
|
||||
float: none;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
form ul.radiolist input[type="radio"] {
|
||||
display: inline; }
|
||||
.admin-area form ul.radiolist input[type="radio"] {
|
||||
margin: -2px 4px 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
form ul.inline {
|
||||
padding: 0; }
|
||||
.admin-area form ul.inline {
|
||||
margin-left: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
form ul.inline li {
|
||||
padding: 0; }
|
||||
.admin-area form ul.inline li {
|
||||
float: left;
|
||||
padding-right: 7px;
|
||||
}
|
||||
|
||||
/* ALIGNED FIELDSETS */
|
||||
|
||||
.aligned label {
|
||||
padding-right: 7px; }
|
||||
.admin-area .aligned label {
|
||||
display: block;
|
||||
padding: 4px 10px 0 0;
|
||||
float: left;
|
||||
width: 160px;
|
||||
word-wrap: break-word;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.aligned label:not(.vCheckboxLabel):after {
|
||||
line-height: 1; }
|
||||
.admin-area .aligned label:not(.vCheckboxLabel):after {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.aligned label + p {
|
||||
height: 26px; }
|
||||
.admin-area .aligned label + p {
|
||||
padding: 6px 0;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
margin-left: 170px;
|
||||
}
|
||||
|
||||
.aligned ul label {
|
||||
margin-left: 170px; }
|
||||
.admin-area .aligned ul label {
|
||||
display: inline;
|
||||
float: none;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.aligned .form-row input {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.colMS .aligned .vLargeTextField, .colMS .aligned .vXMLLargeTextField {
|
||||
width: 350px;
|
||||
}
|
||||
|
||||
form .aligned ul {
|
||||
width: auto; }
|
||||
.admin-area .aligned .form-row input {
|
||||
margin-bottom: 0; }
|
||||
.admin-area .colMS .aligned .vLargeTextField, .admin-area .colMS .aligned .vXMLLargeTextField {
|
||||
width: 350px; }
|
||||
.admin-area form .aligned ul {
|
||||
margin-left: 160px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
form .aligned ul.radiolist {
|
||||
padding-left: 10px; }
|
||||
.admin-area form .aligned ul.radiolist {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
form .aligned p.help {
|
||||
padding: 0; }
|
||||
.admin-area form .aligned p.help {
|
||||
clear: left;
|
||||
margin-top: 0;
|
||||
margin-left: 160px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
form .aligned label + p.help {
|
||||
padding-left: 10px; }
|
||||
.admin-area form .aligned label + p.help {
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
form .aligned p.help:last-child {
|
||||
padding-left: 0; }
|
||||
.admin-area form .aligned p.help:last-child {
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
form .aligned input + p.help,
|
||||
form .aligned textarea + p.help,
|
||||
form .aligned select + p.help {
|
||||
padding-bottom: 0; }
|
||||
.admin-area form .aligned input + p.help,
|
||||
.admin-area form .aligned textarea + p.help,
|
||||
.admin-area form .aligned select + p.help {
|
||||
margin-left: 160px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
form .aligned ul li {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
form .aligned table p {
|
||||
padding-left: 10px; }
|
||||
.admin-area form .aligned ul li {
|
||||
list-style: none; }
|
||||
.admin-area form .aligned table p {
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.aligned .vCheckboxLabel {
|
||||
padding-left: 0; }
|
||||
.admin-area .aligned .vCheckboxLabel {
|
||||
float: none;
|
||||
width: auto;
|
||||
display: inline-block;
|
||||
vertical-align: -3px;
|
||||
padding: 0 0 5px 5px;
|
||||
}
|
||||
|
||||
.aligned .vCheckboxLabel + p.help {
|
||||
margin-top: -4px;
|
||||
}
|
||||
|
||||
.colM .aligned .vLargeTextField, .colM .aligned .vXMLLargeTextField {
|
||||
width: 610px;
|
||||
}
|
||||
|
||||
.checkbox-row p.help {
|
||||
padding: 0 0 5px 5px; }
|
||||
.admin-area .aligned .vCheckboxLabel + p.help {
|
||||
margin-top: -4px; }
|
||||
.admin-area .colM .aligned .vLargeTextField, .admin-area .colM .aligned .vXMLLargeTextField {
|
||||
width: 610px; }
|
||||
.admin-area .checkbox-row p.help {
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
fieldset .field-box {
|
||||
padding-left: 0; }
|
||||
.admin-area fieldset .field-box {
|
||||
float: left;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
/* WIDE FIELDSETS */
|
||||
|
||||
.wide label {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
form .wide p, form .wide input + p.help {
|
||||
margin-left: 200px;
|
||||
}
|
||||
|
||||
form .wide p.help {
|
||||
padding-left: 38px;
|
||||
}
|
||||
|
||||
.colM fieldset.wide .vLargeTextField, .colM fieldset.wide .vXMLLargeTextField {
|
||||
width: 450px;
|
||||
}
|
||||
|
||||
/* COLLAPSED FIELDSETS */
|
||||
|
||||
fieldset.collapsed * {
|
||||
display: none;
|
||||
}
|
||||
|
||||
fieldset.collapsed h2, fieldset.collapsed {
|
||||
display: block;
|
||||
}
|
||||
|
||||
fieldset.collapsed {
|
||||
margin-right: 20px; }
|
||||
.admin-area .wide label {
|
||||
width: 200px; }
|
||||
.admin-area form .wide p, .admin-area form .wide input + p.help {
|
||||
margin-left: 200px; }
|
||||
.admin-area form .wide p.help {
|
||||
padding-left: 38px; }
|
||||
.admin-area .colM fieldset.wide .vLargeTextField, .admin-area .colM fieldset.wide .vXMLLargeTextField {
|
||||
width: 450px; }
|
||||
.admin-area fieldset.collapsed * {
|
||||
display: none; }
|
||||
.admin-area fieldset.collapsed h2, .admin-area fieldset.collapsed {
|
||||
display: block; }
|
||||
.admin-area fieldset.collapsed {
|
||||
border: 1px solid #eee;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
fieldset.collapsed h2 {
|
||||
overflow: hidden; }
|
||||
.admin-area fieldset.collapsed h2 {
|
||||
background: #f8f8f8;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
fieldset .collapse-toggle {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
fieldset.collapsed .collapse-toggle {
|
||||
color: #666; }
|
||||
.admin-area fieldset .collapse-toggle {
|
||||
color: #fff; }
|
||||
.admin-area fieldset.collapsed .collapse-toggle {
|
||||
background: transparent;
|
||||
display: inline;
|
||||
color: #447e9b;
|
||||
}
|
||||
|
||||
/* MONOSPACE TEXTAREAS */
|
||||
|
||||
fieldset.monospace textarea {
|
||||
font-family: "Bitstream Vera Sans Mono", Monaco, "Courier New", Courier, monospace;
|
||||
}
|
||||
|
||||
/* SUBMIT ROW */
|
||||
|
||||
.submit-row {
|
||||
color: #447e9b; }
|
||||
.admin-area fieldset.monospace textarea {
|
||||
font-family: "Bitstream Vera Sans Mono", Monaco, "Courier New", Courier, monospace; }
|
||||
.admin-area .submit-row {
|
||||
padding: 12px 14px;
|
||||
margin: 0 0 20px;
|
||||
background: #f8f8f8;
|
||||
border: 1px solid #eee;
|
||||
border-radius: 4px;
|
||||
text-align: right;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
body.popup .submit-row {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.submit-row input {
|
||||
overflow: hidden; }
|
||||
.admin-area body.popup .submit-row {
|
||||
overflow: auto; }
|
||||
.admin-area .submit-row input {
|
||||
height: 35px;
|
||||
line-height: 15px;
|
||||
margin: 0 0 0 5px;
|
||||
}
|
||||
|
||||
.submit-row input.default {
|
||||
margin: 0 0 0 5px; }
|
||||
.admin-area .submit-row input.default {
|
||||
margin: 0 0 0 8px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.submit-row p {
|
||||
margin: 0.3em;
|
||||
}
|
||||
|
||||
.submit-row p.deletelink-box {
|
||||
text-transform: uppercase; }
|
||||
.admin-area .submit-row p {
|
||||
margin: 0.3em; }
|
||||
.admin-area .submit-row p.deletelink-box {
|
||||
float: left;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.submit-row a.deletelink {
|
||||
margin: 0; }
|
||||
.admin-area .submit-row a.deletelink {
|
||||
display: block;
|
||||
background: #ba2121;
|
||||
border-radius: 4px;
|
||||
padding: 10px 15px;
|
||||
height: 15px;
|
||||
line-height: 15px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.submit-row a.deletelink:focus,
|
||||
.submit-row a.deletelink:hover,
|
||||
.submit-row a.deletelink:active {
|
||||
background: #a41515;
|
||||
}
|
||||
|
||||
/* CUSTOM FORM FIELDS */
|
||||
|
||||
.vSelectMultipleField {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.vCheckboxField {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.vDateField, .vTimeField {
|
||||
color: #fff; }
|
||||
.admin-area .submit-row a.deletelink:focus,
|
||||
.admin-area .submit-row a.deletelink:hover,
|
||||
.admin-area .submit-row a.deletelink:active {
|
||||
background: #a41515; }
|
||||
.admin-area .vSelectMultipleField {
|
||||
vertical-align: top; }
|
||||
.admin-area .vCheckboxField {
|
||||
border: none; }
|
||||
.admin-area .vDateField, .admin-area .vTimeField {
|
||||
margin-right: 2px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.vDateField {
|
||||
min-width: 6.85em;
|
||||
}
|
||||
|
||||
.vTimeField {
|
||||
min-width: 4.7em;
|
||||
}
|
||||
|
||||
.vURLField {
|
||||
width: 30em;
|
||||
}
|
||||
|
||||
.vLargeTextField, .vXMLLargeTextField {
|
||||
width: 48em;
|
||||
}
|
||||
|
||||
.flatpages-flatpage #id_content {
|
||||
height: 40.2em;
|
||||
}
|
||||
|
||||
.module table .vPositiveSmallIntegerField {
|
||||
width: 2.2em;
|
||||
}
|
||||
|
||||
.vTextField {
|
||||
width: 20em;
|
||||
}
|
||||
|
||||
.vIntegerField {
|
||||
width: 5em;
|
||||
}
|
||||
|
||||
.vBigIntegerField {
|
||||
width: 10em;
|
||||
}
|
||||
|
||||
.vForeignKeyRawIdAdminField {
|
||||
width: 5em;
|
||||
}
|
||||
|
||||
/* INLINES */
|
||||
|
||||
.inline-group {
|
||||
margin-bottom: 4px; }
|
||||
.admin-area .vDateField {
|
||||
min-width: 6.85em; }
|
||||
.admin-area .vTimeField {
|
||||
min-width: 4.7em; }
|
||||
.admin-area .vURLField {
|
||||
width: 30em; }
|
||||
.admin-area .vLargeTextField, .admin-area .vXMLLargeTextField {
|
||||
width: 48em; }
|
||||
.admin-area .flatpages-flatpage #id_content {
|
||||
height: 40.2em; }
|
||||
.admin-area .module table .vPositiveSmallIntegerField {
|
||||
width: 2.2em; }
|
||||
.admin-area .vTextField {
|
||||
width: 20em; }
|
||||
.admin-area .vIntegerField {
|
||||
width: 5em; }
|
||||
.admin-area .vBigIntegerField {
|
||||
width: 10em; }
|
||||
.admin-area .vForeignKeyRawIdAdminField {
|
||||
width: 5em; }
|
||||
.admin-area .inline-group {
|
||||
padding: 0;
|
||||
margin: 0 0 30px;
|
||||
}
|
||||
|
||||
.inline-group thead th {
|
||||
padding: 8px 10px;
|
||||
}
|
||||
|
||||
.inline-group .aligned label {
|
||||
width: 160px;
|
||||
}
|
||||
|
||||
.inline-related {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.inline-related h3 {
|
||||
margin: 0 0 30px; }
|
||||
.admin-area .inline-group thead th {
|
||||
padding: 8px 10px; }
|
||||
.admin-area .inline-group .aligned label {
|
||||
width: 160px; }
|
||||
.admin-area .inline-related {
|
||||
position: relative; }
|
||||
.admin-area .inline-related h3 {
|
||||
margin: 0;
|
||||
color: #666;
|
||||
padding: 5px;
|
||||
font-size: 13px;
|
||||
background: #f8f8f8;
|
||||
border-top: 1px solid #eee;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.inline-related h3 span.delete {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.inline-related h3 span.delete label {
|
||||
border-bottom: 1px solid #eee; }
|
||||
.admin-area .inline-related h3 span.delete {
|
||||
float: right; }
|
||||
.admin-area .inline-related h3 span.delete label {
|
||||
margin-left: 2px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.inline-related fieldset {
|
||||
font-size: 11px; }
|
||||
.admin-area .inline-related fieldset {
|
||||
margin: 0;
|
||||
background: #fff;
|
||||
border: none;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.inline-related fieldset.module h3 {
|
||||
width: 100%; }
|
||||
.admin-area .inline-related fieldset.module h3 {
|
||||
margin: 0;
|
||||
padding: 2px 5px 3px 5px;
|
||||
font-size: 11px;
|
||||
text-align: left;
|
||||
font-weight: bold;
|
||||
background: #bcd;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.inline-group .tabular fieldset.module {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.inline-related.tabular fieldset.module table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.last-related fieldset {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.inline-group .tabular tr.has_original td {
|
||||
padding-top: 2em;
|
||||
}
|
||||
|
||||
.inline-group .tabular tr td.original {
|
||||
color: #fff; }
|
||||
.admin-area .inline-group .tabular fieldset.module {
|
||||
border: none; }
|
||||
.admin-area .inline-related.tabular fieldset.module table {
|
||||
width: 100%; }
|
||||
.admin-area .last-related fieldset {
|
||||
border: none; }
|
||||
.admin-area .inline-group .tabular tr.has_original td {
|
||||
padding-top: 2em; }
|
||||
.admin-area .inline-group .tabular tr td.original {
|
||||
padding: 2px 0 0 0;
|
||||
width: 0;
|
||||
_position: relative;
|
||||
}
|
||||
|
||||
.inline-group .tabular th.original {
|
||||
_position: relative; }
|
||||
.admin-area .inline-group .tabular th.original {
|
||||
width: 0px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.inline-group .tabular td.original p {
|
||||
padding: 0; }
|
||||
.admin-area .inline-group .tabular td.original p {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
height: 1.1em;
|
||||
|
@ -427,73 +261,50 @@ body.popup .submit-row {
|
|||
font-size: 9px;
|
||||
font-weight: bold;
|
||||
color: #666;
|
||||
_width: 700px;
|
||||
}
|
||||
|
||||
.inline-group ul.tools {
|
||||
_width: 700px; }
|
||||
.admin-area .inline-group ul.tools {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.inline-group ul.tools li {
|
||||
list-style: none; }
|
||||
.admin-area .inline-group ul.tools li {
|
||||
display: inline;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.inline-group div.add-row,
|
||||
.inline-group .tabular tr.add-row td {
|
||||
padding: 0 5px; }
|
||||
.admin-area .inline-group div.add-row,
|
||||
.admin-area .inline-group .tabular tr.add-row td {
|
||||
color: #666;
|
||||
background: #f8f8f8;
|
||||
padding: 8px 10px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.inline-group .tabular tr.add-row td {
|
||||
border-bottom: 1px solid #eee; }
|
||||
.admin-area .inline-group .tabular tr.add-row td {
|
||||
padding: 8px 10px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.inline-group ul.tools a.add,
|
||||
.inline-group div.add-row a,
|
||||
.inline-group .tabular tr.add-row td a {
|
||||
border-bottom: 1px solid #eee; }
|
||||
.admin-area .inline-group ul.tools a.add,
|
||||
.admin-area .inline-group div.add-row a,
|
||||
.admin-area .inline-group .tabular tr.add-row td a {
|
||||
background: url(../img/icon-addlink.svg) 0 1px no-repeat;
|
||||
padding-left: 16px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.empty-form {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* RELATED FIELD ADD ONE / LOOKUP */
|
||||
|
||||
.add-another, .related-lookup {
|
||||
font-size: 12px; }
|
||||
.admin-area .empty-form {
|
||||
display: none; }
|
||||
.admin-area .add-another, .admin-area .related-lookup {
|
||||
margin-left: 5px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 14px;
|
||||
}
|
||||
|
||||
.add-another {
|
||||
background-size: 14px; }
|
||||
.admin-area .add-another {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background-image: url(../img/icon-addlink.svg);
|
||||
}
|
||||
|
||||
.related-lookup {
|
||||
background-image: url(../img/icon-addlink.svg); }
|
||||
.admin-area .related-lookup {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background-image: url(../img/search.svg);
|
||||
}
|
||||
|
||||
form .related-widget-wrapper ul {
|
||||
background-image: url(../img/search.svg); }
|
||||
.admin-area form .related-widget-wrapper ul {
|
||||
display: inline-block;
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
padding-left: 0; }
|
||||
.admin-area .clearable-file-input input {
|
||||
margin-top: 0; }
|
||||
|
||||
.clearable-file-input input {
|
||||
margin-top: 0;
|
||||
}
|
||||
/*# sourceMappingURL=forms.css.map */
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,499 @@
|
|||
@import url('widgets.css');
|
||||
|
||||
/* FORM ROWS */
|
||||
.admin-area{
|
||||
.form-row {
|
||||
overflow: hidden;
|
||||
padding: 10px;
|
||||
font-size: 13px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.form-row img, .form-row input {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.form-row label input[type="checkbox"] {
|
||||
margin-top: 0;
|
||||
vertical-align: 0;
|
||||
}
|
||||
|
||||
form .form-row p {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* FORM LABELS */
|
||||
|
||||
label {
|
||||
font-weight: normal;
|
||||
color: #666;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.required label, label.required {
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
/* RADIO BUTTONS */
|
||||
|
||||
form ul.radiolist li {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
form ul.radiolist label {
|
||||
float: none;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
form ul.radiolist input[type="radio"] {
|
||||
margin: -2px 4px 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
form ul.inline {
|
||||
margin-left: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
form ul.inline li {
|
||||
float: left;
|
||||
padding-right: 7px;
|
||||
}
|
||||
|
||||
/* ALIGNED FIELDSETS */
|
||||
|
||||
.aligned label {
|
||||
display: block;
|
||||
padding: 4px 10px 0 0;
|
||||
float: left;
|
||||
width: 160px;
|
||||
word-wrap: break-word;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.aligned label:not(.vCheckboxLabel):after {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.aligned label + p {
|
||||
padding: 6px 0;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
margin-left: 170px;
|
||||
}
|
||||
|
||||
.aligned ul label {
|
||||
display: inline;
|
||||
float: none;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.aligned .form-row input {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.colMS .aligned .vLargeTextField, .colMS .aligned .vXMLLargeTextField {
|
||||
width: 350px;
|
||||
}
|
||||
|
||||
form .aligned ul {
|
||||
margin-left: 160px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
form .aligned ul.radiolist {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
form .aligned p.help {
|
||||
clear: left;
|
||||
margin-top: 0;
|
||||
margin-left: 160px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
form .aligned label + p.help {
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
form .aligned p.help:last-child {
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
form .aligned input + p.help,
|
||||
form .aligned textarea + p.help,
|
||||
form .aligned select + p.help {
|
||||
margin-left: 160px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
form .aligned ul li {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
form .aligned table p {
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.aligned .vCheckboxLabel {
|
||||
float: none;
|
||||
width: auto;
|
||||
display: inline-block;
|
||||
vertical-align: -3px;
|
||||
padding: 0 0 5px 5px;
|
||||
}
|
||||
|
||||
.aligned .vCheckboxLabel + p.help {
|
||||
margin-top: -4px;
|
||||
}
|
||||
|
||||
.colM .aligned .vLargeTextField, .colM .aligned .vXMLLargeTextField {
|
||||
width: 610px;
|
||||
}
|
||||
|
||||
.checkbox-row p.help {
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
fieldset .field-box {
|
||||
float: left;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
/* WIDE FIELDSETS */
|
||||
|
||||
.wide label {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
form .wide p, form .wide input + p.help {
|
||||
margin-left: 200px;
|
||||
}
|
||||
|
||||
form .wide p.help {
|
||||
padding-left: 38px;
|
||||
}
|
||||
|
||||
.colM fieldset.wide .vLargeTextField, .colM fieldset.wide .vXMLLargeTextField {
|
||||
width: 450px;
|
||||
}
|
||||
|
||||
/* COLLAPSED FIELDSETS */
|
||||
|
||||
fieldset.collapsed * {
|
||||
display: none;
|
||||
}
|
||||
|
||||
fieldset.collapsed h2, fieldset.collapsed {
|
||||
display: block;
|
||||
}
|
||||
|
||||
fieldset.collapsed {
|
||||
border: 1px solid #eee;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
fieldset.collapsed h2 {
|
||||
background: #f8f8f8;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
fieldset .collapse-toggle {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
fieldset.collapsed .collapse-toggle {
|
||||
background: transparent;
|
||||
display: inline;
|
||||
color: #447e9b;
|
||||
}
|
||||
|
||||
/* MONOSPACE TEXTAREAS */
|
||||
|
||||
fieldset.monospace textarea {
|
||||
font-family: "Bitstream Vera Sans Mono", Monaco, "Courier New", Courier, monospace;
|
||||
}
|
||||
|
||||
/* SUBMIT ROW */
|
||||
|
||||
.submit-row {
|
||||
padding: 12px 14px;
|
||||
margin: 0 0 20px;
|
||||
background: #f8f8f8;
|
||||
border: 1px solid #eee;
|
||||
border-radius: 4px;
|
||||
text-align: right;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
body.popup .submit-row {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.submit-row input {
|
||||
height: 35px;
|
||||
line-height: 15px;
|
||||
margin: 0 0 0 5px;
|
||||
}
|
||||
|
||||
.submit-row input.default {
|
||||
margin: 0 0 0 8px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.submit-row p {
|
||||
margin: 0.3em;
|
||||
}
|
||||
|
||||
.submit-row p.deletelink-box {
|
||||
float: left;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.submit-row a.deletelink {
|
||||
display: block;
|
||||
background: #ba2121;
|
||||
border-radius: 4px;
|
||||
padding: 10px 15px;
|
||||
line-height: 15px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.submit-row a.deletelink:focus,
|
||||
.submit-row a.deletelink:hover,
|
||||
.submit-row a.deletelink:active {
|
||||
background: #a41515;
|
||||
}
|
||||
|
||||
/* CUSTOM FORM FIELDS */
|
||||
|
||||
.vSelectMultipleField {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.vCheckboxField {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.vDateField, .vTimeField {
|
||||
margin-right: 2px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.vDateField {
|
||||
min-width: 6.85em;
|
||||
}
|
||||
|
||||
.vTimeField {
|
||||
min-width: 4.7em;
|
||||
}
|
||||
|
||||
.vURLField {
|
||||
width: 30em;
|
||||
}
|
||||
|
||||
.vLargeTextField, .vXMLLargeTextField {
|
||||
width: 48em;
|
||||
}
|
||||
|
||||
.flatpages-flatpage #id_content {
|
||||
height: 40.2em;
|
||||
}
|
||||
|
||||
.module table .vPositiveSmallIntegerField {
|
||||
width: 2.2em;
|
||||
}
|
||||
|
||||
.vTextField {
|
||||
width: 20em;
|
||||
}
|
||||
|
||||
.vIntegerField {
|
||||
width: 5em;
|
||||
}
|
||||
|
||||
.vBigIntegerField {
|
||||
width: 10em;
|
||||
}
|
||||
|
||||
.vForeignKeyRawIdAdminField {
|
||||
width: 5em;
|
||||
}
|
||||
|
||||
/* INLINES */
|
||||
|
||||
.inline-group {
|
||||
padding: 0;
|
||||
margin: 0 0 30px;
|
||||
}
|
||||
|
||||
.inline-group thead th {
|
||||
padding: 8px 10px;
|
||||
}
|
||||
|
||||
.inline-group .aligned label {
|
||||
width: 160px;
|
||||
}
|
||||
|
||||
.inline-related {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.inline-related h3 {
|
||||
margin: 0;
|
||||
color: #666;
|
||||
padding: 5px;
|
||||
font-size: 13px;
|
||||
background: #f8f8f8;
|
||||
border-top: 1px solid #eee;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.inline-related h3 span.delete {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.inline-related h3 span.delete label {
|
||||
margin-left: 2px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.inline-related fieldset {
|
||||
margin: 0;
|
||||
background: #fff;
|
||||
border: none;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.inline-related fieldset.module h3 {
|
||||
margin: 0;
|
||||
padding: 2px 5px 3px 5px;
|
||||
font-size: 11px;
|
||||
text-align: left;
|
||||
font-weight: bold;
|
||||
background: #bcd;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.inline-group .tabular fieldset.module {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.inline-related.tabular fieldset.module table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.last-related fieldset {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.inline-group .tabular tr.has_original td {
|
||||
padding-top: 2em;
|
||||
}
|
||||
|
||||
.inline-group .tabular tr td.original {
|
||||
padding: 2px 0 0 0;
|
||||
width: 0;
|
||||
_position: relative;
|
||||
}
|
||||
|
||||
.inline-group .tabular th.original {
|
||||
width: 0px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.inline-group .tabular td.original p {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
height: 1.1em;
|
||||
padding: 2px 9px;
|
||||
overflow: hidden;
|
||||
font-size: 9px;
|
||||
font-weight: bold;
|
||||
color: #666;
|
||||
_width: 700px;
|
||||
}
|
||||
|
||||
.inline-group ul.tools {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.inline-group ul.tools li {
|
||||
display: inline;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.inline-group div.add-row,
|
||||
.inline-group .tabular tr.add-row td {
|
||||
color: #666;
|
||||
background: #f8f8f8;
|
||||
padding: 8px 10px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.inline-group .tabular tr.add-row td {
|
||||
padding: 8px 10px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.inline-group ul.tools a.add,
|
||||
.inline-group div.add-row a,
|
||||
.inline-group .tabular tr.add-row td a {
|
||||
background: url(../img/icon-addlink.svg) 0 1px no-repeat;
|
||||
padding-left: 16px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.empty-form {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* RELATED FIELD ADD ONE / LOOKUP */
|
||||
|
||||
.add-another, .related-lookup {
|
||||
margin-left: 5px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 14px;
|
||||
}
|
||||
|
||||
.add-another {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background-image: url(../img/icon-addlink.svg);
|
||||
}
|
||||
|
||||
.related-lookup {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background-image: url(../img/search.svg);
|
||||
}
|
||||
|
||||
form .related-widget-wrapper ul {
|
||||
display: inline-block;
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.clearable-file-input input {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
|
@ -39,4 +39,10 @@ ul#side-menu.nav a {
|
|||
.navbar-default {
|
||||
background-color: white; }
|
||||
|
||||
.alert {
|
||||
margin-bottom: 10px; }
|
||||
|
||||
table.table-first-col-bold td:first-child {
|
||||
font-weight: bold; }
|
||||
|
||||
/*# sourceMappingURL=main.css.map */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"version": 3,
|
||||
"mappings": "AAAA,WAAW;EACP,MAAM,EAAE,IAAI;EACZ,UAAU,EAAE,IAAI;EAChB,gBAAgB,EAAE,OAAO;EAEzB,yBAAa;IACT,MAAM,EAAE,IAAI;IACZ,OAAO,EAAE,GAAG;EAEhB,wBAAY;IACR,UAAU,EAAE,IAAI;IAChB,WAAW,EAAE,GAAG;EAGpB,8BAAkB;IACd,KAAK,EAAE,KAAK;IACZ,eAAe,EAAE,IAAI;EAIrB,+CAAiB;IACb,KAAK,EAAE,KAAK;EAGhB,qHAAyB;IACrB,gBAAgB,EAAE,OAAO;EAM7B,kEAAgB;IACZ,KAAK,EAAE,KAAK;IACZ,eAAe,EAAE,IAAI;IACrB,gBAAgB,EAAE,OAAO;EAIjC,kDAAsC;IAClC,MAAM,EAAE,IAAI;EAGhB,yBAAa;IACT,OAAO,EAAE,KAAK;IAEd,gCAAM;MACF,SAAS,EAAE,GAAG;MACd,KAAK,EAAE,IAAI;;AAMnB,kBAAC;EACG,KAAK,EAAE,IAAI;;AAInB,QAAQ;EACJ,KAAK,EAAE,IAAI;;AAGf,WAAY;EACR,UAAU,EAAE,IAAI;;AAGpB,eAAe;EACX,gBAAgB,EAAE,KAAK",
|
||||
"mappings": "AAAA,WAAW;EACP,MAAM,EAAE,IAAI;EACZ,UAAU,EAAE,IAAI;EAChB,gBAAgB,EAAE,OAAO;EAEzB,yBAAa;IACT,MAAM,EAAE,IAAI;IACZ,OAAO,EAAE,GAAG;EAEhB,wBAAY;IACR,UAAU,EAAE,IAAI;IAChB,WAAW,EAAE,GAAG;EAGpB,8BAAkB;IACd,KAAK,EAAE,KAAK;IACZ,eAAe,EAAE,IAAI;EAIrB,+CAAiB;IACb,KAAK,EAAE,KAAK;EAGhB,qHAAyB;IACrB,gBAAgB,EAAE,OAAO;EAM7B,kEAAgB;IACZ,KAAK,EAAE,KAAK;IACZ,eAAe,EAAE,IAAI;IACrB,gBAAgB,EAAE,OAAO;EAIjC,kDAAsC;IAClC,MAAM,EAAE,IAAI;EAGhB,yBAAa;IACT,OAAO,EAAE,KAAK;IAEd,gCAAM;MACF,SAAS,EAAE,GAAG;MACd,KAAK,EAAE,IAAI;;AAMnB,kBAAC;EACG,KAAK,EAAE,IAAI;;AAInB,QAAQ;EACJ,KAAK,EAAE,IAAI;;AAGf,WAAY;EACR,UAAU,EAAE,IAAI;;AAGpB,eAAe;EACX,gBAAgB,EAAE,KAAK;;AAG3B,MAAM;EACF,aAAa,EAAE,IAAI;;AAInB,yCAAc;EACV,WAAW,EAAE,IAAI",
|
||||
"sources": ["main.scss"],
|
||||
"names": [],
|
||||
"file": "main.css"
|
||||
|
|
|
@ -67,3 +67,13 @@ ul#side-menu.nav{
|
|||
.navbar-default{
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.alert{
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
table.table-first-col-bold{
|
||||
td:first-child{
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
{% block extra-headers %}{% endblock %}
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'app/css/main.css' %}" />
|
||||
<script src="{% static 'app/js/vendor/modernizr-2.8.3.min.js' %}"></script>
|
||||
<script src="{% static 'app/js/vendor/jquery-1.11.2.min.js' %}"></script>
|
||||
<title>{{title|default:"Login"}} - WebODM</title>
|
||||
</head>
|
||||
<body data-admin-utc-offset="{% now "Z" %}">
|
||||
|
@ -67,8 +68,6 @@
|
|||
{% block page-wrapper %}{% endblock %}
|
||||
</div>
|
||||
</body>
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
|
||||
<script>window.jQuery || document.write('<script src="{% static 'app/js/vendor/jquery-1.11.2.min.js' %}"><\/script>')</script>
|
||||
<script src="{% static 'app/js/vendor/bootstrap.min.js' %}"></script>
|
||||
<script src="{% static 'app/js/vendor/metisMenu.min.js' %}"></script>
|
||||
<script src="{% static 'app/js/main.js' %}"></script>
|
||||
|
|
|
@ -248,7 +248,7 @@
|
|||
|
||||
{% for node in nodes %}
|
||||
<li>
|
||||
<a href="#"><span class="fa fa-laptop"></span> {{node}}</a>
|
||||
<a href="{% url 'processing_node' node.id %}"><span class="fa fa-laptop"></span> {{node}}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
<li>
|
||||
|
@ -277,6 +277,15 @@
|
|||
<div id="page-wrapper">
|
||||
<section class="main">
|
||||
<div class="content">
|
||||
{% block messages %}
|
||||
{% for message in messages %}
|
||||
<div class="alert alert-{{ message.tags }} alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
</section>
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
{% extends "app/logged_in_base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<h3>Processing Node</h3>
|
||||
<table class="table table-bordered table-first-col-bold">
|
||||
<tr>
|
||||
<td>{% trans "Hostname" %}</td>
|
||||
<td>{{ processing_node.hostname }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{% trans "Port" %}</td>
|
||||
<td>{{ processing_node.port }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{% trans "API Version" %}</td>
|
||||
<td>{{ processing_node.api_version }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{% trans "Queue Count" %}</td>
|
||||
<td>{{ processing_node.queue_count }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{% trans "Last Refreshed" %}</td>
|
||||
<td>{{ processing_node.last_refreshed }}</td> <!-- TODO: timezone? -->
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{% trans "Options (JSON)" %}</td>
|
||||
<td><div id="processing_node_json"></div></td>
|
||||
</tr>
|
||||
</table>
|
||||
<script>
|
||||
$(function(){
|
||||
// TODO: we'll need a prettier console library to display stuff like
|
||||
// json, console output, etc.
|
||||
// this is temporary!
|
||||
var optionsText = JSON.stringify(JSON.parse("{{ available_options_json|escapejs }}"), null, 4);
|
||||
$("#processing_node_json")
|
||||
.html(optionsText.replace(/\n/g, "<br/>").replace(/ /g, " "))
|
||||
.css({
|
||||
'overflow': 'auto',
|
||||
'max-height': '200px'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
|
@ -4,4 +4,5 @@ from . import views
|
|||
urlpatterns = [
|
||||
url(r'^$', views.index, name='index'),
|
||||
url(r'^dashboard/$', views.dashboard, name='dashboard'),
|
||||
url(r'^processingnode/([\d]+)/$', views.processing_node, name='processing_node'),
|
||||
]
|
18
app/views.py
18
app/views.py
|
@ -1,5 +1,7 @@
|
|||
from django.shortcuts import render, redirect
|
||||
from django.shortcuts import render, redirect, get_object_or_404
|
||||
from django.http import HttpResponse
|
||||
from nodeodm.models import ProcessingNode
|
||||
from django.contrib import messages
|
||||
|
||||
|
||||
def index(request):
|
||||
|
@ -7,4 +9,16 @@ def index(request):
|
|||
else 'login')
|
||||
|
||||
def dashboard(request):
|
||||
return render(request, 'app/dashboard.html', {'title': "Dashboard"})
|
||||
return render(request, 'app/dashboard.html', {'title': 'Dashboard'})
|
||||
|
||||
def processing_node(request, processing_node_id):
|
||||
pn = get_object_or_404(ProcessingNode, pk=processing_node_id)
|
||||
if not pn.update_node_info():
|
||||
messages.add_message(request, messages.constants.WARNING, '{} seems to be offline.'.format(pn))
|
||||
|
||||
return render(request, 'app/processing_node.html',
|
||||
{
|
||||
'title': 'Processing Node',
|
||||
'processing_node': pn,
|
||||
'available_options_json': pn.get_available_options_json()
|
||||
})
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
A wrapper around Bravado to communicate with a node-OpenDroneMap node.
|
||||
"""
|
||||
from bravado.client import SwaggerClient
|
||||
from bravado.exception import HTTPError
|
||||
from requests import ConnectionError
|
||||
|
||||
class ApiClient:
|
||||
|
@ -15,9 +16,10 @@ class ApiClient:
|
|||
if not hasattr(self, 'client'):
|
||||
try:
|
||||
self.client = SwaggerClient.from_url('http://{}:{}/swagger.json'.format(self.host, self.port))
|
||||
except ConnectionError as err:
|
||||
except (ConnectionError, HTTPError) as err:
|
||||
print("{}:{} seems offline: {}".format(self.host, self.port, err))
|
||||
return None
|
||||
|
||||
return func(self, *args, **kwargs)
|
||||
return check
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ from django.db import models
|
|||
from django.contrib.postgres import fields
|
||||
from django.utils import timezone
|
||||
from .api_client import ApiClient
|
||||
import json
|
||||
|
||||
class ProcessingNode(models.Model):
|
||||
hostname = models.CharField(max_length=255, help_text="Hostname where the node is located (can be an internal hostname as well)")
|
||||
|
@ -24,8 +25,10 @@ class ProcessingNode(models.Model):
|
|||
|
||||
def update_node_info(self):
|
||||
"""
|
||||
Retrieves information and options from the node
|
||||
and saves it into the database
|
||||
Retrieves information and options from the node API
|
||||
and saves it into the database.
|
||||
|
||||
:returns: True if information could be updated, False otherwise
|
||||
"""
|
||||
info = self.api_client.info()
|
||||
if info != None:
|
||||
|
@ -38,3 +41,11 @@ class ProcessingNode(models.Model):
|
|||
self.last_refreshed = timezone.now()
|
||||
|
||||
self.save()
|
||||
return True
|
||||
return False
|
||||
|
||||
def get_available_options_json(self):
|
||||
"""
|
||||
:returns available options in JSON string format
|
||||
"""
|
||||
return json.dumps(self.available_options)
|
||||
|
|
|
@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/1.10/ref/settings/
|
|||
"""
|
||||
|
||||
import os
|
||||
from django.contrib.messages import constants as messages
|
||||
|
||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
@ -136,6 +137,12 @@ LOGIN_URL = '/login/'
|
|||
# File uploads
|
||||
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
|
||||
|
||||
# Store flash messages in cookies
|
||||
MESSAGE_STORAGE = 'django.contrib.messages.storage.cookie.CookieStorage'
|
||||
MESSAGE_TAGS = {
|
||||
messages.ERROR: 'danger' # Bootstrap 3 compatibility
|
||||
}
|
||||
|
||||
try:
|
||||
from .local_settings import *
|
||||
except ImportError:
|
||||
|
|
Ładowanie…
Reference in New Issue