fix bug when convert profile cir 29/52829/1
authorElisha Oren <elisha.oren@hpe.com>
Tue, 24 Jan 2017 10:56:07 +0000 (12:56 +0200)
committerElisha Oren <elisha.oren@hpe.com>
Sun, 5 Mar 2017 12:23:31 +0000 (14:23 +0200)
cir kb->Mb instead of cbs B -> KB

Change-Id: I4f4258fc8528d3971417b04e3c1609808db39178
Signed-off-by: Elisha Oren <elisha.oren@hpe.com>
dlux/cpeui/cpeui-module/src/main/resources/cpeui/dialogs/AddProfile.tpl.html
dlux/cpeui/cpeui-module/src/main/resources/cpeui/services/cpeui.services.js

index e15ecf9abe6a3c44d678e2d96f94589524e03b77..4f0e39e44b7c38c0a62a6b3e9b6d6a41729f7160 100644 (file)
@@ -30,7 +30,7 @@
                                           Use default Committed Burst Size {{obj.cir ? ('(' + getDefualtCbs(obj.cir) + ' KB)') : ''}}
                                        </md-checkbox>
                                        <md-input-container class="md-block" ng-if="!obj.default_cbs" ng-init="obj.cbs = params.cbs">
-                                               <label>Committed Burst Size (Bytes)</label>
+                                               <label>Committed Burst Size (KB)</label>
                                                <input type="number" required name="cbs" ng-model="obj.cbs" min="0">
                                                <div ng-messages="projectForm.cbs.$error">
                                                        <div ng-message="required">Number is required!</div>
index e5297434269d2537e37670a0b1f32d61f53af10f..5786d0bda6ce70ba62ba0d60c94261693313a687 100644 (file)
@@ -56,7 +56,7 @@ define(['app/cpeui/cpeui.module'],function(cpeui) {
               if (callback != undefined) {
                   if (response.data["ingress-bwp-flows"]["bwp-flow"]){
                       response.data["ingress-bwp-flows"]["bwp-flow"].forEach(function(p){
-                         p.cir = Math.round(p.cir/1024);
+                         p.cbs = Math.round(p.cbs/1024);
                       });
                   }
                   callback(response.data["ingress-bwp-flows"]["bwp-flow"]);
@@ -75,8 +75,8 @@ define(['app/cpeui/cpeui.module'],function(cpeui) {
               url:"/restconf/config/mef-global:mef-global/profiles/ingress-bwp-flows/",
               data: {"bwp-flow":{
                         "bw-profile" : name,
-                         "cir" : cir*1024,
-                         "cbs" : cbs
+                         "cir" : cir,
+                         "cbs" : cbs*1024
                     }}
           }).then(function successCallback(response) {
               if (callback != undefined) {
@@ -91,8 +91,8 @@ define(['app/cpeui/cpeui.module'],function(cpeui) {
               url:"/restconf/config/mef-global:mef-global/profiles/ingress-bwp-flows/bwp-flow/"+name,
               data: {"bwp-flow":{
                       "bw-profile": name,
-                      cir: cir*1024,
-                      cbs:cbs
+                      cir: cir,
+                      cbs:cbs*1024
                     }}
           }).then(function successCallback(response) {
               if (callback != undefined) {