Skip to content

Commit

Permalink
upgrade to react 17 & add metadata folder (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianchen0119 committed May 25, 2022
1 parent ffc11ce commit 69864fe
Show file tree
Hide file tree
Showing 6 changed files with 1,023 additions and 629 deletions.
16 changes: 8 additions & 8 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
"dependencies": {
"autoprefixer": "7.1.2",
"axios": "latest",
"babel-core": "6.25.0",
"babel-eslint": "10.0.3",
"babel-core": "6.26.3",
"babel-eslint": "10.1.0",
"babel-jest": "20.0.3",
"babel-loader": "7.1.1",
"babel-preset-react-app": "^3.0.2",
"babel-runtime": "6.26.0",
"case-sensitive-paths-webpack-plugin": "2.1.1",
"case-sensitive-paths-webpack-plugin": "2.4.0",
"chalk": "1.1.3",
"classnames": "^2.2.5",
"css-loader": "0.28.4",
Expand All @@ -21,9 +21,9 @@
"eslint-config-react-app": "^2.0.0",
"eslint-loader": "1.9.0",
"eslint-plugin-flowtype": "2.35.0",
"eslint-plugin-import": "2.7.0",
"eslint-plugin-import": "2.25.3",
"eslint-plugin-jsx-a11y": "5.1.1",
"eslint-plugin-react": "7.1.0",
"eslint-plugin-react": "7.27.1",
"extract-text-webpack-plugin": "3.0.0",
"file-loader": "0.11.2",
"fs-extra": "3.0.1",
Expand All @@ -36,14 +36,14 @@
"pe7-icon": "^1.0.4",
"postcss-flexbugs-fixes": "3.2.0",
"postcss-loader": "2.0.6",
"promise": "8.0.1",
"promise": "8.1.0",
"prop-types": "^15.7.2",
"query-string": "5.0.0",
"react": "^15.6.1",
"react": "17.0.2",
"react-bootstrap": "^0.31.2",
"react-bootstrap-table": "^4.3.1",
"react-dev-utils": "^4.0.1",
"react-dom": "^15.6.1",
"react-dom": "17.0.2",
"react-jsonschema-form": "^1.8.1",
"react-redux": "^5.0.6",
"react-router-dom": "^4.2.2",
Expand Down
347 changes: 347 additions & 0 deletions frontend/src/metadata/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,347 @@
// Schema List:
// subModalSchema
// subModaluiSchema
// tenantSchema
// userModalSchema

let subModalSchema = {
// title: "A registration form",
// "description": "A simple form example.",
type: "object",
required: [
"userNumber",
"plmnID",
"ueId",
"authenticationMethod",
"K",
"OPOPcSelect",
"OPOPc",
"SQN",
],
properties: {
userNumber: {
type: "integer",
title: "Subscriber data number (auto-increased with SUPI)",
default: 1,
maximum: 100000,
minimum: 1
},
plmnID: {
type: "string",
title: "PLMN ID",
pattern: "^[0-9]{5,6}$",
default: "20893",
},
ueId: {
type: "string",
title: "SUPI (IMSI)",
pattern: "^[0-9]{10,15}$",
default: "208930000000003",
},
authenticationMethod: {
type: "string",
title: "Authentication Method",
default: "5G_AKA",
enum: ["5G_AKA", "EAP_AKA_PRIME"],
},
K: {
type: "string",
title: "K",
pattern: "^[A-Fa-f0-9]{32}$",
default: "8baf473f2f8fd09487cccbd7097c6862",
},
OPOPcSelect: {
type: "string",
title: "Operator Code Type",
enum: ["OP", "OPc"],
default: "OPc",
},
OPOPc: {
type: "string",
title: "Operator Code Value",
pattern: "^[A-Fa-f0-9]{32}$",
default: "8e27b6af0e692e750f32667a3b14605d",
},
SQN: {
type: "string",
title: "SQN",
pattern: "^[A-Fa-f0-9]{1,12}$",
default: "16f3b3f70fc2",
},
sliceConfigurations: {
type: "array",
title: "S-NSSAI Configuration",
items: { $ref: "#/definitions/SliceConfiguration" },
default: [
{
snssai: {
"sst": 1,
"sd": "010203",
"isDefault": true,
},
dnnConfigurations: [
{
dnn: "internet",
uplinkAmbr: "200 Mbps",
downlinkAmbr: "100 Mbps",
"5qi": 9,
},
{
dnn: "internet2",
uplinkAmbr: "200 Mbps",
downlinkAmbr: "100 Mbps",
"5qi": 9,
}
]
},
{
snssai: {
"sst": 1,
"sd": "112233",
"isDefault": true,
},
dnnConfigurations: [
{
dnn: "internet",
uplinkAmbr: "200 Mbps",
downlinkAmbr: "100 Mbps",
"5qi": 9,
},
{
dnn: "internet2",
uplinkAmbr: "200 Mbps",
downlinkAmbr: "100 Mbps",
"5qi": 9,
}
]
},
],
},
},
definitions: {
Snssai: {
type: "object",
required: ["sst", "sd"],
properties: {
sst: {
type: "integer",
title: "SST",
minimum: 0,
maximum: 255,
},
sd: {
type: "string",
title: "SD",
pattern: "^[A-Fa-f0-9]{6}$",
},
isDefault: {
type: "boolean",
title: "Default S-NSSAI",
default: false,
},
},
},
SliceConfiguration: {
type: "object",
properties: {
snssai: {
$ref: "#/definitions/Snssai"
},
dnnConfigurations: {
type: "array",
title: "DNN Configurations",
items: { $ref: "#/definitions/DnnConfiguration" },
}
}
},
DnnConfiguration: {
type: "object",
required: ["dnn", "uplinkAmbr", "downlinkAmbr"],
properties: {
dnn: {
type: "string",
title: "Data Network Name"
},
uplinkAmbr: {
$ref: "#/definitions/bitRate",
title: "Uplink AMBR",
default: "1000 Kbps"
},
downlinkAmbr: {
$ref: "#/definitions/bitRate",
title: "Downlink AMBR",
default: "1000 Kbps"
},
"5qi": {
type: "integer",
minimum: 0,
maximum: 255,
title: "Default 5QI"
},
flowRules: {
type: "array",
items: { $ref: "#/definitions/FlowInformation" },
maxItems: 1,
title: "Flow Rules"
},
upSecurityChk: {
"type": "boolean",
title: "UP Security",
"default": false
},
},
"dependencies": {
upSecurityChk: {
"oneOf": [
{
"properties": {
upSecurityChk: {
"enum": [false]
}
},
},
{
"properties": {
upSecurityChk: {
"enum": [true]
},
upIntegrity: {
type: "string",
title: "Integrity of UP Security",
enum: ["NOT_NEEDED", "PREFERRED", "REQUIRED"],
},
upConfidentiality: {
type: "string",
title: "Confidentiality of UP Security",
enum: ["NOT_NEEDED", "PREFERRED", "REQUIRED"],
},
},
"required": [
"upIntegrity",
"upConfidentiality"
]
}
]
}
},
},
FlowInformation: {
type: "object",
properties: {
filter: {
$ref: "#/definitions/IPFilter",
title: "IP Filter"
},
"5qi": {
type: "integer",
minimum: 0,
maximum: 255,
title: "5QI"
},
gbrUL: {
$ref: "#/definitions/bitRate",
title: "Uplink GBR",
},
gbrDL: {
$ref: "#/definitions/bitRate",
title: "Downlink GBR",
},
mbrUL: {
$ref: "#/definitions/bitRate",
title: "Uplink MBR",
},
mbrDL: {
$ref: "#/definitions/bitRate",
title: "Downlink MBR",
},
}
},
IPFilter: {
type: "string",
},
bitRate: {
type: "string",
pattern: "^[0-9]+(\\.[0-9]+)? (bps|Kbps|Mbps|Gbps|Tbps)$"
},
},
};

let subModaluiSchema = {
OPOPcSelect: {
"ui:widget": "select",
},
authenticationMethod: {
"ui:widget": "select",
},
SliceConfiurations: {
"ui:options": {
"orderable": false
},
"isDefault": {
"ui:widget": "radio",
},
"dnnConfigurations": {
"ui:options": {
"orderable": false
},
"flowRules": {
"ui:options": {
"orderable": false
},
}
}
}
};

let tenantSchema = {
// title: "A registration form",
// "description": "A simple form example.",
type: "object",
required: [
"tenantName",
],
properties: {
tenantId: {
type: "string",
title: "Tenant ID",
pattern: "^[0-9a-zA-Z-]*$",
default: "",
readOnly: true,
},
tenantName: {
type: "string",
title: "Tenant Name",
default: "",
},
},
};

let userModalSchema = {
// title: "A registration form",
// "description": "A simple form example.",
type: "object",
required: [
"email",
],
properties: {
userId: {
type: "string",
title: "User ID",
pattern: "^[0-9a-zA-Z-]*$",
default: "",
readOnly: true,
},
email: {
type: "string",
title: "User Email",
default: "",
},
password: {
type: "string",
title: "Password",
default: "",
},
},
};

export { subModalSchema, subModaluiSchema, tenantSchema, userModalSchema};
Loading

0 comments on commit 69864fe

Please sign in to comment.