-
-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
performance fix for logging new head peers with autostart off (#1414)
- Loading branch information
Showing
7 changed files
with
147 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
231 changes: 119 additions & 112 deletions
231
src/main/resources/resource/WebGui/app/service/tab-header.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,117 +1,124 @@ | ||
<div class="tab-header col-md-12"> | ||
<table> | ||
<table> | ||
<tr> | ||
<td valign="top"> | ||
<button class="btn btn-default" ng-click="mrl.goBack()" title="back"> | ||
<span class="glyphicon glyphicon-arrow-left"></span> | ||
</button> | ||
</td> | ||
<td> | ||
<div class="dropdown"> | ||
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown"> | ||
<img ng-src="{{::service.simpleName}}.png" alt="" width="16" /> | ||
  {{::service.simpleName}} {{::service.name}} {{::service.serviceVersion}} | ||
<span class="caret"></span> | ||
</button> | ||
<ul class="dropdown-menu"> | ||
<li class="dropdown-header">service functions</li> | ||
<li> | ||
<a href="http://myrobotlab.org/service/{{::service.simpleName}}" target="_blank" ng-click="servicemenuDropdownOpen = false"> | ||
<i class="glyphicon glyphicon-question-sign"></i> | ||
help | ||
</a> | ||
</li> | ||
<li> | ||
<a href="" ng-click="servicemenuDropdownOpen = false;msg.broadcastState()"> | ||
<i class="glyphicon glyphicon-refresh"></i> | ||
refresh | ||
</a> | ||
</li> | ||
<li> | ||
<a href="" target="_blank" width="100%"> | ||
<i class="glyphicon glyphicon-equalizer"></i> | ||
<span ng-show="!parentPanel.showPeerTable" ng-click="showPeers(true)"> show peers</span> | ||
<span ng-show="parentPanel.showPeerTable" ng-click="showPeers(false)"> hide peers</span> | ||
</a> | ||
</li> | ||
<li class="divider"></li> | ||
<li class="dropdown-header">json</li> | ||
<li> | ||
<!-- a href="" target="_blank" ng-click="showProperties=!showProperties" --> | ||
<a href="/api/service/{{::service.name}}" target="_blank"> | ||
<i class="glyphicon glyphicon-list-alt"></i> | ||
properties | ||
</a> | ||
</li> | ||
<li> | ||
<!-- a href="" target="_blank" ng-click="showMethods=!showMethods" --> | ||
<a href="/api/service/{{::service.name}}/" target="_blank"> | ||
<i class="glyphicon glyphicon-list-alt"></i> | ||
methods | ||
</a> | ||
</li> | ||
<li> | ||
<!-- a href="" target="_blank" ng-click="showMethods=!showMethods" --> | ||
<a href="/api/service/runtime/getNotifyEntries/{{service.name}}" target="_blank"> | ||
<i class="glyphicon glyphicon-list-alt"></i> | ||
subscriptions | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</td> | ||
<td> | ||
<button class="btn btn-default" ng-click="release()" title="stops and releases a service"> | ||
<span class="glyphicon glyphicon-remove red"></span> | ||
release | ||
</button> | ||
</td> | ||
<td> | ||
<button class="btn btn-default" ng-click="save()" title="save current configuration"> | ||
<span class="glyphicon glyphicon-save-file"></span> | ||
save | ||
</button> | ||
</td> | ||
<td> | ||
<button class="btn btn-default" ng-click="apply()" title="load and apply configuration"> | ||
<span class="glyphicon glyphicon-open-file"></span> | ||
apply | ||
</button> | ||
</td> | ||
</tr> | ||
</table> | ||
<div ng-show="parentPanel.showPeerTable"> | ||
<table class="table table-sm"> | ||
<thead> | ||
<tr> | ||
<td valign="top"> | ||
<button class="btn btn-default" ng-click="mrl.goBack()" title="back"> | ||
<span class="glyphicon glyphicon-arrow-left"></span> | ||
</button> | ||
</td> | ||
<td> | ||
<div class="dropdown"> | ||
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown"> | ||
<img ng-src="{{::service.simpleName}}.png" alt="" width="16"> | ||
  {{::service.simpleName}} {{::service.name}}@{{::service.id}} {{::service.serviceVersion}}<span class="caret"></span> | ||
</button> | ||
<ul class="dropdown-menu"> | ||
<li class="dropdown-header">service functions</li> | ||
<li> | ||
<a href="http://myrobotlab.org/service/{{::service.simpleName}}" target="_blank" ng-click="servicemenuDropdownOpen = false"> | ||
<i class="glyphicon glyphicon-question-sign"></i> | ||
help | ||
</a> | ||
</li> | ||
<li> | ||
<a href="" ng-click="servicemenuDropdownOpen = false;msg.broadcastState()"> | ||
<i class="glyphicon glyphicon-refresh"></i> | ||
refresh | ||
</a> | ||
</li> | ||
<li> | ||
<a href="" target="_blank" width="100%"> | ||
<i class="glyphicon glyphicon-equalizer"></i> | ||
<span ng-show="!parentPanel.showPeerTable" ng-click="showPeers(true)"> show peers</span> | ||
<span ng-show="parentPanel.showPeerTable" ng-click="showPeers(false)"> hide peers</span> | ||
</a> | ||
</li> | ||
<li class="divider"></li> | ||
<li class="dropdown-header">json</li> | ||
<li> | ||
<!-- a href="" target="_blank" ng-click="showProperties=!showProperties" --> | ||
<a href="/api/service/{{::service.name}}" target="_blank"> | ||
<i class="glyphicon glyphicon-list-alt"></i> | ||
properties | ||
|
||
|
||
</a> | ||
</li> | ||
<li> | ||
<!-- a href="" target="_blank" ng-click="showMethods=!showMethods" --> | ||
<a href="/api/service/{{::service.name}}/" target="_blank"> | ||
<i class="glyphicon glyphicon-list-alt"></i> | ||
methods | ||
|
||
|
||
</a> | ||
</li> | ||
<li> | ||
<!-- a href="" target="_blank" ng-click="showMethods=!showMethods" --> | ||
<a href="/api/service/runtime/getNotifyEntries/{{service.name}}" target="_blank"> | ||
<i class="glyphicon glyphicon-list-alt"></i> | ||
subscriptions | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</td> | ||
<td> | ||
<button class="btn btn-default" ng-click="release()" title="stops and releases a service"> | ||
<span class="glyphicon glyphicon-remove red"></span> | ||
</button> | ||
</td> | ||
<td> | ||
<button class="btn btn-default" ng-click="save()" title="save current configuration"> | ||
<span class="glyphicon glyphicon-save-file"></span> | ||
</button> | ||
</td> | ||
<td> | ||
<button class="btn btn-default" ng-click="apply()" title="load and apply configuration"> | ||
<span class="glyphicon glyphicon-open-file"></span> | ||
</button> | ||
</td> | ||
|
||
<th scope="col">key</th> | ||
<th scope="col">name</th> | ||
<th scope="col">state</th> | ||
<th scope="col"></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr ng-repeat="(key, value) in service.config.peers"> | ||
<td> | ||
<span> | ||
<a href="" ng-click="mrl.changeTab(peer.getActualName(service, key))"> | ||
<img width="32" ng-src="/{{value.type + '.png'}}" width="48" /> | ||
</a> | ||
{{peer.getActualName(service, key)}} | ||
</span> | ||
</td> | ||
<td> | ||
{{value.key}} | ||
<br /> | ||
{{value.type}} | ||
</td> | ||
<td>{{value.state}}</td> | ||
<td> | ||
<toggle | ||
width="30" | ||
height="28" | ||
ng-model="service['is' + key[0].toUpperCase() + key.substring(1) + 'Started']" | ||
ng-change="service['is' + key[0].toUpperCase() + key.substring(1) + 'Started']?startPeer(key):releasePeer(key)" | ||
on="" | ||
off="" | ||
/> | ||
</td> | ||
<td></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<div ng-show="parentPanel.showPeerTable"> | ||
<table class="table table-sm"> | ||
<thead> | ||
<tr> | ||
<th scope="col">key</th> | ||
<th scope="col">name</th> | ||
<th scope="col">state</th> | ||
<th scope="col"></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr ng-repeat="(key, value) in service.config.peers"> | ||
<td> | ||
<span> | ||
|
||
<a href="" ng-click="mrl.changeTab(peer.getActualName(service, key))"> | ||
<img width="32" ng-src="/{{value.type + '.png'}}" width="48"> | ||
</a> | ||
{{peer.getActualName(service, key)}} | ||
</span> | ||
</td> | ||
<td> | ||
{{value.key}}<br/>{{value.type}} | ||
</td> | ||
<td>{{value.state}}</td> | ||
<td> | ||
<toggle width="30" height="28" ng-model="service['is' + key[0].toUpperCase() + key.substring(1) + 'Started']" ng-change="service['is' + key[0].toUpperCase() + key.substring(1) + 'Started']?startPeer(key):releasePeer(key)" on="" off=""/> | ||
</td> | ||
<td></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters