Skip to content

Commit

Permalink
remove SubscriberUpdate.tsx and integrate it into SubscriberCreate.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
brianchennn committed Sep 21, 2023
1 parent 7f345c5 commit 74f2951
Show file tree
Hide file tree
Showing 9 changed files with 392 additions and 1,744 deletions.
10 changes: 8 additions & 2 deletions backend/WebUI/api_webui.go
Original file line number Diff line number Diff line change
Expand Up @@ -1531,12 +1531,18 @@ func dbOperation(ueId string, servingPlmnId string, method string, subsData *Sub
if chargingData.Dnn != "" && chargingData.Filter != "" {
chargingFilter = bson.M{
"ueId": ueId, "servingPlmnId": servingPlmnId,
"snssai": chargingData.Snssai, "dnn": chargingData.Dnn, "filter": chargingData.Filter,
"snssai": chargingData.Snssai,
"dnn": chargingData.Dnn,
"qfi": chargingData.QFI,
"filter": chargingData.Filter,
}
} else {
chargingFilter = bson.M{
"ueId": ueId, "servingPlmnId": servingPlmnId,
"snssai": chargingData.Snssai, "dnn": "", "filter": "",
"snssai": chargingData.Snssai,
"qfi": chargingData.QFI,
"dnn": "",
"filter": "",
}
chargingDataBsonM["dnn"] = ""
chargingDataBsonM["filter"] = ""
Expand Down
1 change: 1 addition & 0 deletions backend/WebUI/model_charging_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package WebUI
type ChargingData struct {
Snssai string `json:"snssai,omitempty" yaml:"snssai" bson:"snssai" mapstructure:"snssai"`
Dnn string `json:"dnn,omitempty" yaml:"dnn" bson:"dnn" mapstructure:"dnn"`
QFI int `json:"qfi" yaml:"qfi" bson:"qfi" mapstructure:"qfi"`
Filter string `json:"filter,omitempty" yaml:"filter" bson:"filter" mapstructure:"filter"`
// nolint
ChargingMethod string `json:"chargingMethod,omitempty" yaml:"chargingMethod" bson:"chargingMethod" mapstructure:"chargingMethod"`
Expand Down
5 changes: 2 additions & 3 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import StatusList from "./pages/StatusList";
import StatusRead from "./pages/StatusRead";
import SubscriberList from "./pages/SubscriberList";
import SubscriberCreate from "./pages/SubscriberCreate";
import SubscriberUpdate from "./pages/SubscriberUpdate";
import SubscriberRead from "./pages/SubscriberRead";
import AnalysisList from "./pages/AnalysisList";
import TenantList from "./pages/TenantList";
Expand Down Expand Up @@ -60,10 +59,10 @@ export default function App() {
}
/>
<Route
path="/subscriber/update/:id/:plmn"
path="/subscriber/create/:id/:plmn"
element={
<ProtectedRoute>
<SubscriberUpdate />
<SubscriberCreate />
</ProtectedRoute>
}
/>
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/Top.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import StatusList from "./pages/StatusList";
import StatusRead from "./pages/StatusRead";
import SubscriberList from "./pages/SubscriberList";
import SubscriberCreate from "./pages/SubscriberCreate";
import SubscriberUpdate from "./pages/SubscriberUpdate";
import SubscriberRead from "./pages/SubscriberRead";
import AnalysisList from "./pages/AnalysisList";
import TenantList from "./pages/TenantList";
Expand All @@ -23,7 +22,7 @@ export default function Top() {
<Route path="/status/:id" element={<StatusRead />} />
<Route path="/subscriber" element={<SubscriberList />} />
<Route path="/subscriber/create" element={<SubscriberCreate />} />
<Route path="/subscriber/update/:id/:plmn" element={<SubscriberUpdate />} />
<Route path="/subscriber/create/:id/:plmn" element={<SubscriberCreate />} />
<Route path="/subscriber/:id/:plmn" element={<SubscriberRead />} />
<Route path="/analysis" element={<AnalysisList />} />
<Route path="/tenant" element={<TenantList />} />
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,12 @@ export interface Tenant {
* @memberof ChargingData
*/
'dnn'?: string;
/**
*
* @type {number}
* @memberof ChargingData
*/
'qfi'?: number;
/**
*
* @type {string}
Expand Down
Loading

0 comments on commit 74f2951

Please sign in to comment.