mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-11 16:27:42 -05:00
support for tags
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
var mongoose = require('mongoose');
|
||||
|
||||
var srcSchema = mongoose.Schema({ pos: Number, src: String });
|
||||
var srcSchema = mongoose.Schema({ pos: Number, src: String, tag: String });
|
||||
|
||||
const callSchema = mongoose.Schema({
|
||||
talkgroupNum: Number,
|
||||
|
||||
@@ -33,7 +33,7 @@ function CallInfo(props) {
|
||||
callFreq = Math.round(freq * 1000) / 1000;
|
||||
}
|
||||
|
||||
srcList = currentCall.srcList.map((source, index) => <List.Item key={index}>{source.src}[{source.pos}]</List.Item>);
|
||||
srcList = currentCall.srcList.map((source, index) => <List.Item key={index}>{source.src}[{source.pos}] {source.tag ? "(" + source.tag + ")" : ""}</List.Item>);
|
||||
callLength = currentCall.len;
|
||||
talkgroupNum = currentCall.talkgroupNum;
|
||||
callDownload = currentCall.url;
|
||||
|
||||
@@ -44,7 +44,7 @@ function CallInfo(props) {
|
||||
}
|
||||
|
||||
|
||||
srcList = currentCall.srcList.map((source, index) => <List.Item key={index}>{source.src}[{source.pos}]</List.Item>);
|
||||
srcList = currentCall.srcList.map((source, index) => <List.Item key={index}>{source.src}[{source.pos}] {source.tag ? "(" + source.tag + ")" : ""}</List.Item>);
|
||||
callLength = currentCall.len;
|
||||
talkgroupNum = currentCall.talkgroupNum;
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ function CallInfoPane(props) {
|
||||
const freq = currentCall.freq / 1000000;
|
||||
callFreq = Math.round(freq * 1000) / 1000;
|
||||
}
|
||||
srcList = currentCall.srcList.map((source, index) => <List.Item key={index}>{source.src}[{source.pos}]</List.Item>);
|
||||
srcList = currentCall.srcList.map((source, index) => <List.Item key={index}>{source.src}[{source.pos}] {source.tag ? "(" + source.tag + ")" : ""}</List.Item>);
|
||||
callLength = currentCall.len;
|
||||
talkgroupNum = currentCall.talkgroupNum;
|
||||
patches = currentCall.patches;
|
||||
|
||||
@@ -136,10 +136,14 @@ const MediaPlayer = (props) => {
|
||||
|
||||
let playEnabled = { "disabled": true }
|
||||
let sourceId = "-";
|
||||
let sourceTag = "";
|
||||
|
||||
if (call) {
|
||||
if (call.srcList.length > sourceIndex) {
|
||||
sourceId = call.srcList[sourceIndex].src;
|
||||
if (call.srcList[sourceIndex].tag !== undefined && call.srcList[sourceIndex].tag !== null && call.srcList[sourceIndex].tag !== "") {
|
||||
sourceTag = "(" + call.srcList[sourceIndex].tag + ")";
|
||||
}
|
||||
}
|
||||
playEnabled = {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user