Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"cy": "CYPRESS_dexUrl=https://$INGRESS_HOST:$PORT_HTTPS CYPRESS_baseUrl=http://localhost:9999 cypress open",
"cy:dev": "source ../monitor-ci/.env && CYPRESS_dexUrl=CLOUD CYPRESS_baseUrl=https://$INGRESS_HOST:$PORT_HTTPS cypress open --config testFiles='{cloud,shared}/**/*.*'",
"cy:dev-oss": "source ../monitor-ci/.env && CYPRESS_dexUrl=OSS CYPRESS_baseUrl=https://$INGRESS_HOST:$PORT_HTTPS cypress open --config testFiles='{oss,shared}/**/*.*'",
"generate": "export SHA=2da36d4beb7fc22dd8d037c3398c91c7ca2c346d && export REMOTE=https://raw.githubusercontent.com/influxdata/openapi/${SHA}/ && yarn generate-meta",
"generate": "export SHA=018d2381f78e52acbe1deaaff4c9512adf5e3703 && export REMOTE=https://raw.githubusercontent.com/influxdata/openapi/${SHA}/ && yarn generate-meta",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this SHA lives in a branch, maybe we should wait for this PR influxdata/openapi#248

"generate-local": "export REMOTE=../openapi/ && yarn generate-meta",
"generate-meta": "if [ -z \"${CLOUD_URL}\" ]; then yarn generate-meta-oss; else yarn generate-meta-cloud; fi",
"generate-meta-oss": "yarn oss-api && yarn notebooks && yarn unity && yarn annotations-oss && yarn pinned && yarn mapsd-oss && yarn cloudPriv",
Expand Down
14 changes: 14 additions & 0 deletions src/visualization/types/Graph/view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ import {

// Annotations
import {addAnnotationLayer} from 'src/visualization/utils/annotationUtils'
import {getColorMappingObjects} from 'src/visualization/utils/colorMappingUtils'
import {isFlagEnabled} from '../../../shared/utils/featureFlag'

interface Props extends VisualizationProps {
properties: XYViewProperties
Expand Down Expand Up @@ -179,6 +181,17 @@ const XYPlot: FC<Props> = ({
return <EmptyGraphMessage message={INVALID_DATA_COPY} />
}

let colorMapping = null

if (isFlagEnabled('graphColorMapping')) {
const [, fillColumnMap] = createGroupIDColumn(result.table, groupKey)
const {colorMappingForGiraffe} = getColorMappingObjects(
fillColumnMap,
properties
)
colorMapping = colorMappingForGiraffe
}

const config: Config = {
...currentTheme,
table: result.table,
Expand Down Expand Up @@ -210,6 +223,7 @@ const XYPlot: FC<Props> = ({
interpolation,
position: properties.position,
colors: colorHexes,
colorMapping,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

an alternative to passing in colorMapping: null when the flag is off is doing something like:

remove this line in the definition of config, and then below where config is defined, doing this:

if (isFlagEnabled('graphColorMapping')) {
  config.colorMapping = colorMapping
}

to make sure this is truly 'dark' in the sense that it makes no changes to production code if the flag is off.

shadeBelow: !!properties.shadeBelow,
shadeBelowOpacity: 0.08,
hoverDimension: properties.hoverDimension,
Expand Down
Loading