Commit 3218c619 authored by Kostis Trantzas's avatar Kostis Trantzas
Browse files

Merge remote-tracking branch 'remotes/origin/develop' into 26-implement-user-journey-tests

parents d00a583e fff4f842
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@ import { ResourceReservationCalendarComponent } from './p_resources/admin/resour
import { EditResourceReservationComponent } from './p_resources/admin/resourcePoolManagement/edit-resource-reservation/edit-resource-reservation.component';
import { EditResourcePoolComponent } from './p_resources/admin/resourcePoolManagement/edit-resource-pool/edit-resource-pool.component';
import { ListResourceReservationsComponent } from './p_resources/admin/resourcePoolManagement/list-resource-reservations/list-resource-reservations.component';
import { EditIndividualsComponent } from './shared/components/partyManagement/edit-individuals/edit-individuals.component';

const routes: Routes = [
  // { path: 'resources_marketplace', component: ResourcesMarketplaceComponent },
@@ -39,6 +40,8 @@ const routes: Routes = [
      { path: 'resource_reservation_update/:id', component: EditResourceReservationComponent},
      { path: 'resource_reservation_update', component: EditResourceReservationComponent },

      { path: 'individual_update/:id', component: EditIndividualsComponent }

    ]
  }

+32 −12
Original line number Diff line number Diff line
@@ -1169,13 +1169,27 @@ export class ServiceRuleDesignComponent implements OnInit {
      };

      Blockly.Java['text_escape'] = function(block: any) {
        var code = Blockly.Java.valueToCode(block, 'paramtxt',
          Blockly.Java.ORDER_NONE) || '""';        
          code = code.replace('"', '');
          code = code.substring(0, code.length-1);
          // code = code.replaceAll('\\', '\\\\');
          // code = code.replaceAll('"', '\\"');
          code = '"' +  textEscape(code) + '"';

        // Get the value connected to 'paramtxt', defaulting to an empty string
        var code = Blockly.Java.valueToCode(block, 'paramtxt', Blockly.Java.ORDER_NONE) || '""';

        // If the code starts and ends with quotes, treat it as a literal string
        if (code.startsWith('"') && code.endsWith('"')) {
            // Remove surrounding quotes
            var literalValue = code.substring(1, code.length - 1);

            // Call the textEscape function to escape the string
            literalValue = textEscape(literalValue);

            // Wrap the escaped string in double quotes again
            code = '"' + literalValue + '"';

            return [code, Blockly.Java.ORDER_ATOMIC]
        }
        
        // If the code is not a literal (e.g., it's a method call)
        code = "escapeText(" + code + ")";

        return [code, Blockly.Java.ORDER_ATOMIC];
      };
  
@@ -1759,10 +1773,16 @@ export class ServiceRuleDesignComponent implements OnInit {

function textEscape(avalue: any): any {
      
  //avalue = avalue.replaceAll('\\', '\\\\');
  avalue = avalue.replaceAll('"', '\\"');
  //avalue = avalue.replaceAll('\\\\\\\\n', '\n');
  
  // Check if the value is an object (including arrays)
  if (typeof avalue === 'object' && avalue !== null) {
    // Convert object or array to a JSON string
    avalue = JSON.stringify(avalue);
  } else if (typeof avalue !== 'string') {
    // If it's not an object/array or string, return as is (e.g., number, null, etc.)
    return avalue;
  }

  // Escape double quotes in the string
  return avalue.replaceAll('"', '\\"');
}
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@
                                    class='fab fa-linkedin mr-2'></i>LinkedIn</a></div>
                    </div>
                    <div class='col-sm-12 col-md-6 col-lg-3'>
                        <div><a href='https://openslice.slack.com/' class='font-weight-light text-white'><i
                        <div><a href='https://join.slack.com/t/openslice/shared_invite/zt-29a1o45yc-3P7TYForhiMTWMFkL6V_Cw' class='font-weight-light text-white'><i
                                    class='fab fa-slack mr-2'></i>Slack</a></div>
                    </div>
                    <div class='col-sm-12 col-md-6 col-lg-3'>
+1 −1
Original line number Diff line number Diff line
@@ -4,6 +4,6 @@
    "DEFAULT_SERVICE_LOGO_PATH":"assets/images/logo_icon_original.png",
    "FAVICON_PATH":"favicon.ico",   
    "WHO_WE_ARE_HTML":"<address class='font-weight-light'><span class='font-weight-bold'>ETSI SDG OpenSlice</span>|<a href='https://osl.etsi.org/' class='text-white'>https://osl.etsi.org</a><br>The ETSI Software Development Group for OpenSlice (SDG OSL) is developing an open source service based Operations Support System (OSS) to deliver Network as a Service (NaaS).</address><address class='font-weight-light'><span class='font-weight-bold'>OpenSlice by ETSI</span>|<a href='http' class='text-white'>http://portal.openslice.eu</a><br>A portal that allows 5G experimenters to design and deploy network services towards the infrastructure.</address><address class='font-weight-light'><span class='font-weight-bold'>OpenSlice by ETSI wiki</span>|<a href='https://osl.etsi.org/documentation' class='text-white'>https://osl.etsi.org/documentation</a><br>A wiki containing OpenSlice software documentation.</address>",
    "CONNECT_WITH_US_HTML":"<div class='col-lg-3 col-md-6 col-sm-12'><div><a class='font-weight-light text-white' href='https://www.linkedin.com/company/openslice'><i class='fab mr-2 fa-linkedin'></i>LinkedIn</a></div></div><div class='col-lg-3 col-md-6 col-sm-12'><div><a class='font-weight-light text-white' href='https://openslice.slack.com/'><i class='fab mr-2 fa-slack'></i>Slack</a></div></div><div class='col-lg-3 col-md-6 col-sm-12'><div><a class='font-weight-light text-white' href='https://twitter.com/OpensliceOSS'><i class='fab mr-2 fa-twitter'></i>Twitter</a></div></div>",
    "CONNECT_WITH_US_HTML":"<div class='col-lg-3 col-md-6 col-sm-12'><div><a class='font-weight-light text-white' href='https://www.linkedin.com/company/openslice'><i class='fab mr-2 fa-linkedin'></i>LinkedIn</a></div></div><div class='col-lg-3 col-md-6 col-sm-12'><div><a class='font-weight-light text-white' href='https://join.slack.com/t/openslice/shared_invite/zt-29a1o45yc-3P7TYForhiMTWMFkL6V_Cw'><i class='fab mr-2 fa-slack'></i>Slack</a></div></div><div class='col-lg-3 col-md-6 col-sm-12'><div><a class='font-weight-light text-white' href='https://twitter.com/OpensliceOSS'><i class='fab mr-2 fa-twitter'></i>Twitter</a></div></div>",
    "FOOTER_HTML":"<div class='row align-items-center'><div class='col-md-2'><img src='assets/images/eu-commission.png'></div><div class='col-md-10 font-weight-light'><div class='font-weight-light'>OpenSlice has received funding from various projects under European Programmes for research, technological development and demonstration. You may refer to our extensive <a href='https://osl.etsi.org/ecosystem/'>ecosystem</a> for further details.</div><div class='font-weight-light'>Openslice by ETSI running OSL version 2025Q2-SNAPSHOT | <a href='https://osl.etsi.org/files/SDG_OSL_Terms_and_Conditions.pdf' class='font-weight-light'>Terms and Conditions</a> | &copy; 2025 on behalf of <a target='_blank' href='https://osl.etsi.org/' title='osl.etsi.org' class='font-weight-light'>osl.etsi.org</a></div></div></div>"
}
 No newline at end of file