Commit c0a637f3 authored by Kevin Di Lallo's avatar Kevin Di Lallo
Browse files

moved help page link to topbar

parent 92327dd2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ select {
#meep-container {
    // height: 100%;
    width: 100%;
    // overflow-x: hidden;
    overflow-x: hidden;
}
.ui-body {
    display: flex;
+21 −2
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import { Grid, GridCell } from '@rmwc/grid';
import { TabBar, Tab } from '@rmwc/tabs';
import { Typography } from '@rmwc/typography';
import { Button } from '@rmwc/button';
import { Icon } from '@rmwc/icon';
import { IconButton } from '@rmwc/icon-button';
import { Menu, MenuItem, MenuSurfaceAnchor } from '@rmwc/menu';

@@ -52,7 +53,8 @@ import {
  PAGE_CONFIGURE_INDEX,
  PAGE_EXECUTE_INDEX,
  PAGE_MONITOR_INDEX,
  PAGE_SETTINGS_INDEX
  PAGE_SETTINGS_INDEX,
  MEEP_HELP_GUI_URL
} from '@/js/meep-constants';

const CorePodsLed = props => {
@@ -71,7 +73,7 @@ const CorePodsLed = props => {
              src={props.corePodsRunning ? greenLed : redLed}
              height={30}
              width={30}
              style={{ marginRight: 15, marginTop: 7 }}
              style={{ marginRight: 15, marginTop: 3 }}
            />
          </a>
          <ReactTooltip
@@ -194,6 +196,20 @@ class MeepTopBar extends Component {
              </ToolbarSection>
              
              <ToolbarSection alignEnd>
                <Button
                  style={{ marginLeft: 10 }}
                  onClick={() => {
                    window.open(MEEP_HELP_GUI_URL,'_blank');
                  }}
                >
                  <Icon
                    title="GUI Help Page"
                    icon="help_outline"
                    iconOptions={{ size: 'large', strategy: 'ligature' }}
                    style={styles.helpIcon}
                  />
                </Button>

                <CorePodsLed
                  corePodsRunning={this.props.corePodsRunning}
                  corePodsErrors={this.props.corePodsErrors}
@@ -256,6 +272,9 @@ const styles = {
    fontSize: 15,
    fontFamily: 'Roboto'
  },
  helpIcon: {
    color: '#ffffff'
  },
  icon: {
    color: '#ffffff',
    padding: 5,
+87 −2
Original line number Diff line number Diff line
@@ -893,6 +893,93 @@ const TypeRelatedFormFields = ({ onUpdate, onEditLocation, onEditPath, element }
      </>
    );
  case ELEMENT_TYPE_DC:
    return (
      <>
        <NCGroups
          onUpdate={onUpdate}
          element={element}
          prefixes={[PREFIX_LINK]}
        />

        <Grid>
          <GridCell span={6}>
            <IDSelect
              label='Initial Connection State'
              span={12}
              options={[OPT_CONNECTED, OPT_DISCONNECTED]}
              onChange={e => onUpdate(FIELD_CONNECTED, e.target.value === 'true', null)}
              value={isConnected}
              disabled={false}
              cydata={CFG_ELEM_CONNECTED}
            />
          </GridCell>
          <GridCell span={6}>
            <IDSelect
              label='Connection Mode'
              span={12}
              options={[OPT_WIRED]}
              onChange={e => onUpdate(FIELD_WIRELESS, e.target.value === 'true', null)}
              value={isWireless}
              disabled={false}
              cydata={CFG_ELEM_WIRELESS}
            />
          </GridCell>
        </Grid>
        {isWireless ? (
          <Grid style={{ paddingTop: 16 }}>
            <CfgTextFieldCell
              span={12}
              onUpdate={onUpdate}
              element={element}
              validate={validateWirelessType}
              label='Supported Wireless Types (order by priority)'
              fieldName={FIELD_WIRELESS_TYPE}
              cydata={CFG_ELEM_WIRELESS_TYPE}
            />
          </Grid> 
        ) : (
          <Grid style={{ paddingTop: 16 }}></Grid>
        )}
        
        <Grid>
          <CfgTextFieldCell
            span={12}
            onUpdate={onUpdate}
            element={element}
            validate={validateDnn}
            label='Data Network Name'
            fieldName={FIELD_DN_NAME}
            cydata={CFG_ELEM_DN_NAME}
          />
        </Grid>

        <Grid>
          <CfgTextFieldCell
            span={12}
            onUpdate={onUpdate}
            element={element}
            validate={validateEcsp}
            label='Service Provider'
            fieldName={FIELD_DN_ECSP}
            cydata={CFG_ELEM_DN_ECSP}
          />
        </Grid>

        <Grid>
          <CfgTextFieldCell
            span={12}
            icon='location_on'
            onIconClick={onEditLocation}
            onUpdate={onUpdate}
            element={element}
            validate={validateLocation}
            label='Location Coordinates'
            fieldName={FIELD_GEO_LOCATION}
            cydata={CFG_ELEM_GEO_LOCATION}
          />
        </Grid>
      </>
    );
  case ELEMENT_TYPE_EDGE:
  case ELEMENT_TYPE_FOG:
    return (
@@ -976,8 +1063,6 @@ const TypeRelatedFormFields = ({ onUpdate, onEditLocation, onEditPath, element }
          />
        </Grid>

        

        <Grid>
          <CfgTextFieldCell
            span={12}
+0 −16
Original line number Diff line number Diff line
@@ -18,10 +18,8 @@ import { connect } from 'react-redux';
import React, { Component } from 'react';
import { Button } from '@rmwc/button';
import { TextField } from '@rmwc/textfield';
import { Icon } from '@rmwc/icon';

import {
  MEEP_HELP_PAGE_CFG_URL,
  CFG_STATE_IDLE,
  CFG_STATE_NEW,
  CFG_STATE_LOADED,
@@ -154,20 +152,6 @@ class CfgPageScenarioButtons extends Component {
          EXPORT
        </Button>

        <Button
          raised
          style={{ ...styles.button, marginLeft: 10 }}
          onClick={() => {
            window.open(MEEP_HELP_PAGE_CFG_URL,'_blank');
          }}
        >
          <Icon
            icon="help_outline"
            iconOptions={{ strategy: 'ligature' }}
            style={styles.icon}
          />
        </Button>

        <a id="export-scenario-link" download="config.yaml" hidden></a>
      </>
    );
+0 −15
Original line number Diff line number Diff line
@@ -17,10 +17,8 @@
import { connect } from 'react-redux';
import React, { Component } from 'react';
import { Button } from '@rmwc/button';
import { Icon } from '@rmwc/icon';

import {
  MEEP_HELP_PAGE_EXEC_URL,
  EXEC_STATE_DEPLOYED,
  EXEC_BTN_SAVE_SCENARIO,
  EXEC_BTN_DEPLOY,
@@ -133,19 +131,6 @@ class ExecPageScenarioButtons extends Component {
        >
          DASHBOARD
        </Button>
        <Button
          raised
          style={styles.buttonWithMargin}
          onClick={() => {
            window.open(MEEP_HELP_PAGE_EXEC_URL,'_blank');
          }}
        >
          <Icon
            icon="help_outline"
            iconOptions={{ strategy: 'ligature' }}
            style={styles.icon}
          />
        </Button>
      </div>
    );
  }
Loading