From c2af8d990478651e7abf09ba5a8564db7c08b1e2 Mon Sep 17 00:00:00 2001 From: morsh Date: Mon, 8 Jan 2018 19:34:52 +0200 Subject: [PATCH 1/4] update tslink and fix relevant rules --- client/package.json | 2 +- client/src/actions/AccountActions.ts | 4 - client/src/actions/ConfigurationsActions.ts | 3 - client/src/actions/ConnectionsActions.ts | 3 - client/src/actions/SettingsActions.ts | 3 - client/src/actions/SetupActions.ts | 5 +- client/src/actions/VisibilityActions.ts | 3 - .../AutoRefreshSelector/RefreshActions.ts | 4 +- .../components/AutoRefreshSelector/index.tsx | 2 +- .../Card/Settings/CardSettingsActions.tsx | 3 - client/src/components/Card/Settings/index.tsx | 2 +- .../Dashboard/Editor/EditorActions.ts | 3 - .../src/components/Dashboard/Editor/index.tsx | 2 +- client/src/components/Dashboard/index.tsx | 2 +- client/src/components/Home/index.tsx | 2 +- .../components/Settings/SetupDashboard.tsx | 1 - client/src/components/Setup/index.tsx | 4 +- .../src/components/Spinner/SpinnerActions.ts | 4 +- client/src/components/Spinner/SpinnerStore.ts | 2 +- client/src/components/Spinner/index.tsx | 2 +- client/src/components/Toast/ToastActions.ts | 4 +- client/src/components/Toast/index.ts | 2 +- .../common/BaseDatasourceSettings.tsx | 2 +- client/src/components/common/TokenInput.tsx | 6 +- .../src/components/generic/BarData/index.tsx | 2 +- .../generic/Dialogs/DialogsActions.ts | 3 - .../src/components/generic/Dialogs/index.tsx | 2 +- client/src/components/generic/MapData.tsx | 2 +- .../src/components/generic/PieData/index.tsx | 2 +- .../src/components/generic/RadarChartCard.tsx | 2 +- .../components/generic/RadialBarChartCard.tsx | 2 +- .../src/components/generic/RequestButton.tsx | 2 +- .../generic/SimpleRadialBarChartCard.tsx | 2 +- client/src/constants/icons.tsx | 1 + .../src/data-sources/DataSourceConnector.ts | 6 +- client/src/data-sources/index.ts | 2 +- .../plugins/ApplicationInsights/common.ts | 2 +- .../data-sources/plugins/Constant/index.ts | 2 +- .../data-sources/plugins/CosmosDB/Query.ts | 4 +- client/src/data-sources/plugins/Sample.ts | 2 +- client/src/tests/data-formats/formats/bars.ts | 2 +- .../src/tests/data-formats/formats/filter.ts | 4 +- .../data-formats/formats/filtered_samples.ts | 6 +- .../src/tests/data-formats/formats/index.ts | 2 +- .../tests/data-formats/formats/retention.ts | 54 ++--- .../tests/data-formats/formats/scorecard.ts | 14 +- client/src/tests/pages/NotFound.test.tsx | 2 +- .../src/utils/data-formats/formats/flags.ts | 10 +- .../utils/data-formats/formats/scorecard.ts | 6 +- .../utils/data-formats/formats/timeline.ts | 4 +- client/src/utils/index.ts | 2 +- client/tslint.json | 12 +- client/yarn.lock | 207 +++--------------- 53 files changed, 134 insertions(+), 299 deletions(-) diff --git a/client/package.json b/client/package.json index dcbe7eb..1d31921 100644 --- a/client/package.json +++ b/client/package.json @@ -35,7 +35,7 @@ "react-router": "3.0.0", "react-scripts-ts": "^2.6.0", "recharts": "^0.21.2", - "tslint": "^4.0.0" + "tslint": "^5.8.0" }, "dependencies": { "body-parser": "^1.17.1", diff --git a/client/src/actions/AccountActions.ts b/client/src/actions/AccountActions.ts index 977127c..260a028 100644 --- a/client/src/actions/AccountActions.ts +++ b/client/src/actions/AccountActions.ts @@ -9,10 +9,6 @@ interface IAccountActions { } class AccountActions extends AbstractActions implements IAccountActions { - - constructor(alt: AltJS.Alt) { - super(alt); - } updateAccount() { diff --git a/client/src/actions/ConfigurationsActions.ts b/client/src/actions/ConfigurationsActions.ts index dc0530b..293b742 100644 --- a/client/src/actions/ConfigurationsActions.ts +++ b/client/src/actions/ConfigurationsActions.ts @@ -19,9 +19,6 @@ interface IConfigurationsActions { } class ConfigurationsActions extends AbstractActions implements IConfigurationsActions { - constructor(alt: AltJS.Alt) { - super(alt); - } submitDashboardFile(content: string, dashboardId: string) { return (dispatcher: (json: any) => void) => { diff --git a/client/src/actions/ConnectionsActions.ts b/client/src/actions/ConnectionsActions.ts index eaeb10c..e26e226 100644 --- a/client/src/actions/ConnectionsActions.ts +++ b/client/src/actions/ConnectionsActions.ts @@ -5,9 +5,6 @@ interface IConnectionsActions { } class ConnectionsActions extends AbstractActions implements IConnectionsActions { - constructor(alt: AltJS.Alt) { - super(alt); - } updateConnection(connectionName: string, args: IDictionary) { return { connectionName, args }; diff --git a/client/src/actions/SettingsActions.ts b/client/src/actions/SettingsActions.ts index 6be02a1..9f29ccf 100644 --- a/client/src/actions/SettingsActions.ts +++ b/client/src/actions/SettingsActions.ts @@ -6,9 +6,6 @@ interface ISettingsActions { } class SettingsActions extends AbstractActions implements ISettingsActions { - constructor(alt: AltJS.Alt) { - super(alt); - } saveSettings() { return { }; diff --git a/client/src/actions/SetupActions.ts b/client/src/actions/SetupActions.ts index 054400b..d4a7d61 100644 --- a/client/src/actions/SetupActions.ts +++ b/client/src/actions/SetupActions.ts @@ -1,6 +1,6 @@ import alt, { AbstractActions } from '../alt'; import * as request from 'xhr-request'; -import {IToast, ToastActions} from '../components/Toast'; +import { IToast, ToastActions } from '../components/Toast'; interface ISetupActions { load(): any; @@ -9,9 +9,6 @@ interface ISetupActions { } class SetupActions extends AbstractActions implements ISetupActions { - constructor(alt: AltJS.Alt) { - super(alt); - } load() { diff --git a/client/src/actions/VisibilityActions.ts b/client/src/actions/VisibilityActions.ts index fde7653..d517c93 100644 --- a/client/src/actions/VisibilityActions.ts +++ b/client/src/actions/VisibilityActions.ts @@ -7,9 +7,6 @@ interface IVisibilityActions { } class VisibilityActions extends AbstractActions implements IVisibilityActions { - constructor(alt: AltJS.Alt) { - super(alt); - } setFlags(flags: IDict): any { return flags; diff --git a/client/src/components/AutoRefreshSelector/RefreshActions.ts b/client/src/components/AutoRefreshSelector/RefreshActions.ts index d0b0065..453d9f2 100644 --- a/client/src/components/AutoRefreshSelector/RefreshActions.ts +++ b/client/src/components/AutoRefreshSelector/RefreshActions.ts @@ -10,8 +10,8 @@ class RefreshActions extends AbstractActions implements IRefreshActions { private runningRefreshInterval: any; - constructor(alt: AltJS.Alt) { - super(alt); + constructor(altobj: AltJS.Alt) { + super(altobj); this.setRefreshTimer = this.setRefreshTimer.bind(this); } diff --git a/client/src/components/AutoRefreshSelector/index.tsx b/client/src/components/AutoRefreshSelector/index.tsx index 021ca58..9a720ed 100644 --- a/client/src/components/AutoRefreshSelector/index.tsx +++ b/client/src/components/AutoRefreshSelector/index.tsx @@ -6,4 +6,4 @@ export { AutoRefreshSelector, RefreshActions, RefreshStore -} \ No newline at end of file +}; \ No newline at end of file diff --git a/client/src/components/Card/Settings/CardSettingsActions.tsx b/client/src/components/Card/Settings/CardSettingsActions.tsx index 2deb4b0..991fb1f 100644 --- a/client/src/components/Card/Settings/CardSettingsActions.tsx +++ b/client/src/components/Card/Settings/CardSettingsActions.tsx @@ -9,9 +9,6 @@ interface ICardSettingsActions { } class CardSettingsActions extends AbstractActions implements ICardSettingsActions { - constructor(alt: AltJS.Alt) { - super(alt); - } openDialog(title: string, elementId: string) { return {title, elementId}; diff --git a/client/src/components/Card/Settings/index.tsx b/client/src/components/Card/Settings/index.tsx index 3c6fb8f..5abf1e4 100644 --- a/client/src/components/Card/Settings/index.tsx +++ b/client/src/components/Card/Settings/index.tsx @@ -6,4 +6,4 @@ export { Settings, SettingsActions, SettingsStore -} \ No newline at end of file +}; \ No newline at end of file diff --git a/client/src/components/Dashboard/Editor/EditorActions.ts b/client/src/components/Dashboard/Editor/EditorActions.ts index f2eccc5..66498d8 100644 --- a/client/src/components/Dashboard/Editor/EditorActions.ts +++ b/client/src/components/Dashboard/Editor/EditorActions.ts @@ -10,9 +10,6 @@ interface IEditorActions { } class EditorActions extends AbstractActions implements IEditorActions { - constructor(alt: AltJS.Alt) { - super(alt); - } openDialog() { return {}; diff --git a/client/src/components/Dashboard/Editor/index.tsx b/client/src/components/Dashboard/Editor/index.tsx index f42da04..2c62848 100644 --- a/client/src/components/Dashboard/Editor/index.tsx +++ b/client/src/components/Dashboard/Editor/index.tsx @@ -6,4 +6,4 @@ export { Editor, EditorActions, EditorStore -} \ No newline at end of file +}; \ No newline at end of file diff --git a/client/src/components/Dashboard/index.tsx b/client/src/components/Dashboard/index.tsx index 50d1e0a..8917c02 100644 --- a/client/src/components/Dashboard/index.tsx +++ b/client/src/components/Dashboard/index.tsx @@ -22,7 +22,7 @@ import ConfigurationsActions from '../../actions/ConfigurationsActions'; import ConfigurationsStore from '../../stores/ConfigurationsStore'; import VisibilityStore from '../../stores/VisibilityStore'; -import {Editor, EditorActions} from './Editor'; +import { Editor, EditorActions } from './Editor'; import { Settings } from '../Card/Settings'; const renderHTML = require('react-render-html'); diff --git a/client/src/components/Home/index.tsx b/client/src/components/Home/index.tsx index f449952..b694702 100644 --- a/client/src/components/Home/index.tsx +++ b/client/src/components/Home/index.tsx @@ -219,7 +219,7 @@ export default class Home extends React.Component { updateFileName(value: string) { this.setState({ fileName: value }); - }; + } onLoad(importedFileContent: any, uploadResult: string) { const { name, size, type, lastModifiedDate } = importedFileContent; diff --git a/client/src/components/Settings/SetupDashboard.tsx b/client/src/components/Settings/SetupDashboard.tsx index adb7df6..0c10d42 100644 --- a/client/src/components/Settings/SetupDashboard.tsx +++ b/client/src/components/Settings/SetupDashboard.tsx @@ -8,7 +8,6 @@ import ConfigurationsStore, { IConfigurationsStoreState } from '../../stores/Con import ConfigurationsActions from '../../actions/ConfigurationsActions'; import { DataSourceConnector, IDataSourceDictionary } from '../../data-sources'; -import connections from '../../data-sources/connections'; import ConnectionsStore from '../../stores/ConnectionsStore'; import ConnectionsActions from '../../actions/ConnectionsActions'; diff --git a/client/src/components/Setup/index.tsx b/client/src/components/Setup/index.tsx index b8f75f8..4dca1f8 100644 --- a/client/src/components/Setup/index.tsx +++ b/client/src/components/Setup/index.tsx @@ -197,11 +197,11 @@ export default class Setup extends React.Component { onSwitchAuthenticationEnables(checked: boolean) { this.setState({ enableAuthentication: checked }); - }; + } onSwitchAllowHttp(checked: boolean) { this.setState({ allowHttp: checked }); - }; + } onFieldChange(value: string, e: any) { let state = {}; diff --git a/client/src/components/Spinner/SpinnerActions.ts b/client/src/components/Spinner/SpinnerActions.ts index dbfd215..903cdd5 100644 --- a/client/src/components/Spinner/SpinnerActions.ts +++ b/client/src/components/Spinner/SpinnerActions.ts @@ -8,8 +8,8 @@ interface ISpinnerActions { } class SpinnerActions extends AbstractActions /*implements ISpinnerActions*/ { - constructor(alt: AltJS.Alt) { - super(alt); + constructor(altobj: AltJS.Alt) { + super(altobj); this.generateActions( 'startPageLoading', diff --git a/client/src/components/Spinner/SpinnerStore.ts b/client/src/components/Spinner/SpinnerStore.ts index 526fb88..a1e34d3 100644 --- a/client/src/components/Spinner/SpinnerStore.ts +++ b/client/src/components/Spinner/SpinnerStore.ts @@ -1,6 +1,6 @@ import alt, { AbstractStoreModel } from '../../alt'; -import {Toast, ToastActions, IToast} from '../Toast'; +import { Toast, ToastActions, IToast } from '../Toast'; import spinnerActions from './SpinnerActions'; export interface ISpinnerStoreState { diff --git a/client/src/components/Spinner/index.tsx b/client/src/components/Spinner/index.tsx index 8fb26b0..65dc08c 100644 --- a/client/src/components/Spinner/index.tsx +++ b/client/src/components/Spinner/index.tsx @@ -6,4 +6,4 @@ export { Spinner, SpinnerActions, SpinnerStore -} \ No newline at end of file +}; \ No newline at end of file diff --git a/client/src/components/Toast/ToastActions.ts b/client/src/components/Toast/ToastActions.ts index 7d12f32..c742d1d 100644 --- a/client/src/components/Toast/ToastActions.ts +++ b/client/src/components/Toast/ToastActions.ts @@ -8,8 +8,8 @@ interface IToastActions { } class ToastActions extends AbstractActions { - constructor(alt: AltJS.Alt) { - super(alt); + constructor(altobj: AltJS.Alt) { + super(altobj); this.generateActions( 'addToast', diff --git a/client/src/components/Toast/index.ts b/client/src/components/Toast/index.ts index f2ade5c..54ca789 100644 --- a/client/src/components/Toast/index.ts +++ b/client/src/components/Toast/index.ts @@ -10,4 +10,4 @@ export { ToastStore, IToast, IToastStoreState -} \ No newline at end of file +}; \ No newline at end of file diff --git a/client/src/components/common/BaseDatasourceSettings.tsx b/client/src/components/common/BaseDatasourceSettings.tsx index 5fcf5db..0200166 100644 --- a/client/src/components/common/BaseDatasourceSettings.tsx +++ b/client/src/components/common/BaseDatasourceSettings.tsx @@ -115,4 +115,4 @@ export abstract class BaseDataSourceSettings ); } -}; \ No newline at end of file +} \ No newline at end of file diff --git a/client/src/components/common/TokenInput.tsx b/client/src/components/common/TokenInput.tsx index c907fe7..04c1086 100644 --- a/client/src/components/common/TokenInput.tsx +++ b/client/src/components/common/TokenInput.tsx @@ -10,11 +10,11 @@ interface ITokenInputProps { tokens: any[]; zDepth: number; onTokensChanged(): void; -}; +} interface ITokenInputState { newToken: any; -}; +} /** * This is a UI for editing a string array. @@ -92,4 +92,4 @@ export default class TokenInput extends React.Component ); } -}; \ No newline at end of file +} \ No newline at end of file diff --git a/client/src/components/generic/BarData/index.tsx b/client/src/components/generic/BarData/index.tsx index 4882c24..9269569 100644 --- a/client/src/components/generic/BarData/index.tsx +++ b/client/src/components/generic/BarData/index.tsx @@ -17,7 +17,7 @@ interface IBarProps extends IGenericProps { /** The name of the property in the data source that contains the name for the X axis */ nameKey: string; }; -}; +} interface IBarState extends IGenericState { values: any[]; diff --git a/client/src/components/generic/Dialogs/DialogsActions.ts b/client/src/components/generic/Dialogs/DialogsActions.ts index 9ede7c2..d57a6f0 100644 --- a/client/src/components/generic/Dialogs/DialogsActions.ts +++ b/client/src/components/generic/Dialogs/DialogsActions.ts @@ -6,9 +6,6 @@ interface IDialogsActions { } class DialogsActions extends AbstractActions implements IDialogsActions { - constructor(alt: AltJS.Alt) { - super(alt); - } openDialog(dialogName: string, args: { [id: string]: Object }) { return { dialogName, args }; diff --git a/client/src/components/generic/Dialogs/index.tsx b/client/src/components/generic/Dialogs/index.tsx index 1d844fe..aeb50d3 100644 --- a/client/src/components/generic/Dialogs/index.tsx +++ b/client/src/components/generic/Dialogs/index.tsx @@ -22,4 +22,4 @@ export { Dialog, DialogsActions, DialogsStore -} \ No newline at end of file +}; \ No newline at end of file diff --git a/client/src/components/generic/MapData.tsx b/client/src/components/generic/MapData.tsx index 80fd12a..596e70c 100644 --- a/client/src/components/generic/MapData.tsx +++ b/client/src/components/generic/MapData.tsx @@ -41,7 +41,7 @@ interface IMapDataProps extends IGenericProps { props: { searchLocations: boolean; }; -}; +} interface IMapDataState extends IGenericState { markers: any[]; diff --git a/client/src/components/generic/PieData/index.tsx b/client/src/components/generic/PieData/index.tsx index 02864df..b7485b5 100644 --- a/client/src/components/generic/PieData/index.tsx +++ b/client/src/components/generic/PieData/index.tsx @@ -21,7 +21,7 @@ interface IPieProps extends IGenericProps { entityType?: string; }; theme?: string[]; -}; +} interface IPieState extends IGenericState { activeIndex?: number; diff --git a/client/src/components/generic/RadarChartCard.tsx b/client/src/components/generic/RadarChartCard.tsx index c0e529d..3f4cc65 100644 --- a/client/src/components/generic/RadarChartCard.tsx +++ b/client/src/components/generic/RadarChartCard.tsx @@ -15,7 +15,7 @@ interface IRadarProps extends IGenericProps { nameKey: string; }; -}; +} interface IRadarState extends IGenericState { values: Object[]; diff --git a/client/src/components/generic/RadialBarChartCard.tsx b/client/src/components/generic/RadialBarChartCard.tsx index 17982ff..d8116c4 100644 --- a/client/src/components/generic/RadialBarChartCard.tsx +++ b/client/src/components/generic/RadialBarChartCard.tsx @@ -15,7 +15,7 @@ interface IRadarProps extends IGenericProps { nameKey: string; }; -}; +} interface IRadarState extends IGenericState { values: Object[]; diff --git a/client/src/components/generic/RequestButton.tsx b/client/src/components/generic/RequestButton.tsx index 7fd9814..69656c4 100644 --- a/client/src/components/generic/RequestButton.tsx +++ b/client/src/components/generic/RequestButton.tsx @@ -23,7 +23,7 @@ interface IRequestButtonProps extends IGenericProps { buttonProps?: { [key: string]: Object }; }; theme?: string[]; -}; +} interface IRequestButtonState extends IGenericState { body: Object | string; diff --git a/client/src/components/generic/SimpleRadialBarChartCard.tsx b/client/src/components/generic/SimpleRadialBarChartCard.tsx index 669c949..1422318 100644 --- a/client/src/components/generic/SimpleRadialBarChartCard.tsx +++ b/client/src/components/generic/SimpleRadialBarChartCard.tsx @@ -15,7 +15,7 @@ interface IRadarProps extends IGenericProps { nameKey: string; }; -}; +} interface IRadarState extends IGenericState { values: Object[]; diff --git a/client/src/constants/icons.tsx b/client/src/constants/icons.tsx index d144071..a7fee4d 100644 --- a/client/src/constants/icons.tsx +++ b/client/src/constants/icons.tsx @@ -1 +1,2 @@ +// tslint:disable-next-line:max-line-length export default ['3d_rotation', 'accessibility', 'accessible', 'account_balance', 'account_balance_wallet', 'account_box', 'account_circle', 'add_shopping_cart', 'alarm', 'alarm_add', 'alarm_off', 'alarm_on', 'all_out', 'android', 'announcement', 'aspect_ratio', 'assessment', 'assignment', 'assignment_ind', 'assignment_late', 'assignment_return', 'assignment_returned', 'assignment_turned_in', 'autorenew', 'backup', 'book', 'bookmark', 'bookmark_border', 'bug_report', 'build', 'cached', 'camera_enhance', 'card_giftcard', 'card_membership', 'card_travel', 'change_history', 'check_circle', 'chrome_reader_mode', 'class', 'code', 'compare_arrows', 'copyright', 'credit_card', 'dashboard', 'date_range', 'delete', 'delete_forever', 'description', 'dns', 'done', 'done_all', 'donut_large', 'donut_small', 'eject', 'euro_symbol', 'event', 'event_seat', 'exit_to_app', 'explore', 'extension', 'face', 'favorite', 'favorite_border', 'feedback', 'find_in_page', 'find_replace', 'fingerprint', 'flight_land', 'flight_takeoff', 'flip_to_back', 'flip_to_front', 'g_translate', 'gavel', 'get_app', 'gif', 'grade', 'group_work', 'help', 'help_outline', 'highlight_off', 'history', 'home', 'hourglass_empty', 'hourglass_full', 'http', 'https', 'important_devices', 'info', 'info_outline', 'input', 'invert_colors', 'label', 'label_outline', 'language', 'launch', 'lightbulb_outline', 'line_style', 'line_weight', 'list', 'lock', 'lock_open', 'lock_outline', 'loyalty', 'markunread_mailbox', 'motorcycle', 'note_add', 'offline_pin', 'opacity', 'open_in_browser', 'open_in_new', 'open_with', 'pageview', 'pan_tool', 'payment', 'perm_camera_mic', 'perm_contact_calendar', 'perm_data_setting', 'perm_device_information', 'perm_identity', 'perm_media', 'perm_phone_msg', 'perm_scan_wifi', 'pets', 'picture_in_picture', 'picture_in_picture_alt', 'play_for_work', 'polymer', 'power_settings_new', 'pregnant_woman', 'print', 'query_builder', 'question_answer', 'receipt', 'record_voice_over', 'redeem', 'remove_shopping_cart', 'reorder', 'report_problem', 'restore', 'restore_page', 'room', 'rounded_corner', 'rowing', 'schedule', 'search', 'settings', 'settings_applications', 'settings_backup_restore', 'settings_bluetooth', 'settings_brightness', 'settings_cell', 'settings_ethernet', 'settings_input_antenna', 'settings_input_component', 'settings_input_composite', 'settings_input_hdmi', 'settings_input_svideo', 'settings_overscan', 'settings_phone', 'settings_power', 'settings_remote', 'settings_voice', 'shop', 'shop_two', 'shopping_basket', 'shopping_cart', 'speaker_notes', 'speaker_notes_off', 'spellcheck', 'star_rate', 'stars', 'store', 'subject', 'supervisor_account', 'swap_horiz', 'swap_vert', 'swap_vertical_circle', 'system_update_alt', 'tab', 'tab_unselected', 'theaters', 'thumb_down', 'thumb_up', 'thumbs_up_down', 'timeline', 'toc', 'today', 'toll', 'touch_app', 'track_changes', 'translate', 'trending_down', 'trending_flat', 'trending_up', 'turned_in', 'turned_in_not', 'update', 'verified_user', 'view_agenda', 'view_array', 'view_carousel', 'view_column', 'view_day', 'view_headline', 'view_list', 'view_module', 'view_quilt', 'view_stream', 'view_week', 'visibility', 'visibility_off', 'watch_later', 'work', 'youtube_searched_for', 'zoom_in', 'zoom_out', 'av_timer', 'art_track', 'album', 'airplay', 'add_to_queue', 'warning', 'error_outline', 'error', 'add_alert', 'branding_watermark', 'call_to_action', 'closed_caption', 'equalizer', 'explicit', 'fast_forward', 'fast_rewind', 'featured_play_list', 'featured_video', 'fiber_dvr', 'fiber_manual_record', 'fiber_new', 'fiber_pin', 'fiber_smart_record', 'forward_10', 'forward_30', 'forward_5', 'games', 'hd', 'hearing', 'high_quality', 'library_add', 'library_books', 'library_music', 'loop', 'mic', 'mic_none', 'mic_off', 'movie', 'music_video', 'new_releases', 'not_interested', 'note', 'pause', 'pause_circle_filled', 'pause_circle_outline', 'play_arrow', 'play_circle_filled', 'play_circle_outline', 'playlist_add', 'dialer_sip', 'contacts', 'contact_phone', 'contact_mail', 'comment', 'clear_all', 'chat_bubble_outline', 'chat_bubble', 'chat', 'call_split', 'call_received', 'call_missed_outgoing', 'call_missed', 'call_merge', 'call_made', 'call_end', 'call', 'business', 'web_asset', 'web', 'volume_up', 'volume_off', 'volume_mute', 'volume_down', 'videocam_off', 'videocam', 'video_library', 'video_label', 'video_call', 'surround_sound', 'subtitles', 'subscriptions', 'stop', 'sort_by_alpha', 'snooze', 'slow_motion_video', 'skip_previous', 'skip_next', 'shuffle', 'replay_5', 'replay_30', 'replay_10', 'replay', 'repeat_one', 'repeat', 'remove_from_queue', 'recent_actors', 'radio', 'queue_play_next', 'queue_music', 'queue', 'playlist_play', 'playlist_add_check', 'redo', 'next_week', 'move_to_inbox', 'markunread', 'mail', 'low_priority', 'link', 'inbox', 'gesture', 'forward', 'font_download', 'flag', 'filter_list', 'drafts', 'delete_sweep', 'create', 'content_paste', 'content_cut', 'content_copy', 'clear', 'block', 'backspace', 'archive', 'add_circle_outline', 'add_circle', 'add_box', 'add', 'vpn_key', 'voicemail', 'textsms', 'swap_calls', 'stop_screen_share', 'stay_primary_portrait', 'stay_primary_landscape', 'stay_current_portrait', 'stay_current_landscape', 'speaker_phone', 'screen_share', 'rss_feed', 'ring_volume', 'present_to_all', 'portable_wifi_off', 'phonelink_setup', 'phonelink_ring', 'phonelink_lock', 'phonelink_erase', 'phone', 'no_sim', 'message', 'mail_outline', 'location_on', 'location_off', 'live_help', 'invert_colors_off', 'import_export', 'import_contacts', 'forum', 'email', 'dialpad', 'screen_rotation', 'screen_lock_rotation', 'screen_lock_portrait', 'screen_lock_landscape', 'nfc', 'network_wifi', 'network_cell', 'location_searching', 'location_disabled', 'graphic_eq', 'gps_off', 'gps_not_fixed', 'gps_fixed', 'dvr', 'devices', 'developer_mode', 'data_usage', 'brightness_medium', 'brightness_low', 'brightness_high', 'brightness_auto', 'bluetooth_searching', 'bluetooth_disabled', 'bluetooth_connected', 'bluetooth', 'battery_unknown', 'battery_std', 'battery_full', 'battery_charging_full', 'battery_alert', 'airplanemode_inactive', 'airplanemode_active', 'add_alarm', 'access_time', 'access_alarms', 'access_alarm', 'weekend', 'undo', 'unarchive', 'text_format', 'sort', 'send', 'select_all', 'save', 'report', 'reply_all', 'reply', 'remove_circle_outline', 'remove_circle', 'remove', 'drag_handle', 'format_align_center', 'format_align_justify', 'format_align_left', 'format_align_right', 'format_bold', 'format_clear', 'format_color_fill', 'format_color_reset', 'format_strikethrough', 'format_size', 'format_shapes', 'format_quote', 'format_paint', 'format_list_numbered', 'format_list_bulleted', 'format_line_spacing', 'format_italic', 'format_indent_increase', 'format_indent_decrease', 'format_color_text', 'bubble_chart', 'border_vertical', 'border_top', 'border_style', 'border_right', 'border_outer', 'border_left', 'border_inner', 'border_horizontal', 'border_color', 'border_clear', 'border_bottom', 'border_all', 'attach_money', 'attach_file', 'wifi_tethering', 'wifi_lock', 'widgets', 'wallpaper', 'usb', 'storage', 'signal_wifi_off', 'signal_wifi_4_bar_lock', 'signal_wifi_4_bar', 'signal_cellular_off', 'signal_cellular_null', 'signal_cellular_no_sim', 'signal_cellular_connected_no_internet_4_bar', 'signal_cellular_4_bar', 'settings_system_daydream', 'sd_storage', 'format_textdirection_l_to_r', 'format_textdirection_r_to_l', 'format_underlined', 'functions', 'highlight', 'insert_chart', 'insert_comment', 'insert_drive_file', 'insert_emoticon', 'insert_invitation', 'insert_link', 'insert_photo', 'linear_scale', 'merge_type', 'mode_comment', 'mode_edit', 'monetization_on', 'money_off', 'multiline_chart', 'pie_chart', 'pie_chart_outlined', 'publish', 'short_text', 'show_chart', 'space_bar', 'strikethrough_s', 'text_fields', 'title', 'vertical_align_bottom', 'vertical_align_center', 'vertical_align_top', 'wrap_text', 'attachment', 'cloud', 'cloud_circle', 'cloud_done', 'cloud_download', 'cloud_off', 'cloud_queue', 'cloud_upload', 'create_new_folder', 'file_download', 'file_upload', 'folder', 'folder_shared', 'folder_open', 'cast', 'cast_connected', 'computer', 'desktop_mac', 'desktop_windows', 'developer_board', 'device_hub', 'devices_other', 'dock', 'gamepad', 'headset', 'headset_mic', 'keyboard', 'keyboard_arrow_down', 'keyboard_arrow_left', 'keyboard_arrow_right', 'keyboard_arrow_up', 'keyboard_backspace', 'keyboard_capslock', 'keyboard_hide', 'keyboard_return', 'keyboard_tab', 'keyboard_voice', 'laptop', 'laptop_chromebook', 'laptop_mac', 'laptop_windows', 'memory', 'mouse', 'phone_android', 'phone_iphone', 'phonelink', 'phonelink_off', 'power_input', 'router', 'scanner', 'security', 'sim_card', 'smartphone', 'speaker', 'speaker_group', 'tablet', 'tablet_android', 'tablet_mac', 'toys', 'tv', 'videogame_asset', 'watch', 'exposure_plus_1', 'exposure_plus_2', 'exposure_zero', 'filter', 'filter_1', 'filter_2', 'filter_3', 'filter_4', 'filter_5', 'crop_landscape', 'crop_original', 'crop_portrait', 'crop_rotate', 'crop_square', 'dehaze', 'details', 'edit', 'exposure', 'exposure_neg_1', 'exposure_neg_2', 'add_a_photo', 'add_to_photos', 'adjust', 'assistant', 'assistant_photo', 'audiotrack', 'blur_circular', 'blur_linear', 'blur_off', 'blur_on', 'brightness_1', 'brightness_2', 'brightness_3', 'brightness_4', 'brightness_5', 'brightness_6', 'brightness_7', 'broken_image', 'brush', 'burst_mode', 'camera', 'camera_alt', 'camera_front', 'camera_rear', 'camera_roll', 'center_focus_strong', 'center_focus_weak', 'collections', 'collections_bookmark', 'color_lens', 'colorize', 'compare', 'control_point', 'control_point_duplicate', 'crop', 'crop_16_9', 'crop_3_2', 'crop_5_4', 'crop_7_5', 'crop_din', 'crop_free', 'filter_7', 'filter_6', 'flare', 'filter_vintage', 'filter_tilt_shift', 'filter_none', 'filter_hdr', 'filter_frames', 'filter_drama', 'filter_center_focus', 'filter_b_and_w', 'style', 'straighten', 'slideshow', 'rotate_right', 'rotate_left', 'rotate_90_degrees_ccw', 'remove_red_eye', 'portrait', 'picture_as_pdf', 'photo_size_select_small', 'photo_size_select_large', 'photo_size_select_actual', 'photo_library', 'photo_filter', 'photo_camera', 'filter_8', 'filter_9', 'filter_9_plus', 'movie_filter', 'music_note', 'nature', 'nature_people', 'navigate_before', 'navigate_next', 'palette', 'panorama', 'panorama_fish_eye', 'flash_auto', 'flash_off', 'flash_on', 'flip', 'gradient', 'grain', 'grid_off', 'grid_on', 'hdr_off', 'hdr_on', 'hdr_strong', 'hdr_weak', 'healing', 'image', 'image_aspect_ratio', 'iso', 'landscape', 'leak_add', 'leak_remove', 'lens', 'linked_camera', 'looks', 'looks_3', 'looks_4', 'looks_5', 'looks_6', 'looks_one', 'looks_two', 'loupe', 'monochrome_photos', 'movie_creation', 'photo_album', 'photo', 'panorama_wide_angle', 'panorama_vertical', 'panorama_horizontal', 'local_dining', 'local_convenience_store', 'local_car_wash', 'local_cafe', 'local_bar', 'local_atm', 'local_airport', 'local_activity', 'layers_clear', 'layers', 'hotel', 'flight', 'ev_station', 'edit_location', 'directions_walk', 'directions_transit', 'directions_subway', 'directions_run', 'directions_railway', 'directions_car', 'directions_bus', 'directions_boat', 'directions_bike', 'directions', 'beenhere', 'add_location', 'wb_sunny', 'wb_iridescent', 'wb_incandescent', 'wb_cloudy', 'wb_auto', 'vignette', 'view_compact', 'view_comfy', 'tune', 'transform', 'tonality', 'timer_off', 'timer_3', 'timer_10', 'timer', 'timelapse', 'texture', 'tag_faces', 'local_drink', 'switch_camera', 'switch_video', 'fullscreen_exit', 'fullscreen', 'first_page', 'arrow_forward', 'arrow_drop_up', 'arrow_drop_down_circle', 'arrow_drop_down', 'arrow_downward', 'arrow_back', 'apps', 'zoom_out_map', 'transfer_within_a_station', 'tram', 'train', 'traffic', 'terrain', 'subway', 'streetview', 'store_mall_directory', 'satellite', 'restaurant_menu', 'restaurant', 'rate_review', 'place', 'pin_drop', 'person_pin_circle', 'person_pin', 'near_me', 'navigation', 'my_location', 'map', 'local_taxi', 'local_shipping', 'local_see', 'local_printshop', 'local_post_office', 'local_play', 'local_pizza', 'local_phone', 'local_pharmacy', 'local_parking', 'local_offer', 'local_movies', 'local_mall', 'local_library', 'local_laundry_service', 'local_hotel', 'local_hospital', 'local_grocery_store', 'local_gas_station', 'local_florist', 'arrow_upward', 'cancel', 'check', 'chevron_left', 'chevron_right', 'close', 'expand_less', 'expand_more', 'menu', 'last_page', 'airline_seat_legroom_normal', 'airline_seat_legroom_extra', 'airline_seat_individual_suite', 'airline_seat_flat_angled', 'airline_seat_flat', 'adb', 'subdirectory_arrow_right', 'subdirectory_arrow_left', 'refresh', 'more_vert', 'more_horiz', 'sync_problem', 'sync_disabled', 'sync', 'sms_failed', 'sms', 'sim_card_alert', 'sd_card', 'priority_high', 'power', 'phone_paused', 'phone_missed', 'phone_locked', 'phone_in_talk', 'phone_forwarded', 'phone_bluetooth_speaker', 'personal_video', 'ondemand_video', 'no_encryption', 'network_locked', 'network_check', 'more', 'mms', 'live_tv', 'folder_special', 'event_note', 'event_busy', 'event_available', 'enhanced_encryption', 'drive_eta', 'do_not_disturb_on', 'do_not_disturb_off', 'do_not_disturb_alt', 'do_not_disturb', 'disc_full', 'confirmation_number', 'bluetooth_audio', 'airline_seat_recline_normal', 'airline_seat_recline_extra', 'airline_seat_legroom_reduced', 'system_update', 'tap_and_play', 'time_to_leave', 'vibration', 'voice_chat', 'vpn_lock', 'hot_tub', 'golf_course', 'free_breakfast', 'fitness_center', 'child_friendly', 'child_care', 'casino', 'business_center', 'beach_access', 'notifications_active', 'notifications', 'mood_bad', 'mood', 'location_city', 'group_add', 'group', 'domain', 'cake', 'spa', 'smoking_rooms', 'smoke_free', 'rv_hookup', 'room_service', 'pool', 'kitchen', 'wc', 'wifi', 'ac_unit', 'airport_shuttle', 'all_inclusive', 'notifications_none', 'notifications_off', 'notifications_paused', 'pages', 'party_mode', 'people', 'people_outline', 'person', 'person_add', 'person_outline', 'plus_one', 'poll', 'public', 'school', 'sentiment_dissatisfied', 'sentiment_neutral', 'sentiment_satisfied', 'sentiment_very_dissatisfied', 'sentiment_very_satisfied', 'share', 'whatshot', 'check_box', 'check_box_outline_blank', 'indeterminate_check_box', 'radio_button_checked', 'radio_button_unchecked', 'star', 'star_border', 'star_half']; \ No newline at end of file diff --git a/client/src/data-sources/DataSourceConnector.ts b/client/src/data-sources/DataSourceConnector.ts index f9b9bc5..501435b 100644 --- a/client/src/data-sources/DataSourceConnector.ts +++ b/client/src/data-sources/DataSourceConnector.ts @@ -309,19 +309,19 @@ export class DataSourceConnector { } // Calling action with arguments - var result = plugin[action].call(this, extrapolation.dependencies, ...args) || {}; + let result = plugin[action].call(this, extrapolation.dependencies, ...args) || {}; // Checking is result is a dispatcher or a direct value if (typeof result === 'function') { return (dispatch) => { result(function (obj: any) { obj = obj || {}; - var fullResult = DataSourceConnector.callibrateResult(obj, plugin, extrapolation.dependencies); + let fullResult = DataSourceConnector.callibrateResult(obj, plugin, extrapolation.dependencies); dispatch(fullResult); }); }; } else { - var fullResult = DataSourceConnector.callibrateResult(result, plugin, extrapolation.dependencies); + let fullResult = DataSourceConnector.callibrateResult(result, plugin, extrapolation.dependencies); return fullResult; } }; diff --git a/client/src/data-sources/index.ts b/client/src/data-sources/index.ts index 983a9d8..b2dcc54 100644 --- a/client/src/data-sources/index.ts +++ b/client/src/data-sources/index.ts @@ -5,4 +5,4 @@ export { IDataSource, IDataSourceDictionary, IExtrapolationResult -} \ No newline at end of file +}; \ No newline at end of file diff --git a/client/src/data-sources/plugins/ApplicationInsights/common.ts b/client/src/data-sources/plugins/ApplicationInsights/common.ts index aab80cf..34cc44d 100644 --- a/client/src/data-sources/plugins/ApplicationInsights/common.ts +++ b/client/src/data-sources/plugins/ApplicationInsights/common.ts @@ -7,4 +7,4 @@ export { appInsightsUri, appId, apiKey -} \ No newline at end of file +}; \ No newline at end of file diff --git a/client/src/data-sources/plugins/Constant/index.ts b/client/src/data-sources/plugins/Constant/index.ts index e99a45f..5222789 100644 --- a/client/src/data-sources/plugins/Constant/index.ts +++ b/client/src/data-sources/plugins/Constant/index.ts @@ -1,6 +1,6 @@ import * as _ from 'lodash'; -import {DataSourcePlugin, IOptions} from '../DataSourcePlugin'; +import { DataSourcePlugin, IOptions } from '../DataSourcePlugin'; import ConstantDatasourceSettings from './Settings'; interface IConstantParams { diff --git a/client/src/data-sources/plugins/CosmosDB/Query.ts b/client/src/data-sources/plugins/CosmosDB/Query.ts index 6974dd8..9da6332 100644 --- a/client/src/data-sources/plugins/CosmosDB/Query.ts +++ b/client/src/data-sources/plugins/CosmosDB/Query.ts @@ -33,8 +33,8 @@ export default class CosmosDBQuery extends DataSourcePlugin { */ dependenciesUpdated(dependencies: any) { let emptyDependency = false; - Object.keys(this._props.dependencies).forEach((key) => { - if (typeof dependencies[key] === 'undefined') { emptyDependency = true; } + Object.keys(this._props.dependencies).forEach(k => { + if (typeof dependencies[k] === 'undefined') { emptyDependency = true; } }); // If one of the dependencies is not supplied, do not run the query diff --git a/client/src/data-sources/plugins/Sample.ts b/client/src/data-sources/plugins/Sample.ts index 9b0767a..1bd32bc 100644 --- a/client/src/data-sources/plugins/Sample.ts +++ b/client/src/data-sources/plugins/Sample.ts @@ -1,6 +1,6 @@ import * as _ from 'lodash'; -import {DataSourcePlugin, IOptions} from './DataSourcePlugin'; +import { DataSourcePlugin, IOptions } from './DataSourcePlugin'; interface ISampleParams { samples: IDictionary; diff --git a/client/src/tests/data-formats/formats/bars.ts b/client/src/tests/data-formats/formats/bars.ts index d038d44..68ae801 100644 --- a/client/src/tests/data-formats/formats/bars.ts +++ b/client/src/tests/data-formats/formats/bars.ts @@ -1,6 +1,6 @@ import { IFormatTest } from './formats'; -export default { +export default { format: { type: 'bars', args: { diff --git a/client/src/tests/data-formats/formats/filter.ts b/client/src/tests/data-formats/formats/filter.ts index 1128801..f06060b 100644 --- a/client/src/tests/data-formats/formats/filter.ts +++ b/client/src/tests/data-formats/formats/filter.ts @@ -1,6 +1,6 @@ import { IFormatTest } from './formats'; -export default { +export default { format: 'filter', state: { values: [ @@ -13,4 +13,4 @@ export default { 'values-all': [ 'value 1', 'value 2', 'value 3' ], 'values-selected': [ ], } -} \ No newline at end of file +}; \ No newline at end of file diff --git a/client/src/tests/data-formats/formats/filtered_samples.ts b/client/src/tests/data-formats/formats/filtered_samples.ts index 7caa3a7..6b13fcc 100644 --- a/client/src/tests/data-formats/formats/filtered_samples.ts +++ b/client/src/tests/data-formats/formats/filtered_samples.ts @@ -13,7 +13,7 @@ const values = [ { name: 'slack-de', value: 1, locale: 'de', channel: 'slack' } ]; -export default [ +export default [ { format: 'filtered_samples', params: { @@ -30,7 +30,7 @@ export default [ }, state: { values: [ 'value 1', 'value 2', 'value 3' ] }, expected: { - "filtered_values": values + 'filtered_values': values } }, { @@ -49,7 +49,7 @@ export default [ }, state: { values: [ 'value 1', 'value 2', 'value 3' ] }, expected: { - "filtered_values": _.filter(values, { locale: 'en' }) + 'filtered_values': _.filter(values, { locale: 'en' }) } } ]; \ No newline at end of file diff --git a/client/src/tests/data-formats/formats/index.ts b/client/src/tests/data-formats/formats/index.ts index ad5c92c..41fec66 100644 --- a/client/src/tests/data-formats/formats/index.ts +++ b/client/src/tests/data-formats/formats/index.ts @@ -8,7 +8,7 @@ import timeline from './timeline'; import timespan from './timespan'; import filtered_samples from './filtered_samples'; -export const formatTests = >{ +export const formatTests = > { bars, filter, flags, diff --git a/client/src/tests/data-formats/formats/retention.ts b/client/src/tests/data-formats/formats/retention.ts index 5bb9e54..9b9c1c2 100644 --- a/client/src/tests/data-formats/formats/retention.ts +++ b/client/src/tests/data-formats/formats/retention.ts @@ -1,6 +1,6 @@ import { IFormatTest } from './formats'; -export default [ +export default [ { format: 'retention', state: { @@ -17,19 +17,19 @@ export default [ ] }, expected: { - "returning": 0, - "returning24hr": 3, - "returning30d": 6, - "returning7d": 3, - "total": 0, - "totalUnique": 10, - "totalUniqueUsersIn24hr": 5, - "totalUniqueUsersIn30d": 10, - "totalUniqueUsersIn7d": 7, - "values": [ - { "retention": "60%", "returning": 3, "timespan": "24 hours", "unique": 5 }, - { "retention": "43%", "returning": 3, "timespan": "7 days", "unique": 7 }, - { "retention": "60%", "returning": 6, "timespan": "30 days", "unique": 10 } + 'returning': 0, + 'returning24hr': 3, + 'returning30d': 6, + 'returning7d': 3, + 'total': 0, + 'totalUnique': 10, + 'totalUniqueUsersIn24hr': 5, + 'totalUniqueUsersIn30d': 10, + 'totalUniqueUsersIn7d': 7, + 'values': [ + { 'retention': '60%', 'returning': 3, 'timespan': '24 hours', 'unique': 5 }, + { 'retention': '43%', 'returning': 3, 'timespan': '7 days', 'unique': 7 }, + { 'retention': '60%', 'returning': 6, 'timespan': '30 days', 'unique': 10 } ] } }, @@ -52,19 +52,19 @@ export default [ ] }, expected: { - "returning": 3, - "returning24hr": 3, - "returning30d": 6, - "returning7d": 3, - "total": 5, - "totalUnique": 10, - "totalUniqueUsersIn24hr": 5, - "totalUniqueUsersIn30d": 10, - "totalUniqueUsersIn7d": 7, - "values": [ - { "retention": "60%", "returning": 3, "timespan": "24 hours", "unique": 5 }, - { "retention": "43%", "returning": 3, "timespan": "7 days", "unique": 7 }, - { "retention": "60%", "returning": 6, "timespan": "30 days", "unique": 10 } + 'returning': 3, + 'returning24hr': 3, + 'returning30d': 6, + 'returning7d': 3, + 'total': 5, + 'totalUnique': 10, + 'totalUniqueUsersIn24hr': 5, + 'totalUniqueUsersIn30d': 10, + 'totalUniqueUsersIn7d': 7, + 'values': [ + { 'retention': '60%', 'returning': 3, 'timespan': '24 hours', 'unique': 5 }, + { 'retention': '43%', 'returning': 3, 'timespan': '7 days', 'unique': 7 }, + { 'retention': '60%', 'returning': 6, 'timespan': '30 days', 'unique': 10 } ] } } diff --git a/client/src/tests/data-formats/formats/scorecard.ts b/client/src/tests/data-formats/formats/scorecard.ts index b613a8b..e0a6e9b 100644 --- a/client/src/tests/data-formats/formats/scorecard.ts +++ b/client/src/tests/data-formats/formats/scorecard.ts @@ -1,6 +1,6 @@ import { IFormatTest } from './formats'; -export default { +export default { format: { type: 'scorecard', args: { @@ -13,11 +13,11 @@ export default { values: [{ count: 99, other_count: 44 }] }, expected: { - "value": "99", - "heading": "Heading", - "color": "#fff", - "icon": "chat", - "subvalue": 44, - "subheading": "Subheading" + 'value': '99', + 'heading': 'Heading', + 'color': '#fff', + 'icon': 'chat', + 'subvalue': 44, + 'subheading': 'Subheading' } }; \ No newline at end of file diff --git a/client/src/tests/pages/NotFound.test.tsx b/client/src/tests/pages/NotFound.test.tsx index cccca41..a06651d 100644 --- a/client/src/tests/pages/NotFound.test.tsx +++ b/client/src/tests/pages/NotFound.test.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import * as TestUtils from 'react-dom/test-utils'; -import NotFound from '../../pages/NotFound' +import NotFound from '../../pages/NotFound'; describe('NotFound', () => { let setup; diff --git a/client/src/utils/data-formats/formats/flags.ts b/client/src/utils/data-formats/formats/flags.ts index cb3e39d..e6630bf 100644 --- a/client/src/utils/data-formats/formats/flags.ts +++ b/client/src/utils/data-formats/formats/flags.ts @@ -52,11 +52,11 @@ export function flags( if (!state) { return null; } let values = params[args.data || 'values']; - let flags = {}; - values.forEach(key => { flags[key] = state.selectedValue === key; }); + let flagsobj = {}; + values.forEach(key => { flagsobj[key] = state.selectedValue === key; }); - flags[prefix + 'values-all'] = values; - flags[prefix + 'values-selected'] = state.selectedValue || []; + flagsobj[prefix + 'values-all'] = values; + flagsobj[prefix + 'values-selected'] = state.selectedValue || []; - return flags; + return flagsobj; } \ No newline at end of file diff --git a/client/src/utils/data-formats/formats/scorecard.ts b/client/src/utils/data-formats/formats/scorecard.ts index 8a91fc6..a4e7010 100644 --- a/client/src/utils/data-formats/formats/scorecard.ts +++ b/client/src/utils/data-formats/formats/scorecard.ts @@ -52,15 +52,15 @@ export function scorecard ( let checkValue = (values && values[0] && values[0][countField]) || 0; - let createValue = (value: any, heading: string, color: string, icon: string, subvalue?: any, subheading?: string) => { + let createValue = (value: any, heading: string, color: string, icon: string, sv?: any, sh?: string) => { let item = {}; const prefix = getPrefix(format); item[prefix + 'value'] = isFinite(value) ? utils.kmNumber(value, postfix) : '-'; item[prefix + 'heading'] = heading; item[prefix + 'color'] = color; item[prefix + 'icon'] = icon; - item[prefix + 'subvalue'] = isFinite(subvalue) ? subvalue : ''; - item[prefix + 'subheading'] = subheading || ''; + item[prefix + 'subvalue'] = isFinite(sv) ? sv : ''; + item[prefix + 'subheading'] = sh || ''; return item; }; diff --git a/client/src/utils/data-formats/formats/timeline.ts b/client/src/utils/data-formats/formats/timeline.ts index 60dc196..d6e1d95 100644 --- a/client/src/utils/data-formats/formats/timeline.ts +++ b/client/src/utils/data-formats/formats/timeline.ts @@ -62,12 +62,12 @@ export function timeline( const { timeField, lineField, valueField } = args; const prefix = getPrefix(format); let values = state[args.data || 'values']; - const timeline = values; + const timelineSourceValues = values; let _timeline = {}; let _lines = {}; - timeline.forEach(row => { + timelineSourceValues.forEach(row => { let timestamp = row[timeField]; let lineFieldValue = lineField === undefined ? valueField : row[lineField]; let valueFieldValue = row[valueField]; diff --git a/client/src/utils/index.ts b/client/src/utils/index.ts index 5d7fe9e..70b96a9 100644 --- a/client/src/utils/index.ts +++ b/client/src/utils/index.ts @@ -129,4 +129,4 @@ export default class Utils { return `Error: ${message}`; } -}; \ No newline at end of file +} \ No newline at end of file diff --git a/client/tslint.json b/client/tslint.json index 8b74b92..b23cda0 100644 --- a/client/tslint.json +++ b/client/tslint.json @@ -26,10 +26,14 @@ "label-position": true, "max-line-length": [ true, 120 ], "member-ordering": [ - true, - "public-before-private", - "static-before-instance", - "variables-before-functions" + true, + { + "order": [ + "static-before-instance", + "variables-before-functions", + "public-before-private" + ] + } ], "no-any": false, "no-arg": true, diff --git a/client/yarn.lock b/client/yarn.lock index b2db9a3..9a75272 100644 --- a/client/yarn.lock +++ b/client/yarn.lock @@ -182,12 +182,6 @@ ansi-align@^1.1.0: dependencies: string-width "^1.0.1" -ansi-align@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-2.0.0.tgz#c36aeccba563b89ceb556f3690f0b1d9e3547f7f" - dependencies: - string-width "^2.0.0" - ansi-escapes@^1.1.0, ansi-escapes@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" @@ -414,7 +408,7 @@ babel-code-frame@6.22.0: esutils "^2.0.2" js-tokens "^3.0.0" -babel-code-frame@^6.11.0, babel-code-frame@^6.20.0, babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: +babel-code-frame@^6.11.0, babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" dependencies: @@ -691,18 +685,6 @@ boxen@^0.6.0: string-width "^1.0.1" widest-line "^1.0.0" -boxen@^1.0.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.2.1.tgz#0f11e7fe344edb9397977fc13ede7f64d956481d" - dependencies: - ansi-align "^2.0.0" - camelcase "^4.0.0" - chalk "^2.0.1" - cli-boxes "^1.0.0" - string-width "^2.0.0" - term-size "^1.2.0" - widest-line "^1.0.0" - brace-expansion@^1.0.0, brace-expansion@^1.1.7: version "1.1.8" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" @@ -837,7 +819,7 @@ buffer@^4.3.0: ieee754 "^1.1.4" isarray "^1.0.0" -builtin-modules@^1.0.0: +builtin-modules@^1.0.0, builtin-modules@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" @@ -899,7 +881,7 @@ camelcase@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" -camelcase@^4.0.0, camelcase@^4.1.0: +camelcase@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" @@ -1151,17 +1133,6 @@ configstore@^2.0.0: write-file-atomic "^1.1.2" xdg-basedir "^2.0.0" -configstore@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/configstore/-/configstore-3.1.1.tgz#094ee662ab83fad9917678de114faaea8fcdca90" - dependencies: - dot-prop "^4.1.0" - graceful-fs "^4.1.2" - make-dir "^1.0.0" - unique-string "^1.0.0" - write-file-atomic "^2.0.0" - xdg-basedir "^3.0.0" - connect-history-api-fallback@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.3.0.tgz#e51d17f8f0ef0db90a64fdb47de3051556e9f169" @@ -1250,7 +1221,7 @@ create-ecdh@^4.0.0: bn.js "^4.1.0" elliptic "^6.0.0" -create-error-class@^3.0.0, create-error-class@^3.0.1: +create-error-class@^3.0.1: version "3.0.2" resolved "https://registry.yarnpkg.com/create-error-class/-/create-error-class-3.0.2.tgz#06be7abef947a3f14a30fd610671d401bca8b7b6" dependencies: @@ -1320,10 +1291,6 @@ crypto-browserify@^3.11.0: public-encrypt "^4.0.0" randombytes "^2.0.0" -crypto-random-string@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e" - css-color-names@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" @@ -1622,7 +1589,7 @@ detect-port-alt@1.1.3: address "^1.0.1" debug "^2.6.0" -diff@^3.0.1, diff@^3.2.0: +diff@^3.2.0: version "3.3.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.0.tgz#056695150d7aa93237ca7e378ac3b1682b7963b9" @@ -1715,12 +1682,6 @@ dot-prop@^3.0.0: dependencies: is-obj "^1.0.0" -dot-prop@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57" - dependencies: - is-obj "^1.0.0" - dotenv@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-4.0.0.tgz#864ef1379aced55ce6f95debecdce179f7a0cd1d" @@ -1737,10 +1698,6 @@ duplexer2@^0.1.4: dependencies: readable-stream "^2.0.2" -duplexer3@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" - duplexer@^0.1.1, duplexer@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" @@ -2153,12 +2110,6 @@ find-up@^2.0.0, find-up@^2.1.0: dependencies: locate-path "^2.0.0" -findup-sync@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-0.3.0.tgz#37930aa5d816b777c03445e1966cc6790a4c0b16" - dependencies: - glob "~5.0.0" - flatten@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" @@ -2351,16 +2302,6 @@ glob@~3.2.9: inherits "2" minimatch "0.3" -glob@~5.0.0: - version "5.0.15" - resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" - dependencies: - inflight "^1.0.4" - inherits "2" - minimatch "2 || 3" - once "^1.3.0" - path-is-absolute "^1.0.0" - global-modules@1.0.0, global-modules@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" @@ -2439,22 +2380,6 @@ got@^5.0.0: unzip-response "^1.0.2" url-parse-lax "^1.0.0" -got@^6.7.1: - version "6.7.1" - resolved "https://registry.yarnpkg.com/got/-/got-6.7.1.tgz#240cd05785a9a18e561dc1b44b41c763ef1e8db0" - dependencies: - create-error-class "^3.0.0" - duplexer3 "^0.1.4" - get-stream "^3.0.0" - is-redirect "^1.0.0" - is-retry-allowed "^1.0.0" - is-stream "^1.0.0" - lowercase-keys "^1.0.0" - safe-buffer "^5.0.1" - timed-out "^4.0.0" - unzip-response "^2.0.1" - url-parse-lax "^1.0.0" - graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: version "4.1.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" @@ -2724,10 +2649,6 @@ immutable@^3.7.4: version "3.8.1" resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.8.1.tgz#200807f11ab0f72710ea485542de088075f68cd2" -import-lazy@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" - imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" @@ -3503,12 +3424,6 @@ latest-version@^2.0.0: dependencies: package-json "^2.0.0" -latest-version@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-3.1.0.tgz#a205383fea322b33b5ae3b18abee0dc2f356ee15" - dependencies: - package-json "^4.0.0" - lazy-cache@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" @@ -3720,12 +3635,6 @@ macaddress@^0.2.8: version "0.2.8" resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12" -make-dir@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.0.0.tgz#97a011751e91dd87cfadef58832ebb04936de978" - dependencies: - pify "^2.3.0" - makeerror@1.0.x: version "1.0.11" resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" @@ -4294,7 +4203,7 @@ opn@5.1.0: dependencies: is-wsl "^1.1.0" -optimist@^0.6.1, optimist@~0.6.0: +optimist@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" dependencies: @@ -4378,15 +4287,6 @@ package-json@^2.0.0: registry-url "^3.0.3" semver "^5.1.0" -package-json@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/package-json/-/package-json-4.0.1.tgz#8869a0401253661c4c4ca3da6c2121ed555f5eed" - dependencies: - got "^6.7.1" - registry-auth-token "^3.0.1" - registry-url "^3.0.3" - semver "^5.1.0" - pako@~0.2.0: version "0.2.9" resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" @@ -5603,7 +5503,7 @@ resolve@1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" -resolve@^1.1.7, resolve@^1.3.2: +resolve@^1.3.2: version "1.4.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.4.0.tgz#a75be01c53da25d934a98ebd0e4c4a7312f92a86" dependencies: @@ -6225,12 +6125,6 @@ tar@^2.0.0, tar@^2.2.1: fstream "^1.0.2" inherits "2" -term-size@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/term-size/-/term-size-1.2.0.tgz#458b83887f288fc56d6fffbfad262e26638efa69" - dependencies: - execa "^0.7.0" - test-exclude@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.1.1.tgz#4d84964b0966b0087ecc334a2ce002d3d9341e26" @@ -6281,10 +6175,6 @@ timed-out@^3.0.0: version "3.1.3" resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-3.1.3.tgz#95860bfcc5c76c277f8f8326fd0f5b2e20eba217" -timed-out@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" - timers-browserify@^2.0.2: version "2.0.4" resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.4.tgz#96ca53f4b794a5e7c0e1bd7cc88a372298fa01e6" @@ -6367,6 +6257,10 @@ tslib@^1.7.1: version "1.7.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.7.1.tgz#bc8004164691923a79fe8378bbeb3da2017538ec" +tslib@^1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.8.1.tgz#6946af2d1d651a7b1863b531d6e5afa41aa44eac" + tslint-loader@^3.5.3: version "3.5.3" resolved "https://registry.yarnpkg.com/tslint-loader/-/tslint-loader-3.5.3.tgz#343f74122d94f356b689457d3f59f64a69ab606f" @@ -6383,20 +6277,6 @@ tslint-react@^3.0.0: dependencies: tsutils "^2.8.0" -tslint@^4.0.0: - version "4.5.1" - resolved "https://registry.yarnpkg.com/tslint/-/tslint-4.5.1.tgz#05356871bef23a434906734006fc188336ba824b" - dependencies: - babel-code-frame "^6.20.0" - colors "^1.1.2" - diff "^3.0.1" - findup-sync "~0.3.0" - glob "^7.1.1" - optimist "~0.6.0" - resolve "^1.1.7" - tsutils "^1.1.0" - update-notifier "^2.0.0" - tslint@^5.2.0: version "5.6.0" resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.6.0.tgz#088aa6c6026623338650b2900828ab3edf59f6cf" @@ -6412,9 +6292,27 @@ tslint@^5.2.0: tslib "^1.7.1" tsutils "^2.7.1" -tsutils@^1.1.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-1.9.1.tgz#b9f9ab44e55af9681831d5f28d0aeeaf5c750cb0" +tslint@^5.8.0: + version "5.8.0" + resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.8.0.tgz#1f49ad5b2e77c76c3af4ddcae552ae4e3612eb13" + dependencies: + babel-code-frame "^6.22.0" + builtin-modules "^1.1.1" + chalk "^2.1.0" + commander "^2.9.0" + diff "^3.2.0" + glob "^7.1.1" + minimatch "^3.0.4" + resolve "^1.3.2" + semver "^5.3.0" + tslib "^1.7.1" + tsutils "^2.12.1" + +tsutils@^2.12.1: + version "2.16.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.16.0.tgz#ad8e83f47bef4f7d24d173cc6cd180990c831105" + dependencies: + tslib "^1.8.1" tsutils@^2.7.1, tsutils@^2.8.0: version "2.8.1" @@ -6517,12 +6415,6 @@ uniqs@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" -unique-string@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a" - dependencies: - crypto-random-string "^1.0.0" - universalify@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7" @@ -6535,10 +6427,6 @@ unzip-response@^1.0.0, unzip-response@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-1.0.2.tgz#b984f0877fc0a89c2c773cc1ef7b5b232b5b06fe" -unzip-response@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-2.0.1.tgz#d2f0f737d16b0615e72a6935ed04214572d56f97" - update-notifier@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-1.0.3.tgz#8f92c515482bd6831b7c93013e70f87552c7cf5a" @@ -6552,19 +6440,6 @@ update-notifier@^1.0.3: semver-diff "^2.0.0" xdg-basedir "^2.0.0" -update-notifier@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-2.2.0.tgz#1b5837cf90c0736d88627732b661c138f86de72f" - dependencies: - boxen "^1.0.0" - chalk "^1.0.0" - configstore "^3.0.0" - import-lazy "^2.1.0" - is-npm "^1.0.0" - latest-version "^3.0.0" - semver-diff "^2.0.0" - xdg-basedir "^3.0.0" - upper-case@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" @@ -6874,14 +6749,10 @@ window-size@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" -wordwrap@0.0.2: +wordwrap@0.0.2, wordwrap@~0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" -wordwrap@~0.0.2: - version "0.0.3" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" - wordwrap@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" @@ -6912,24 +6783,12 @@ write-file-atomic@^1.1.2: imurmurhash "^0.1.4" slide "^1.1.5" -write-file-atomic@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab" - dependencies: - graceful-fs "^4.1.11" - imurmurhash "^0.1.4" - signal-exit "^3.0.2" - xdg-basedir@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-2.0.0.tgz#edbc903cc385fc04523d966a335504b5504d1bd2" dependencies: os-homedir "^1.0.0" -xdg-basedir@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4" - xhr-request@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/xhr-request/-/xhr-request-1.0.1.tgz#83f08a4b20beec67a8c1c728e8102f4c9eecbdda" From 7eedf642e9cf2e98c9811e3a5e63c0bfd895fc8d Mon Sep 17 00:00:00 2001 From: morsh Date: Mon, 8 Jan 2018 19:45:21 +0200 Subject: [PATCH 2/4] make travis push to source branch --- .travis/push.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis/push.sh b/.travis/push.sh index 5ddff14..7ff10b1 100755 --- a/.travis/push.sh +++ b/.travis/push.sh @@ -5,7 +5,7 @@ set -euo pipefail readonly GITHUB_ORG="${GITHUB_ORG:-Azure}" readonly GITHUB_REPO="${GITHUB_REPO:-ibex-dashboard}" readonly TARGET_BRANCH="${TARGET_BRANCH:-master}" -readonly SOURCE_BRANCH="${SOURCE_BRANCH:-ibex-version-1.0}" +# readonly SOURCE_BRANCH="${SOURCE_BRANCH:-ibex-version-1.0}" readonly AUTOCOMMIT_NAME="Travis CI" readonly AUTOCOMMIT_EMAIL="travis@travis-ci.org" From 4d724d8d14e4f1d515e9732b088828a7daca7a3a Mon Sep 17 00:00:00 2001 From: morsh Date: Mon, 8 Jan 2018 21:27:21 +0200 Subject: [PATCH 3/4] update travis-ci vars --- .travis/push.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.travis/push.sh b/.travis/push.sh index 7ff10b1..ea653ed 100755 --- a/.travis/push.sh +++ b/.travis/push.sh @@ -16,6 +16,14 @@ log() { } ensure_preconditions_met() { + + log "TRAVIS_BRANCH: ${TRAVIS_BRANCH}" + log "TRAVIS_PULL_REQUEST: ${TRAVIS_PULL_REQUEST}" + log "TRAVIS_PULL_REQUEST_BRANCH: ${TRAVIS_PULL_REQUEST_BRANCH}" + log "TRAVIS_COMMIT: ${TRAVIS_COMMIT}" + log "TRAVIS_COMMIT_MESSAGE: ${TRAVIS_COMMIT_MESSAGE}" + log "TRAVIS_COMMIT_RANGE: ${TRAVIS_COMMIT_RANGE}" + if [ -z "${TRAVIS_PULL_REQUEST_BRANCH}" ]; then log "Job is CI for a push, skipping creation of production build" exit 0 From 32a36d834678f2b43776cbe35cc02a3ca0fc0cff Mon Sep 17 00:00:00 2001 From: morsh Date: Mon, 8 Jan 2018 21:40:33 +0200 Subject: [PATCH 4/4] update push branch --- .travis/push.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.travis/push.sh b/.travis/push.sh index ea653ed..5806328 100755 --- a/.travis/push.sh +++ b/.travis/push.sh @@ -28,12 +28,15 @@ ensure_preconditions_met() { log "Job is CI for a push, skipping creation of production build" exit 0 fi - # if [ "${TRAVIS_BRANCH}_${TRAVIS_PULL_REQUEST_BRANCH}" != "${TARGET_BRANCH}_${SOURCE_BRANCH}" ]; then + + # Only if push is to master branch, include a build + # if [ "${TRAVIS_BRANCH}" != "${TARGET_BRANCH}" ]; then # log "Skipping creation of production build" - # log "We only create production builds for pull requests from '${SOURCE_BRANCH}' to '${TARGET_BRANCH}'" - # log "but this pull request is from '${TRAVIS_PULL_REQUEST BRANCH}' to '${TRAVIS_BRANCH}'" + # log "We only create production builds for pull requests to '${TARGET_BRANCH}'" + # log "but this pull request is to '${TRAVIS_BRANCH}'" # exit 0 # fi + if [ -z "${GITHUB_TOKEN}" ]; then log "GITHUB_TOKEN not set: won't be able to push production build" log "Please configure the token in .travis.yml or the Travis UI" @@ -58,7 +61,7 @@ commit_build_files() { } push_to_github() { - git push origin-travis "${AUTOCOMMIT_BRANCH}:${SOURCE_BRANCH}" + git push origin-travis "${AUTOCOMMIT_BRANCH}:${TRAVIS_PULL_REQUEST_BRANCH}" } ensure_preconditions_met