Commit 006015d6 authored by Simon Pastor's avatar Simon Pastor
Browse files

2nd merge

parent 9c586cf1
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -13,9 +13,9 @@ class CreateNewAppDialog extends Component {
  constructor(props) {
    super(props);
    this.state = {
      appName: null,
      appName: '',
      appErr: null,
      mepName: null
      mepName: ''
    };
  }

@@ -52,11 +52,10 @@ class CreateNewAppDialog extends Component {
      this.submitApp();
    }
    this.props.onClose();
    this.changeMepName(null);
    this.setState({
      appName: null,
      appName: '',
      appErr: null,
      mepName: null
      mepName: ''
    });
  }

@@ -70,7 +69,7 @@ class CreateNewAppDialog extends Component {
        closeLabel = {'CANCEL'}
        submitLabel = {'CREATE'}
        okDisabled={
          (!this.state.appName || this.state.appErr || this.state.mepName === null)
          (this.state.appName === '' || this.state.appErr || this.state.mepName === '')
        }
        cydata={DLG_CREATE_NEW_APP}
      >
+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ const detailedTableColumnData = [

const tableStyles = () => ({
  root: {
    whiteSpace: 'nowrap'
    whiteSpace: 'normal'
  },
  table: {
    maxHeight: 360
+46 −17
Original line number Diff line number Diff line
@@ -127,30 +127,30 @@ class ApiPane extends Component {
        let mepName = this.edgeAppsMap.edgeApps[i].mepName;
        switch(this.edgeAppsMap.edgeApps[i].img) {
        case 'meep-docker-registry:30001/meep-loc-serv':
          apiUrl = 'api/?urls.primaryName=Location%20Service%20REST%20API';
          apiUrl = 'api/?urls.primaryName='+mepName+'%20-%20Location%20Service%20REST%20API';
          apiPath = mepName+'/location/v2';
          pseudoName = 'Location (013) on ' + mepName;
          pseudoName = 'Location (013) on ' + mepName;// + ' with id ' + this.edgeAppsMap.edgeApps[i].id;
          break;
        case 'meep-docker-registry:30001/meep-rnis':
          apiUrl = 'api/?urls.primaryName=Radio%20Network%20Information%20Service%20REST%20API';
          apiPath = this.edgeAppsMap.edgeApps[i].mepName+'/rni/v2';
          pseudoName = 'Radio Network Information (012) on ' + mepName;
          apiUrl = 'api/?urls.primaryName='+mepName+'%20-%20Radio%20Network%20Information%20Service%20REST%20API';
          apiPath = mepName+'/rni/v2';
          pseudoName = 'Radio Network Information (012) on ' + mepName;// + ' with id ' + this.edgeAppsMap.edgeApps[i].id;
          break;
        case 'meep-docker-registry:30001/meep-wais':
          apiUrl = 'api/?urls.primaryName=WLAN%20Access%20Information%20Service%20REST%20API';
          apiPath = this.edgeAppsMap.edgeApps[i].mepName+'/wai/v2';
          pseudoName = 'WLAN Access Information (028) on ' + mepName;
          apiUrl = 'api/?urls.primaryName='+mepName+'%20-%20WLAN%20Access%20Information%20Service%20REST%20API';
          apiPath = mepName+'/wai/v2';
          pseudoName = 'WLAN Access Information (028) on ' + mepName;// + ' with id ' + this.edgeAppsMap.edgeApps[i].id;
          break;
        case 'meep-docker-registry:30001/meep-app-enablement':
          if (this.edgeAppsMap.edgeApps[i].name.includes('app-support')) {
            apiUrl = 'api/?urls.primaryName=MEC%20Application%20Support%20API';
            apiPath = this.edgeAppsMap.edgeApps[i].mepName+'/mec_app_support/v1';
            pseudoName = 'MEC Application Support (011) on ' + mepName;
            apiUrl = 'api/?urls.primaryName='+mepName+'%20-%20MEC%20Application%20Support%20API';
            apiPath = mepName+'/mec_app_support/v1';
            pseudoName = 'MEC Application Support (011) on ' + mepName;// + ' with id ' + this.edgeAppsMap.edgeApps[i].id;
          } else {
            if (this.edgeAppsMap.edgeApps[i].name.includes('service-mgmt')) {
              apiUrl = 'api/?urls.primaryName=MEC%20Service%20Management%20API';
              apiPath = this.edgeAppsMap.edgeApps[i].mepName+'/mec_service_mgmt/v1';
              pseudoName = 'MEC Service Management (011) on ' + mepName;
              apiUrl = 'api/?urls.primaryName='+mepName+'%20-%20MEC%20Service%20Management%20API';
              apiPath = mepName+'/mec_service_mgmt/v1';
              pseudoName = 'MEC Service Management (011) on ' + mepName;// + ' with id ' + this.edgeAppsMap.edgeApps[i].id;
            }
          }
          break;
@@ -173,6 +173,35 @@ class ApiPane extends Component {
    if (!configEnabled) {
      this.props.changeMecApiSelected(null);
    }

    let mepName = '', currentMepName = '';
    var label = '';
    var options = [];
    var dropDownOptions = [];
    if (pseudoNames.length > 0) {
      for (i = 0; i < pseudoNames.length; i++) {
        mepName = this.edgeAppsMap.edgeApps[i].mepName;
        if (mepName !== currentMepName) {
          if (currentMepName !== '') {
            var entry = {
              label: label,
              options: options
            };
            dropDownOptions.push(entry);
          }
          label = mepName;
          options = [];
          currentMepName = mepName;
        }
        options.push(pseudoNames[i]);
      }
      var lastEntry = {
        label: label,
        options: options
      };
      dropDownOptions.push(lastEntry);
    }

    return (
      <div>
        <div style={styles.title} title="Observe and interact with MEC APIs">
@@ -189,7 +218,7 @@ class ApiPane extends Component {
            style={{ flex: '0 0 450px' }}
          >
            <div style={styles.section}>
              <Grid style={{ marginBottom: 20}} align="center">
              <Grid style={{ marginBottom: 2}} align="center">
                <GridCell span={10}>
                  <Select
                    title="Select the MEC API"
@@ -198,7 +227,7 @@ class ApiPane extends Component {
                    outlined
                    label="MEC Services Instances"
                    placeholder=" "
                    options={this.mecApis}
                    options={dropDownOptions}//this.mecApis}
                    disabled={!configEnabled}
                    onChange={event => {
                      this.props.changeMecApiSelected(event.target.value);
@@ -244,7 +273,7 @@ const styles = {
    paddingTop: 15
  },
  section: {
    padding: 15
    padding: 5
  },
  select: {
    width: '100%',
+6 −0
Original line number Diff line number Diff line
@@ -74,9 +74,15 @@ class TryIt extends Component {
        );
      }

      let runningOn = this.props.edgeAppsMap.edgeApps[index].mepName;
      let appId = this.props.edgeAppsMap.edgeApps[index].id;

      return (
        <>
          <div title="Open a browser client to exercise selected MEC API">
            <Typography className="text-color-main" use="body1">
                Running on {runningOn}<br/> application id: {appId}<br/><br/>
            </Typography>
            <Typography theme="primary" use="headline6">Try-it in the browser</Typography>
            <Typography className="text-color-main" use="body1">
              <p>