Commit 4bd8a526 authored by Kevin Di Lallo's avatar Kevin Di Lallo
Browse files

added help buttons on frontend pages

parent 8d621e08
Loading
Loading
Loading
Loading

dashboards/basic-dashboards.json

deleted100755 → 0
+0 −109

File deleted.

Preview size limit exceeded, changes collapsed.

dashboards/dashboards.conf

deleted100644 → 0
+0 −7
Original line number Diff line number Diff line
#defaultIndex is a reserved value
#lines starting with a '#' are ignored when parsed

defaultIndex: 27b98a60-bb57-11e8-a056-d1ed6789004e
basic: <GITDIR>/dashboards/basic-dashboards.json
demo1: <GITDIR>/examples/demo1/demo1-dashboards.json
#k8s: https://raw.githubusercontent.com/monotek/kibana-dashboards/master/k8s-fluentd-elasticsearch.json
+2 −2
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ import { NO_SCENARIO_NAME, MEEP_LBL_SCENARIO_NAME } from '../meep-constants';
const HeadlineBar = ({ titleLabel, scenarioName }) => {
  var name = scenarioName === NO_SCENARIO_NAME ? 'None' : scenarioName;
  return (
    <div style={{ marginTop: 14, marginBottom: 14 }}>
    <>
      <span className="mdc-typography--headline6">{titleLabel}: </span>
      <span
        data-cy={MEEP_LBL_SCENARIO_NAME}
@@ -29,7 +29,7 @@ const HeadlineBar = ({ titleLabel, scenarioName }) => {
      >
        {name}
      </span>
    </div>
    </>
  );
};

+2 −2
Original line number Diff line number Diff line
@@ -591,9 +591,9 @@ class CfgPageContainer extends Component {
                      scenarioName={this.props.scenarioName}
                    />
                  </GridCell>
                  <GridCell span={8}>
                  <GridCell align={'middle'} span={8}>
                    <GridInner align={'right'}>
                      <GridCell align={'middle'} span={12}>
                      <GridCell span={12}>
                        <CfgPageScenarioButtons
                          {...this.props}
                          onDeleteScenario={() => {
+33 −11
Original line number Diff line number Diff line
@@ -18,8 +18,10 @@ 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,
@@ -82,6 +84,7 @@ class CfgPageScenarioButtons extends Component {
    const input = (
      <TextField
        type="file"
        hidden
        ref={input => (this.inputElement = input)}
        onClick={() => this.props.onInputScenario(this.inputElement.input_)}
        onChange={() => this.props.onInputScenario(this.inputElement.input_)}
@@ -89,10 +92,10 @@ class CfgPageScenarioButtons extends Component {
      />
    );
    return (
      <div style={{ marginTop: 12 }}>
      <>
        <Button
          raised
          style={buttonStyles}
          style={styles.button}
          onClick={() => this.props.onNewScenario()}
          disabled={!this.canCreateNewScenario()}
          data-cy={CFG_BTN_NEW_SCENARIO}
@@ -101,7 +104,7 @@ class CfgPageScenarioButtons extends Component {
        </Button>
        <Button
          raised
          style={buttonStyles}
          style={styles.button}
          onClick={() => this.props.onOpenScenario()}
          disabled={!this.canOpenScenario()}
          data-cy={CFG_BTN_OPEN_SCENARIO}
@@ -110,7 +113,7 @@ class CfgPageScenarioButtons extends Component {
        </Button>
        <Button
          raised
          style={buttonStyles}
          style={styles.button}
          onClick={() => this.props.onSaveScenario()}
          disabled={!this.canSaveScenario()}
          data-cy={CFG_BTN_SAVE_SCENARIO}
@@ -119,7 +122,7 @@ class CfgPageScenarioButtons extends Component {
        </Button>
        <Button
          raised
          style={buttonStyles}
          style={styles.button}
          onClick={() => this.props.onDeleteScenario()}
          disabled={!this.canDeleteScenario()}
          data-cy={CFG_BTN_DEL_SCENARIO}
@@ -131,7 +134,7 @@ class CfgPageScenarioButtons extends Component {

        <Button
          raised
          style={{ ...buttonStyles, marginLeft: 10 }}
          style={{ ...styles.button, marginLeft: 10 }}
          onClick={() => {
            this.inputElement.input_.click();
          }}
@@ -143,7 +146,7 @@ class CfgPageScenarioButtons extends Component {

        <Button
          raised
          style={buttonStyles}
          style={styles.button}
          onClick={() => this.props.onExportScenario()}
          disabled={!this.canExportScenario()}
          data-cy={CFG_BTN_EXP_SCENARIO}
@@ -151,15 +154,34 @@ 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>
      </div>
      </>
    );
  }
}

const buttonStyles = {
const styles = {
  button: {
    color: 'white',
    marginRight: 5
  },
  icon: {
    color: 'white'
  }
};

const mapStateToProps = state => {
Loading