add flow-direction in webui

This commit is contained in:
Sukchan Lee 2017-08-23 11:47:12 +09:00
parent 0e7196c9c1
commit 486f0b5725
3 changed files with 31 additions and 11 deletions

View File

@ -58,6 +58,7 @@ const Subscriber = new Schema({
},
pcc_rule: [{
flow: [{
direction: Number,
description: String
}],
qos: {

View File

@ -116,9 +116,6 @@ const schema = {
"pre_emption_vulnerability": {
"type": "number",
"title": "Vulnerability*",
"default": 1,
"minimum": 0,
"maximum": 1,
"enum": [1, 0],
"enumNames": ["Disabled", "Enabled"],
"default": 1,
@ -163,11 +160,22 @@ const schema = {
"items": {
"type": "object",
"properties": {
"direction": {
"type": "number",
"title": "Flow Direction*",
"enum": [1, 2],
"enumNames": ["Downlink", "Uplink"],
"default": 1,
},
"description": {
"type": "string",
"title": "Flow Description*",
"default": "permit in ip from any to any",
"required": true
"title": "Description*",
"default": "permit out ip from any to any",
"required": true,
"pattern": "^permit\\s+out",
"messages": {
"pattern": "Begin with reserved keyword 'permit out'."
}
}
}
}
@ -307,7 +315,15 @@ const uiSchema = {
"pcc_rule": {
"items": {
"flow": {
"ui:help": "Hint: See IPFilterRule in RFC 3588!"
"items": {
"direction": {
classNames: "col-xs-12"
},
"description": {
classNames: "col-xs-12",
"ui:help": "Hint: Flow-Description(TS29.212), IPFilterRule(RFC 3588)",
},
},
},
"qos": {
"qci": {

View File

@ -142,7 +142,7 @@ const Pdn = styled.div`
margin: 0px 32px;
.small_data {
width: 40px;
width: 60px;
font-size: 12px;
margin: 4px;
}
@ -301,10 +301,13 @@ const View = ({ visible, disableOnClickOutside, subscriber, onEdit, onDelete, on
</div>
{pcc_rule['flow'] !== undefined &&
pcc_rule.flow.map(flow =>
<div className="body" key={flow.description}>
<div className="body">
<div className="medium_data"></div>
<div className="small_data" style={{color:oc.gray[5]}}>FLOW</div>
<div className="large_data" style={{width:"640px"}}>{flow.description}</div>
<div className="small_data" style={{color:oc.gray[5]}}>
{flow.direction == 1 && "Downlink"}
{flow.direction == 2 && "Uplink"}
</div>
<div className="large_data" style={{width:"480px"}}>{flow.description}</div>
</div>
)
}