From e287a27c40282bb22527e4c61a29f6a2781c947e Mon Sep 17 00:00:00 2001 From: Isaac Date: Thu, 27 Sep 2018 13:05:41 -0700 Subject: [PATCH] Merge Master with Feature Branch (#1111) * Dev Walkthru: add a new Panel to the Dashboard (#1062) * Dev Walkthru: add a new Panel to the Dashboard * small tweaks, review feedback * fix bad code end marker * Diagnostics bugFix (#1065) * flatMap * Dummy comment to retrigger build * Add Rule Diagnostics (#1064) Add diagnostics logging for rule create/update events. Added the following metrics: Rule_NewClick Rule_EditClick Rule_DeviceGroupClick Rule_CalculationClick Rule_FieldClick Rule_OperatorClick Rule_AddConditionClick Rule_SeverityLevelClick Rule_StatusToggle Rule_ApplyClick Rule_CancelClick Rule_TopXCloseClick Also includes new "sessionid" sections of diagnostics call, which logs the time in ms since Jan 1, 1970 when the page was loaded (amplitude expects session id in this format). This fields will be added by diagnostics to enable logging of session id to amplitude--until those changes go in it will be ignored by the backend. * Delete .travis.yml (#1066) * Delete .travis.yml * Update README.md * Add diagnostics for new device funnel (#1075) * Add device metrics Add metrics for new device flyout * Add device created metric Add metric on device create so we can log device id for physical devices * Fix rule apply event Rule apply click event was only emitted for new rules. Move call so it is emitted if a rule is added or edited. * Address comments and align metric names Address comments. Update metric names to be in same format as rule metrics * fix insertion when entities are null for devices and rules (#1078) * Refactor to make walkthrough code less intrusive (#1069) * refactor to make walkthrough code less intrusive * refactor after meeting with team * update MD files, move httpClient * review feedback * fix nit * update breadcrumbs to use isDef instead of checking undefined * Treat text and number correctly in device jobs (#1082) * treat text and number correctly in device jobs * fix formatting nit * Rule updates need to send ETag (#1084) UI needs to send the ETag when updating rules. * Rule enable/disable needs to update ETag in redux store (#1086) * Small updates for the add page walkthrough (#1089) * Making cloudToDeviceMethod to empty an string (#1090) * rearrange controls on context menus (#1093) * Add links to Time Series Insights from Dashboard and Device Details Page (#1085) Add a Hyperlink shared component Fetch the Time Series Explorer URL from Telemetry Add link to dashboard and device details * Adding curly brackets in json Payload (#1094) * Fix alignment of stats on dashbaord (quick fix) (#1097) * Move Add Condition button below the rule conditions (#1103) * Update section decriptions to be more actionable on Device Details (#1110) --- public/locales/en/translations.json | 16 ++--- .../flyouts/deviceDetails/deviceDetails.js | 28 +++++++- .../pages/maintenance/summary/summary.js | 10 +-- .../rules/flyouts/ruleEditor/ruleEditor.js | 12 ++-- .../components/pages/dashboard/dashboard.js | 64 +++++++++---------- 5 files changed, 75 insertions(+), 55 deletions(-) diff --git a/public/locales/en/translations.json b/public/locales/en/translations.json index 2375043df..8a6453b39 100644 --- a/public/locales/en/translations.json +++ b/public/locales/en/translations.json @@ -206,12 +206,12 @@ }, "methods": { "title": "Methods", - "description": "All methods available for device", + "description": "To run a method on one or more devices, close this pane, select the checkbox for the device(s), click <1><0>{{jobs}}, and then select <3><0>{{methods}}.", "noneExist": "No methods found for this device." }, "properties": { "title": "Properties", - "description": "Selected properties on device", + "description": "To change a property on one or more devices, close this pane, select the checkbox for the device(s), click <1><0>{{jobs}}, and then select <3><0>{{properties}}.", "keyHeader": "Property", "valueHeader": "Value", "noneExist": "No properties found for this device.", @@ -221,7 +221,7 @@ }, "tags": { "title": "Tags", - "description": "Tags applied to device", + "description": "To add, delete, or change a tag on one or more devices, close this pane, select the checkbox for the device(s), click <1><0>{{jobs}}, and then select <3><0>{{tags}}.", "keyHeader": "Key", "valueHeader": "Value", "noneExist": "No tags found for this device." @@ -265,7 +265,7 @@ "required": "Is required" }, "tags": { - "radioLabel": "Tag", + "radioLabel": "Tags", "title": "Tags on selected devices", "description": "Tags in common on selected devices", "keyHeader": "Key", @@ -277,8 +277,8 @@ "add": "Add tag" }, "methods": { - "radioLabel": "Run method", - "title": "Run method", + "radioLabel": "Methods", + "title": "Run method on selected devices", "description": "All available methods for device or group of devices", "methodName": "Method name", "methodNameHint": "Select method", @@ -288,8 +288,8 @@ "firmwareUriHint": "Enter firmware URI value" }, "properties": { - "radioLabel": "Reconfigure", - "title": "Reconfigure", + "radioLabel": "Properties", + "title": "Properties on selected devices", "description": "Available properties and values to change", "keyHeader": "Property", "valueHeader": "Value", diff --git a/src/components/pages/devices/flyouts/deviceDetails/deviceDetails.js b/src/components/pages/devices/flyouts/deviceDetails/deviceDetails.js index a68f843f6..1b7bd344e 100644 --- a/src/components/pages/devices/flyouts/deviceDetails/deviceDetails.js +++ b/src/components/pages/devices/flyouts/deviceDetails/deviceDetails.js @@ -1,6 +1,7 @@ // Copyright (c) Microsoft. All rights reserved. import React, { Component } from 'react'; +import { Trans } from 'react-i18next'; import { Subject } from 'rxjs'; import moment from 'moment'; import { DEFAULT_TIME_FORMAT } from 'components/shared/pcsGrid/pcsGridConfig'; @@ -230,7 +231,14 @@ export class DeviceDetails extends Component { {t('devices.flyouts.details.tags.title')} - {t('devices.flyouts.details.tags.description')} + + + To edit, close this panel, click on + {{ jobs: t('devices.flyouts.jobs.title') }} + then select + {{ tags: t('devices.flyouts.jobs.tags.radioLabel') }}. + + { (tags.length === 0) && t('devices.flyouts.details.tags.noneExist') @@ -262,7 +270,14 @@ export class DeviceDetails extends Component { {t('devices.flyouts.details.methods.title')} - {t('devices.flyouts.details.methods.description')} + + + To edit, close this panel, click on + {{ jobs: t('devices.flyouts.jobs.title') }} + then select + {{ methods: t('devices.flyouts.jobs.methods.radioLabel') }}. + + { (device.methods.length === 0) ? t('devices.flyouts.details.methods.noneExist') @@ -283,7 +298,14 @@ export class DeviceDetails extends Component { {t('devices.flyouts.details.properties.title')} - {t('devices.flyouts.details.properties.description')} + + + To edit, close this panel, click on + {{ jobs: t('devices.flyouts.jobs.title') }} + then select + {{ properties: t('devices.flyouts.jobs.properties.radioLabel') }}. + + { (properties.length === 0) && t('devices.flyouts.details.properties.noneExist') diff --git a/src/components/pages/maintenance/summary/summary.js b/src/components/pages/maintenance/summary/summary.js index e1d9e4445..4119cfb6d 100644 --- a/src/components/pages/maintenance/summary/summary.js +++ b/src/components/pages/maintenance/summary/summary.js @@ -56,11 +56,11 @@ export const Summary = ({ - + diff --git a/src/components/pages/rules/flyouts/ruleEditor/ruleEditor.js b/src/components/pages/rules/flyouts/ruleEditor/ruleEditor.js index 404ab0628..0e703aa32 100644 --- a/src/components/pages/rules/flyouts/ruleEditor/ruleEditor.js +++ b/src/components/pages/rules/flyouts/ruleEditor/ruleEditor.js @@ -370,12 +370,6 @@ export class RuleEditor extends LinkedComponent { { !fieldQueryPending &&
- - {t('rules.flyouts.ruleEditor.conditions')} - - {t('rules.flyouts.ruleEditor.addCondition')} - - { conditionLinks.map((condition, idx) => ( @@ -421,6 +415,12 @@ export class RuleEditor extends LinkedComponent { )) } + + {t('rules.flyouts.ruleEditor.conditions')} + + {t('rules.flyouts.ruleEditor.addCondition')} + + diff --git a/src/walkthrough/components/pages/dashboard/dashboard.js b/src/walkthrough/components/pages/dashboard/dashboard.js index 7b333e650..04954d81f 100644 --- a/src/walkthrough/components/pages/dashboard/dashboard.js +++ b/src/walkthrough/components/pages/dashboard/dashboard.js @@ -5,7 +5,7 @@ import React, { Component } from 'react'; import { Grid, Cell } from 'components/pages/dashboard/grid'; import { ExamplePanel } from './panels'; -import { ComponentArray, ContextMenu, PageContent } from 'components/shared'; +import { ContextMenu, PageContent } from 'components/shared'; import './dashboard.css'; @@ -22,37 +22,35 @@ export class Dashboard extends Component { render() { const { t } = this.props; - return ( - - - {/** Add context buttons here... as needed for your dashboard. In this example, there are none. */} - - - - - - - - - - - - - - - - - - - - - - - - - - - - ); + return [ + + {/** Add context buttons here... as needed for your dashboard. In this example, there are none. */} + , + + + + + + + + + + + + + + + + + + + + + + + + + + ]; } }