feat: refs #7207 show queue in worker summary
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jorge Penadés 2024-09-23 14:40:38 +02:00
parent f4de066d16
commit 6ff76fd74b
6 changed files with 121 additions and 3 deletions

View File

@ -175,6 +175,12 @@
"PrintConfig": {
"dataSource": "vn"
},
"QueueMember": {
"dataSource": "vn"
},
"Queue": {
"dataSource": "vn"
},
"ViaexpressConfig": {
"dataSource": "vn"
},

View File

@ -0,0 +1,38 @@
{
"name": "QueueMember",
"base": "VnModel",
"options": {
"mysql": {
"table": "pbx.queueMember"
}
},
"properties": {
"id": {
"type": "number",
"id": true
},
"queue": {
"type": "string"
},
"extension": {
"type": "string"
}
},
"relations": {
"queueRelation": {
"type": "belongsTo",
"model": "Queue",
"foreignKey": "queue",
"primaryKey": "name"
}
},
"acls": [
{
"property": "*",
"accessType": "READ",
"principalType": "ROLE",
"principalId": "employee",
"permission": "ALLOW"
}
]
}

30
back/models/queue.json Normal file
View File

@ -0,0 +1,30 @@
{
"name": "Queue",
"base": "VnModel",
"options": {
"mysql": {
"table": "pbx.queue"
}
},
"properties": {
"id": {
"type": "number",
"id": true
},
"description": {
"type": "string"
},
"name": {
"type": "string"
}
},
"acls": [
{
"property": "*",
"accessType": "READ",
"principalType": "ROLE",
"principalId": "employee",
"permission": "ALLOW"
}
]
}

View File

@ -3972,3 +3972,22 @@ INSERT INTO vn.accountDetailType (id, description, code)
INSERT IGNORE INTO ormConfig
SET id =1,
selectLimit = 1000;
INSERT INTO pbx.queueMultiConfig
SET id = 'ring',
strategy = 20,
timeout = 2,
retry = 0,
weight = 0,
maxLen = 0,
ringInUse = 0;
INSERT IGNORE INTO pbx.queue
SET description = 'X-men',
name = '1000',
config = 1;
INSERT IGNORE INTO pbx.queueMember
SET queue = '1000',
extension = '1010';

View File

@ -25,7 +25,12 @@
"type": "belongsTo",
"model": "VnUser",
"foreignKey": "user_id"
},
"queueMember": {
"type": "belongsTo",
"model": "QueueMember",
"foreignKey": "extension",
"primaryKey": "extension"
}
}
}

View File

@ -253,7 +253,27 @@
"relation": "client"
},
{
"relation": "sip"
"relation": "sip",
"scope": {
"include": {
"relation": "queueMember",
"scope": {
"fields": [
"queue",
"extension"
],
"include": {
"relation": "queueRelation",
"scope": {
"fields": [
"description",
"name"
]
}
}
}
}
}
}
]
},