Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactored CardTitleRow into single component #2224

Merged
merged 4 commits into from Aug 10, 2020

Conversation

ekfuhrmann
Copy link
Contributor

Overview

Merged the CardTitleRow and CardTitleFilterRow into a single component, and updated all uses of it throughout the project.

Card Title Row Component

The Card Title Row is a component you want to use anytime you are creating a title block within the app content area. Card Title Row takes in the following properties:

label string

Passes the label for the title row

icon ComponentType<SvgIconExports> (Optional)

Passes in an icon to be prepended to the label.

filter () => React$Node (Optional)

Passes in a filter on the opposite end of the row. This should be used if needing to apply a date/time picker, edit button, or content filter.


Examples

<CardTitleRow icon={Alarm} label={`Alerts (${alerts.length})`} />

image


 ...

  function Filter() {
    return (
      <Grid container justify="flex-end" alignItems="center" spacing={1}>
        <Grid item>
          <Text variant="body3" className={classes.dateTimeText}>
            Filter By Time
          </Text>
        </Grid>
        <Grid item>
          <TimeRangeSelector
            variant="outlined"
            className={classes.formControl}
            value={timeRange}
            onChange={setTimeRange}
          />
        </Grid>
      </Grid>
    );
  }

  return (
    <>
      <CardTitleRow
        icon={DataUsageIcon}
        label="Gateway Check-Ins"
        filter={Filter}
      />
      ...
    </>
  );

image

dependabot bot and others added 2 commits August 7, 2020 14:27
…/autoprefixer-9.8.6

Bump autoprefixer from 7.2.6 to 9.8.6 in /nms/app
@karthiksubraveti karthiksubraveti added the component: nms NMS-related issue label Aug 8, 2020
@karthiksubraveti
Copy link
Contributor

@ekfuhrmann can you fix the conflicts and post again. Thanks

@karthiksubraveti karthiksubraveti merged commit f2fefc7 into magma:master Aug 10, 2020
ardzoht added a commit to ardzoht/magma that referenced this pull request Aug 10, 2020
* 'master' of github.com:magma/magma: (31 commits)
  [AGW]: uplink_br0: configure using DHCP (magma#2218)
  Remove axios as a package dependency from magmalte. (magma#2246)
  [pipelined] Add conntrack pipelined controller (magma#2191)
  Bump dotenv from 6.2.0 to 8.2.0 in /nms/app (magma#2247)
  Bump nodemon from 1.19.4 to 2.0.4 in /nms/app (magma#2248)
  Bump @testing-library/react from 9.5.0 to 10.4.8 in /nms/app (magma#2249)
  [orc8r][cwf]LI swagger API update (magma#2170)
  [AGW] MME: add retry for mobility ip block read API. (magma#2233)
  Refactored CardTitleRow into single component (magma#2224)
  Add policy JSON editor (magma#2182)
  [lte][agw] Updating _get_enb_label_from_request to get IP from peername request (magma#2244)
  Make gateway ID a link in Gateway overview page (magma#2232)
  Fix metric label used for querying (magma#2241)
  Hide gateway status in JSON editor (magma#2223)
  Bump postcss-flexbugs-fixes from 3.3.1 to 4.2.1 in /nms/app (magma#2236)
  Bump regenerator-runtime from 0.13.5 to 0.13.7 in /nms/app (magma#2234)
  Bump @testing-library/react-hooks from 3.3.0 to 3.4.1 in /nms/app (magma#2235)
  Clean up Session Recycling Logic (magma#2149)
  Migrate CreateSessionRequest to use bundled fields (magma#2166)
  orc8r-values.tpl YAML template fix (magma#2228)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: nms NMS-related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants