mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
STAT: Refine tcUrl for SRT/RTC. v5.0.54
This commit is contained in:
parent
d877c0b76f
commit
9c6774b644
21 changed files with 121 additions and 36 deletions
|
@ -584,6 +584,8 @@ scApp.filter('sc_filter_streamURL', function(){
|
|||
|
||||
const pos = v.url.lastIndexOf('/');
|
||||
const stream = pos < 0 ? '' : v.url.substr(pos);
|
||||
// Use name or extract from url.
|
||||
const streamName = v.name ? v.name : stream;
|
||||
|
||||
const pos2 = v.tcUrl.indexOf('?');
|
||||
const tcUrl = pos2 < 0 ? v.tcUrl : v.tcUrl.substr(0, pos2);
|
||||
|
@ -591,7 +593,7 @@ scApp.filter('sc_filter_streamURL', function(){
|
|||
let params = pos2 < 0 ? '' : v.tcUrl.substr(pos2);
|
||||
if (params === '?vhost=__defaultVhost__' || params === '?domain=__defaultVhost__') params = '';
|
||||
|
||||
return `${tcUrl}${stream}${params}`;
|
||||
return `${tcUrl}${streamName}${params}`;
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
<tr>
|
||||
<th>ID</th>
|
||||
<th>流名称</th>
|
||||
<th>URL</th>
|
||||
<th>Vhost</th>
|
||||
<th>状态</th>
|
||||
<th>在线人数</th>
|
||||
|
@ -24,6 +25,7 @@
|
|||
<tr ng-repeat="stream in streams">
|
||||
<td><a href="javascript:void(0)" ng-click="gogogo('/streams/' + stream.id)">{{stream.id}}</a></td>
|
||||
<td>{{stream.name| sc_filter_less}}</td>
|
||||
<td>{{stream |sc_filter_streamURL}}</td>
|
||||
<td><a href="javascript:void(0)" ng-click="gogogo('/vhosts/' + stream.vhost)">{{stream.owner.name}}</a></td>
|
||||
<td>{{stream.publish.active| sc_filter_has_stream}}</td>
|
||||
<td>{{stream.clients}}人</td>
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Name</th>
|
||||
<th>URL</th>
|
||||
<th>Vhost</th>
|
||||
<th>Status</th>
|
||||
<th>Clients</th>
|
||||
|
@ -24,6 +25,7 @@
|
|||
<tr ng-repeat="stream in streams">
|
||||
<td><a href="javascript:void(0)" ng-click="gogogo('/streams/' + stream.id)">{{stream.id}}</a></td>
|
||||
<td>{{stream.name| sc_filter_less}}</td>
|
||||
<td>{{stream |sc_filter_streamURL}}</td>
|
||||
<td><a href="javascript:void(0)" ng-click="gogogo('/vhosts/' + stream.vhost)">{{stream.owner.name}}</a></td>
|
||||
<td>{{stream.publish.active| sc_filter_has_stream}}</td>
|
||||
<td>{{stream.clients}}人</td>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue