| OLD | NEW |
| 1 <!DOCTYPE html><html><head><!-- | 1 <!DOCTYPE html><html><head><!-- |
| 2 @license | 2 @license |
| 3 Copyright (c) 2016 The Polymer Project Authors. All rights reserved. | 3 Copyright (c) 2016 The Polymer Project Authors. All rights reserved. |
| 4 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt | 4 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt |
| 5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | 5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt |
| 6 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt | 6 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt |
| 7 Code distributed by Google as part of the polymer project is also | 7 Code distributed by Google as part of the polymer project is also |
| 8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt | 8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt |
| 9 --><!-- | 9 --><!-- |
| 10 @license | 10 @license |
| (...skipping 16390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16401 margin-left:15px; | 16401 margin-left:15px; |
| 16402 } | 16402 } |
| 16403 .main-content { | 16403 .main-content { |
| 16404 padding: 3px; | 16404 padding: 3px; |
| 16405 } | 16405 } |
| 16406 | 16406 |
| 16407 .main-content a { | 16407 .main-content a { |
| 16408 color: #1F78B4; | 16408 color: #1F78B4; |
| 16409 } | 16409 } |
| 16410 | 16410 |
| 16411 auth-signin, .small { |
| 16412 font-size: .7em; |
| 16413 } |
| 16414 |
| 16411 paper-fab { | 16415 paper-fab { |
| 16412 position: fixed; | 16416 position: fixed; |
| 16413 bottom: 5px; | 16417 bottom: 5px; |
| 16414 right: 5px; | 16418 right: 5px; |
| 16415 background-color: #1F78B4; | 16419 background-color: #1F78B4; |
| 16416 } | 16420 } |
| 16417 | 16421 |
| 16418 paper-spinner-lite { | 16422 paper-spinner-lite { |
| 16419 --paper-spinner-color: var(--google-yellow-500); | 16423 --paper-spinner-color: var(--google-yellow-500); |
| 16420 } | 16424 } |
| 16421 </style> | 16425 </style> |
| 16422 <app-header-layout> | 16426 <app-header-layout> |
| 16423 <app-header fixed=""> | 16427 <app-header fixed=""> |
| 16424 <app-toolbar> | 16428 <app-toolbar> |
| 16425 <div class="title left">[[name]]</div> | 16429 <div class="title left">[[name]]</div> |
| 16426 <paper-spinner-lite class="left" active="[[_or(busy,_busy)]]"></paper-
spinner-lite> | 16430 <paper-spinner-lite class="left" active="[[_or(busy,_busy1,_busy2)]]">
</paper-spinner-lite> |
| 16427 | 16431 |
| 16428 <a class="left" href="/newui/">Home</a> | 16432 <a class="left" href="/newui/">Home</a> |
| 16429 <a class="left" href="/newui/botlist">Bot List</a> | 16433 <a class="left" href="/newui/botlist">Bot List</a> |
| 16430 <a class="left" href="/newui/tasklist">Task List</a> | 16434 <a class="left" href="/newui/tasklist">Task List</a> |
| 16431 <div class="flex"></div> | 16435 <div class="flex"></div> |
| 16436 <div class="small right"> |
| 16437 Server: |
| 16438 <a href$="[[_versionLink(server_version)]]"> |
| 16439 [[server_version.server_version]] |
| 16440 </a> |
| 16441 </div> |
| 16432 <auth-signin class="right" client_id="[[client_id]]" auth_headers="{{a
uth_headers}}" signed_in="{{signed_in}}"> | 16442 <auth-signin class="right" client_id="[[client_id]]" auth_headers="{{a
uth_headers}}" signed_in="{{signed_in}}"> |
| 16433 </auth-signin> | 16443 </auth-signin> |
| 16434 </app-toolbar> | 16444 </app-toolbar> |
| 16435 </app-header> | 16445 </app-header> |
| 16436 <div class="main-content"> | 16446 <div class="main-content"> |
| 16437 <content></content> | 16447 <content></content> |
| 16438 </div> | 16448 </div> |
| 16439 <a target="_blank" href="https://bugs.chromium.org/p/chromium/issues/ent
ry?components=Infra%3EPlatform%3ESwarming&owner=kjlubick@chromium.org&st
atus=Assigned"> | 16449 <a target="_blank" href="https://bugs.chromium.org/p/chromium/issues/ent
ry?components=Infra%3EPlatform%3ESwarming&owner=kjlubick@chromium.org&st
atus=Assigned"> |
| 16440 <paper-fab mini="" icon="icons:bug-report"></paper-fab> | 16450 <paper-fab mini="" icon="icons:bug-report"></paper-fab> |
| 16441 </a> | 16451 </a> |
| (...skipping 16 matching lines...) Expand all Loading... |
| 16458 client_id: { | 16468 client_id: { |
| 16459 type: String, | 16469 type: String, |
| 16460 }, | 16470 }, |
| 16461 name: { | 16471 name: { |
| 16462 type: String, | 16472 type: String, |
| 16463 }, | 16473 }, |
| 16464 // outputs | 16474 // outputs |
| 16465 auth_headers: { | 16475 auth_headers: { |
| 16466 type: Object, | 16476 type: Object, |
| 16467 notify: true, | 16477 notify: true, |
| 16468 observer: "_loadPermissions" | 16478 observer: "_load" |
| 16469 }, | 16479 }, |
| 16470 | 16480 |
| 16471 permissions: { | 16481 permissions: { |
| 16472 type: Object, | 16482 type: Object, |
| 16473 value: function() { | 16483 value: function() { |
| 16474 // If we aren't logged in, default to no permissions. | 16484 // If we aren't logged in, default to no permissions. |
| 16475 return {}; | 16485 return {}; |
| 16476 }, | 16486 }, |
| 16477 notify: true, | 16487 notify: true, |
| 16478 }, | 16488 }, |
| 16479 | 16489 |
| 16490 server_version: { |
| 16491 type: Object, |
| 16492 notify: true, |
| 16493 }, |
| 16494 |
| 16480 signed_in: { | 16495 signed_in: { |
| 16481 type: Boolean, | 16496 type: Boolean, |
| 16482 value: false, | 16497 value: false, |
| 16483 notify:true, | 16498 notify: true, |
| 16484 }, | 16499 }, |
| 16485 | 16500 |
| 16486 // private | 16501 // private |
| 16487 _busy: { | 16502 _busy1: { |
| 16503 type: Boolean, |
| 16504 value: false, |
| 16505 }, |
| 16506 _busy2: { |
| 16488 type: Boolean, | 16507 type: Boolean, |
| 16489 value: false, | 16508 value: false, |
| 16490 } | 16509 } |
| 16491 | 16510 |
| 16492 }, | 16511 }, |
| 16493 | 16512 |
| 16494 _loadPermissions: function() { | 16513 _load: function() { |
| 16495 this._getJsonAsync("permissions", "/_ah/api/swarming/v1/server/permissio
ns", | 16514 this._getJsonAsync("permissions", "/_ah/api/swarming/v1/server/permissio
ns", |
| 16496 "_busy", this.auth_headers); | 16515 "_busy1", this.auth_headers); |
| 16516 this._getJsonAsync("server_version", "/_ah/api/swarming/v1/server/detail
s", |
| 16517 "_busy2", this.auth_headers) |
| 16497 }, | 16518 }, |
| 16498 | 16519 |
| 16520 _versionLink: function(version) { |
| 16521 if (!version || !version.server_version) { |
| 16522 return undefined; |
| 16523 } |
| 16524 var split = version.server_version.split("-"); |
| 16525 if (split.length !== 2) { |
| 16526 return undefined; |
| 16527 } |
| 16528 return "https://github.com/luci/luci-py/commit/"+split[1]; |
| 16529 } |
| 16530 |
| 16499 }); | 16531 }); |
| 16500 </script> | 16532 </script> |
| 16501 </dom-module> | 16533 </dom-module> |
| 16502 | 16534 |
| 16503 <dom-module id="swarming-app-style" assetpath="/res/imp/common/"> | 16535 <dom-module id="swarming-app-style" assetpath="/res/imp/common/"> |
| 16504 <style> | 16536 <style> |
| 16505 * { | 16537 * { |
| 16506 font-family: sans-serif; | 16538 font-family: sans-serif; |
| 16507 } | 16539 } |
| 16508 /* Only style anchor tags that are actually linking somewhere.*/ | 16540 /* Only style anchor tags that are actually linking somewhere.*/ |
| 16509 a[href] { | 16541 a[href] { |
| 16510 color: #1F78B4; | 16542 color: #1F78B4; |
| 16511 } | 16543 } |
| 16512 </style> | 16544 </style> |
| 16513 </dom-module> | 16545 </dom-module> |
| 16514 <dom-module id="swarming-index" assetpath="/res/imp/index/"> | 16546 <dom-module id="swarming-index" assetpath="/res/imp/index/"> |
| 16515 <template> | 16547 <template> |
| 16516 <style include="swarming-app-style"> | 16548 <style include="swarming-app-style"> |
| 16517 .command { | 16549 .command { |
| 16518 font-family: monospace; | 16550 font-family: monospace; |
| 16519 margin-bottom: 10px; | 16551 margin-bottom: 10px; |
| 16520 margin-top: 10px; | 16552 margin-top: 10px; |
| 16521 white-space: pre-wrap; | 16553 white-space: pre-wrap; |
| 16522 background-color: #f5f5f5; | 16554 background-color: #f5f5f5; |
| 16523 border: 1px solid #ccc; | 16555 border: 1px solid #ccc; |
| 16524 border-radius: 4px; | 16556 border-radius: 4px; |
| 16525 } | 16557 } |
| 16526 </style> | 16558 </style> |
| 16527 | 16559 |
| 16528 <swarming-app client_id="[[client_id]]" auth_headers="{{auth_headers}}" perm
issions="{{_permissions}}" name="Swarming Server" busy="[[_busy]]"> | 16560 <swarming-app client_id="[[client_id]]" auth_headers="{{auth_headers}}" perm
issions="{{_permissions}}" server_version="{{_server_version}}" name="Swarming S
erver" busy="[[_busy]]"> |
| 16529 | 16561 |
| 16530 <h2>Service Status</h2> | 16562 <h2>Service Status</h2> |
| 16531 <div>Server Version: [[serverDetails.server_version]]</div> | 16563 <div>Server Version: [[_server_version.server_version]]</div> |
| 16532 <ul> | 16564 <ul> |
| 16533 <li> | 16565 <li> |
| 16534 | 16566 |
| 16535 <a href="/stats">Usage statistics</a> | 16567 <a href="/stats">Usage statistics</a> |
| 16536 </li> | 16568 </li> |
| 16537 <li> | 16569 <li> |
| 16538 <a href="/restricted/mapreduce/status">Map Reduce Jobs</a> | 16570 <a href="/restricted/mapreduce/status">Map Reduce Jobs</a> |
| 16539 </li> | 16571 </li> |
| 16540 <li> | 16572 <li> |
| 16541 <a href$="[[_makeInstancesUrl(serverDetails,_project_id)]]">View versi
on's instances on Cloud Console</a> | 16573 <a href$="[[_makeInstancesUrl(_server_version,_project_id)]]">View ver
sion's instances on Cloud Console</a> |
| 16542 </li> | 16574 </li> |
| 16543 <li> | 16575 <li> |
| 16544 <a></a><a href$="[[_makeErrorUrl(_project_id)]]">View server errors on
Cloud Console</a> | 16576 <a></a><a href$="[[_makeErrorUrl(_project_id)]]">View server errors on
Cloud Console</a> |
| 16545 </li> | 16577 </li> |
| 16546 <li> | 16578 <li> |
| 16547 <a></a><a href$="[[_makeLogUrl(_project_id)]]">View logs for HTTP 5xx
on Cloud Console</a> | 16579 <a></a><a href$="[[_makeLogUrl(_project_id)]]">View logs for HTTP 5xx
on Cloud Console</a> |
| 16548 </li> | 16580 </li> |
| 16549 </ul> | 16581 </ul> |
| 16550 | 16582 |
| 16551 <h2>Configuration</h2> | 16583 <h2>Configuration</h2> |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16599 | 16631 |
| 16600 behaviors: [ | 16632 behaviors: [ |
| 16601 SwarmingBehaviors.CommonBehavior, | 16633 SwarmingBehaviors.CommonBehavior, |
| 16602 ], | 16634 ], |
| 16603 | 16635 |
| 16604 properties: { | 16636 properties: { |
| 16605 client_id: { | 16637 client_id: { |
| 16606 type: String, | 16638 type: String, |
| 16607 }, | 16639 }, |
| 16608 | 16640 |
| 16609 auth_headers: { | |
| 16610 type: Object, | |
| 16611 observer: "signIn", | |
| 16612 }, | |
| 16613 | |
| 16614 serverDetails: { | |
| 16615 type: Object, | |
| 16616 }, | |
| 16617 | |
| 16618 _bootstrap_token: { | 16641 _bootstrap_token: { |
| 16619 type: String, | 16642 type: String, |
| 16620 // TODO(kjlubick): fetch this from an API | 16643 // TODO(kjlubick): fetch this from an API |
| 16621 value: "abc123", | 16644 value: "abc123", |
| 16622 }, | 16645 }, |
| 16623 _busy: { | 16646 _busy: { |
| 16624 type: Boolean, | 16647 type: Boolean, |
| 16625 value: false, | 16648 value: false, |
| 16626 }, | 16649 }, |
| 16627 _host_url: { | 16650 _host_url: { |
| 16628 type: String, | 16651 type: String, |
| 16629 value: function() { | 16652 value: function() { |
| 16630 return location.origin; | 16653 return location.origin; |
| 16631 }, | 16654 }, |
| 16632 }, | 16655 }, |
| 16633 _permissions: { | 16656 _permissions: { |
| 16634 type: Object, | 16657 type: Object, |
| 16635 }, | 16658 }, |
| 16636 _project_id: { | 16659 _project_id: { |
| 16637 type: String, | 16660 type: String, |
| 16638 value: function() { | 16661 value: function() { |
| 16639 var idx = location.hostname.indexOf(".appspot.com"); | 16662 var idx = location.hostname.indexOf(".appspot.com"); |
| 16640 return location.hostname.substring(0, idx); | 16663 return location.hostname.substring(0, idx); |
| 16641 }, | 16664 }, |
| 16642 } | 16665 }, |
| 16666 _server_version: { |
| 16667 type: Object, |
| 16668 }, |
| 16643 }, | 16669 }, |
| 16644 | 16670 |
| 16645 signIn: function(){ | |
| 16646 this._getJsonAsync("serverDetails", "/_ah/api/swarming/v1/server/details
", | |
| 16647 "_busy", this.auth_headers); | |
| 16648 }, | |
| 16649 | 16671 |
| 16650 _cannotBootstrap: function(permissions) { | 16672 _cannotBootstrap: function(permissions) { |
| 16651 return !(permissions && permissions.get_bootstrap_token); | 16673 return !(permissions && permissions.get_bootstrap_token); |
| 16652 }, | 16674 }, |
| 16653 | 16675 |
| 16654 _makeInstancesUrl: function(details, project_id) { | 16676 _makeInstancesUrl: function(details, project_id) { |
| 16655 return "https://console.cloud.google.com/appengine/instances?project="+ | 16677 return "https://console.cloud.google.com/appengine/instances?project="+ |
| 16656 project_id+"&versionId="+details.server_version; | 16678 project_id+"&versionId="+details.server_version; |
| 16657 }, | 16679 }, |
| 16658 | 16680 |
| (...skipping 7916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 24575 if (state === "RUNNING" || state === "PENDING") { | 24597 if (state === "RUNNING" || state === "PENDING") { |
| 24576 return "pending"; | 24598 return "pending"; |
| 24577 } | 24599 } |
| 24578 return ""; | 24600 return ""; |
| 24579 } | 24601 } |
| 24580 | 24602 |
| 24581 }); | 24603 }); |
| 24582 })(); | 24604 })(); |
| 24583 </script> | 24605 </script> |
| 24584 </dom-module></div></body></html> | 24606 </dom-module></div></body></html> |
| OLD | NEW |