-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: [Data History Explorer]: Builder components (#807)
* added data history explorer's builder components and the modal * run prettier * [Auto] Adding updated localization files Files changed: M src/Resources/Locales/cs.json M src/Resources/Locales/de.json M src/Resources/Locales/es.json M src/Resources/Locales/fr.json M src/Resources/Locales/hu.json M src/Resources/Locales/it.json M src/Resources/Locales/ja.json M src/Resources/Locales/ko.json M src/Resources/Locales/nl.json M src/Resources/Locales/pl.json M src/Resources/Locales/pt-pt.json M src/Resources/Locales/pt.json M src/Resources/Locales/ru.json M src/Resources/Locales/sv.json M src/Resources/Locales/tr.json M src/Resources/Locales/zh-Hans.json * jest test fail fix * styling changes and test fix * style change * CR fix * now fixed typing error in build for iconStart * CR fixes - 1 * CR fixes - 2 * [Auto] Adding updated localization files Files changed: M src/Resources/Locales/cs.json M src/Resources/Locales/de.json M src/Resources/Locales/es.json M src/Resources/Locales/fr.json M src/Resources/Locales/hu.json M src/Resources/Locales/it.json M src/Resources/Locales/ja.json M src/Resources/Locales/ko.json M src/Resources/Locales/nl.json M src/Resources/Locales/pl.json M src/Resources/Locales/pt-pt.json M src/Resources/Locales/pt.json M src/Resources/Locales/ru.json M src/Resources/Locales/sv.json M src/Resources/Locales/tr.json M src/Resources/Locales/zh-Hans.json * CR fixes - 3 * reverting react select double scroll bar changes since it requires separate PR * cast label font weight changed Co-authored-by: iremgokce <[email protected]>
- Loading branch information
Showing
68 changed files
with
1,789 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import ADTInstanceTimeSeriesConnectionData from '../Models/Classes/AdapterDataClasses/ADTInstanceTimeSeriesConnectionData'; | ||
import { | ||
ADTAllModelsData, | ||
ADTTwinToModelMappingData | ||
} from '../Models/Classes/AdapterDataClasses/ADTModelData'; | ||
import ADTTwinData from '../Models/Classes/AdapterDataClasses/ADTTwinData'; | ||
import AdapterEntityCache from '../Models/Classes/AdapterEntityCache'; | ||
import { | ||
modelRefreshMaxAge, | ||
timeSeriesConnectionRefreshMaxAge | ||
} from '../Models/Constants/Constants'; | ||
import { IAuthService } from '../Models/Constants/Interfaces'; | ||
import { applyMixins } from '../Models/Services/Utils'; | ||
import ADTAdapter from './ADTAdapter'; | ||
import ADXAdapter from './ADXAdapter'; | ||
import AzureManagementAdapter from './AzureManagementAdapter'; | ||
|
||
export default class ADTDataHistoryAdapter { | ||
constructor( | ||
authService: IAuthService, | ||
adtHostUrl: string, | ||
tenantId?: string, | ||
uniqueObjectId?: string, | ||
adtProxyServerPath = '/proxy/adt' | ||
) { | ||
this.adtHostUrl = adtHostUrl; | ||
this.authService = this.adxAuthService = authService; | ||
this.tenantId = tenantId; | ||
this.uniqueObjectId = uniqueObjectId; | ||
this.adtTwinCache = new AdapterEntityCache<ADTTwinData>(9000); | ||
this.adtModelsCache = new AdapterEntityCache<ADTAllModelsData>( | ||
modelRefreshMaxAge | ||
); | ||
this.adtTwinToModelMappingCache = new AdapterEntityCache<ADTTwinToModelMappingData>( | ||
modelRefreshMaxAge | ||
); | ||
this.timeSeriesConnectionCache = new AdapterEntityCache<ADTInstanceTimeSeriesConnectionData>( | ||
timeSeriesConnectionRefreshMaxAge | ||
); | ||
|
||
this.adtProxyServerPath = adtProxyServerPath; | ||
this.authService.login(); | ||
// Fetch & cache models on mount (makes first use of models faster as models should already be cached) | ||
this.getAllAdtModels(); | ||
} | ||
} | ||
|
||
export default interface ADTDataHistoryAdapter | ||
extends ADTAdapter, | ||
ADXAdapter, | ||
AzureManagementAdapter {} | ||
applyMixins(ADTDataHistoryAdapter, [ | ||
ADTAdapter, | ||
ADXAdapter, | ||
AzureManagementAdapter | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/Components/DataHistoryExplorer/DataHistoryExplorer.stories.local.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import React from 'react'; | ||
import { getDefaultStoryDecorator } from '../../Models/Services/StoryUtilities'; | ||
import DataHistoryExplorer from './DataHistoryExplorer'; | ||
import { IDataHistoryExplorerProps } from './DataHistoryExplorer.types'; | ||
import useAuthParams from '../../../.storybook/useAuthParams'; | ||
import MsalAuthService from '../../Models/Services/MsalAuthService'; | ||
import ADTDataHistoryAdapter from '../../Adapters/ADTDataHistoryAdapter'; | ||
|
||
const wrapperStyle = { width: '100%', height: '500px', padding: 8 }; | ||
|
||
export default { | ||
title: 'Components/DataHistoryExplorer', | ||
component: DataHistoryExplorer, | ||
decorators: [ | ||
getDefaultStoryDecorator<IDataHistoryExplorerProps>(wrapperStyle) | ||
] | ||
}; | ||
|
||
export const ADT = (args) => { | ||
const authenticationParameters = useAuthParams(); | ||
return !authenticationParameters ? ( | ||
<div></div> | ||
) : ( | ||
<DataHistoryExplorer | ||
{...args} | ||
adapter={ | ||
new ADTDataHistoryAdapter( | ||
new MsalAuthService( | ||
authenticationParameters.adt.aadParameters | ||
), | ||
authenticationParameters.adt.hostUrl | ||
) | ||
} | ||
/> | ||
); | ||
}; |
Oops, something went wrong.