diff --git a/webui/server/models/subscriber.js b/webui/server/models/subscriber.js index f28fdf2cf..309b0889b 100644 --- a/webui/server/models/subscriber.js +++ b/webui/server/models/subscriber.js @@ -30,9 +30,9 @@ const Subscriber = new Schema({ default: 12 // minites }, - ue_ambr: { - max_bandwidth_ul: Number, - max_bandwidth_dl: Number + ambr: { + downlink: Number, + uplink: Number }, pdn: [{ @@ -45,17 +45,42 @@ const Subscriber = new Schema({ arp: { priority_level: Number, pre_emption_capability: { - $type: Number, default: 1 // Capability Disabled + $type: Number, default: 1 // Capability Disabled }, pre_emption_vulnerability: { - $type : Number, default: 1 // Vulnerability Disabled + $type : Number, default: 1 // Vulnerability Disabled } } }, - pdn_ambr: { - max_bandwidth_ul: Number, - max_bandwidth_dl: Number - } + ambr: { + downlink: Number, + uplink: Number + }, + pcc_rule: [{ + flow: [{ + description: String + }], + qos: { + qci: Number, + arp: { + priority_level: Number, + pre_emption_capability: { + $type: Number, default: 1 // Capability Disabled + }, + pre_emption_vulnerability: { + $type : Number, default: 1 // Vulnerability Disabled + } + }, + mbr: { + downlink: Number, + uplink: Number + }, + gbr: { + downlink: Number, + uplink: Number + }, + }, + }] }] }, { typeKey: '$type' }); diff --git a/webui/src/components/Shared/Form.js b/webui/src/components/Shared/Form.js index 73a0c5675..e56884a4a 100644 --- a/webui/src/components/Shared/Form.js +++ b/webui/src/components/Shared/Form.js @@ -16,7 +16,7 @@ const Wrapper = styled.div` display: flex; flex-direction: column; postion: relative; - width: 800px; + width: 1050px; ${media.mobile` width: calc(100vw - 2rem); @@ -39,7 +39,7 @@ const Body = styled.div` padding: 2rem; font-size: 14px; - height: 400px; + height: 500px; ${media.mobile` height: calc(100vh - 16rem); `} diff --git a/webui/src/components/Subscriber/Edit.js b/webui/src/components/Subscriber/Edit.js index 42cb0b611..ce8cfb5ad 100644 --- a/webui/src/components/Subscriber/Edit.js +++ b/webui/src/components/Subscriber/Edit.js @@ -5,7 +5,7 @@ import withWidth, { SMALL } from 'helpers/with-width'; import { Form } from 'components'; const schema = { - "title": "Subscriber", + "title": "Subscriber Configuration", "type": "object", "properties": { "imsi": { @@ -51,16 +51,16 @@ const schema = { } } }, - "ue_ambr": { + "ambr": { "type": "object", "title": "", "properties": { - "max_bandwidth_dl": { + "downlink": { "type": "number", "title": "UE-AMBR Downlink (Kbps)*", "required": true }, - "max_bandwidth_ul": { + "uplink": { "type": "number", "title": "UE-AMBR Uplink (Kbps)*", "required": true @@ -69,12 +69,12 @@ const schema = { }, "pdn": { "type": "array", - "title": "EPS Session", + "title": "APN Configurations", "minItems": 1, "maxItems": 8, "messages": { - "minItems": "At least 1 PDN is required", - "maxItems": "8 PDNs are supported" + "minItems": "At least 1 APN is required", + "maxItems": "8 APNs are supported" }, "items": { "type": "object", @@ -92,7 +92,7 @@ const schema = { "type": "number", "title": "QoS Class Identifier (QCI)*", "enum": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 65, 66, 69, 70 ], - "default": 9 + "default": 9, }, "arp" : { "type": "object", @@ -112,7 +112,6 @@ const schema = { "enum": [1, 0], "enumNames": ["Disabled", "Enabled"], "default": 1, - "required": true }, "pre_emption_vulnerability": { "type": "number", @@ -123,25 +122,129 @@ const schema = { "enum": [1, 0], "enumNames": ["Disabled", "Enabled"], "default": 1, - "required": true }, } } } }, - "pdn_ambr": { + "ambr": { "type": "object", "title": "", "properties": { - "max_bandwidth_dl": { + "downlink": { "type": "number", "title": "APN-AMBR Downlink (Kbps)", }, - "max_bandwidth_ul": { + "uplink": { "type": "number", "title": "APN-AMBR Uplink (Kbps)", }, } + }, + "pcc_rule": { + "type": "array", + "title": "PCC Rules", + "maxItems": 16, + "messages": { + "maxItems": "16 PCC Rules are supported" + }, + "items": { + "type": "object", + "properties": { + "flow": { + "type": "array", + "title": "", + "minItems": 1, + "maxItems": 16, + "messages": { + "minItems": "At least 1 Flow is required", + "maxItems": "16 Flows are supported" + }, + "items": { + "type": "object", + "properties": { + "description": { + "type": "string", + "title": "Flow Description*", + "default": "permit in ip from any to any", + "required": true + } + } + } + }, + "qos": { + "type": "object", + "title": "", + "properties": { + "qci": { + "type": "number", + "title": "QoS Class Identifier (QCI)*", + "enum": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 65, 66, 69, 70 ], + "default": 9, + }, + "arp" : { + "type": "object", + "title": "", + "properties": { + "priority_level": { + "type": "number", + "title": "ARP Priority Level (1-15)*", + "default": 8, + "minimum": 1, + "maximum": 15, + "required": true + }, + "pre_emption_capability": { + "type": "number", + "title": "Capability*", + "enum": [1, 0], + "enumNames": ["Disabled", "Enabled"], + "default": 1, + }, + "pre_emption_vulnerability": { + "type": "number", + "title": "Vulnerability*", + "default": 1, + "minimum": 0, + "maximum": 1, + "enum": [1, 0], + "enumNames": ["Disabled", "Enabled"], + "default": 1, + }, + } + }, + "mbr": { + "type": "object", + "title": "", + "properties": { + "downlink": { + "type": "number", + "title": "MBR Downlink (Kbps)", + }, + "uplink": { + "type": "number", + "title": "MBR Uplink (Kbps)", + }, + } + }, + "gbr": { + "type": "object", + "title": "", + "properties": { + "downlink": { + "type": "number", + "title": "GBR Downlink (Kbps)", + }, + "uplink": { + "type": "number", + "title": "GBR Uplink (Kbps)", + }, + } + }, + }, + }, + } + } } } } @@ -164,18 +267,15 @@ const uiSchema = { classNames: "col-xs-5", }, }, - "ue_ambr" : { - "max_bandwidth_dl" : { + "ambr" : { + "downlink" : { classNames: "col-xs-6" }, - "max_bandwidth_ul" : { + "uplink" : { classNames: "col-xs-6" }, }, "pdn": { - "ui:options": { - "orderable": false - }, "items": { "qos": { "qci": { @@ -196,13 +296,55 @@ const uiSchema = { } } }, - "pdn_ambr" : { - "max_bandwidth_dl" : { + "ambr" : { + "downlink" : { classNames: "col-xs-6" }, - "max_bandwidth_ul" : { + "uplink" : { classNames: "col-xs-6" }, + }, + "pcc_rule": { + "items": { + "flow": { + "ui:help": "Hint: See IPFilterRule in RFC 3588!" + }, + "qos": { + "qci": { + "ui:widget": "radio", + "ui:options": { + "inline": true + }, + }, + "arp": { + "priority_level": { + classNames: "col-xs-6" + }, + "pre_emption_capability": { + classNames: "col-xs-3" + }, + "pre_emption_vulnerability": { + classNames: "col-xs-3" + } + }, + "mbr": { + "downlink": { + classNames: "col-xs-6" + }, + "uplink": { + classNames: "col-xs-6" + } + }, + "gbr": { + "downlink": { + classNames: "col-xs-6" + }, + "uplink": { + classNames: "col-xs-6" + } + } + } + } } } } @@ -307,4 +449,4 @@ class Edit extends Component { } } -export default withWidth()(Edit); \ No newline at end of file +export default withWidth()(Edit); diff --git a/webui/src/components/Subscriber/View.js b/webui/src/components/Subscriber/View.js index 62caea80b..7e92fcd67 100644 --- a/webui/src/components/Subscriber/View.js +++ b/webui/src/components/Subscriber/View.js @@ -18,7 +18,7 @@ const Wrapper = styled.div` display: flex; flex-direction: column; postion: relative; - width: 600px; + width: 900px; ${media.mobile` width: calc(100vw - 4rem); @@ -80,7 +80,7 @@ const Body = styled.div` display: block; margin: 0.5rem; - height: 400px; + height: 500px; ${media.mobile` height: calc(100vh - 16rem); `} @@ -141,17 +141,27 @@ const Pdn = styled.div` flex:1; margin: 0px 32px; - .data { + .small_data { + width: 40px; + font-size: 12px; + margin: 4px; + } + .medium_data { width: 80px; font-size: 12px; margin: 4px; } + .large_data { + width: 160px; + font-size: 12px; + margin: 4px; + } } ` const View = ({ visible, disableOnClickOutside, subscriber, onEdit, onDelete, onHide }) => { const imsi = (subscriber || {}).imsi; const security = ((subscriber || {}).security || {}); - const ue_ambr = ((subscriber || {}).ue_ambr || {}); + const ambr = ((subscriber || {}).ambr || {}); const pdns = ((subscriber || {}).pdn || []); return ( @@ -178,7 +188,7 @@ const View = ({ visible, disableOnClickOutside, subscriber, onEdit, onDelete, on
- Subscriber Details + Subscriber Configuration
@@ -217,11 +227,11 @@ const View = ({ visible, disableOnClickOutside, subscriber, onEdit, onDelete, on
- {ue_ambr.max_bandwidth_ul} Kbps + {ambr.downlink} Kbps UL
- {ue_ambr.max_bandwidth_dl} Kbps + {ambr.uplink} Kbps DL
@@ -229,20 +239,78 @@ const View = ({ visible, disableOnClickOutside, subscriber, onEdit, onDelete, on
- PDN + APN Configrations
-
APN
-
QCI
-
ARP
-
UL/DL(Kbps)
+
APN
+
QCI
+
ARP
+
Capability
+
Vulnerablility
+
MBR DL/UL(Kbps)
+
GBR DL/UL(Kbps)
{pdns.map(pdn => -
-
{pdn.apn}
-
{pdn.qos.qci}
-
{pdn.qos.arp.priority_level}
-
{pdn.pdn_ambr.max_bandwidth_ul}/{pdn.pdn_ambr.max_bandwidth_ul}
+
+
+
{pdn.apn}
+
{pdn.qos.qci}
+
{pdn.qos.arp.priority_level}
+
{pdn.qos.arp.pre_emption_capability === 1 ? "Disabled" : "Enabled"}
+
{pdn.qos.arp.pre_emption_vulnerability === 1 ? "Disabled" : "Enabled"}
+ {pdn['ambr'] === undefined ? +
+ unlimited/unlimited +
: +
+ {pdn.ambr['downlink'] === undefined ? "unlimited" : pdn.ambr.downlink} + / + {pdn.ambr['uplink'] === undefined ? "unlimited" : pdn.ambr.uplink} +
+ } +
+ {pdn['pcc_rule'] !== undefined && + pdn.pcc_rule.map(pcc_rule => +
+
+
+
{pcc_rule.qos.qci}
+
{pcc_rule.qos.arp.priority_level}
+
{pcc_rule.qos.arp.pre_emption_capability === 1 ? "Disabled" : "Enabled"}
+
{pcc_rule.qos.arp.pre_emption_vulnerability === 1 ? "Disabled" : "Enabled"}
+ {pcc_rule.qos['mbr'] === undefined ? +
+ unlimited/unlimited +
: +
+ {pcc_rule.qos.mbr['downlink'] === undefined ? "unlimited" : pcc_rule.qos.mbr.downlink} + / + {pcc_rule.qos.mbr['uplink'] === undefined ? "unlimited" : pcc_rule.qos.mbr.uplink} +
+ } + {pcc_rule.qos['gbr'] === undefined ? +
+ unlimited/unlimited +
: +
+ {pcc_rule.qos.gbr['downlink'] === undefined ? "unlimited" : pcc_rule.qos.gbr.downlink} + / + {pcc_rule.qos.gbr['uplink'] === undefined ? "unlimited" : pcc_rule.qos.gbr.uplink} +
+ } +
+ {pcc_rule['flow'] !== undefined && + pcc_rule.flow.map(flow => +
+
+
FLOW
+
{flow.description}
+
+ ) + } +
+ ) + }
)} diff --git a/webui/src/containers/Subscriber/Document.js b/webui/src/containers/Subscriber/Document.js index c866e8a8e..dabd87080 100644 --- a/webui/src/containers/Subscriber/Document.js +++ b/webui/src/containers/Subscriber/Document.js @@ -17,9 +17,9 @@ const formData = { op: "5F1D289C 5D354D0A 140C2548 F5F3E3BA", amf: "8000" }, - "ue_ambr": { - "max_bandwidth_ul": 1024000, - "max_bandwidth_dl": 1024000 + "ambr": { + "downlink": 1024000, + "uplink": 1024000 }, "pdn": [ {