diff --git a/OpenBench/static/base.css b/OpenBench/static/base.css new file mode 100644 index 0000000..11f70fd --- /dev/null +++ b/OpenBench/static/base.css @@ -0,0 +1,315 @@ +/* Width classes */ +.w-25 { + width: 25%; +} + +.w-50 { + width: 50%; +} + +.w-75 { + width: 75%; +} + +.w-100 { + width: 100%; +} + +.mw-25 { + max-width: 25%; +} + +.mw-50 { + max-width: 50%; +} + +.mw-75 { + max-width: 75%; +} + +.mw-100 { + max-width: 100%; +} + +/* Margin and Padding classes */ +.mt-1 { + margin-top: 0.25rem; +} + +.mt-2 { + margin-top: 0.5rem; +} + +.mt-3 { + margin-top: 1rem; +} + +.mt-4 { + margin-top: 1.5rem; +} + +.mt-5 { + margin-top: 3rem; +} + +.mb-1 { + margin-bottom: 0.25rem; +} + +.mb-2 { + margin-bottom: 0.5rem; +} + +.mb-3 { + margin-bottom: 1rem; +} + +.mb-4 { + margin-bottom: 1.5rem; +} + +.mb-5 { + margin-bottom: 3rem; +} + +.ml-1 { + margin-left: 0.25rem; +} + +.ml-2 { + margin-left: 0.5rem; +} + +.ml-3 { + margin-left: 1rem; +} + +.ml-4 { + margin-left: 1.5rem; +} + +.ml-5 { + margin-left: 3rem; +} + +.mr-1 { + margin-right: 0.25rem; +} + +.mr-2 { + margin-right: 0.5rem; +} + +.mr-3 { + margin-right: 1rem; +} + +.mr-4 { + margin-right: 1.5rem; +} + +.mr-5 { + margin-right: 3rem; +} + +.mx-1 { + margin-left: 0.25rem; + margin-right: 0.25rem; +} + +.mx-2 { + margin-left: 0.5rem; + margin-right: 0.5rem; +} + +.mx-3 { + margin-left: 1rem; + margin-right: 1rem; +} + +.mx-4 { + margin-left: 1.5rem; + margin-right: 1.5rem; +} + +.mx-5 { + margin-left: 3rem; + margin-right: 3rem; +} + +.my-1 { + margin-top: 0.25rem; + margin-bottom: 0.25rem; +} + +.my-2 { + margin-top: 0.5rem; + margin-bottom: 0.5rem; +} + +.my-3 { + margin-top: 1rem; + margin-bottom: 1rem; +} + +.my-4 { + margin-top: 1.5rem; + margin-bottom: 1.5rem; +} + +.my-5 { + margin-top: 3rem; + margin-bottom: 3rem; +} + +.p-1{ + padding: 0.25rem; +} + +.p-2{ + padding: 0.5rem; +} + +.p-3{ + padding: 0.75rem; +} + +.p-4{ + padding: 1.0rem; +} + +.p-5{ + padding: 1.25rem; +} + +.pt-1 { + padding-top: 0.25rem; +} + +.pt-2 { + padding-top: 0.5rem; +} + +.pt-3 { + padding-top: 1rem; +} + +.pt-4 { + padding-top: 1.5rem; +} + +.pt-5 { + padding-top: 3rem; +} + +.pb-1 { + padding-bottom: 0.25rem; +} + +.pb-2 { + padding-bottom: 0.5rem; +} + +.pb-3 { + padding-bottom: 1rem; +} + +.pb-4 { + padding-bottom: 1.5rem; +} + +.pb-5 { + padding-bottom: 3rem; +} + +.pl-1 { + padding-left: 0.25rem; +} + +.pl-2 { + padding-left: 0.5rem; +} + +.pl-3 { + padding-left: 1rem; +} + +.pl-4 { + padding-left: 1.5rem; +} + +.pl-5 { + padding-left: 3rem; +} + +.pr-1 { + padding-right: 0.25rem; +} + +.pr-2 { + padding-right: 0.5rem; +} + +.pr-3 { + padding-right: 1rem; +} + +.pr-4 { + padding-right: 1.5rem; +} + +.pr-5 { + padding-right: 3rem; +} + +.px-1 { + padding-left: 0.25rem; + padding-right: 0.25rem; +} + +.px-2 { + padding-left: 0.5rem; + padding-right: 0.5rem; +} + +.px-3 { + padding-left: 1rem; + padding-right: 1rem; +} + +.px-4 { + padding-left: 1.5rem; + padding-right: 1.5rem; +} + +.px-5 { + padding-left: 3rem; + padding-right: 3rem; +} + +.py-1 { + padding-top: 0.25rem; + padding-bottom: 0.25rem; +} + +.py-2 { + padding-top: 0.5rem; + padding-bottom: 0.5rem; +} + +.py-3 { + padding-top: 1rem; + padding-bottom: 1rem; +} + +.py-4 { + padding-top: 1.5rem; + padding-bottom: 1.5rem; +} + +.py-5 { + padding-top: 3rem; + padding-bottom: 3rem; +} + + diff --git a/OpenBench/static/ethereal.css b/OpenBench/static/ethereal.css new file mode 100644 index 0000000..347a0ef --- /dev/null +++ b/OpenBench/static/ethereal.css @@ -0,0 +1,307 @@ +body { + font-family: "Courier Prime"; + font-size: 18px; + background: #303030; +} + +a:link, a:visited, a:hover, a:active { + text-decoration: none; + color: #FFFFFF; +} + +#sidebar { + float: left; + margin: 16px; + margin-top: 60px; +} + +#sidebar ul { + list-style-type: none; + padding: 0px 16px 0px 8px; + line-height: 1.75; +} + +#sidebar li a { + color: #A2A2A2; + padding: 0px 16px; + font-size: 1.0rem; +} + +#sidebar li:hover { + background-color: #666666; + border-radius: 8px; +} + +#sidebar .header { + color: #00AF00; + padding: 0px 16px; + font-size: 1.0rem; +} + +#sidebar .header:hover { + background-color: #303030; +} + +#content { + float: left; + margin-top: 0; + color: #EAEAEA; +} + +#content label { + width: 128px; + padding-right: 10px; + text-align: right; + display: inline-block; + color: #A2A2A2; + font-size: 14px; +} + +#content input, #content select { + background-color: #BBBBBB; + color: #000000; + padding: 10px; + margin: 1px 0px; + width: 320px; + box-sizing: border-box; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; +} + +#content button { + padding: 8px 0px; + margin: 2px 0px; + display: inline-block; + vertical-align: middle; + width: 290px; + background-color: #777777; + color: black; + border: none; + border-radius: 16px; + cursor: pointer; + font-weight: bold; +} + +#content button:hover { + background-color: #00AF00; +} + +#content input[type=submit] { + background-color: #00AF00; + color: #000000; + border: none; + border-radius: 16px; + cursor: pointer; + width: 100%; + font-weight: bold; +} + +#content input:read-only { + font-weight: bold; +} + +#content input:-moz-read-only { + font-weight: bold; +} + +#content #configuration { + float: left; + margin-top: 20px; +} + +#content #actions { + margin-left: 32px; + float: right; +} + +#content #actions h4 { + color: #A2A2A2; + font-size: 15px; + font-weight: bold; +} + +#content #actions .anchorbutton { + color: #000000; + padding: 8px 8px; + margin: 0px 8px; + border-radius: 16px; + font-weight: bold; + text-align: center; + display: inline-block; + width: 25%; +} + +#content #actions .anchorbutton a:hover { + background-color: #00AF00; +} + +#content #actions #approvebutton { + background-color: #9DF779; +} + +#content #actions #stopbutton { + background-color: #EEF788; +} + +#content #actions #restartbutton { + background-color: #EEF788; +} + +#content #actions #deletebutton { + background-color: #FA8E8E; +} + +#content #actions .deadbutton { + background-color: #808080; + pointer-events: none; +} + +#content #actions input { + width: 260px; +} + +#content #actions input[type=submit] { + width: 100%; +} + +#content .left-align { + text-align: left; +} + +#content tr:hover { + background-color: #666666; +} + +#content th { + color: #00AF00; + font-size: 16px; + font-weight: 100; + padding: 7px 12px 5px 12px; + background-color: #000000; +} + +#content td { + padding: 7px 12px 5px 12px; +} + +#content .numeric { + text-align: right; +} + +#content tr { + background-color: #202020; +} + +#content .table-spacer th { + background: #303030; + height: 16px; +} + +#content .statblock { + line-height: 70%; + color: black; + background-color: #CCCCCC; + border-radius: 4px; + font-family: "Courier New"; +} + +#content .green { + background-color: #9DF779 +} + +#content .yellow { + background-color: #EEF788 +} + +#content .red { + background-color: #FA8E8E +} + +#content #results { + display: inline-block; + width: inherit; +} + +#content table { + line-height: 96%; +} + +#content .textcenter { + text-align: center; +} + +#content strong { + font-size: 14px; + font-weight: bold; +} + +#content a:not(.TitleLink) { + font-weight: 100; + color: #8BBAD6; +} + +#content a.redlink { + color: #FF4D4D; +} + +#content a.unstarred { + color: #808080; +} + +#content h1, h2, h3 { + color: #a7a7a7; + text-align: center; +} + +#content #pagebrowse { + text-align: center; + margin: 16px 0px 16px 0px; +} + +#content .page { + text-align: center; + display: inline-block; + padding: 8px 0px; + width: 5%; + background-color: #1A1A1A; + border-radius: 8px; +} + +#content .page:hover { + background-color: #00AF00; +} + +#error { + background-color: #EE7676; + padding: 8px; + text-align: center; +} + +#content form h3 { + margin-left: 110px; + margin-bottom: 2px; + font-size: 16px; + font-weight: normal; + color: #00AF00; +} + +#content h4 a { + font-size: 18px; +} + +#content form .settings-column { + float: left; + padding-bottom: 16px; +} + +#content #test-mode-buttons button { + width: 49.8%; +} + +#content #test-mode-buttons .left-floated { + float: left; +} + +#content #test-mode-buttons .right-floated { + float: right; +} \ No newline at end of file diff --git a/OpenBench/static/form.css b/OpenBench/static/form.css new file mode 100644 index 0000000..050b996 --- /dev/null +++ b/OpenBench/static/form.css @@ -0,0 +1,105 @@ + +#content .form { + +} + +#content .form .col { + display: inline-block; + width: 50%; + white-space: normal; + margin-left: 0; + box-sizing: border-box; + vertical-align: top; +} + +#content .form .col-full { + display: block; + width: 100%; + white-space: normal; + margin-left: 0; + box-sizing: border-box; + vertical-align: top; +} + +/* Styles for screen widths less than 600px */ +@media (max-width: 1024px) { + #content .form .col { + display: block; + width: 100%; + } +} + +#content .form h3 { + font-weight: 700; + width: 100%; + display: inline-block; + box-sizing: border-box; + padding-left: 2rem; + text-align: left; + color: var(--color-font3) +} + +#content .form .row { + display: flex; + align-items: center; + margin-bottom: 0.5rem; +} + +#content .row label { + width: 25%; + min-width: 128px; + margin-right: 1rem; + text-align: right; + font-weight: 600; + color: var(--color-font2) +} + +#content .row input, +#content .row select { + flex-grow: 1; + min-width: 0; + border: 1px solid var(--color3); + border-radius: 4px; + padding: 6px; + background-color: var(--color2); + color: var(--color-font2) +} +#content .row input[type="file"]{ + padding: 2px 2px; +} + +#content .row input:focus, +#content .row select:focus { + outline: none; + border-color: var(--color3); + box-shadow: 0 0 0 3px rgba(77, 144, 254, 0.25); + background-color: var(--color2); + color: var(--color-font2) +} + +#content .row input[type="file"]::file-selector-button { + background-color: var(--color3); + border: 1px solid var(--color2); + border-radius: 4px; + padding: 4px 6px; + color: var(--color-font2); + cursor: pointer; + transition: background-color 0.3s, border-color 0.3s; +} + +#content .row input[type="file"]::file-selector-button:hover { + background-color: rgba(77, 144, 254, 0.8); + border-color: var(--color2); +} + +#content .form .flex { + display: flex; + flex-wrap: wrap; + max-width: 100%; + justify-content: flex-start; +} + +#content .form .flex button{ + max-width: 100%; +} + diff --git a/OpenBench/static/style.css b/OpenBench/static/style.css index dbf43df..cf50cd9 100644 --- a/OpenBench/static/style.css +++ b/OpenBench/static/style.css @@ -1,225 +1,276 @@ -body { - font-family: "Courier Prime"; - font-size: 18px; - background: #303030; -} a:link, a:visited, a:hover, a:active { text-decoration: none; - color: #FFFFFF; + color: #8BBAD6; +} + +body { + --color1: #222222; + --color2: #2D2D2D; + --color3: #3B3B3B; + + --color-font1: #DBDEE1; + --color-font2: #949BA4; + --color-font3: #008F11; + + background-color: var(--color1); + + font-size: 16px; + font-family: "Courier Prime"; + display:flex; +} + +body, html, main{ + padding: 0; + margin: 0; + min-width: 100%; + max-width: 100%; + white-space: nowrap; } #sidebar { - float: left; - margin: 16px; - margin-top: 60px; + /*float: left;*/ + padding: 60px 16px 16px 16px; + flex-basis: calc(min(300px, max(200px, 15%))); } +#content-parent{ + flex-grow: 1; + justify-content: left; + height: 100%; + + box-sizing: border-box; + padding-left: 2rem; + padding-right: 2rem; +} + +#content{ + max-width: calc(min(100%,1200px)); + width: 100%; + white-space: nowrap; + display: inline-block; +} + + +/* Styles for screen widths less than 600px */ +@media (max-width: 599px) { + #sidebar { + flex-basis: 100%; + padding: 16px; + } + + #content-parent { + height: auto; + flex-grow: 0; + flex-basis: 100%; + } + + body { + flex-direction: column; + } +} + + #sidebar ul { list-style-type: none; - padding: 0px 0px 0px 8px; - line-height: 1.50; + padding: 0px 16px 0px 8px; + line-height: 1.75; +} + +#sidebar li { + padding: 2px 16px; + font-size: 1.0rem; + border-radius: 4px; + transition: background-color 0.2s ease-in-out; } #sidebar li a { - color: #A2A2A2; - padding: 0px 16px; - font-size: 16px; + color: var(--color-font2); } #sidebar li:hover { - background-color: #666666; - border-radius: 8px; -} - -#sidebar .header { - color: #00AF00; - padding: 0px 16px; - font-size: 16px; -} - -#sidebar .header:hover { background-color: #303030; } -#content { - float: left; - margin-top: 0; - color: #EAEAEA; -} - -#content label { - width: 128px; - padding-right: 10px; - text-align: right; - display: inline-block; - color: #A2A2A2; - font-size: 14px; -} - -#content input, #content select { - - background-color: #BBBBBB; - color: #000000; - padding: 10px; - margin: 1px 0px; - width: 340px; - - border: 2px solid black; - border-radius: 6px; - - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} - -#content button { - padding: 8px 0px; - margin: 2px 0px; - display: inline-block; - vertical-align: middle; - width: 290px; - background-color: #777777; - color: black; - border: none; - border-radius: 16px; - cursor: pointer; - font-weight: bold; -} - -#content button:hover { - background-color: #00AF00; -} - -#content input[type=submit] { - background-color: #00AF00; - color: #000000; - border: none; - border-radius: 16px; - cursor: pointer; - width: 100%; - font-weight: bold; -} - -#content input:read-only { - font-weight: bold; -} - -#content input:-moz-read-only { - font-weight: bold; -} - -#content #configuration { - float: left; - margin-top: 20px; -} - -#content #actions { - margin-left: 32px; - float: right; -} - -#content #actions h4 { - color: #A2A2A2; - font-size: 15px; - font-weight: bold; -} - -#content #actions .anchorbutton { - color: #000000; - padding: 8px 8px; - margin: 0px 8px; - border-radius: 16px; - font-weight: bold; - text-align: center; - display: inline-block; - width: 25%; -} - -#content #actions .anchorbutton a:hover { - background-color: #00AF00; -} - -#content #actions #approvebutton { - background-color: #9DF779; -} - -#content #actions #stopbutton { - background-color: #EEF788; -} - -#content #actions #restartbutton { - background-color: #EEF788; -} - -#content #actions #deletebutton { - background-color: #FA8E8E; -} - -#content #actions .deadbutton { - background-color: #808080; +#sidebar .header { + color: var(--color-font3); + font-size: 1.1rem; pointer-events: none; } -#content #actions input { - width: 260px; +#sidebar hr { + border: 1px var(--color2) solid; } -#content #actions input[type=submit] { - width: 100%; +/* Table Striping, with overriding for the Table Header */ + +#content .stripes tr:nth-child(odd):not(.table-header) { + background-color: var(--color1); } -#content .left-align { - text-align: left; +#content .stripes tr:nth-child(even):not(.table-header) { + background-color: var(--color2); } -#content tr:hover { - background-color: #666666; +#content .stripes th { + background-color: black; } -#content th { - color: #00AF00; - font-size: 16px; - font-weight: 100; - padding: 7px 12px 5px 12px; - background-color: #000000; +/* Tables that have hoverable table rows */ + +#content .hoverable tr:nth-child(odd):hover:not(.table-header) { + background-color: #323232; +} + +#content .hoverable tr:nth-child(even):hover:not(.table-header) { + background-color: #323232; +} + +#content .hoverable tr:hover{ + background-color: var(--color1); +} + +/* Tables that are too long can wrap words*/ + +#content .wrappable td{ + white-space: pre-wrap; + word-break: break-word; + word-wrap: break-word; +} + +/* Table Headers in General */ + +#content .table-header th:first-child { + border-top-left-radius: 12px; +} + +#content .table-header th:last-child { + border-top-right-radius: 12px; +} + +#content .table-header th { + color: var(--color-font3); + font-weight: 400; + background-color: #171717; +} + +/* Table Spacer for chaining Tables as a hack */ + +#content .table-spacer th { + background-color: var(--color1); + height: 1rem; +} + +/* Generic Table CSS for all Tables */ + +#content table { + line-height: 96%; + border-collapse: collapse; } #content td { - padding: 7px 12px 5px 12px; + color: var(--color-font2); + border-bottom: 1px #444444 solid; } -#content .numeric { - text-align: right; +#content th, #content td { + padding: 10px 12px 6px 12px; } -#content tr { - background-color: #202020; +#content .anchorbutton { + border-radius: 4px; + padding: 8px; + border-color: transparent; + color: var(--color-font1); + display: inline-block; + text-align: center; + transition: background-color 0.3s ease; } -#content .table-spacer th { - background: #303030; - height: 16px; +#content .btn-blue { + background-color: #1C2D40; } +#content .btn-yellow { + background-color: #7A4E09; +} + +#content .btn-red { + background-color: #74261E; +} + +#content .btn-disabled { + background-color: var(--color3); +} + +#content .btn-blue:hover { + background-color: #2E3F57; +} + +#content .btn-yellow:hover { + background-color: #9B6B0F; +} + +#content .btn-red:hover { + background-color: #8E3D28; +} + +#content .btn-disabled:hover { + background-color: var(--color3); + cursor: not-allowed; + transform: none; +} + +#content .copy-button { + color: var(--color-font2); + transition: color 0.2s ease-in-out; +} + +#content .copy-button:hover { + color: var(--color-font3); +} + +/* Short StatBlock to show SPRT and Test Results */ + #content .statblock { - line-height: 70%; + font-size: 13px; color: black; + line-height: 96%; background-color: #CCCCCC; - border-radius: 4px; font-family: "Courier New"; + border-radius: 4px; + padding: 8px 10px; } -#content .green { - background-color: #9DF779 +#content .statblock-green { + background-color: #76D576; } -#content .yellow { - background-color: #EEF788 +#content .statblock-yellow { + background-color: #EFF891 } -#content .red { - background-color: #FA8E8E +#content .statblock-red { + background-color: #FA9696 +} + +/* Long StatBlock which we can copy */ + +#content .long-statblock { + background-color: var(--color3); + color: var(--color-font2); + border-radius: 4px; + padding: 0.50rem 0.75rem; +} + +/* Test Views */ + +#content #config { + float: left; +} + +#content #actions { + float: left; } #content #results { @@ -227,89 +278,14 @@ a:link, a:visited, a:hover, a:active { width: inherit; } -#content table { - line-height: 96%; +#content .test-config { + font-size: 1.0rem; } -#content .textcenter { - text-align: center; +#content .test-config .td-label { + color: var(--color-font1); } -#content strong { - font-size: 14px; - font-weight: bold; -} -#content a:not(.TitleLink) { - font-weight: 100; - color: #8BBAD6; -} -#content a.redlink { - color: #FF4D4D; -} -#content a.unstarred { - color: #808080; -} - -#content h1, h2, h3 { - color: #a7a7a7; - text-align: center; -} - -#content #pagebrowse { - text-align: center; - margin: 16px 0px 16px 0px; -} - -#content .page { - text-align: center; - display: inline-block; - padding: 8px 0px; - width: 5%; - background-color: #1A1A1A; - border-radius: 8px; -} - -#content .page:hover { - background-color: #00AF00; -} - -#error pre { - background-color: #EE7676; - padding: 6px; - margin: 0px; - text-align: center; - font-family: "Courier Prime"; - font-size: 18px; -} - -#content form h3 { - margin-left: 110px; - margin-bottom: 2px; - font-size: 16px; - font-weight: normal; - color: #00AF00; -} - -#content h4 a { - font-size: 18px; -} - -#content form .settings-column { - float: left; - padding-bottom: 16px; -} - -#content #test-mode-buttons button { - width: 49.8%; -} - -#content #test-mode-buttons .left-floated { - float: left; -} - -#content #test-mode-buttons .right-floated { - float: right; -} diff --git a/OpenBench/templatetags/mytags.py b/OpenBench/templatetags/mytags.py index e668d60..067fb30 100644 --- a/OpenBench/templatetags/mytags.py +++ b/OpenBench/templatetags/mytags.py @@ -108,21 +108,22 @@ def longStatBlock(test): if test.test_mode == 'SPRT': - lowerllr = twoDigitPrecision(test.lowerllr) - currentllr = twoDigitPrecision(test.currentllr) - upperllr = twoDigitPrecision(test.upperllr) - elolower = twoDigitPrecision(test.elolower) - eloupper = twoDigitPrecision(test.eloupper) + lowerllr = twoDigitPrecision(test.lowerllr) + currentllr = twoDigitPrecision(test.currentllr) + upperllr = twoDigitPrecision(test.upperllr) + elolower = twoDigitPrecision(test.elolower) + eloupper = twoDigitPrecision(test.eloupper) + timecontrol = test.timecontrol + ['s', '']['=' in test.timecontrol] return 'ELO | {0} +- {1} (95%)\n'.format(elo, error) \ - + 'SPRT | {0}s Threads={1} Hash={2}MB\n'.format(test.timecontrol, threads, hash) \ + + 'SPRT | {0} Threads={1} Hash={2}MB\n'.format(timecontrol, threads, hash) \ + 'LLR | {0} ({1}, {2}) [{3}, {4}]\n'.format(currentllr, lowerllr, upperllr, elolower, eloupper) \ + 'GAMES | N: {0} W: {1} L: {2} D: {3}'.format(test.games, test.wins, test.losses, test.draws) if test.test_mode == 'GAMES': return 'ELO | {0} +- {1} (95%)\n'.format(elo, error) \ - + 'CONF | {0}s Threads={1} Hash={2}MB\n'.format(test.timecontrol, threads, hash) \ + + 'CONF | {0} Threads={1} Hash={2}MB\n'.format(timecontrol, threads, hash) \ + 'GAMES | N: {0} W: {1} L: {2} D: {3}'.format(test.games, test.wins, test.losses, test.draws) def testResultColour(test): diff --git a/Templates/OpenBench/Blocks/testsummary.html b/Templates/OpenBench/Blocks/testsummary.html index 2bdbe44..32058e5 100644 --- a/Templates/OpenBench/Blocks/testsummary.html +++ b/Templates/OpenBench/Blocks/testsummary.html @@ -7,5 +7,5 @@ {% else %} {{test|prettyDevName}} {% endif %} diff {{test.timecontrol}} - {{test|shortStatBlock|linebreaksbr}} + {{test|shortStatBlock|linebreaksbr}} diff --git a/Templates/OpenBench/base.html b/Templates/OpenBench/base.html index 8780367..84ed8b1 100644 --- a/Templates/OpenBench/base.html +++ b/Templates/OpenBench/base.html @@ -6,6 +6,8 @@ + + @@ -42,7 +44,6 @@ - {% if error %}
@@ -111,11 +112,14 @@
-
-

OpenBench Testing Framework

- {% block content %} - {% endblock %} +
+
+

OpenBench Testing Framework

+ {% block content %} + {% endblock %} +
+ diff --git a/Templates/OpenBench/buyEthereal.html b/Templates/OpenBench/buyEthereal.html index dd9b69a..993543c 100644 --- a/Templates/OpenBench/buyEthereal.html +++ b/Templates/OpenBench/buyEthereal.html @@ -5,7 +5,7 @@ {% load static %} - + diff --git a/Templates/OpenBench/events.html b/Templates/OpenBench/events.html index d8d59f0..ce04213 100644 --- a/Templates/OpenBench/events.html +++ b/Templates/OpenBench/events.html @@ -4,9 +4,9 @@ {% block content %} - +
- + diff --git a/Templates/OpenBench/index.html b/Templates/OpenBench/index.html index cd5d644..a56d40d 100644 --- a/Templates/OpenBench/index.html +++ b/Templates/OpenBench/index.html @@ -2,42 +2,42 @@ {% block content %} -
Date User Test
+
{% if paging.page == 1 %} {% if pending %} - + {% for test in pending %} {% include "OpenBench/Blocks/testsummary.html" %} {% endfor %} - + {% endif %} {% if awaiting %} - + {% for test in awaiting %} {% include "OpenBench/Blocks/testsummary.html" %} {% endfor %} - + {% endif %} {% if active %} - + {% for test in active %} {% include "OpenBench/Blocks/testsummary.html" %} {% endfor %} - + {% endif %} {% endif %} - + {% for test in completed %} {% include "OpenBench/Blocks/testsummary.html" %} {% endfor %} diff --git a/Templates/OpenBench/login.html b/Templates/OpenBench/login.html index b770957..2a77ad4 100644 --- a/Templates/OpenBench/login.html +++ b/Templates/OpenBench/login.html @@ -4,9 +4,17 @@ {% csrf_token %} -
-
- +
+
+
+
+
+
+
+
+ +
+
{% endblock %} diff --git a/Templates/OpenBench/machines.html b/Templates/OpenBench/machines.html index 2facb0e..c04b4cb 100644 --- a/Templates/OpenBench/machines.html +++ b/Templates/OpenBench/machines.html @@ -4,9 +4,9 @@ {% block content %} -
Pending
Pending
Awaiting Artifacts
Awaiting Artifacts
Active {{status}}
Active {{status}}
Finished
Finished
+
- + diff --git a/Templates/OpenBench/networks.html b/Templates/OpenBench/networks.html index c5a9855..bad87e4 100644 --- a/Templates/OpenBench/networks.html +++ b/Templates/OpenBench/networks.html @@ -55,9 +55,9 @@ {% block content %} -
# User System
+
- + diff --git a/Templates/OpenBench/newTest.html b/Templates/OpenBench/newTest.html index 62de293..897e23f 100644 --- a/Templates/OpenBench/newTest.html +++ b/Templates/OpenBench/newTest.html @@ -12,128 +12,132 @@ function set_test_type() { - //// When the test mode is set or changed, run this. - //// Sets the bounds, confidence intervals, and max games fields. + //// When the test mode is set or changed, run this. + //// Sets the bounds, confidence intervals, and max games fields. - var selectA = document.getElementById("test_mode"); - var mode = selectA.options[selectA.selectedIndex].value; + var selectA = document.getElementById("test_mode"); + var mode = selectA.options[selectA.selectedIndex].value; - var selectB = document.getElementById("enginename"); - var engine = selectB.options[selectB.selectedIndex].value; + var selectB = document.getElementById("enginename"); + var engine = selectB.options[selectB.selectedIndex].value; - if (mode == "SPRT") { - document.getElementById("test_bounds" ).value = engines[engine].bounds - document.getElementById("test_confidence").value = "{{config.tests.confidence}}"; - document.getElementById("test_max_games" ).value = "N/A"; - } + if (mode == "SPRT") { + document.getElementById("test_bounds" ).value = engines[engine].bounds + document.getElementById("test_confidence").value = "{{ config.tests.confidence }}"; + document.getElementById("test_max_games" ).value = "N/A"; + } - if (mode == "GAMES") { - document.getElementById("test_bounds" ).value = "N/A"; - document.getElementById("test_confidence").value = "N/A"; - document.getElementById("test_max_games" ).value = "{{config.tests.max_games}}"; - } + if (mode == "GAMES") { + document.getElementById("test_bounds" ).value = "N/A"; + document.getElementById("test_confidence").value = "N/A"; + document.getElementById("test_max_games" ).value = "{{ config.tests.max_games }}"; + } } function set_test_mode(mode_str) { - var selection = document.getElementById("enginename"); - var engine = selection.options[selection.selectedIndex].value; - var mode = engines[engine].testmodes[mode_str]; + var selection = document.getElementById("enginename"); + var engine = selection.options[selection.selectedIndex].value; + var mode = engines[engine].testmodes[mode_str]; - document.getElementById("report_rate" ).value = mode["report_rate"] || 8; - document.getElementById("workload_size").value = mode["workload_size"] || 32; - document.getElementById("devoptions" ).value = mode["options"] || "Threads=1 Hash=8"; - document.getElementById("baseoptions" ).value = mode["options"] || "Threads=1 Hash=8"; - document.getElementById("timecontrol" ).value = mode["timecontrol"] || "10.0+0.1"; - document.getElementById("bookname" ).value = mode["book"] || engines[engine].book; + document.getElementById("report_rate" ).value = mode["report_rate"] || 8; + document.getElementById("workload_size").value = mode["workload_size"] || 32; + document.getElementById("devoptions" ).value = mode["options"] || "Threads=1 Hash=8"; + document.getElementById("baseoptions" ).value = mode["options"] || "Threads=1 Hash=8"; + document.getElementById("timecontrol" ).value = mode["timecontrol"] || "10.0+0.1"; + document.getElementById("bookname" ).value = mode["book"] || engines[engine].book; - if (mode["bounds"] != null) { - document.getElementById("test_mode").value = "SPRT"; set_test_type(); - document.getElementById("test_bounds").value = mode["bounds"]; - } + if (mode["bounds"] != null) { + document.getElementById("test_mode").value = "SPRT"; set_test_type(); + document.getElementById("test_bounds").value = mode["bounds"]; + } - if (mode["games"] != null) { - document.getElementById("test_mode").value = "GAMES"; set_test_type(); - document.getElementById("test_max_games").value = mode["games"]; - } + if (mode["games"] != null) { + document.getElementById("test_mode").value = "GAMES"; set_test_type(); + document.getElementById("test_max_games").value = mode["games"]; + } - if (mode["bounds"] == null && mode["games"] == null) { - document.getElementById("test_mode").value = "SPRT"; set_test_type(); - } + if (mode["bounds"] == null && mode["games"] == null) { + document.getElementById("test_mode").value = "SPRT"; set_test_type(); + } } function set_engine(engine) { - //// Creates a button to setup test modes, as specififed in the Engine's - //// entry in config.py. Also sets the opening book, and default base branch - //// based on the same config entry. Finally, creates a list of all uploaded - //// Network files that can be selected. The default Network is set as such, - //// if it exists. In all cases, a blank Network is included in the options. + //// Creates a button to setup test modes, as specififed in the Engine's + //// entry in config.py. Also sets the opening book, and default base branch + //// based on the same config entry. Finally, creates a list of all uploaded + //// Network files that can be selected. The default Network is set as such, + //// if it exists. In all cases, a blank Network is included in the options. - document.getElementById("enginename").value = engine; + document.getElementById("enginename").value = engine; - var button_div = document.getElementById("test-mode-buttons"); - while (button_div.hasChildNodes()) - button_div.removeChild(button_div.lastChild); + var button_div = document.getElementById("test-mode-buttons"); + while (button_div.hasChildNodes()) + button_div.removeChild(button_div.lastChild); - var index = 0; - for (let mode in engines[engine].testmodes) { - btn = document.createElement('button') - btn.innerHTML = mode; - btn.onclick = function() { set_test_mode(mode); }; - btn.class = (++index % 2) ? "left-floated" : "right-floated"; - button_div.append(btn); - } + var index = 0; + for (let mode in engines[engine].testmodes) { + btn = document.createElement('button') + btn.innerHTML = mode; + btn.onclick = function() { set_test_mode(mode); }; + {# btn.class = (++index % 2) ? "left-floated" : "right-floated";#} + btn.classList.add("anchorbutton") + btn.classList.add("btn-yellow") + btn.classList.add("mr-2") + btn.classList.add("mt-2") + button_div.append(btn); + } - var devnet = document.getElementById("devnetwork"); - var basenet = document.getElementById("basenetwork"); - var hasdefault = false; + var devnet = document.getElementById("devnetwork"); + var basenet = document.getElementById("basenetwork"); + var hasdefault = false; - while (devnet.length) devnet.remove(0); - while (basenet.length) basenet.remove(0); + while (devnet.length) devnet.remove(0); + while (basenet.length) basenet.remove(0); - for (const network of networks) { + for (const network of networks) { - if (network.engine !== engine) continue; + if (network.engine !== engine) continue; - var devopt = document.createElement("option"); - var baseopt = document.createElement("option"); + var devopt = document.createElement("option"); + var baseopt = document.createElement("option"); - devopt.text = baseopt.text = network.name; - devopt.value = baseopt.value = network.sha256; + devopt.text = baseopt.text = network.name; + devopt.value = baseopt.value = network.sha256; - devopt.selected = network.default; - baseopt.selected = network.default; - devnet.add(devopt); basenet.add(baseopt); + devopt.selected = network.default; + baseopt.selected = network.default; + devnet.add(devopt); basenet.add(baseopt); - hasdefault = hasdefault || network.default; - } + hasdefault = hasdefault || network.default; + } - { - var devopt = document.createElement("option"); - var baseopt = document.createElement("option"); + { + var devopt = document.createElement("option"); + var baseopt = document.createElement("option"); - devopt.text = baseopt.text = "None"; - devopt.value = baseopt.value = ""; + devopt.text = baseopt.text = "None"; + devopt.value = baseopt.value = ""; - devopt.selected = !hasdefault; devnet.add(devopt); - baseopt.selected = !hasdefault; basenet.add(baseopt); - } + devopt.selected = !hasdefault; devnet.add(devopt); + baseopt.selected = !hasdefault; basenet.add(baseopt); + } - document.getElementById("basebranch").value = engines[engine].base; - document.getElementById("bookname" ).value = engines[engine].book; - document.getElementById("win_adj" ).value = engines[engine].win_adj; - document.getElementById("draw_adj" ).value = engines[engine].draw_adj; + document.getElementById("basebranch").value = engines[engine].base; + document.getElementById("bookname" ).value = engines[engine].book; + document.getElementById("win_adj" ).value = engines[engine].win_adj; + document.getElementById("draw_adj" ).value = engines[engine].draw_adj; - set_test_mode("STC"); + set_test_mode("STC"); } document.addEventListener( - 'DOMContentLoaded', function () { - set_test_type(); - set_engine("{{profile.engine}}"); - set_test_mode("STC"); - }, false + 'DOMContentLoaded', function () { + set_test_type(); + set_engine("{{ profile.engine }}"); + set_test_mode("STC"); + }, false ); {% endblock %} @@ -142,82 +146,143 @@ {% csrf_token %} -
-

Engine

-
-
+ +
+
-

Dev Settings

-
-
-
-
+

Engine

+
+ +
-

Base Settings

-
-
-
-
+
+ +
-

Workload Settings

-
- +

Dev Settings

+
+ +
+
+ +
+
+ +
+
+ +
+

Base Settings

+ +
+ +
+
+ +
+
+ +
+
+ +
+ + +

Workload Settings

+
+ +
+
+ +
+
+ +
+ +

Game Settings

+ +
+ +
+
+ +
+ + +

Test Settings

+
+ + +
+
+ +
+
+ +
+
+ +
+ + +

General Settings

+
+ +
+
+ +
+
+ +
+ +

Adjudication Settings

+
+ + +
+
+ +
+
+ +
+
-
- -

Game Settings

-
-
- -

Test Settings

-
-
-
-
- -

General Settings

-
-
- -
- -

Adjudication Settings

- -
- -
-
- -
- -
- + -
- +
+
+
+
+ +
+
+
+ {% endblock %} diff --git a/Templates/OpenBench/profile.html b/Templates/OpenBench/profile.html index 2793983..63aa8b2 100644 --- a/Templates/OpenBench/profile.html +++ b/Templates/OpenBench/profile.html @@ -4,29 +4,44 @@
{% csrf_token %} +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + +
+ +
+
- -
-
-
-
-
- -
- diff --git a/Templates/OpenBench/search.html b/Templates/OpenBench/search.html index db26d4f..5d2be87 100644 --- a/Templates/OpenBench/search.html +++ b/Templates/OpenBench/search.html @@ -23,54 +23,66 @@
{% csrf_token %} -
-
- - -
- - -
- - -
- - -
- - -
- - -
- - - +
+
+
+
+
+
+
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+ +
+
{% endif %} -
Engine Uploader
+
{% for test in tests %} {% include "OpenBench/Blocks/testsummary.html" %} {% endfor %} diff --git a/Templates/OpenBench/test.html b/Templates/OpenBench/test.html index 6d21369..e26bd19 100644 --- a/Templates/OpenBench/test.html +++ b/Templates/OpenBench/test.html @@ -6,43 +6,54 @@ {% load static %} {% endblock %} +{% block scripts %} + + function copy_statblock() { + var text = document.getElementById("long-statblock").innerHTML; + text = text.replace(/
/g, "\n"); + text += "\n" + window.location.href; + navigator.clipboard.writeText(text); + } + +{% endblock %} + {% block content %} -
-
- - - - - - - +
+
Author{{test.author|capfirst}}
Creation{{test.creation|date:'U'}}
Engine{{test.engine}}
Dev Branch{{test.dev.name|prettyName}}
Dev Bench{{test.dev.bench}}
Dev Options{{test.devoptions}}
Dev Sha{{test.dev.sha}}
+ + + + + + + {% if test.devnetwork %} - + {% endif %} - - - - + + + + {% if test.basenetwork %} - + {% endif %} - - - - - - + + + + + +
Author{{test.author|capfirst}}
Creation{{test.creation|date:'U'}}
Engine{{test.engine}}
Dev Branch{{test.dev.name|prettyName}}
Dev Bench{{test.dev.bench}}
Dev Options{{test.devoptions}}
Dev Sha{{test.dev.sha}}
Dev NetworkDev Network {{test.devnetname}}
Base Branch{{test.base.name|prettyName}}
Base Bench{{test.base.bench}}
Base Options{{test.baseoptions}}
Base Sha{{test.base.sha}}
Base Branch{{test.base.name|prettyName}}
Base Bench{{test.base.bench}}
Base Options{{test.baseoptions}}
Base Sha{{test.base.sha}}
Base NetworkBase Network {{test.basenetname}}
Source Repo{{test.source}}
Opening Book{{test.bookname}}
Syzygy WDL{{test.syzygy_wdl}}
Syzygy ADJ.{{test.syzygy_adj}}
Win ADJ.{{test.win_adj}}
Draw ADJ.{{test.draw_adj}}
Source Repo{{test.source}}
Opening Book{{test.bookname}}
Syzygy WDL{{test.syzygy_wdl}}
Syzygy ADJ.{{test.syzygy_adj}}
Win ADJ.{{test.win_adj}}
Draw ADJ.{{test.draw_adj}}
-
+

@@ -51,69 +62,76 @@ {% if not test.approved and profile.approver and profile.user.username != test.author %} - Approve + Approve {% elif not test.approved and request.user.is_superuser %} - Approve + Approve {% else %} - Approve + Approve {% endif %} {% if test.finished and profile.approver %} - Restart + Restart {% elif test.finished and profile.user.username == test.author %} - Restart + Restart {% elif test.finished %} - Restart + Restart {% endif %} {% if not test.finished and profile.approver %} - Stop + Stop {% elif not test.finished and profile.user.username == test.author %} - Stop + Stop {% elif not test.finished %} - Stop + Stop {% endif %} {% if profile.approver or profile.user.username == test.author %} - Delete + Delete {% else %} - Delete + Delete {% endif %} + + + + -
{{test|longStatBlock|linebreaksbr}}
+
{{test|longStatBlock|linebreaksbr}}
- {% csrf_token %} - -
-
-
-
- - - {% if profile.approver or profile.user.username == test.author %} - - {% else %} - - {% endif %} - +
+
+
+ +
+
+ +
+
+ +
+
+ +
+ + {% if profile.approver or profile.user.username == test.author %} + + {% else %} + + {% endif %} +
+
-

-
- -
- - - - +
+
+ diff --git a/Templates/OpenBench/uploadnet.html b/Templates/OpenBench/uploadnet.html index a3f6d55..3291df3 100644 --- a/Templates/OpenBench/uploadnet.html +++ b/Templates/OpenBench/uploadnet.html @@ -3,22 +3,37 @@ {% block content %} - {% csrf_token %} + {% csrf_token %} + +
+
+
+ +
+
+ +
+
+ + +
+ + + +
+
+ -
-
-
- {% endblock %} diff --git a/Templates/OpenBench/users.html b/Templates/OpenBench/users.html index 9bbe5a3..59e794b 100644 --- a/Templates/OpenBench/users.html +++ b/Templates/OpenBench/users.html @@ -4,35 +4,37 @@ {% block content %} -
# User OS
+
- - + + - + + {% for profile in profiles %} - {% if profile.enabled %} - {% if profile.games or profile.tests or profile.approver %} - - - - - - - + {% if profile.enabled %} + {% if profile.games or profile.tests or profile.approver %} + + + + + + + + {% endif %} {% endif %} - {% endif %} {% endfor %}
Username
Username Games TestsEngineEngine Default Repository
{{profile.user.username|capfirst}}{{profile.games|insertCommas}}{{profile.tests|insertCommas}}{{profile.engine}}{{profile.repo}}
{{profile.user.username|capfirst}}{{profile.games|insertCommas}}{{profile.tests|insertCommas}}{{profile.engine}}{{profile.repo}}