├── .husky
├── .gitignore
└── pre-commit
├── .npmrc
├── Docker
├── MongoDb
│ ├── .gitignore
│ └── docker-compose.yml
└── Local
│ └── docker-compose.yml
├── Scripts
└── Azure
│ ├── .gitignore
│ ├── run-azure-scripts.sh
│ └── example-config.cfg
├── Src
├── WitsmlExplorer.Frontend
│ ├── .jshintrc
│ ├── vite-env.d.ts
│ ├── components
│ │ ├── StyledComponents
│ │ │ ├── Chip
│ │ │ │ └── index.ts
│ │ │ ├── StyledMenu
│ │ │ │ └── index.ts
│ │ │ ├── StyledAccordion
│ │ │ │ └── index.ts
│ │ │ ├── Tooltip.tsx
│ │ │ ├── ErrorMessage.tsx
│ │ │ ├── Layout.tsx
│ │ │ ├── ModalContentLayout.tsx
│ │ │ ├── StyledTab.tsx
│ │ │ ├── Container.tsx
│ │ │ ├── Warning.tsx
│ │ │ ├── Typography.tsx
│ │ │ ├── Checkbox.tsx
│ │ │ └── Banner.tsx
│ │ ├── Sidebar
│ │ │ ├── WellItem
│ │ │ │ ├── index.ts
│ │ │ │ └── styles.ts
│ │ │ ├── SearchFilter
│ │ │ │ ├── index.ts
│ │ │ │ ├── FilterIcon
│ │ │ │ │ └── index.ts
│ │ │ │ ├── EndAdornment
│ │ │ │ │ └── index.ts
│ │ │ │ └── StartAdornment
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── StartAdornment.tsx
│ │ │ ├── SidebarVirtualItem
│ │ │ │ └── index.ts
│ │ │ ├── InactiveWellsHiddenFilterHelper
│ │ │ │ └── index.ts
│ │ │ └── EmptyTreeItem.tsx
│ │ ├── ContentViews
│ │ │ ├── QueryView
│ │ │ │ ├── index.ts
│ │ │ │ └── components
│ │ │ │ │ ├── ResultMeta
│ │ │ │ │ └── index.ts
│ │ │ │ │ └── QueryOptions
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── DataGridSwitch
│ │ │ │ │ └── index.ts
│ │ │ │ │ └── TemplatePicker
│ │ │ │ │ └── index.ts
│ │ │ ├── table
│ │ │ │ └── index.ts
│ │ │ ├── DataWorkOrder
│ │ │ │ └── StatusChips
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── styles.ts
│ │ │ ├── __tests__
│ │ │ │ └── WellboresListView.tests.tsx
│ │ │ └── SearchListView.tsx
│ │ ├── Modals
│ │ │ ├── ConfigurationChangeReasonModal
│ │ │ │ ├── index.ts
│ │ │ │ ├── AffectedGroup
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── AffectedGroup.tsx
│ │ │ │ │ └── style.ts
│ │ │ │ └── styles.ts
│ │ │ └── ModalPresenter.tsx
│ │ ├── ContentView.tsx
│ │ ├── WarningBar.tsx
│ │ ├── ContextMenus
│ │ │ ├── ContextMenuPresenter.tsx
│ │ │ ├── LoadingContextMenu.tsx
│ │ │ └── UidMappingUtils.tsx
│ │ ├── Nav.tsx
│ │ ├── Constants.tsx
│ │ ├── TimeConversionUtils.tsx
│ │ └── Select.tsx
│ ├── models
│ │ ├── levelIntegerCode.ts
│ │ ├── bhaStatusTypes.ts
│ │ ├── indexCurve.ts
│ │ ├── errorDetails.ts
│ │ ├── lithologySources.ts
│ │ ├── refNameString.tsx
│ │ ├── unitType.ts
│ │ ├── dataWorkOrder
│ │ │ ├── channelCriticality.ts
│ │ │ ├── operationStatus.ts
│ │ │ ├── sectionOrderStatus.ts
│ │ │ ├── assetContact.ts
│ │ │ ├── logIndexType.ts
│ │ │ ├── configurationChangeReason.ts
│ │ │ ├── requirementPurpose.ts
│ │ │ ├── dataSourceConfigurationSet.ts
│ │ │ ├── channelRequirement.ts
│ │ │ ├── dataWorkOrder.ts
│ │ │ └── channelConfiguration.ts
│ │ ├── jobs
│ │ │ ├── wellReference.ts
│ │ │ ├── checkLogHeaderJob.tsx
│ │ │ ├── mnemonicsMappingJob.tsx
│ │ │ ├── spliceLogsJob.tsx
│ │ │ ├── objectReference.ts
│ │ │ ├── importLogDataJob.ts
│ │ │ ├── replaceObjectsJob.ts
│ │ │ ├── modifyLogCurveInfoJob.ts
│ │ │ ├── replaceComponentsJob.ts
│ │ │ ├── compareLogData.tsx
│ │ │ ├── minimumDataQcJob.tsx
│ │ │ ├── downloadLogDataJob.tsx
│ │ │ ├── offsetLogCurveJob.tsx
│ │ │ ├── deleteLogCurveValuesJob.tsx
│ │ │ ├── objectReferences.ts
│ │ │ ├── batchModifyLogCurveInfoJob.ts
│ │ │ ├── wellboreSubObjectsComparisonJob.tsx
│ │ │ ├── deleteEmptyMnemonicsJob.ts
│ │ │ ├── wellboreReference.ts
│ │ │ ├── missingDataJob.tsx
│ │ │ ├── jobInfo.tsx
│ │ │ └── deleteJobs.ts
│ │ ├── stratigraphicStruct.ts
│ │ ├── itemStateTypes.ts
│ │ ├── messageTypes.ts
│ │ ├── reportType.ts
│ │ ├── lithology.tsx
│ │ ├── AxisDefinition.ts
│ │ ├── measureWithDatum.ts
│ │ ├── referencePoint.tsx
│ │ ├── trajRawData.tsx
│ │ ├── boxPinConfigTypes.ts
│ │ ├── jobStatus.ts
│ │ ├── logTraceState.ts
│ │ ├── multilogCurveInfo.ts
│ │ ├── wellDatum.tsx
│ │ ├── stnTrajValid.tsx
│ │ ├── riskType.ts
│ │ ├── wellborePurposeValues.ts
│ │ ├── rigType.ts
│ │ ├── holeCasingTypes.ts
│ │ ├── tubular.tsx
│ │ ├── objectSearchResult.ts
│ │ ├── materialTypes.ts
│ │ ├── rheometer.ts
│ │ ├── AgentSettings.tsx
│ │ ├── riskCategory.ts
│ │ ├── logData.ts
│ │ ├── maxLength.ts
│ │ ├── measure.ts
│ │ ├── wbGeometry.tsx
│ │ ├── fluidsReport.ts
│ │ ├── messageObject.tsx
│ │ ├── typeTubularAssy.ts
│ │ ├── mudLog.tsx
│ │ ├── tubularComponent.tsx
│ │ ├── stnTrajCorUsed.tsx
│ │ ├── location.tsx
│ │ ├── changeLog.ts
│ │ ├── entityType.ts
│ │ ├── selectableObjectOnWellbore.ts
│ │ ├── exportProperties.ts
│ │ ├── commonData.tsx
│ │ ├── wbGeometrySection.tsx
│ │ ├── riskObject.tsx
│ │ ├── geologyInterval.tsx
│ │ ├── server.ts
│ │ ├── bhaRun.tsx
│ │ ├── trajectory.tsx
│ │ ├── logObject.tsx
│ │ ├── reports
│ │ │ └── BaseReport.tsx
│ │ ├── rig.tsx
│ │ ├── uidMapping.tsx
│ │ ├── serverCapabilities.tsx
│ │ └── riskAffectedPersonnel.ts
│ ├── contexts
│ │ ├── CompactEdsProvider
│ │ │ ├── index.ts
│ │ │ └── CompactEdsProvider.tsx
│ │ ├── operationType.ts
│ │ ├── operationContext.ts
│ │ └── MuiThemeProvider.tsx
│ ├── assets
│ │ ├── favicon.ico
│ │ └── fonts
│ │ │ ├── Equinor-Bold.woff2
│ │ │ ├── Equinor-Medium.woff2
│ │ │ └── Equinor-Regular.woff2
│ ├── App.tsx
│ ├── hooks
│ │ ├── query
│ │ │ ├── queryOptions.tsx
│ │ │ ├── useGetWell.tsx
│ │ │ └── useGetWellbore.tsx
│ │ ├── useOperationState.tsx
│ │ ├── useErrorMessage.tsx
│ │ └── useDocumentDimensions.ts
│ ├── templates
│ │ ├── well_id-only.xml
│ │ ├── wellbore_id-only.xml
│ │ ├── object_id-only.xml
│ │ ├── changeLog_id-only.xml
│ │ ├── dataGrid
│ │ │ ├── DataGridProperty.ts
│ │ │ └── objects
│ │ │ │ └── common
│ │ │ │ ├── DataGridExtensionAny.ts
│ │ │ │ ├── properties
│ │ │ │ ├── DataGridCostProperties.ts
│ │ │ │ ├── DataGridUomProperties.ts
│ │ │ │ ├── DataGridChronostratigraphyStructProperties.ts
│ │ │ │ ├── DataGridLithostratigraphyStructProperties.ts
│ │ │ │ ├── DataGridRefNameStringProperties.ts
│ │ │ │ ├── DataGridNameStructProperties.ts
│ │ │ │ ├── DataGridWellKnownNameStructProperties.ts
│ │ │ │ ├── DataGridWellVerticalDepthCoordProperties.ts
│ │ │ │ ├── DataGridFootageDirection.ts
│ │ │ │ ├── DataGridRefObjectStringProperties.ts
│ │ │ │ ├── DataGridMeasuredDepthCoordProperties.ts
│ │ │ │ ├── DataGridWellElevationCoordProperties.ts
│ │ │ │ ├── DataGridIndexedObjectProperties.ts
│ │ │ │ ├── DataGridRefWellWellboreProperties.ts
│ │ │ │ └── DataGridRefWellboreTrajectoryProperties.ts
│ │ │ │ └── DataGridCustomData.ts
│ │ ├── log_data-only.xml
│ │ └── dataWorkOrder_id-only.xml
│ ├── tools
│ │ ├── desktopAppHelpers.tsx
│ │ ├── IndexHelpers.tsx
│ │ ├── windowHelpers.ts
│ │ ├── themeHelpers.ts
│ │ └── logSameNamesHelper.tsx
│ ├── main.tsx
│ ├── tsconfig.node.json
│ ├── .env.development
│ ├── vitest.config.ts
│ ├── WitsmlExplorer.Frontend.csproj
│ ├── index.html
│ ├── .gitignore
│ ├── setupTests.ts
│ ├── nginx
│ │ └── nginx.conf
│ ├── vite.config.ts
│ ├── routes
│ │ ├── ErrorPage.tsx
│ │ └── utils
│ │ │ └── checkIsUrlTooLong.ts
│ └── styles
│ │ └── global.css
├── WitsmlExplorer.Console
│ ├── .gitignore
│ ├── uninstall.sh
│ ├── install.sh
│ ├── CustomQueries
│ │ └── GetAllWellbores.xml
│ ├── WitsmlClient
│ │ └── WitsmlConfiguration.cs
│ ├── Extensions
│ │ └── StringExtensions.cs
│ ├── ListCommands
│ │ ├── ListLogsSettings.cs
│ │ ├── ListBhaRunsSettings.cs
│ │ └── ListTubularsSettings.cs
│ ├── ShowCommands
│ │ └── ShowTubularSettings.cs
│ └── Injection
│ │ └── TypeResolver.cs
├── Witsml
│ ├── Data
│ │ ├── Measures
│ │ │ ├── WitsmlTimeMeasure.cs
│ │ │ ├── WitsmlAreaMeasure.cs
│ │ │ ├── WitsmlDayMeasure.cs
│ │ │ ├── WitsmlForceMeasure.cs
│ │ │ ├── WitsmlPowerMeasure.cs
│ │ │ ├── WitsmlLengthMeasure.cs
│ │ │ ├── WitsmlVolumeMeasure.cs
│ │ │ ├── WitsmlFlowRateMeasure.cs
│ │ │ ├── WitsmlPerLengthMeasure.cs
│ │ │ ├── WitsmlPlaneAngleMeasure.cs
│ │ │ ├── WitsmlPressureMeasure.cs
│ │ │ ├── WitsmlVelocityMeasure.cs
│ │ │ ├── WitsmlAnglePerTimeMeasure.cs
│ │ │ ├── WitsmlAnglePerLengthMeasure.cs
│ │ │ ├── WitsmlMassPerLengthMeasure.cs
│ │ │ ├── WitsmlMomentOfForceMeasure.cs
│ │ │ ├── WitsmlRelativePowerMeasure.cs
│ │ │ ├── WitsmlLinearAccelerationMeasure.cs
│ │ │ ├── WitsmlMagneticFluxDensityMeasure.cs
│ │ │ ├── WitsmlMeasuredDepthCoord.cs
│ │ │ ├── WitsmlWellVerticalDepthCoord.cs
│ │ │ ├── WitsmlThermodynamicTemperatureMeasure.cs
│ │ │ ├── Measure.cs
│ │ │ └── WitsmlMeasureWithDatum.cs
│ │ ├── IWitsmlQueryType.cs
│ │ ├── WitsmlCost.cs
│ │ ├── IWitsmlObjectList.cs
│ │ ├── WitsmlIndexCurve.cs
│ │ ├── WitsmlParentWellbore.cs
│ │ ├── WitsmlRefNameString.cs
│ │ ├── WitsmlChronostratigraphyStruct.cs
│ │ ├── WitsmlLithostratigraphyStruct.cs
│ │ ├── WitsmlExtensionValue.cs
│ │ ├── WitsmlCommonTime.cs
│ │ ├── WitsmlRefWellboreTrajectory.cs
│ │ ├── Curves
│ │ │ ├── CurveValue.cs
│ │ │ ├── StringValue.cs
│ │ │ ├── Row.cs
│ │ │ ├── DepthUnit.cs
│ │ │ └── DoubleValue.cs
│ │ ├── WitsmlStnTrajValid.cs
│ │ ├── WitsmlRefWellboreTrajectoryStation.cs
│ │ ├── WitsmlLogData.cs
│ │ ├── WitsmlWells.cs
│ │ ├── WitsmlData.cs
│ │ ├── Tubular
│ │ │ ├── WitsmlBend.cs
│ │ │ ├── WitsmlSensor.cs
│ │ │ ├── WitsmlTubulars.cs
│ │ │ └── WitsmlMwdTool.cs
│ │ ├── WitsmlWellbores.cs
│ │ ├── DataWorkOrder
│ │ │ └── WitsmlDataSourceConfigurationSet.cs
│ │ ├── WitsmlChangeLogs.cs
│ │ ├── WitsmlIndexedObject.cs
│ │ ├── WitsmlTrajRawData.cs
│ │ ├── WitsmlObjectReference.cs
│ │ ├── WitsmlObjectOnWellbore.cs
│ │ ├── Rig
│ │ │ └── WitsmlRigs.cs
│ │ ├── WitsmlRisks.cs
│ │ ├── WitsmlLogs.cs
│ │ ├── WitsmlBhaRuns.cs
│ │ ├── WitsmlMessages.cs
│ │ ├── WitsmlReferencePoint.cs
│ │ ├── WitsmlAttachments.cs
│ │ ├── WitsmlIndex.cs
│ │ ├── MudLog
│ │ │ ├── WitsmlMudLogs.cs
│ │ │ └── WitsmlMudGas.cs
│ │ ├── WitsmlFluidsReports.cs
│ │ ├── WitsmlWbGeometrys.cs
│ │ ├── WitsmlTrajectories.cs
│ │ └── WitsmlAxisDefinition.cs
│ ├── Metrics
│ │ ├── WitsmlMethod.cs
│ │ └── WitsmlMetricsExtensions.cs
│ ├── QueryResult.cs
│ ├── WitsmlRemoteServerRequestCrashedException.cs
│ ├── ServiceReference
│ │ └── dotnet-svcutil.params.json
│ └── Extensions
│ │ ├── ListExtensions.cs
│ │ ├── DateTimeExtensions.cs
│ │ ├── StringExtensions.cs
│ │ ├── ObjectExtensions.cs
│ │ └── UriExtensions.cs
├── WitsmlExplorer.Desktop
│ ├── resources
│ │ └── logo.png
│ ├── .gitignore
│ └── electron-builder.json
└── WitsmlExplorer.Api
│ ├── Properties
│ ├── AssemblyInfo.cs
│ └── launchSettings.json
│ ├── Pages
│ ├── _ViewImports.cshtml
│ └── Error.cshtml.cs
│ ├── Models
│ ├── Measure
│ │ ├── Measure.cs
│ │ ├── DayMeasure.cs
│ │ └── WellMeasure.cs
│ ├── MissingDataCheck.cs
│ ├── AxisDefinition.cs
│ ├── MultiLogCurveInfo.cs
│ ├── SelectableObjectOnWellbore.cs
│ ├── Reports
│ │ ├── DownloadLogDataReport.cs
│ │ ├── BatchModifyReport.cs
│ │ ├── CheckLogHeaderReport.cs
│ │ ├── BatchModifyLogCurveInfoReport.cs
│ │ ├── MissingDataReport.cs
│ │ ├── DeleteEmptyMnemonicsReport.cs
│ │ ├── CountLogDataReport.cs
│ │ └── BaseReport.cs
│ ├── BaseObjectOnWellbore.cs
│ ├── WitsmlQuery.cs
│ ├── LogTraceState.cs
│ ├── LogCurveIndex.cs
│ ├── ObjectSearchResult.cs
│ ├── ConnectionInformation.cs
│ ├── ObjectOnWellbore.cs
│ ├── LogCurvePriority.cs
│ ├── UidMappingCollection.cs
│ ├── CommonTime.cs
│ ├── TrajRawData.cs
│ ├── Tubular.cs
│ ├── TubularComponent.cs
│ ├── Connection.cs
│ └── MnemonicsMapping.cs
│ ├── Configuration
│ ├── ICredentials.cs
│ └── ConfigConstants.cs
│ ├── Jobs
│ ├── Common
│ │ ├── IReference.cs
│ │ ├── Interfaces
│ │ │ └── IObjectReference.cs
│ │ ├── WellReference.cs
│ │ └── MixedObjectsReferences.cs
│ ├── DeleteJobs.cs
│ ├── ModifyWellJob.cs
│ ├── CreateWellJob.cs
│ ├── ModifyWellboreJob.cs
│ ├── CheckLogHeaderJob.cs
│ ├── CreateWellboreJob.cs
│ ├── IDeleteJob.cs
│ └── ReplaceObjectsJob.cs
│ ├── Extensions
│ ├── StringExtensions.cs
│ └── StreamExtensions.cs
│ ├── appsettings.json
│ ├── Middleware
│ ├── DataException.cs
│ ├── WitsmlResultParsingException.cs
│ ├── ErrorDetails.cs
│ └── WitsmlUnsupportedCapabilityException.cs
│ ├── Workers
│ ├── IWorker.cs
│ └── RequestUtils.cs
│ ├── HttpHandlers
│ ├── CapHandler.cs
│ ├── RiskHandler.cs
│ ├── ChangeLogHandler.cs
│ └── WellHandler.cs
│ ├── Services
│ ├── NotificationsHub.cs
│ ├── WitsmlService.cs
│ └── CapService.cs
│ └── appsettings.Development.json
├── Tests
├── WitsmlExplorer.IntegrationTests
│ └── .gitignore
├── .editorconfig
└── WitsmlExplorer.Api.Tests
│ ├── Workers
│ └── CopyTestsUtils.cs
│ └── WitsmlExplorer.Api.Tests.csproj
├── .prettierrc.json
├── .dockerignore
├── .config
└── dotnet-tools.json
├── Nuget.Config
├── Docs
└── nuget_witsml.md
├── .prettierignore
├── PR_REVIEW_CHECKLIST.md
├── .github
└── ISSUE_TEMPLATE
│ ├── userstory.md
│ ├── documentation----.md
│ ├── enhancement.md
│ ├── feature-request---.md
│ └── generic-issue---.md
└── SECURITY.md
/.husky/.gitignore:
--------------------------------------------------------------------------------
1 | _
2 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | package-lock=false
2 |
--------------------------------------------------------------------------------
/Docker/MongoDb/.gitignore:
--------------------------------------------------------------------------------
1 | data
2 |
--------------------------------------------------------------------------------
/Scripts/Azure/.gitignore:
--------------------------------------------------------------------------------
1 | config.cfg
2 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "esversion": 6
3 | }
4 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Console/.gitignore:
--------------------------------------------------------------------------------
1 | appsettings.witsml.json
2 | CustomQueries/**
3 |
--------------------------------------------------------------------------------
/Tests/WitsmlExplorer.IntegrationTests/.gitignore:
--------------------------------------------------------------------------------
1 | secrets.json
2 | Properties\launchSettings.json
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/StyledComponents/Chip/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./Chip.tsx";
2 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/Sidebar/WellItem/index.ts:
--------------------------------------------------------------------------------
1 | export { default } from "./WellItem";
2 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Console/uninstall.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | dotnet tool uninstall witsml-cli --global
4 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/ContentViews/QueryView/index.ts:
--------------------------------------------------------------------------------
1 | export { default } from "./QueryView.tsx";
2 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/Sidebar/SearchFilter/index.ts:
--------------------------------------------------------------------------------
1 | export { default } from "./SearchFilter.tsx";
2 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/levelIntegerCode.ts:
--------------------------------------------------------------------------------
1 | export const levelIntegerCode = ["1", "2", "3", "4", "5"];
2 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/StyledComponents/StyledMenu/index.ts:
--------------------------------------------------------------------------------
1 | export { default } from "./StyledMenu.tsx";
2 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/contexts/CompactEdsProvider/index.ts:
--------------------------------------------------------------------------------
1 | export { default } from "./CompactEdsProvider.tsx";
2 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/Sidebar/SearchFilter/FilterIcon/index.ts:
--------------------------------------------------------------------------------
1 | export { default } from "./FilterIcon.tsx";
2 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/bhaStatusTypes.ts:
--------------------------------------------------------------------------------
1 | export const bhaStatusTypes = ["final", "progress", "plan", "unknown"];
2 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/indexCurve.ts:
--------------------------------------------------------------------------------
1 | export enum IndexCurve {
2 | Depth = "Depth",
3 | Time = "Time"
4 | }
5 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/Sidebar/SearchFilter/EndAdornment/index.ts:
--------------------------------------------------------------------------------
1 | export { default } from "./EndAdornment.tsx";
2 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/Sidebar/SidebarVirtualItem/index.ts:
--------------------------------------------------------------------------------
1 | export { default } from "./SidebarVirtualItem.tsx";
2 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/StyledComponents/StyledAccordion/index.ts:
--------------------------------------------------------------------------------
1 | export { default } from "./StyledAccordion.tsx";
2 |
--------------------------------------------------------------------------------
/.husky/pre-commit:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # .husky pre-commit ^5.0.0
3 | . "$(dirname "$0")/_/husky.sh"
4 |
5 | yarn lint-staged --relative
6 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/ContentViews/QueryView/components/ResultMeta/index.ts:
--------------------------------------------------------------------------------
1 | export { default } from "./ResultMeta";
2 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/Sidebar/SearchFilter/StartAdornment/index.ts:
--------------------------------------------------------------------------------
1 | export { default } from "./StartAdornment.tsx";
2 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/errorDetails.ts:
--------------------------------------------------------------------------------
1 | export interface ErrorDetails {
2 | code: number;
3 | message: string;
4 | }
5 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/lithologySources.ts:
--------------------------------------------------------------------------------
1 | export const lithologySources = ["interpreted", "core", "cuttings", "unknown"];
2 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/ContentViews/QueryView/components/QueryOptions/index.ts:
--------------------------------------------------------------------------------
1 | export { default } from "./QueryOptions";
2 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/Sidebar/InactiveWellsHiddenFilterHelper/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./InactiveWellsHiddenFilterHelper";
2 |
--------------------------------------------------------------------------------
/Scripts/Azure/run-azure-scripts.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | echo "Running Azure scripts."
4 | . ./create-cosmos-db.sh
5 |
6 | echo "Done."
7 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Measures/WitsmlTimeMeasure.cs:
--------------------------------------------------------------------------------
1 | namespace Witsml.Data.Measures;
2 |
3 | public class WitsmlTimeMeasure : Measure
4 | {
5 |
6 | }
7 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Console/install.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | dotnet pack
4 | dotnet tool install --global --add-source ./nupkg witsml-cli
5 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/refNameString.tsx:
--------------------------------------------------------------------------------
1 | export default interface RefNameString {
2 | uidRef: string;
3 | value: string;
4 | }
5 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/unitType.ts:
--------------------------------------------------------------------------------
1 | export const unitType = ["m", "ft", "cm", "in"].sort((a, b) =>
2 | a.localeCompare(b)
3 | );
4 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Desktop/resources/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/equinor/witsml-explorer/HEAD/Src/WitsmlExplorer.Desktop/resources/logo.png
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/assets/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/equinor/witsml-explorer/HEAD/Src/WitsmlExplorer.Frontend/assets/favicon.ico
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/Modals/ConfigurationChangeReasonModal/index.ts:
--------------------------------------------------------------------------------
1 | export { default } from "./ConfigurationChangeReasonModal.tsx";
2 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/dataWorkOrder/channelCriticality.ts:
--------------------------------------------------------------------------------
1 | export enum ChannelCriticality {
2 | Normal = "normal",
3 | High = "high"
4 | }
5 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/jobs/wellReference.ts:
--------------------------------------------------------------------------------
1 | export default interface WellReference {
2 | wellUid: string;
3 | wellName: string;
4 | }
5 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/stratigraphicStruct.ts:
--------------------------------------------------------------------------------
1 | export default interface StratigraphicStruct {
2 | kind: string;
3 | value: string;
4 | }
5 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Measures/WitsmlAreaMeasure.cs:
--------------------------------------------------------------------------------
1 | namespace Witsml.Data.Measures
2 | {
3 | public class WitsmlAreaMeasure : Measure
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Measures/WitsmlDayMeasure.cs:
--------------------------------------------------------------------------------
1 | namespace Witsml.Data.Measures
2 | {
3 | public class WitsmlDayMeasure : Measure
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Measures/WitsmlForceMeasure.cs:
--------------------------------------------------------------------------------
1 | namespace Witsml.Data.Measures
2 | {
3 | public class WitsmlForceMeasure : Measure
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Measures/WitsmlPowerMeasure.cs:
--------------------------------------------------------------------------------
1 | namespace Witsml.Data.Measures
2 | {
3 | public class WitsmlPowerMeasure : Measure
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/ContentViews/QueryView/components/QueryOptions/DataGridSwitch/index.ts:
--------------------------------------------------------------------------------
1 | export { default } from "./DataGridSwitch.tsx";
2 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/ContentViews/QueryView/components/QueryOptions/TemplatePicker/index.ts:
--------------------------------------------------------------------------------
1 | export { default } from "./TemplatePicker.tsx";
2 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Measures/WitsmlLengthMeasure.cs:
--------------------------------------------------------------------------------
1 | namespace Witsml.Data.Measures
2 | {
3 | public class WitsmlLengthMeasure : Measure
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Measures/WitsmlVolumeMeasure.cs:
--------------------------------------------------------------------------------
1 | namespace Witsml.Data.Measures
2 | {
3 | public class WitsmlVolumeMeasure : Measure
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.CompilerServices;
2 |
3 | [assembly: InternalsVisibleTo("WitsmlExplorer.IntegrationTests")]
4 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Measures/WitsmlFlowRateMeasure.cs:
--------------------------------------------------------------------------------
1 | namespace Witsml.Data.Measures
2 | {
3 | public class WitsmlFlowRateMeasure : Measure
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Measures/WitsmlPerLengthMeasure.cs:
--------------------------------------------------------------------------------
1 | namespace Witsml.Data.Measures
2 | {
3 | public class WitsmlPerLengthMeasure : Measure
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Measures/WitsmlPlaneAngleMeasure.cs:
--------------------------------------------------------------------------------
1 | namespace Witsml.Data.Measures
2 | {
3 | public class WitsmlPlaneAngleMeasure : Measure
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Measures/WitsmlPressureMeasure.cs:
--------------------------------------------------------------------------------
1 | namespace Witsml.Data.Measures
2 | {
3 | public class WitsmlPressureMeasure : Measure
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Measures/WitsmlVelocityMeasure.cs:
--------------------------------------------------------------------------------
1 | namespace Witsml.Data.Measures
2 | {
3 | public class WitsmlVelocityMeasure : Measure
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/App.tsx:
--------------------------------------------------------------------------------
1 | import Router from "routes/Router";
2 | import "styles/global.css";
3 |
4 | export function App() {
5 | return ;
6 | }
7 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/itemStateTypes.ts:
--------------------------------------------------------------------------------
1 | export const itemStateTypes = ["actual", "model", "plan", "unknown"].sort(
2 | (a, b) => a.localeCompare(b)
3 | );
4 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Measures/WitsmlAnglePerTimeMeasure.cs:
--------------------------------------------------------------------------------
1 | namespace Witsml.Data.Measures
2 | {
3 | public class WitsmlAnglePerTimeMeasure : Measure
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Pages/_ViewImports.cshtml:
--------------------------------------------------------------------------------
1 | @using WitsmlExplorer.Api
2 | @namespace WitsmlExplorer.Api.Pages
3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
4 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/assets/fonts/Equinor-Bold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/equinor/witsml-explorer/HEAD/Src/WitsmlExplorer.Frontend/assets/fonts/Equinor-Bold.woff2
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/hooks/query/queryOptions.tsx:
--------------------------------------------------------------------------------
1 | export interface QueryOptions {
2 | enabled?: boolean;
3 | placeholderData?: any;
4 | staleTime?: number;
5 | }
6 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/messageTypes.ts:
--------------------------------------------------------------------------------
1 | export const messageTypes = [
2 | "alarm",
3 | "event",
4 | "informational",
5 | "warning",
6 | "unknown"
7 | ];
8 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/reportType.ts:
--------------------------------------------------------------------------------
1 | enum ReportType {
2 | Report = "Report",
3 | File = "File",
4 | None = "None"
5 | }
6 |
7 | export default ReportType;
8 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Measures/WitsmlAnglePerLengthMeasure.cs:
--------------------------------------------------------------------------------
1 | namespace Witsml.Data.Measures
2 | {
3 | public class WitsmlAnglePerLengthMeasure : Measure
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Measures/WitsmlMassPerLengthMeasure.cs:
--------------------------------------------------------------------------------
1 | namespace Witsml.Data.Measures
2 | {
3 | public class WitsmlMassPerLengthMeasure : Measure
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Measures/WitsmlMomentOfForceMeasure.cs:
--------------------------------------------------------------------------------
1 | namespace Witsml.Data.Measures
2 | {
3 | public class WitsmlMomentOfForceMeasure : Measure
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Measures/WitsmlRelativePowerMeasure.cs:
--------------------------------------------------------------------------------
1 | namespace Witsml.Data.Measures
2 | {
3 | public class WitsmlRelativePowerMeasure : Measure
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/assets/fonts/Equinor-Medium.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/equinor/witsml-explorer/HEAD/Src/WitsmlExplorer.Frontend/assets/fonts/Equinor-Medium.woff2
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/assets/fonts/Equinor-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/equinor/witsml-explorer/HEAD/Src/WitsmlExplorer.Frontend/assets/fonts/Equinor-Regular.woff2
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/lithology.tsx:
--------------------------------------------------------------------------------
1 | export default interface Lithology {
2 | uid: string;
3 | type: string;
4 | codeLith: string;
5 | lithPc: string;
6 | }
7 |
--------------------------------------------------------------------------------
/.prettierrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "trailingComma": "none",
3 | "tabWidth": 2,
4 | "semi": true,
5 | "singleQuote": false,
6 | "quoteProps": "consistent",
7 | "endOfLine": "lf"
8 | }
9 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Measures/WitsmlLinearAccelerationMeasure.cs:
--------------------------------------------------------------------------------
1 | namespace Witsml.Data.Measures
2 | {
3 | public class WitsmlLinearAccelerationMeasure : Measure
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Measures/WitsmlMagneticFluxDensityMeasure.cs:
--------------------------------------------------------------------------------
1 | namespace Witsml.Data.Measures
2 | {
3 | public class WitsmlMagneticFluxDensityMeasure : Measure
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Measures/WitsmlMeasuredDepthCoord.cs:
--------------------------------------------------------------------------------
1 | namespace Witsml.Data.Measures
2 | {
3 | public class WitsmlMeasuredDepthCoord : WitsmlMeasureWithDatum
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/ContentViews/table/index.ts:
--------------------------------------------------------------------------------
1 | export * from "components/ContentViews/table/ContentTable";
2 | export * from "components/ContentViews/table/tableParts";
3 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/AxisDefinition.ts:
--------------------------------------------------------------------------------
1 | export default interface AxisDefinition {
2 | uid: string;
3 | order: number;
4 | count: number;
5 | doubleValues: string;
6 | }
7 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/dataWorkOrder/operationStatus.ts:
--------------------------------------------------------------------------------
1 | export enum OperationStatus {
2 | Inactive = "Inactive",
3 | Active = "Active",
4 | Completed = "Completed"
5 | }
6 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/measureWithDatum.ts:
--------------------------------------------------------------------------------
1 | import Measure from "models/measure";
2 |
3 | export default interface MeasureWithDatum extends Measure {
4 | datum: string;
5 | }
6 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/templates/well_id-only.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Measures/WitsmlWellVerticalDepthCoord.cs:
--------------------------------------------------------------------------------
1 | namespace Witsml.Data.Measures
2 | {
3 | public class WitsmlWellVerticalDepthCoord : WitsmlMeasureWithDatum
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/Modals/ConfigurationChangeReasonModal/AffectedGroup/index.ts:
--------------------------------------------------------------------------------
1 | export { default } from "./AffectedGroup.tsx";
2 | export { ListLabel } from "./style.ts";
3 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/StyledComponents/Tooltip.tsx:
--------------------------------------------------------------------------------
1 | import styled from "styled-components";
2 |
3 | export const TooltipLayout = styled.div`
4 | white-space: pre-line;
5 | `;
6 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/jobs/checkLogHeaderJob.tsx:
--------------------------------------------------------------------------------
1 | import LogObject from "models/logObject";
2 |
3 | export default interface CheckLogHeaderJob {
4 | logReference: LogObject;
5 | }
6 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Measures/WitsmlThermodynamicTemperatureMeasure.cs:
--------------------------------------------------------------------------------
1 | namespace Witsml.Data.Measures
2 | {
3 | public class WitsmlThermodynamicTemperatureMeasure : Measure
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Models/Measure/Measure.cs:
--------------------------------------------------------------------------------
1 | namespace WitsmlExplorer.Api.Models.Measure
2 | {
3 | public class Measure
4 | {
5 | public string Uom { get; init; }
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/Sidebar/EmptyTreeItem.tsx:
--------------------------------------------------------------------------------
1 | // EmptyTreeItem is used to trigger the appearance of the expand icon.
2 | export function EmptyTreeItem() {
3 | return <>>;
4 | }
5 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/jobs/mnemonicsMappingJob.tsx:
--------------------------------------------------------------------------------
1 | export default interface MnemonicsMappingJob {
2 | vendorName: string;
3 | overwrite: boolean;
4 | mappings: string[][];
5 | }
6 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/referencePoint.tsx:
--------------------------------------------------------------------------------
1 | import Location from "./location.tsx";
2 |
3 | export default interface ReferencePoint {
4 | name: string;
5 | location: Location[];
6 | }
7 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/trajRawData.tsx:
--------------------------------------------------------------------------------
1 | import Measure from "models/measure";
2 |
3 | export default interface TrajRawData {
4 | magTran1Raw?: Measure;
5 | magTran2Raw?: Measure;
6 | }
7 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/tools/desktopAppHelpers.tsx:
--------------------------------------------------------------------------------
1 | export const isDesktopApp = () => {
2 | const userAgent = navigator.userAgent.toLowerCase();
3 | return userAgent.indexOf(" electron/") > -1;
4 | };
5 |
--------------------------------------------------------------------------------
/.dockerignore:
--------------------------------------------------------------------------------
1 | Dockerfile
2 |
3 | **/bin/
4 | **/obj/
5 | **/out/
6 | **/build/
7 |
8 | **/node_modules
9 |
10 | .DS_Store
11 |
12 | **/secrets.json
13 | **/config.json
14 | **/mysettings.*
15 | **/.env*
16 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/boxPinConfigTypes.ts:
--------------------------------------------------------------------------------
1 | export const boxPinConfigTypes = [
2 | "bottom box, top box",
3 | "bottom box, top pin",
4 | "bottom pin top box",
5 | "bottom pin",
6 | "unknown"
7 | ];
8 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/jobStatus.ts:
--------------------------------------------------------------------------------
1 | enum JobStatus {
2 | Started = "Started",
3 | Finished = "Finished",
4 | Failed = "Failed",
5 | Cancelled = "Cancelled"
6 | }
7 |
8 | export default JobStatus;
9 |
--------------------------------------------------------------------------------
/.config/dotnet-tools.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 1,
3 | "isRoot": true,
4 | "tools": {
5 | "dotnet-format": {
6 | "version": "5.1.250801",
7 | "commands": ["dotnet-format"]
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/logTraceState.ts:
--------------------------------------------------------------------------------
1 | export const logTraceState = [
2 | "depth adjusted",
3 | "edited",
4 | "joined",
5 | "processed",
6 | "raw",
7 | "unknown"
8 | ].sort((a, b) => a.localeCompare(b));
9 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/multilogCurveInfo.ts:
--------------------------------------------------------------------------------
1 | import LogCurveInfo from "./logCurveInfo";
2 |
3 | export default interface MultiLogCurveInfo extends LogCurveInfo {
4 | serverUrl?: string;
5 | logUid?: string;
6 | }
7 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/wellDatum.tsx:
--------------------------------------------------------------------------------
1 | import MeasureWithDatum from "./measureWithDatum.ts";
2 |
3 | export default interface WellDatum {
4 | name: string;
5 | code: string;
6 | elevation: MeasureWithDatum;
7 | }
8 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/StyledComponents/ErrorMessage.tsx:
--------------------------------------------------------------------------------
1 | import styled from "styled-components";
2 |
3 | export const ErrorMessage = styled.div`
4 | margin-top: 0.5em;
5 | color: red;
6 | line-break: auto;
7 | `;
8 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/dataWorkOrder/sectionOrderStatus.ts:
--------------------------------------------------------------------------------
1 | export enum SectionOrderStatus {
2 | NoOrderedCurves = "no ordered curves",
3 | Draft = "draft",
4 | Submitted = "submitted",
5 | Approved = "approved"
6 | }
7 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/templates/wellbore_id-only.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Src/Witsml/Metrics/WitsmlMethod.cs:
--------------------------------------------------------------------------------
1 | namespace Witsml.Metrics;
2 |
3 | public enum WitsmlMethod
4 | {
5 | GetFromStore,
6 | AddToStore,
7 | UpdateInStore,
8 | DeleteFromStore,
9 | GetCap,
10 | GetVersion
11 | }
12 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/StyledComponents/Layout.tsx:
--------------------------------------------------------------------------------
1 | import styled from "styled-components";
2 |
3 | export const Layout = styled.div`
4 | display: grid;
5 | grid-template-columns: repeat(1, auto);
6 | gap: 1rem;
7 | `;
8 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/stnTrajValid.tsx:
--------------------------------------------------------------------------------
1 | import Measure from "models/measure";
2 |
3 | export default interface StnTrajValid {
4 | magTotalFieldCalc?: Measure;
5 | magDipAngleCalc?: Measure;
6 | gravTotalFieldCalc?: Measure;
7 | }
8 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/StyledComponents/ModalContentLayout.tsx:
--------------------------------------------------------------------------------
1 | import styled from "styled-components";
2 |
3 | export const ModalContentLayout = styled.div`
4 | display: flex;
5 | flex-direction: column;
6 | gap: 0.8rem;
7 | `;
8 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/riskType.ts:
--------------------------------------------------------------------------------
1 | export const riskType = [
2 | "risk",
3 | "event",
4 | "near miss",
5 | "best practice",
6 | "other",
7 | "unknown",
8 | "lessons learned"
9 | ].sort((a, b) => a.localeCompare(b));
10 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/wellborePurposeValues.ts:
--------------------------------------------------------------------------------
1 | export const wellborePurposeValues = [
2 | "appraisal",
3 | "development",
4 | "exploration",
5 | "fluid storage",
6 | "general srvc",
7 | "mineral",
8 | "unknown"
9 | ];
10 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/IWitsmlQueryType.cs:
--------------------------------------------------------------------------------
1 | namespace Witsml.Data
2 | {
3 | public interface IWitsmlQueryType
4 | {
5 | string TypeName { get; }
6 | }
7 |
8 | public interface IWitsmlGrowingDataQueryType : IWitsmlQueryType { }
9 | }
10 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/jobs/spliceLogsJob.tsx:
--------------------------------------------------------------------------------
1 | import ObjectReferences from "models/jobs/objectReferences";
2 |
3 | export default interface SpliceLogsJob {
4 | logs: ObjectReferences;
5 | newLogName: string;
6 | newLogUid: string;
7 | }
8 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Console/CustomQueries/GetAllWellbores.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/rigType.ts:
--------------------------------------------------------------------------------
1 | export const rigType = [
2 | "barge",
3 | "coiled tubing",
4 | "floater",
5 | "jackup",
6 | "land",
7 | "platform",
8 | "semi-submersible",
9 | "unknown"
10 | ].sort((a, b) => a.localeCompare(b));
11 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/templates/object_id-only.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/holeCasingTypes.ts:
--------------------------------------------------------------------------------
1 | export const holeCasingTypes = [
2 | "blow out preventer",
3 | "casing",
4 | "conductor",
5 | "curved conductor",
6 | "liner",
7 | "open hole",
8 | "riser",
9 | "tubing",
10 | "unknown"
11 | ];
12 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/templates/changeLog_id-only.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/jobs/objectReference.ts:
--------------------------------------------------------------------------------
1 | export default interface ObjectReference {
2 | serverUrl?: string;
3 | wellUid: string;
4 | wellboreUid: string;
5 | uid: string;
6 | wellName: string;
7 | wellboreName: string;
8 | name: string;
9 | }
10 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/templates/dataGrid/DataGridProperty.ts:
--------------------------------------------------------------------------------
1 | export interface DataGridProperty {
2 | name: string;
3 | documentation: string;
4 | isAttribute?: boolean;
5 | isContainer?: boolean;
6 | isMultiple?: boolean;
7 | properties?: DataGridProperty[];
8 | }
9 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/jobs/importLogDataJob.ts:
--------------------------------------------------------------------------------
1 | import ObjectReference from "models/jobs/objectReference";
2 |
3 | export default interface ImportLogDataJob {
4 | targetLog: ObjectReference;
5 | mnemonics: string[];
6 | units: string[];
7 | dataRows: string[][];
8 | }
9 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/tubular.tsx:
--------------------------------------------------------------------------------
1 | import CommonData from "models/commonData";
2 | import ObjectOnWellbore from "models/objectOnWellbore";
3 |
4 | export default interface Tubular extends ObjectOnWellbore {
5 | typeTubularAssy: string;
6 | commonData: CommonData;
7 | }
8 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/jobs/replaceObjectsJob.ts:
--------------------------------------------------------------------------------
1 | import { CopyObjectsJob } from "models/jobs/copyJobs";
2 | import { DeleteObjectsJob } from "models/jobs/deleteJobs";
3 |
4 | export interface ReplaceObjectsJob {
5 | deleteJob: DeleteObjectsJob;
6 | copyJob: CopyObjectsJob;
7 | }
8 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/templates/log_data-only.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/main.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import ReactDOM from "react-dom/client";
3 | import { App } from "./App.tsx";
4 |
5 | ReactDOM.createRoot(document.getElementById("root")!).render(
6 |
7 |
8 |
9 | );
10 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Configuration/ICredentials.cs:
--------------------------------------------------------------------------------
1 | namespace WitsmlExplorer.Api.Configuration
2 | {
3 | public interface ICredentials
4 | {
5 | internal string UserId { get; }
6 | internal string Password { get; }
7 | public bool IsNullOrEmpty();
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Jobs/Common/IReference.cs:
--------------------------------------------------------------------------------
1 | namespace WitsmlExplorer.Api.Jobs.Common
2 | {
3 | public interface IReference
4 | {
5 | string Description();
6 | string GetWellName();
7 | string GetWellboreName();
8 | string GetObjectName();
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/ContentViews/DataWorkOrder/StatusChips/index.ts:
--------------------------------------------------------------------------------
1 | export { OperationStatusChip } from "./OperationStatusChip.tsx";
2 | export { ChannelCriticalityStatusChip } from "./ChannelCriticalityStatusChip.tsx";
3 | export { SectionOrderStatusChip } from "./SectionOrderStatusChip.tsx";
4 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/dataWorkOrder/assetContact.ts:
--------------------------------------------------------------------------------
1 | export default interface AssetContact {
2 | uid: string;
3 | companyName: string;
4 | name: string;
5 | role: string;
6 | emailAddress: string;
7 | phoneNum: string;
8 | availability: string;
9 | timeZone: string;
10 | }
11 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/jobs/modifyLogCurveInfoJob.ts:
--------------------------------------------------------------------------------
1 | import ObjectReference from "models/jobs/objectReference";
2 | import LogCurveInfo from "models/logCurveInfo";
3 |
4 | export default interface ModifyLogCurveInfoJob {
5 | logReference: ObjectReference;
6 | logCurveInfo: LogCurveInfo;
7 | }
8 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/jobs/replaceComponentsJob.ts:
--------------------------------------------------------------------------------
1 | import { CopyComponentsJob } from "models/jobs/copyJobs";
2 | import { DeleteComponentsJob } from "models/jobs/deleteJobs";
3 |
4 | export interface ReplaceComponentsJob {
5 | deleteJob: DeleteComponentsJob;
6 | copyJob: CopyComponentsJob;
7 | }
8 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/objectSearchResult.ts:
--------------------------------------------------------------------------------
1 | import ObjectOnWellbore from "models/objectOnWellbore";
2 | import { ObjectType } from "models/objectType";
3 |
4 | export default interface ObjectSearchResult extends ObjectOnWellbore {
5 | searchProperty?: string;
6 | objectType: ObjectType;
7 | }
8 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/jobs/compareLogData.tsx:
--------------------------------------------------------------------------------
1 | import ObjectReference from "models/jobs/objectReference";
2 |
3 | export default interface CompareLogDataJob {
4 | sourceLog: ObjectReference;
5 | targetLog: ObjectReference;
6 | includeIndexDuplicates: boolean;
7 | compareAllIndexes: boolean;
8 | }
9 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/materialTypes.ts:
--------------------------------------------------------------------------------
1 | export const materialTypes = [
2 | "aluminium",
3 | "beryllium copper",
4 | "chrome alloy",
5 | "composite",
6 | "other",
7 | "non-magnetic steel",
8 | "plastic",
9 | "steel",
10 | "steel alloy",
11 | "titanium",
12 | "unknown"
13 | ];
14 |
--------------------------------------------------------------------------------
/Nuget.Config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/dataWorkOrder/logIndexType.ts:
--------------------------------------------------------------------------------
1 | export enum LogIndexType {
2 | DateTime = "DateTime",
3 | ElapsedTime = "ElapsedTime",
4 | Length = "Length",
5 | MeasuredDepth = "MeasuredDepth",
6 | VerticalDepth = "VerticalDepth",
7 | Other = "Other",
8 | Unknown = "Unknown"
9 | }
10 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/templates/dataWorkOrder_id-only.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Models/MissingDataCheck.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace WitsmlExplorer.Api.Models
4 | {
5 | public class MissingDataCheck
6 | {
7 | public EntityType ObjectType { get; set; }
8 | public ICollection Properties { get; set; }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/WitsmlCost.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace Witsml.Data
4 | {
5 | public class WitsmlCost
6 | {
7 | [XmlAttribute("currency")]
8 | public string Currency { get; set; }
9 |
10 | [XmlText]
11 | public double Value { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Console/WitsmlClient/WitsmlConfiguration.cs:
--------------------------------------------------------------------------------
1 | namespace WitsmlExplorer.Console.WitsmlClient
2 | {
3 | public class WitsmlConfiguration
4 | {
5 | public string Host { get; set; }
6 | public string Username { get; set; }
7 | public string Password { get; set; }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/templates/dataGrid/objects/common/DataGridExtensionAny.ts:
--------------------------------------------------------------------------------
1 | import { DataGridProperty } from "templates/dataGrid/DataGridProperty";
2 |
3 | export const dataGridExtensionAny: DataGridProperty = {
4 | name: "extensionAny",
5 | documentation: "Extensions to the schema using an xsd:any construct."
6 | };
7 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/tsconfig.node.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "composite": true,
4 | "skipLibCheck": true,
5 | "module": "ESNext",
6 | "moduleResolution": "bundler",
7 | "allowSyntheticDefaultImports": true,
8 | "strict": false
9 | },
10 | "include": ["vite.config.ts"]
11 | }
12 |
--------------------------------------------------------------------------------
/Docs/nuget_witsml.md:
--------------------------------------------------------------------------------
1 | ## Access pre-built Witsml nuget package
2 |
3 | If you only need to include the [Witsml](https://github.com/equinor/witsml-explorer/tree/main/Src/Witsml) project (`witsml-explorer/Src/Witsml`),
4 | then you can simply add a pre-published nuget package for that library:
5 | `dotnet add PROJECT package WitsmlClient`
6 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/IWitsmlObjectList.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Xml.Serialization;
3 |
4 | namespace Witsml.Data
5 | {
6 | public interface IWitsmlObjectList : IWitsmlQueryType
7 | {
8 | [XmlIgnore]
9 | IEnumerable Objects { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Extensions/StringExtensions.cs:
--------------------------------------------------------------------------------
1 | namespace WitsmlExplorer.Api.Extensions
2 | {
3 | public static class StringExtensions
4 | {
5 | public static string CapitalizeFirstLetter(this string str)
6 | {
7 | return char.ToUpper(str[0]) + str[1..];
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/.env.development:
--------------------------------------------------------------------------------
1 | # To disable MSAL, leave VIITE_MSALENABLED empty
2 | # To override this file locally, create a ".env.development.local" duplicate
3 | VITE_MSALENABLED=
4 | VITE_AZURE_AD_TENANT_ID=
5 | VITE_AZURE_AD_CLIENT_ID=
6 | VITE_AZURE_AD_URL_WITSMLEXPLORER=http://localhost:3000/
7 | VITE_AZURE_AD_SCOPE_API=
8 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/WitsmlIndexCurve.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace Witsml.Data
4 | {
5 | public class WitsmlIndexCurve
6 | {
7 | [XmlAttribute("columnIndex")]
8 | public string ColumnIndex { get; set; }
9 |
10 | [XmlText]
11 | public string Value { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Src/Witsml/QueryResult.cs:
--------------------------------------------------------------------------------
1 | namespace Witsml;
2 |
3 | public class QueryResult
4 | {
5 | public bool IsSuccessful { get; }
6 | public string Reason { get; }
7 |
8 | public QueryResult(bool isSuccessful, string reason = null)
9 | {
10 | IsSuccessful = isSuccessful;
11 | Reason = reason;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Models/AxisDefinition.cs:
--------------------------------------------------------------------------------
1 | namespace WitsmlExplorer.Api.Models
2 | {
3 | public class AxisDefinition
4 | {
5 | public string Uid { get; set; }
6 | public int Order { get; set; }
7 | public int Count { get; set; }
8 | public string DoubleValues { get; set; }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/jobs/minimumDataQcJob.tsx:
--------------------------------------------------------------------------------
1 | import LogObject from "../logObject.tsx";
2 |
3 | export interface MinimumDataQcJob {
4 | logReference: LogObject;
5 | startIndex: string;
6 | endIndex: string;
7 | mnemonics: string[];
8 | density: number;
9 | depthGap?: number;
10 | timeGap?: number;
11 | }
12 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/tools/IndexHelpers.tsx:
--------------------------------------------------------------------------------
1 | export const indexToNumber = (index: string): number => {
2 | if (!index) return null;
3 | return Number(index.replace(/[^\d.-]/g, ""));
4 | };
5 |
6 | export const formatIndexValue = (value: string | number): string => {
7 | return typeof value === "number" ? String(value) : value;
8 | };
9 |
--------------------------------------------------------------------------------
/Tests/.editorconfig:
--------------------------------------------------------------------------------
1 | # .editorconfig file for tests that overrides the root one
2 |
3 | #### C# Coding Conventions ####
4 | [*.cs]
5 |
6 | # CA1707: Identifiers should not contain underscores
7 | dotnet_diagnostic.CA1707.severity = none
8 | # xUnit1004: Test methods should not be skipped
9 | dotnet_diagnostic.xUnit1004.severity = none
10 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/WitsmlParentWellbore.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace Witsml.Data
4 | {
5 | public class WitsmlParentWellbore
6 | {
7 | [XmlAttribute("uidRef")]
8 | public string UidRef { get; set; }
9 |
10 | [XmlText]
11 | public string Value { get; set; }
12 |
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/WitsmlRefNameString.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace Witsml.Data
4 | {
5 | public class WitsmlRefNameString
6 | {
7 |
8 | [XmlAttribute("uidRef")]
9 | public string UidRef { get; set; }
10 |
11 | [XmlText]
12 | public string Value { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/StyledComponents/StyledTab.tsx:
--------------------------------------------------------------------------------
1 | import { Tabs } from "@equinor/eds-core-react";
2 | import styled from "styled-components";
3 | import { Colors } from "styles/Colors";
4 |
5 | export const StyledTab = styled(Tabs.Tab)<{ colors: Colors }>`
6 | color: ${(props) => props.colors.infographic.primaryMossGreen};
7 | `;
8 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/jobs/downloadLogDataJob.tsx:
--------------------------------------------------------------------------------
1 | import LogObject from "models/logObject";
2 |
3 | export default interface DownloadLogDataJob {
4 | logReference: LogObject;
5 | mnemonics: string[];
6 | startIndexIsInclusive: boolean;
7 | exportToLas: boolean;
8 | startIndex?: string;
9 | endIndex?: string;
10 | }
11 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/templates/dataGrid/objects/common/properties/DataGridCostProperties.ts:
--------------------------------------------------------------------------------
1 | import { DataGridProperty } from "templates/dataGrid/DataGridProperty";
2 |
3 | export const dataGridCostProperties: DataGridProperty[] = [
4 | {
5 | name: "currency",
6 | documentation: "",
7 | isAttribute: true
8 | }
9 | ];
10 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Models/MultiLogCurveInfo.cs:
--------------------------------------------------------------------------------
1 | namespace WitsmlExplorer.Api.Models
2 | {
3 | public class MultiLogCurveInfo : LogCurveInfo
4 | {
5 | public MultiLogCurveInfo()
6 | {
7 |
8 | }
9 | public string LogUid { get; init; }
10 | public string ServerUrl { get; init; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/templates/dataGrid/objects/common/DataGridCustomData.ts:
--------------------------------------------------------------------------------
1 | import { DataGridProperty } from "templates/dataGrid/DataGridProperty";
2 |
3 | export const dataGridCustomData: DataGridProperty = {
4 | name: "customData",
5 | documentation:
6 | "A container element that can contain custom or user defined data elements."
7 | };
8 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/WitsmlChronostratigraphyStruct.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace Witsml.Data
4 | {
5 | public class WitsmlChronostratigraphyStruct
6 | {
7 | [XmlAttribute("kind")]
8 | public string Kind { get; set; }
9 |
10 | [XmlText]
11 | public string Value { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/WitsmlLithostratigraphyStruct.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace Witsml.Data
4 | {
5 | public class WitsmlLithostratigraphyStruct
6 | {
7 | [XmlAttribute("kind")]
8 | public string Kind { get; set; }
9 |
10 | [XmlText]
11 | public string Value { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/dataWorkOrder/configurationChangeReason.ts:
--------------------------------------------------------------------------------
1 | export default interface ConfigurationChangeReason {
2 | changedBy: string;
3 | dTimChanged: string;
4 | isChangedDataRequirements: boolean;
5 | comments: string;
6 | channelsAdded: string[];
7 | channelsModified: string[];
8 | channelsRemoved: string[];
9 | }
10 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/rheometer.ts:
--------------------------------------------------------------------------------
1 | import Measure from "models/measure";
2 |
3 | export default interface Rheometer {
4 | uid: string;
5 | tempRheom: Measure;
6 | presRheom: Measure;
7 | vis3Rpm: string;
8 | vis6Rpm: string;
9 | vis100Rpm: string;
10 | vis200Rpm: string;
11 | vis300Rpm: string;
12 | vis600Rpm: string;
13 | }
14 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/WitsmlExtensionValue.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace Witsml.Data
4 | {
5 | public class WitsmlExtensionValue
6 | {
7 | [XmlAttribute("uom")]
8 | public string Uom { get; set; } = string.Empty;
9 |
10 | [XmlText]
11 | public string Value { get; set; } = string.Empty;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | # Ignore artifacts:
2 | Tests
3 | Src/Witsml
4 | Src/WitsmlExplorer.Api
5 | Src/WitsmlExplorer.Console
6 | Src/WitsmlExplorer.Frontend/build
7 | Src/WitsmlExplorer.Frontend/obj
8 | Src/WitsmlExplorer.Frontend/bin
9 | Src/WitsmlExplorer.Frontend/dist
10 |
11 | .vscode/*
12 |
13 | *.md
14 | *.yml
15 | .prettierignore
16 | .github
17 | eslint.config.js
18 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Models/SelectableObjectOnWellbore.cs:
--------------------------------------------------------------------------------
1 | namespace WitsmlExplorer.Api.Models
2 | {
3 | public class SelectableObjectOnWellbore
4 | {
5 | public string ObjectType { get; init; }
6 | public string LogType { get; init; }
7 | public string Uid { get; init; }
8 | public string Name { get; init; }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/AgentSettings.tsx:
--------------------------------------------------------------------------------
1 | export interface AgentSettings {
2 | minimumDataQcTimeoutDefault: number;
3 | minimumDataQcDepthGapDefault: number;
4 | minimumDataQcDepthDensityDefault: number;
5 | minimumDataQcTimeGapDefault: number;
6 | minimumDataQcTimeDensityDefault: number;
7 | username?: string;
8 | timestamp?: string;
9 | }
10 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/riskCategory.ts:
--------------------------------------------------------------------------------
1 | export const riskCategory = [
2 | "hydraulics",
3 | "mechanical",
4 | "time related",
5 | "wellbore stability",
6 | "directional drilling",
7 | "bit",
8 | "equipment failure",
9 | "completion",
10 | "casing",
11 | "HSE",
12 | "other",
13 | "unknown"
14 | ].sort((a, b) => a.localeCompare(b));
15 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/vitest.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig, mergeConfig } from "vitest/config";
2 | import viteConfig from "./vite.config";
3 |
4 | export default mergeConfig(
5 | viteConfig,
6 | defineConfig({
7 | test: {
8 | globals: true,
9 | environment: "jsdom",
10 | setupFiles: ["./setupTests.ts"]
11 | }
12 | })
13 | );
14 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/jobs/offsetLogCurveJob.tsx:
--------------------------------------------------------------------------------
1 | import ComponentReferences from "models/jobs/componentReferences";
2 |
3 | export interface OffsetLogCurveJob {
4 | logCurveInfoReferences: ComponentReferences;
5 | timeOffsetMilliseconds: number;
6 | depthOffset: number;
7 | startIndex: string;
8 | endIndex: string;
9 | useBackup: boolean;
10 | }
11 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "LogQueries": false,
3 | "AllowedHosts": "*",
4 | "AllowedOrigin": "http://localhost:3000",
5 | "Witsml": {
6 | "ClientCapabilities": {
7 | "Name": "Witsml Explorer",
8 | "Description": "Browser interface for Witsml servers"
9 | }
10 | },
11 | "OAuth2Enabled": false,
12 | "enableHttp": false
13 | }
14 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/jobs/deleteLogCurveValuesJob.tsx:
--------------------------------------------------------------------------------
1 | import ObjectReference from "models/jobs/objectReference";
2 |
3 | export interface IndexRange {
4 | startIndex: string;
5 | endIndex: string;
6 | }
7 |
8 | export interface DeleteLogCurveValuesJob {
9 | logReference: ObjectReference;
10 | mnemonics: string[];
11 | indexRanges: IndexRange[];
12 | }
13 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/jobs/objectReferences.ts:
--------------------------------------------------------------------------------
1 | import { ObjectType } from "models/objectType";
2 |
3 | export default interface ObjectReferences {
4 | serverUrl?: string;
5 | objectUids: string[];
6 | wellUid: string;
7 | wellboreUid: string;
8 | objectType: ObjectType;
9 | wellName: string;
10 | wellboreName: string;
11 | names: string[];
12 | }
13 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/templates/dataGrid/objects/common/properties/DataGridUomProperties.ts:
--------------------------------------------------------------------------------
1 | import { DataGridProperty } from "templates/dataGrid/DataGridProperty";
2 |
3 | export const dataGridUomProperties: DataGridProperty[] = [
4 | {
5 | name: "uom",
6 | documentation: "The unit of measure of the quantity value.",
7 | isAttribute: true
8 | }
9 | ];
10 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Models/Reports/DownloadLogDataReport.cs:
--------------------------------------------------------------------------------
1 | namespace WitsmlExplorer.Api.Models.Reports;
2 |
3 | ///
4 | /// The report contains log rows.
5 | ///
6 | public class DownloadLogDataReport : BaseReport
7 | {
8 | ///
9 | /// Log object data.
10 | ///
11 | public LogObject LogReference { get; init; }
12 | }
13 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Desktop/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # production
9 | /build
10 | /out
11 |
12 | # misc
13 | .DS_Store
14 | .env*.local
15 |
16 | # debug
17 | npm-debug.log*
18 | yarn-debug.log*
19 | yarn-error.log*
20 |
21 | .ignore*
22 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/StyledComponents/Container.tsx:
--------------------------------------------------------------------------------
1 | import styled from "styled-components";
2 |
3 | export const ContentContainer = styled.div`
4 | display: flex;
5 | flex-direction: column;
6 | height: 100%;
7 | `;
8 |
9 | export const CommonPanelContainer = styled.div`
10 | display: flex;
11 | flex-direction: row;
12 | align-items: center;
13 | `;
14 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/ContentView.tsx:
--------------------------------------------------------------------------------
1 | import { Outlet } from "react-router-dom";
2 | import styled from "styled-components";
3 |
4 | export default function ContentView() {
5 | return (
6 |
7 |
8 |
9 | );
10 | }
11 |
12 | const ContentPanel = styled.div`
13 | position: relative;
14 | height: 100%;
15 | `;
16 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Console/Extensions/StringExtensions.cs:
--------------------------------------------------------------------------------
1 | using Spectre.Console;
2 |
3 | namespace WitsmlExplorer.Console.Extensions
4 | {
5 | public static class StringExtensions
6 | {
7 | public static string WithColor(this string text, Color color) => $"[{color}]{text}[/]";
8 | public static string Bold(this string text) => $"[bold]{text}[/]";
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/jobs/batchModifyLogCurveInfoJob.ts:
--------------------------------------------------------------------------------
1 | import LogCurveInfo, { LogCurveInfoBatchItem } from "models/logCurveInfo";
2 | import WellboreReference from "./wellboreReference";
3 | export default interface BatchModifyLogCurveInfoJob {
4 | wellboreReference: WellboreReference;
5 | editedLogCurveInfo: LogCurveInfo;
6 | logCurveInfoBatchItems: LogCurveInfoBatchItem[];
7 | }
8 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/logData.ts:
--------------------------------------------------------------------------------
1 | export interface LogData {
2 | startIndex: string;
3 | endIndex: string;
4 | curveSpecifications: CurveSpecification[];
5 | data: LogDataRow[];
6 | }
7 |
8 | export interface CurveSpecification {
9 | mnemonic: string;
10 | unit: string;
11 | }
12 |
13 | export interface LogDataRow {
14 | [key: string]: number | string | boolean;
15 | }
16 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/WitsmlCommonTime.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace Witsml.Data
4 | {
5 | [XmlRoot]
6 | public class WitsmlCommonTime
7 | {
8 | [XmlElement("dTimCreation")]
9 | public string DTimCreation { get; set; } = null;
10 |
11 | [XmlElement("dTimLastChange")]
12 | public string DTimLastChange { get; set; } = null;
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/contexts/operationType.ts:
--------------------------------------------------------------------------------
1 | enum OperationType {
2 | DisplayContextMenu,
3 | HideContextMenu,
4 | DisplayModal,
5 | HideModal,
6 | SetCheckedContentItems,
7 | AddToClipboard,
8 | ClearClipboard,
9 | SetTheme,
10 | SetTimeZone,
11 | SetMode,
12 | SetDateTimeFormat,
13 | SetDecimal,
14 | SetHotKeysEnabled
15 | }
16 |
17 | export default OperationType;
18 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/templates/dataGrid/objects/common/properties/DataGridChronostratigraphyStructProperties.ts:
--------------------------------------------------------------------------------
1 | import { DataGridProperty } from "templates/dataGrid/DataGridProperty";
2 |
3 | export const dataGridChronostratigraphyStructProperties: DataGridProperty[] = [
4 | {
5 | name: "kind",
6 | documentation: "The unit of chronostratigraphy.",
7 | isAttribute: true
8 | }
9 | ];
10 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/templates/dataGrid/objects/common/properties/DataGridLithostratigraphyStructProperties.ts:
--------------------------------------------------------------------------------
1 | import { DataGridProperty } from "templates/dataGrid/DataGridProperty";
2 |
3 | export const dataGridLithostratigraphyStructProperties: DataGridProperty[] = [
4 | {
5 | name: "kind",
6 | documentation: "The unit of lithostratigraphy.",
7 | isAttribute: true
8 | }
9 | ];
10 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/Modals/ConfigurationChangeReasonModal/styles.ts:
--------------------------------------------------------------------------------
1 | import styled from "styled-components";
2 |
3 | export const VerticalLayout = styled.div`
4 | display: flex;
5 | flex-direction: column;
6 | gap: 1rem;
7 | `;
8 |
9 | export const HorizontalLayout = styled.div`
10 | display: grid;
11 | grid-template-columns: 60% 40%;
12 | gap: 1rem;
13 | width: 100%;
14 | `;
15 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/hooks/useOperationState.tsx:
--------------------------------------------------------------------------------
1 | import OperationContext from "contexts/operationContext";
2 | import { useContext } from "react";
3 |
4 | export function useOperationState() {
5 | const context = useContext(OperationContext);
6 | if (!context)
7 | throw new Error(
8 | `useOperationState() has to be used within `
9 | );
10 | return context;
11 | }
12 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/maxLength.ts:
--------------------------------------------------------------------------------
1 | const MaxLength = {
2 | Comment: 4000, //abstractCommentString
3 | Description: 256, //abstractDescriptionString
4 | Enum: 50, //abstractTypeEnum
5 | Name: 64, //abstractNameString
6 | Str16: 16, //str16
7 | String32: 32, //abstractString32
8 | Uid: 64, //abstractUidString
9 | UomEnum: 24 //abstractUomEnum
10 | };
11 |
12 | export default MaxLength;
13 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/measure.ts:
--------------------------------------------------------------------------------
1 | export default interface Measure {
2 | value: number;
3 | uom: string;
4 | }
5 |
6 | export function measureToString(measure: Measure, decimals?: number): string {
7 | if (decimals && measure?.value) {
8 | return `${measure?.value?.toFixed(decimals) ?? ""} ${measure?.uom ?? ""}`;
9 | }
10 | return `${measure?.value ?? ""} ${measure?.uom ?? ""}`;
11 | }
12 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/tools/windowHelpers.ts:
--------------------------------------------------------------------------------
1 | import { isDesktopApp } from "tools/desktopAppHelpers";
2 |
3 | export const openRouteInNewWindow = (route: string) => {
4 | if (isDesktopApp()) {
5 | // @ts-ignore
6 | window.electronAPI.newWindow(route);
7 | } else {
8 | const host = `${window.location.protocol}//${window.location.host}`;
9 | window.open(`${host}${route}`);
10 | }
11 | };
12 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/wbGeometry.tsx:
--------------------------------------------------------------------------------
1 | import CommonData from "models/commonData";
2 | import Measure from "models/measure";
3 | import ObjectOnWellbore from "models/objectOnWellbore";
4 |
5 | export default interface WbGeometryObject extends ObjectOnWellbore {
6 | dTimReport?: string;
7 | mdBottom?: Measure;
8 | gapAir?: Measure;
9 | depthWaterMean?: Measure;
10 | commonData: CommonData;
11 | }
12 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Models/BaseObjectOnWellbore.cs:
--------------------------------------------------------------------------------
1 | using Witsml.Data;
2 |
3 | namespace WitsmlExplorer.Api.Models
4 | {
5 | public class BaseObjectOnWellbore : ObjectOnWellbore
6 | {
7 | public override IWitsmlQueryType ToWitsml()
8 | {
9 | throw new System.NotImplementedException("BaseObjectOnWellbore is not supposed to be converted to a WITSML model");
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/fluidsReport.ts:
--------------------------------------------------------------------------------
1 | import CommonData from "models/commonData";
2 | import MeasureWithDatum from "models/measureWithDatum";
3 | import ObjectOnWellbore from "models/objectOnWellbore";
4 |
5 | export default interface FluidsReport extends ObjectOnWellbore {
6 | dTim: string;
7 | md: MeasureWithDatum;
8 | tvd: MeasureWithDatum;
9 | numReport: string;
10 | commonData: CommonData;
11 | }
12 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/messageObject.tsx:
--------------------------------------------------------------------------------
1 | import CommonData from "models/commonData";
2 | import ObjectOnWellbore from "models/objectOnWellbore";
3 | import MeasureWithDatum from "./measureWithDatum";
4 |
5 | export default interface MessageObject extends ObjectOnWellbore {
6 | messageText: string;
7 | dTim: string;
8 | typeMessage: string;
9 | commonData: CommonData;
10 | md: MeasureWithDatum;
11 | }
12 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/WitsmlRefWellboreTrajectory.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace Witsml.Data
4 | {
5 | public class WitsmlRefWellboreTrajectory
6 | {
7 | [XmlElement("trajectoryReference")]
8 | public WitsmlRefNameString TrajectoryReference { get; set; }
9 |
10 | [XmlElement("wellboreParent")]
11 | public WitsmlRefNameString WellboreParent { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/jobs/wellboreSubObjectsComparisonJob.tsx:
--------------------------------------------------------------------------------
1 | import WellboreReference from "models/jobs/wellboreReference";
2 |
3 | export default interface WellboreSubObjectsComparisonJob {
4 | countLogsData: boolean;
5 | checkLogsData: boolean;
6 | checkTimeBasedLogsData: boolean;
7 | checkDepthBasedLogsData: boolean;
8 | sourceWellbore: WellboreReference;
9 | targetWellbore: WellboreReference;
10 | }
11 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Console/ListCommands/ListLogsSettings.cs:
--------------------------------------------------------------------------------
1 | using Spectre.Console.Cli;
2 |
3 | namespace WitsmlExplorer.Console.ListCommands
4 | {
5 | public class ListLogsSettings : CommandSettings
6 | {
7 | [CommandArgument(0, "")]
8 | public string WellUid { get; init; }
9 |
10 | [CommandArgument(1, "")]
11 | public string WellboreUid { get; init; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/WitsmlExplorer.Frontend.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | net8.0
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/WarningBar.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { Warning } from "./StyledComponents/Warning";
3 |
4 | type WarningBarProps = {
5 | message?: string;
6 | };
7 |
8 | const WarningBar = ({ message }: WarningBarProps): React.ReactElement => {
9 | return (
10 |
11 | Warning: {message}
12 |
13 | );
14 | };
15 | export default WarningBar;
16 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | WITSML Explorer
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Middleware/DataException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Net;
3 |
4 | namespace WitsmlExplorer.Api.Middleware
5 | {
6 | public class DataException : Exception
7 | {
8 | public int StatusCode { get; private set; }
9 |
10 | public DataException(string message) : base(message)
11 | {
12 | StatusCode = (int)HttpStatusCode.InternalServerError;
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Console/ListCommands/ListBhaRunsSettings.cs:
--------------------------------------------------------------------------------
1 | using Spectre.Console.Cli;
2 |
3 | namespace WitsmlExplorer.Console.ListCommands
4 | {
5 | public class ListBhaRunsSettings : CommandSettings
6 | {
7 | [CommandArgument(0, "")]
8 | public string WellUid { get; init; }
9 |
10 | [CommandArgument(1, "")]
11 | public string WellboreUid { get; init; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Docker/MongoDb/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '3.1'
2 |
3 | services:
4 | mongo:
5 | image: mongo:4.4.1
6 | container_name: witsml-explorer-db
7 | restart: unless-stopped
8 | ports:
9 | - 27017:27017
10 | volumes:
11 | - ./data:/data/db #Location for data folder can be changed.
12 | environment:
13 | - MONGO_INITDB_ROOT_USERNAME=
14 | - MONGO_INITDB_ROOT_PASSWORD=
15 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Curves/CurveValue.cs:
--------------------------------------------------------------------------------
1 | using Witsml.Extensions;
2 |
3 | namespace Witsml.Data.Curves
4 | {
5 | public abstract class CurveValue
6 | {
7 | public abstract string GetAsString();
8 |
9 | public static CurveValue From(string input)
10 | {
11 | return string.IsNullOrEmpty(input) ? null : input.IsNumeric() ? new DoubleValue(input) : new StringValue(input);
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Src/Witsml/WitsmlRemoteServerRequestCrashedException.cs:
--------------------------------------------------------------------------------
1 | using System.ServiceModel;
2 |
3 | namespace Witsml;
4 |
5 | ///
6 | /// This class represents a custom exception for cases where a WITSML remote server request crash.
7 | ///
8 | public class WitsmlRemoteServerRequestCrashedException : CommunicationException
9 | {
10 | public WitsmlRemoteServerRequestCrashedException(string message) : base(message) { }
11 | }
12 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Middleware/WitsmlResultParsingException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace WitsmlExplorer.Api.Middleware
4 | {
5 | public class WitsmlResultParsingException : Exception
6 | {
7 | public WitsmlResultParsingException(string message, int statusCode) : base(message)
8 | {
9 | StatusCode = statusCode;
10 | }
11 | public int StatusCode { get; private set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Console/ListCommands/ListTubularsSettings.cs:
--------------------------------------------------------------------------------
1 | using Spectre.Console.Cli;
2 |
3 | namespace WitsmlExplorer.Console.ListCommands
4 | {
5 | public class ListTubularsSettings : CommandSettings
6 | {
7 | [CommandArgument(0, "")]
8 | public string WellUid { get; init; }
9 |
10 | [CommandArgument(1, "")]
11 | public string WellboreUid { get; init; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Scripts/Azure/example-config.cfg:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | #Provide your existing subscription id and resource group in order for scripts to work properly. Can be found in https://portal.azure.com/
4 | subscriptionId=''
5 | resourceGroupName=''
6 | regionName=''
7 |
8 | #Database specific. Provide config for either a new or existing database. A new database will be created if not allready existing.
9 | databaseAccountName=''
10 | databaseName=''
11 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # next.js
12 | /.next/
13 | /out/
14 |
15 | # production
16 | /build
17 |
18 | # misc
19 | .DS_Store
20 | .env*.local
21 |
22 | # debug
23 | npm-debug.log*
24 | yarn-debug.log*
25 | yarn-error.log*
26 |
27 | .ignore*
28 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/ContextMenus/ContextMenuPresenter.tsx:
--------------------------------------------------------------------------------
1 | import { useOperationState } from "hooks/useOperationState";
2 | import React from "react";
3 |
4 | const ContextMenuPresenter = (): React.ReactElement => {
5 | const { operationState } = useOperationState();
6 | const { contextMenu } = operationState;
7 |
8 | return <>{contextMenu && contextMenu.component}>;
9 | };
10 |
11 | export default ContextMenuPresenter;
12 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/typeTubularAssy.ts:
--------------------------------------------------------------------------------
1 | export const typeTubularAssy = [
2 | "drilling",
3 | "directional drilling",
4 | "fishing",
5 | "condition mud",
6 | "tubing conveyed logging",
7 | "cementing",
8 | "casing",
9 | "clean out",
10 | "completion or testing",
11 | "coring",
12 | "hole opening or underreaming",
13 | "milling or dressing or cutting",
14 | "wiper or check or reaming",
15 | "unknown"
16 | ];
17 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/dataWorkOrder/requirementPurpose.ts:
--------------------------------------------------------------------------------
1 | export enum RequirementPurpose {
2 | DisplayRange = "DisplayRange",
3 | SensorRange = "SensorRange",
4 | AlarmThreshold = "AlarmThreshold",
5 | OperationalRange = "OperationalRange",
6 | Calibration = "Calibration",
7 | SafetyRange = "SafetyRange",
8 | WorkflowSpecific = "WorkflowSpecific",
9 | QualityRequirement = "QualityRequirement",
10 | Other = "Other"
11 | }
12 |
--------------------------------------------------------------------------------
/Src/Witsml/ServiceReference/dotnet-svcutil.params.json:
--------------------------------------------------------------------------------
1 | {
2 | "providerId": "Microsoft.Tools.ServiceModel.Svcutil",
3 | "version": "2.0.1",
4 | "options": {
5 | "inputs": [
6 | "../../../Resources/Wsdl/witsml_v1.4.0_api.wsdl"
7 | ],
8 | "namespaceMappings": [
9 | "*, Witsml.ServiceReference"
10 | ],
11 | "outputFile": "WitsmlService.cs",
12 | "targetFramework": "netstandard2.0",
13 | "typeReuseMode": "All"
14 | }
15 | }
--------------------------------------------------------------------------------
/Src/Witsml/Extensions/ListExtensions.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Witsml.Extensions
4 | {
5 | public static class ListExtensions
6 | {
7 | public static List AsItemInList(this T item)
8 | {
9 | return new List { item };
10 | }
11 |
12 | public static ICollection AsCollection(this IList list)
13 | {
14 | return list;
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Models/WitsmlQuery.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | using Witsml.ServiceReference;
4 |
5 | namespace WitsmlExplorer.Api.Models
6 | {
7 | public class WitsmlQuery
8 | {
9 | [JsonConverter(typeof(JsonStringEnumConverter))]
10 | public ReturnElements? ReturnElements { get; init; }
11 | public string OptionsInString { get; init; }
12 | public string Body { get; init; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/tools/themeHelpers.ts:
--------------------------------------------------------------------------------
1 | import { UserTheme } from "../contexts/operationStateReducer.tsx";
2 |
3 | export const normaliseThemeForEds = (
4 | theme: UserTheme
5 | ): UserTheme.Compact | UserTheme.Comfortable => {
6 | if (theme === UserTheme.Comfortable) return UserTheme.Comfortable;
7 | return UserTheme.Compact;
8 | };
9 |
10 | export const isInAnyCompactMode = (theme: UserTheme): boolean =>
11 | theme !== UserTheme.Comfortable;
12 |
--------------------------------------------------------------------------------
/PR_REVIEW_CHECKLIST.md:
--------------------------------------------------------------------------------
1 | # Pull request review checklist
2 |
3 | When reviewing a pull request, please use the following checklist. Remove any checkboxes which are not relevant for the pull request.
4 |
5 | You can copy and paste the checklist into your review when approving.
6 |
7 | ```markdown
8 | *Reviewer checklist*
9 | - [ ] Read issue and PR
10 | - [ ] Pulled branch and manually tested
11 | - [ ] Verify that PR resolves issue
12 | - [ ] Reviewed the code
13 | ```
14 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/StyledComponents/Warning.tsx:
--------------------------------------------------------------------------------
1 | import styled from "styled-components";
2 | import { colors } from "../../styles/Colors";
3 |
4 | export const Warning = styled.div`
5 | border: 1px solid ${colors.interactive.dangerResting};
6 | border-radius: 2px;
7 | padding: 1em;
8 | background-color: ${colors.interactive.dangerHighlight};
9 | color: ${colors.interactive.dangerHover};
10 | margin-top: 1em;
11 | width: 28em;
12 | `;
13 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/mudLog.tsx:
--------------------------------------------------------------------------------
1 | import CommonData from "models/commonData";
2 | import MeasureWithDatum from "models/measureWithDatum";
3 | import ObjectOnWellbore from "models/objectOnWellbore";
4 |
5 | export default interface MudLog extends ObjectOnWellbore {
6 | mudLogCompany: string;
7 | mudLogEngineers: string;
8 | objectGrowing: boolean;
9 | startMd: MeasureWithDatum;
10 | endMd: MeasureWithDatum;
11 | commonData: CommonData;
12 | }
13 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/tubularComponent.tsx:
--------------------------------------------------------------------------------
1 | import Measure from "models/measure";
2 |
3 | export default interface TubularComponent {
4 | uid: string;
5 | typeTubularComponent: string;
6 | sequence: number;
7 | description: string;
8 | id: Measure;
9 | od: Measure;
10 | len: Measure;
11 | numJointStand: number;
12 | wtPerLen: Measure;
13 | configCon: string;
14 | typeMaterial: string;
15 | vendor: string;
16 | model: string;
17 | }
18 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Curves/StringValue.cs:
--------------------------------------------------------------------------------
1 | namespace Witsml.Data.Curves
2 | {
3 | public class StringValue : CurveValue
4 | {
5 | private readonly string _value;
6 |
7 | public StringValue(string value)
8 | {
9 | _value = value;
10 | }
11 |
12 | public string Get() => _value;
13 |
14 | public override string GetAsString() => _value;
15 |
16 | public override string ToString() => _value;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Src/Witsml/Extensions/DateTimeExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 |
4 | using Witsml.Data.Curves;
5 |
6 | namespace Witsml.Extensions
7 | {
8 | public static class DateTimeExtensions
9 | {
10 | public static string ToISODateTimeString(this DateTime dateTime)
11 | {
12 | return dateTime.ToUniversalTime().ToString(CommonConstants.DateTimeIndex.IsoPattern, CultureInfo.InvariantCulture);
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Workers/IWorker.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using System.Threading;
3 | using System.Threading.Tasks;
4 |
5 | using WitsmlExplorer.Api.Jobs;
6 | using WitsmlExplorer.Api.Models;
7 |
8 | namespace WitsmlExplorer.Api.Workers
9 | {
10 | public interface IWorker
11 | {
12 | JobType JobType { get; }
13 | Task<(Task<(WorkerResult, RefreshAction)>, Job)> SetupWorker(Stream jobStream, CancellationToken? cancellationToken = null);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/stnTrajCorUsed.tsx:
--------------------------------------------------------------------------------
1 | import Measure from "models/measure";
2 |
3 | export default interface StnTrajCorUsed {
4 | gravAxialAccelCor?: Measure;
5 | gravTran1AccelCor?: Measure;
6 | gravTran2AccelCor?: Measure;
7 | magAxialDrlstrCor?: Measure;
8 | magTran1DrlstrCor?: Measure;
9 | magTran2DrlstrCor?: Measure;
10 | sagIncCor?: Measure;
11 | stnMagDeclUsed?: Measure;
12 | stnGridCorUsed?: Measure;
13 | dirSensorOffset?: Measure;
14 | }
15 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/WitsmlStnTrajValid.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | using Witsml.Data.Measures;
4 |
5 | namespace Witsml.Data
6 | {
7 | public class WitsmlStnTrajValid
8 | {
9 | [XmlElement("magTotalFieldCalc")] public Measure MagTotalFieldCalc { get; set; }
10 | [XmlElement("magDipAngleCalc")] public Measure MagDipAngleCalc { get; set; }
11 | [XmlElement("gravTotalFieldCalc")] public Measure GravTotalFieldCalc { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/location.tsx:
--------------------------------------------------------------------------------
1 | import Measure from "./measure.ts";
2 | import RefNameString from "./refNameString.tsx";
3 |
4 | export default interface Location {
5 | uid: string;
6 | wellCrs: RefNameString;
7 | latitude: Measure;
8 | longitude: Measure;
9 | easting: Measure;
10 | northing: Measure;
11 | westing: Measure;
12 | southing: Measure;
13 | projectedX: Measure;
14 | projectedY: Measure;
15 | localX: Measure;
16 | localY: Measure;
17 | }
18 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/setupTests.ts:
--------------------------------------------------------------------------------
1 | import * as Matchers from "@testing-library/jest-dom/matchers";
2 | import { expect } from "vitest";
3 |
4 | expect.extend(Matchers);
5 |
6 | //temporary solution to workaround innapropriate types from @testing-library/jest-dom/vitest out of runtime
7 | declare module "vitest" {
8 | /* eslint-disable @typescript-eslint/no-empty-object-type */
9 | interface Assertion
10 | extends Matchers.TestingLibraryMatchers {}
11 | }
12 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/WitsmlRefWellboreTrajectoryStation.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace Witsml.Data
4 | {
5 | public class WitsmlRefWellboreTrajectoryStation
6 | {
7 | [XmlElement("stationReference")] public string StationReference { get; set; }
8 | [XmlElement("trajectoryParent")] public WitsmlRefNameString TrajectoryParent { get; set; }
9 | [XmlElement("wellboreParent")] public WitsmlRefNameString WellboreParent { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/nginx/nginx.conf:
--------------------------------------------------------------------------------
1 | worker_processes 1;
2 | pid /tmp/nginx.pid;
3 | events {
4 | worker_connections 1024;
5 | }
6 | http {
7 | include mime.types;
8 | default_type application/octet-stream;
9 | sendfile on;
10 | keepalive_timeout 65;
11 | server {
12 | listen 3000;
13 | location / {
14 | root /usr/share/nginx/html;
15 | try_files $uri /index.html;
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Jobs/Common/Interfaces/IObjectReference.cs:
--------------------------------------------------------------------------------
1 | namespace WitsmlExplorer.Api.Jobs.Common.Interfaces;
2 |
3 | ///
4 | /// Interface of common wellbore properties.
5 | ///
6 | public interface IObjectReference
7 | {
8 | public string Uid { get; }
9 | public string WellUid { get; }
10 | public string WellboreUid { get; }
11 | public string Name { get; }
12 | public string WellName { get; }
13 | public string WellboreName { get; }
14 | }
15 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/changeLog.ts:
--------------------------------------------------------------------------------
1 | import CommonData from "models/commonData";
2 | import ObjectOnWellbore from "models/objectOnWellbore";
3 |
4 | // ChangeLog extends ObjectOnWellbore despite not having uid and name fields in WITSML
5 | // These fields are set in the API to conform to ObjectOnWellbore
6 | export default interface ChangeLog extends ObjectOnWellbore {
7 | uidObject: string;
8 | nameObject: string;
9 | lastChangeType: string;
10 | commonData: CommonData;
11 | }
12 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/jobs/deleteEmptyMnemonicsJob.ts:
--------------------------------------------------------------------------------
1 | import ObjectReference from "models/jobs/objectReference";
2 | import WellboreReference from "models/jobs/wellboreReference";
3 | import WellReference from "models/jobs/wellReference";
4 |
5 | export interface DeleteEmptyMnemonicsJob {
6 | wells: WellReference[];
7 | wellbores: WellboreReference[];
8 | logs: ObjectReference[];
9 | nullDepthValue: number;
10 | nullTimeValue: string;
11 | deleteNullIndex: boolean;
12 | }
13 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Middleware/ErrorDetails.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json;
2 |
3 | namespace WitsmlExplorer.Api.Middleware
4 | {
5 | public class ErrorDetails
6 | {
7 | public int StatusCode { get; set; }
8 | public string Message { get; set; }
9 |
10 | public override string ToString()
11 | {
12 | return JsonSerializer.Serialize(this, new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase });
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/Sidebar/WellItem/styles.ts:
--------------------------------------------------------------------------------
1 | import { UserTheme } from "../../../contexts/operationStateReducer.tsx";
2 | import { SxProps } from "@mui/material";
3 | import { treeItemClasses } from "@mui/x-tree-view";
4 |
5 | export const getStyles = (theme: UserTheme): SxProps => {
6 | if (theme === UserTheme.Compact)
7 | return {
8 | [`.${treeItemClasses.label} p`]: {
9 | p: "0.3rem 0.3rem 0.3rem 0rem"
10 | }
11 | };
12 |
13 | return {};
14 | };
15 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/contexts/operationContext.ts:
--------------------------------------------------------------------------------
1 | import {
2 | OperationAction,
3 | OperationState
4 | } from "contexts/operationStateReducer";
5 | import { createContext } from "react";
6 |
7 | export interface OperationContextProps {
8 | operationState: OperationState;
9 | dispatchOperation: (action: OperationAction) => void;
10 | }
11 |
12 | const OperationContext = createContext(
13 | {} as OperationContextProps
14 | );
15 | export default OperationContext;
16 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/vite.config.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | import react from "@vitejs/plugin-react";
4 | import { defineConfig } from "vite";
5 | import tsconfigPaths from "vite-tsconfig-paths";
6 |
7 | // https://vitejs.dev/config/
8 | export default defineConfig({
9 | plugins: [react(), tsconfigPaths()],
10 |
11 | // port for preview
12 | preview: {
13 | port: 3000
14 | },
15 |
16 | // port for dev
17 | server: {
18 | port: 3000
19 | }
20 | });
21 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Middleware/WitsmlUnsupportedCapabilityException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Net;
3 |
4 | namespace WitsmlExplorer.Api.Middleware
5 | {
6 | public class WitsmlUnsupportedCapabilityException : Exception
7 | {
8 | public int StatusCode { get; private set; }
9 |
10 | public WitsmlUnsupportedCapabilityException(string message) : base(message)
11 | {
12 | StatusCode = (int)HttpStatusCode.InternalServerError;
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Models/LogTraceState.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 |
3 | namespace WitsmlExplorer.Api.Models;
4 |
5 | public enum LogTraceState
6 | {
7 | [Description("depth adjusted")]
8 | DepthAdjusted,
9 |
10 | [Description("edited")]
11 | Edited,
12 |
13 | [Description("joined")]
14 | Joined,
15 |
16 | [Description("processed")]
17 | Processed,
18 |
19 | [Description("raw")]
20 | Raw,
21 |
22 | [Description("unknown")]
23 | Unknown
24 | }
25 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/entityType.ts:
--------------------------------------------------------------------------------
1 | enum EntityType {
2 | Well = "Well",
3 | Wellbore = "Wellbore",
4 | BhaRun = "BhaRun",
5 | DataWorkOrder = "DataWorkOrder",
6 | FluidsReport = "FluidsReport",
7 | FormationMarker = "FormationMarker",
8 | Log = "Log",
9 | Message = "Message",
10 | MudLog = "MudLog",
11 | Rig = "Rig",
12 | Risk = "Risk",
13 | Tubular = "Tubular",
14 | Trajectory = "Trajectory",
15 | WbGeometry = "WbGeometry"
16 | }
17 |
18 | export default EntityType;
19 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Models/Reports/BatchModifyReport.cs:
--------------------------------------------------------------------------------
1 | namespace WitsmlExplorer.Api.Models.Reports
2 | {
3 | public class BatchModifyReport : BaseReport
4 | {
5 | }
6 |
7 | public class BatchModifyReportItem
8 | {
9 | public string WellUid { get; init; }
10 | public string WellboreUid { get; init; }
11 | public string Uid { get; init; }
12 | public string IsSuccessful { get; init; }
13 | public string FailureReason { get; init; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Extensions/StreamExtensions.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using System.Text.Json;
3 | using System.Threading.Tasks;
4 |
5 | namespace WitsmlExplorer.Api.Extensions
6 | {
7 | public static class StreamExtensions
8 | {
9 | public static async Task Deserialize(this Stream stream)
10 | {
11 | return await JsonSerializer.DeserializeAsync(stream, new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase });
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Models/LogCurveIndex.cs:
--------------------------------------------------------------------------------
1 | using Index = Witsml.Data.Curves.Index;
2 |
3 | namespace WitsmlExplorer.Api.Models;
4 |
5 | ///
6 | /// Common model of curve min max index values.
7 | ///
8 | public class LogCurveIndex
9 | {
10 | ///
11 | /// Min index of curve.
12 | ///
13 | public Index MinIndex { get; set; }
14 | ///
15 | /// Max index of curve.
16 | ///
17 | public Index MaxIndex { get; set; }
18 | }
19 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/ContextMenus/LoadingContextMenu.tsx:
--------------------------------------------------------------------------------
1 | import { CircularProgress } from "@equinor/eds-core-react";
2 | import ContextMenu from "components/ContextMenus/ContextMenu";
3 | import React from "react";
4 |
5 | const LoadingContextMenu = (): React.ReactElement => {
6 | return (
7 |
10 | ]}
11 | />
12 | );
13 | };
14 |
15 | export default LoadingContextMenu;
16 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/templates/dataGrid/objects/common/properties/DataGridRefNameStringProperties.ts:
--------------------------------------------------------------------------------
1 | import { DataGridProperty } from "templates/dataGrid/DataGridProperty";
2 |
3 | export const dataGridRefNameStringProperties: DataGridProperty[] = [
4 | {
5 | name: "uidRef",
6 | documentation:
7 | "A reference to the unique identifier (uid attribute) in the node referenced by the name value. This attribute is required within the context of a WITSML server.",
8 | isAttribute: true
9 | }
10 | ];
11 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/Nav.tsx:
--------------------------------------------------------------------------------
1 | import { Breadcrumbs } from "components/Breadcrumbs";
2 | import TopRightCornerMenu from "components/TopRightCornerMenu";
3 | import styled from "styled-components";
4 |
5 | export default function Nav() {
6 | return (
7 |
8 |
9 |
10 |
11 | );
12 | }
13 |
14 | const NavContainer = styled.nav`
15 | display: flex;
16 | align-items: center;
17 | justify-content: space-between;
18 | `;
19 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/selectableObjectOnWellbore.ts:
--------------------------------------------------------------------------------
1 | import { ContentTableRow } from "components/ContentViews/table";
2 | import WellboreReference from "./jobs/wellboreReference";
3 |
4 | export default interface SelectableObjectOnWellbore extends ContentTableRow {
5 | objectType: string;
6 | logType: string;
7 | uid: string;
8 | name: string;
9 | }
10 |
11 | export interface MixedObjectsReferences {
12 | wellboreReference: WellboreReference;
13 | selectedObjects: SelectableObjectOnWellbore[];
14 | }
15 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Models/ObjectSearchResult.cs:
--------------------------------------------------------------------------------
1 | using Witsml.Data;
2 |
3 | namespace WitsmlExplorer.Api.Models
4 | {
5 | public class ObjectSearchResult : ObjectOnWellbore
6 | {
7 | public string SearchProperty { get; set; }
8 | public EntityType ObjectType { get; set; }
9 |
10 | public override IWitsmlQueryType ToWitsml()
11 | {
12 | throw new System.NotImplementedException("ObjectSearchResult is not supposed to be converted to a WITSML model");
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/Modals/ModalPresenter.tsx:
--------------------------------------------------------------------------------
1 | import { useOperationState } from "hooks/useOperationState";
2 | import { Fragment, ReactElement } from "react";
3 |
4 | const ModalPresenter = (): ReactElement => {
5 | const { operationState } = useOperationState();
6 | const { modals } = operationState;
7 | return (
8 | <>
9 | {modals.map((modal, index) => {
10 | return {modal};
11 | })}
12 | >
13 | );
14 | };
15 |
16 | export default ModalPresenter;
17 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/templates/dataGrid/objects/common/properties/DataGridNameStructProperties.ts:
--------------------------------------------------------------------------------
1 | import { DataGridProperty } from "templates/dataGrid/DataGridProperty";
2 |
3 | export const dataGridNameStructProperties: DataGridProperty[] = [
4 | {
5 | name: "namingSystem",
6 | documentation: "The naming system within the name is (hopefully) unique.",
7 | isAttribute: true
8 | }
9 | ];
10 |
11 | export const dataGridShortNameStructProperties: DataGridProperty[] = [
12 | ...dataGridNameStructProperties
13 | ];
14 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Measures/Measure.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace Witsml.Data.Measures
4 | {
5 | public class Measure
6 | {
7 | [XmlAttribute("uom")] public string Uom { get; set; }
8 | [XmlText] public string Value { get; set; }
9 |
10 | public static T ToFetch() where T : Measure, new()
11 | {
12 | return new()
13 | {
14 | Uom = string.Empty,
15 | Value = string.Empty
16 | };
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Models/Measure/DayMeasure.cs:
--------------------------------------------------------------------------------
1 | using System.Globalization;
2 |
3 | using Witsml.Data.Measures;
4 |
5 | namespace WitsmlExplorer.Api.Models.Measure
6 | {
7 | public class DayMeasure : Measure
8 | {
9 | public int Value { get; init; }
10 |
11 | public WitsmlDayMeasure ToWitsml()
12 | {
13 | return new()
14 | {
15 | Uom = Uom,
16 | Value = Value.ToString(CultureInfo.InvariantCulture)
17 | };
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/exportProperties.ts:
--------------------------------------------------------------------------------
1 | export interface ExportProperties {
2 | outputMimeType: string;
3 | fileExtension: string;
4 | separator: string;
5 | newLineCharacter: string;
6 | omitSpecialCharactersFromFilename?: boolean;
7 | appendDateTime?: boolean;
8 | }
9 |
10 | export const defaultExportProperties = {
11 | fileExtension: ".csv",
12 | newLineCharacter: "\n",
13 | outputMimeType: "text/csv",
14 | separator: ",",
15 | omitSpecialCharactersFromFilename: true,
16 | appendDateTime: true
17 | };
18 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Console/ShowCommands/ShowTubularSettings.cs:
--------------------------------------------------------------------------------
1 | using Spectre.Console.Cli;
2 |
3 | namespace WitsmlExplorer.Console.ShowCommands
4 | {
5 | public class ShowTubularSettings : CommandSettings
6 | {
7 | [CommandArgument(0, "")]
8 | public string WellUid { get; init; }
9 |
10 | [CommandArgument(1, "")]
11 | public string WellboreUid { get; init; }
12 |
13 | [CommandArgument(2, "")]
14 | public string TubularUid { get; init; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/ContentViews/DataWorkOrder/StatusChips/styles.ts:
--------------------------------------------------------------------------------
1 | import styled, { css } from "styled-components";
2 | import { Chip } from "../../../StyledComponents/Chip";
3 |
4 | export type TableFriendlyType = { $tableFriendly?: boolean };
5 |
6 | export const StyledStatusChip = styled(Chip)`
7 | ${({ $tableFriendly }) =>
8 | $tableFriendly
9 | ? css`
10 | height: auto;
11 | line-height: 1rem;
12 | border-radius: 0.8rem;
13 | `
14 | : ""}
15 | `;
16 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/WitsmlLogData.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Xml.Serialization;
3 |
4 | namespace Witsml.Data
5 | {
6 | public class WitsmlLogData : IWitsmlQueryType
7 | {
8 | [XmlElement("mnemonicList")]
9 | public string MnemonicList { get; set; }
10 |
11 | [XmlElement("unitList")]
12 | public string UnitList { get; set; }
13 |
14 | [XmlElement("data")]
15 | public List Data { get; set; }
16 |
17 | public string TypeName => "data";
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/WitsmlWells.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Xml.Serialization;
3 |
4 | namespace Witsml.Data
5 | {
6 | [XmlRoot("wells", Namespace = "http://www.witsml.org/schemas/1series")]
7 | public class WitsmlWells : IWitsmlQueryType
8 | {
9 | [XmlAttribute("version")]
10 | public string Version = "1.4.1.1";
11 |
12 | [XmlElement("well")]
13 | public List Wells { get; set; } = new List();
14 |
15 | public string TypeName => "well";
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Docker/Local/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '3.7'
2 | services:
3 | api:
4 | image: witsmlexplorer-api:latest
5 | container_name: witsmlexplorer-api-dev
6 | ports:
7 | - 5000:5000
8 | volumes:
9 | - ./config.json:/app/config.json:ro
10 | - ./ca-bundle.crt:/etc/ssl/certs/ca-bundle.crt:ro
11 | environment:
12 | - SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt
13 |
14 | web:
15 | image: witsmlexplorer-frontend:latest
16 | container_name: witsmlexplorer-frontend-dev
17 | ports:
18 | - 3000:3000
19 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/WitsmlData.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | using Witsml.Data.Curves;
4 |
5 | namespace Witsml.Data
6 | {
7 | public class WitsmlData : IWitsmlQueryType
8 | {
9 | [XmlText]
10 | public string Data { get; set; } = string.Empty;
11 |
12 | public Point GetPoint()
13 | {
14 | return new(Data);
15 | }
16 |
17 | public Row GetRow()
18 | {
19 | return new(Data);
20 | }
21 |
22 | public string TypeName => "data";
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Src/Witsml/Extensions/StringExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 |
4 | namespace Witsml.Extensions
5 | {
6 | public static class StringExtensions
7 | {
8 | public static bool IsNumeric(this string input)
9 | {
10 | return double.TryParse(input, NumberStyles.Any, CultureInfo.InvariantCulture, out _);
11 | }
12 |
13 | public static string NullIfEmpty(this string value)
14 | {
15 | return string.IsNullOrEmpty(value) ? null : value;
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/jobs/wellboreReference.ts:
--------------------------------------------------------------------------------
1 | import Wellbore from "models/wellbore";
2 |
3 | export default interface WellboreReference {
4 | wellUid: string;
5 | wellboreUid: string;
6 | wellName: string;
7 | wellboreName: string;
8 | serverUrl?: string;
9 | }
10 |
11 | export const toWellboreReference = (wellbore: Wellbore): WellboreReference => {
12 | return {
13 | wellUid: wellbore.wellUid,
14 | wellboreUid: wellbore.uid,
15 | wellName: wellbore.wellName,
16 | wellboreName: wellbore.name
17 | };
18 | };
19 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/templates/dataGrid/objects/common/properties/DataGridWellKnownNameStructProperties.ts:
--------------------------------------------------------------------------------
1 | import { DataGridProperty } from "templates/dataGrid/DataGridProperty";
2 |
3 | export const dataGridWellKnownNameStructProperties: DataGridProperty[] = [
4 | {
5 | name: "namingSystem",
6 | documentation: "The naming system within the name is unique.",
7 | isAttribute: true
8 | },
9 | {
10 | name: "code",
11 | documentation: "A unique (short) code associated with the name.",
12 | isAttribute: true
13 | }
14 | ];
15 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/commonData.tsx:
--------------------------------------------------------------------------------
1 | export default interface CommonData {
2 | sourceName: string;
3 | dTimCreation?: string;
4 | dTimLastChange?: string;
5 | itemState?: string;
6 | comments?: string;
7 | defaultDatum?: string;
8 | serviceCategory?: string;
9 | }
10 |
11 | export function emptyCommonData(): CommonData {
12 | return {
13 | sourceName: "",
14 | dTimCreation: "",
15 | dTimLastChange: "",
16 | itemState: "",
17 | comments: "",
18 | defaultDatum: "",
19 | serviceCategory: ""
20 | };
21 | }
22 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Measures/WitsmlMeasureWithDatum.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace Witsml.Data.Measures
4 | {
5 | public class WitsmlMeasureWithDatum : Measure
6 | {
7 | [XmlAttribute("datum")] public string Datum { get; set; } = null;
8 |
9 | public static WitsmlMeasureWithDatum ToFetch()
10 | {
11 | return new()
12 | {
13 | Uom = string.Empty,
14 | Value = string.Empty,
15 | Datum = string.Empty
16 | };
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Jobs/DeleteJobs.cs:
--------------------------------------------------------------------------------
1 | using WitsmlExplorer.Api.Jobs.Common;
2 |
3 | namespace WitsmlExplorer.Api.Jobs
4 | {
5 | public record DeleteComponentsJob : IDeleteJob { }
6 | public record DeleteObjectsJob : IDeleteJob { }
7 | public record DeleteWellboreJob : IDeleteJob
8 | {
9 | public bool CascadedDelete { get; init; }
10 | }
11 | public record DeleteWellJob : IDeleteJob
12 | {
13 | public bool CascadedDelete { get; init; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/wbGeometrySection.tsx:
--------------------------------------------------------------------------------
1 | import Measure from "models/measure";
2 | import MeasureWithDatum from "models/measureWithDatum";
3 |
4 | export default interface WbGeometrySection {
5 | uid: string;
6 | typeHoleCasing: string;
7 | mdTop: MeasureWithDatum;
8 | mdBottom: MeasureWithDatum;
9 | tvdTop: MeasureWithDatum;
10 | tvdBottom: MeasureWithDatum;
11 | idSection: Measure;
12 | odSection: Measure;
13 | wtPerLen: Measure;
14 | grade: string;
15 | curveConductor: boolean;
16 | diaDrift: Measure;
17 | factFric: number;
18 | }
19 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Tubular/WitsmlBend.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | using Witsml.Data.Measures;
4 |
5 | namespace Witsml.Data.Tubular
6 | {
7 | public class WitsmlBend
8 | {
9 | [XmlAttribute("uid")]
10 | public string Uid { get; set; }
11 |
12 | [XmlElement("angle")]
13 | public Measure Angle { get; set; }
14 |
15 | [XmlElement("distBendBot")]
16 | public Measure DistBendBot { get; set; }
17 |
18 | [XmlElement("customData")]
19 | public WitsmlCustomData CustomData { get; set; }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/WitsmlWellbores.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Xml.Serialization;
3 |
4 | namespace Witsml.Data
5 | {
6 | [XmlRoot("wellbores", Namespace = "http://www.witsml.org/schemas/1series")]
7 | public class WitsmlWellbores : IWitsmlQueryType
8 | {
9 | [XmlAttribute("version")]
10 | public string Version = "1.4.1.1";
11 |
12 | [XmlElement("wellbore")]
13 | public List Wellbores { get; set; } = new List();
14 | public string TypeName => "wellbore";
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Models/ConnectionInformation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Text.Json;
3 | using System.Text.Json.Serialization;
4 |
5 | namespace WitsmlExplorer.Api.Models
6 | {
7 | public class ConnectionInformation
8 | {
9 | [JsonPropertyName("serverUrl")]
10 | public Uri ServerUrl { get; init; }
11 | [JsonPropertyName("userName")]
12 | public string UserName { get; init; }
13 |
14 | public override string ToString()
15 | {
16 | return JsonSerializer.Serialize(this);
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/ContentViews/__tests__/WellboresListView.tests.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | MockResizeObserver,
3 | renderWithContexts
4 | } from "__testUtils__/testUtils";
5 | import WellboresListView from "components/ContentViews/WellboresListView";
6 |
7 | test("Should render when selected well is not set", () => {
8 | //mock ResizeObserver to enable testing virtualized components
9 | window.ResizeObserver = MockResizeObserver;
10 | const component = renderWithContexts();
11 | expect(component.baseElement).toMatchSnapshot();
12 | });
13 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/HttpHandlers/CapHandler.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 |
3 | using Microsoft.AspNetCore.Http;
4 | using Microsoft.AspNetCore.Mvc;
5 |
6 | using Witsml.Data;
7 |
8 | using WitsmlExplorer.Api.Services;
9 |
10 | namespace WitsmlExplorer.Api.HttpHandlers
11 | {
12 | public static class CapHandler
13 | {
14 | [Produces(typeof(WitsmlServerCapabilities))]
15 | public static async Task GetCap(ICapService capService)
16 | {
17 | return TypedResults.Ok(await capService.GetCap());
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/jobs/missingDataJob.tsx:
--------------------------------------------------------------------------------
1 | import WellReference from "models/jobs/wellReference";
2 | import WellboreReference from "models/jobs/wellboreReference";
3 |
4 | // Either wellReferences or wellboreReferences should be set, the other should be empty.
5 | export default interface MissingDataJob {
6 | wellReferences: WellReference[];
7 | wellboreReferences: WellboreReference[];
8 | missingDataChecks: MissingDataCheck[];
9 | }
10 |
11 | export interface MissingDataCheck {
12 | id: string;
13 | objectType: string;
14 | properties: string[];
15 | }
16 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/DataWorkOrder/WitsmlDataSourceConfigurationSet.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Xml.Serialization;
3 |
4 | namespace Witsml.Data.DataWorkOrder;
5 |
6 | public class WitsmlDataSourceConfigurationSet
7 | {
8 | [XmlAttribute("uid")]
9 | public string Uid { get; set; }
10 |
11 | [XmlElement("dataSourceConfiguration")]
12 | public List DataSourceConfigurations { get; set; }
13 |
14 | [XmlElement("extensionNameValue")]
15 | public List ExtensionNameValues { get; set; }
16 | }
17 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/WitsmlChangeLogs.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Xml.Serialization;
3 |
4 | namespace Witsml.Data
5 | {
6 | [XmlRoot("changeLogs", Namespace = "http://www.witsml.org/schemas/1series")]
7 | public class WitsmlChangeLogs : IWitsmlQueryType
8 | {
9 | [XmlAttribute("version")]
10 | public string Version = "1.4.1.1";
11 |
12 | [XmlElement("changeLog")]
13 | public List ChangeLogs { get; set; } = new List();
14 |
15 | public string TypeName => "changeLog";
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Services/NotificationsHub.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 |
3 | using Microsoft.AspNetCore.SignalR;
4 |
5 | namespace WitsmlExplorer.Api.Services
6 | {
7 | public class NotificationsHub : Hub
8 | {
9 | public async Task JoinJobProgressGroup()
10 | {
11 | await Groups.AddToGroupAsync(Context.ConnectionId, "jobProgress");
12 | }
13 |
14 | public async Task LeaveJobProgressGroup()
15 | {
16 | await Groups.RemoveFromGroupAsync(Context.ConnectionId, "jobProgress");
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Models/Reports/CheckLogHeaderReport.cs:
--------------------------------------------------------------------------------
1 | namespace WitsmlExplorer.Api.Models.Reports
2 | {
3 | public class CheckLogHeaderReport : BaseReport
4 | {
5 | public LogObject LogReference { get; init; }
6 | }
7 |
8 | public class CheckLogHeaderReportItem
9 | {
10 | public string Mnemonic { get; init; }
11 | public string HeaderStartIndex { get; init; }
12 | public string DataStartIndex { get; init; }
13 | public string HeaderEndIndex { get; init; }
14 | public string DataEndIndex { get; init; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/StyledComponents/Typography.tsx:
--------------------------------------------------------------------------------
1 | import { Typography as EdsTypography } from "@equinor/eds-core-react";
2 | import styled, { css } from "styled-components";
3 | import { Colors } from "styles/Colors";
4 |
5 | export const Typography = styled(EdsTypography)<{
6 | colors: Colors;
7 | $primary?: boolean;
8 | }>`
9 | ${({ $primary, colors }) =>
10 | !$primary
11 | ? ""
12 | : css`
13 | &[class*="Typography__StyledTypography"] {
14 | color: ${colors.interactive.primaryResting};
15 | }
16 | `}
17 | `;
18 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Services/WitsmlService.cs:
--------------------------------------------------------------------------------
1 | using System.Net;
2 |
3 | using Witsml;
4 |
5 | using WitsmlExplorer.Api.Middleware;
6 |
7 | namespace WitsmlExplorer.Api.Services
8 | {
9 | public class WitsmlService
10 | {
11 | protected readonly IWitsmlClient _witsmlClient;
12 |
13 | protected WitsmlService(IWitsmlClientProvider witsmlClientProvider)
14 | {
15 | _witsmlClient = witsmlClientProvider.GetClient() ?? throw new WitsmlClientProviderException($"No WITSML access", (int)HttpStatusCode.Unauthorized, ServerType.Target);
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Src/Witsml/Extensions/ObjectExtensions.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Text;
3 |
4 | namespace Witsml.Extensions
5 | {
6 | public static class ObjectExtensions
7 | {
8 | public static string PrintProperties(this object obj)
9 | {
10 | PropertyInfo[] props = obj.GetType().GetProperties();
11 | StringBuilder sb = new();
12 | foreach (PropertyInfo p in props)
13 | {
14 | sb.AppendLine(p.Name + ": " + p.GetValue(obj, null));
15 | }
16 | return sb.ToString();
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/userstory.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Userstory
3 | about: Template for Userstory proposals
4 | labels: userstory
5 | assignees: ''
6 |
7 | ---
8 |
9 |
10 | ### User story: [descriptive name] ###
11 |
12 | As a [role]
13 | I want to [...]
14 | so that [...]
15 |
16 | ### Acceptance criteria ###
17 | - [ ] [describe criteria]
18 | - [ ] [describe criteria]
19 |
20 | Also, here are a few points that need to be addressed:
21 | - [ ] [describe Constraint]
22 | - [ ] [describe Constraint ]
23 |
24 | ### Resources ###
25 |
26 | - Lead resource: [name/company]
27 | - Contributors: [list names/company]
28 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Models/Measure/WellMeasure.cs:
--------------------------------------------------------------------------------
1 | namespace WitsmlExplorer.Api.Models.Measure
2 | {
3 | public class WellMeasure : Measure
4 | {
5 | public string Value { get; private init; }
6 |
7 | public static WellMeasure FromWitsmlMeasure(Witsml.Data.Measures.Measure witsmlMeasure)
8 | {
9 | return witsmlMeasure == null
10 | ? null
11 | : new WellMeasure
12 | {
13 | Uom = witsmlMeasure.Uom,
14 | Value = witsmlMeasure.Value
15 | };
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Models/Reports/BatchModifyLogCurveInfoReport.cs:
--------------------------------------------------------------------------------
1 | namespace WitsmlExplorer.Api.Models.Reports;
2 |
3 | ///
4 | /// Batch modification report for logCurveInfos.
5 | ///
6 | public class BatchModifyLogCurveInfoReport : BaseReport
7 | {
8 | }
9 |
10 | ///
11 | /// The item information about a batch modification is extended with LogUid.
12 | ///
13 | public class BatchModifyLogCurveInfoReportItem : BatchModifyReportItem
14 | {
15 | ///
16 | /// Log unique identifier.
17 | ///
18 | public string LogUid { get; init; }
19 | }
20 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Models/ObjectOnWellbore.cs:
--------------------------------------------------------------------------------
1 | using Witsml.Data;
2 |
3 | using WitsmlExplorer.Api.Jobs.Common.Interfaces;
4 |
5 | namespace WitsmlExplorer.Api.Models
6 | {
7 | public abstract class ObjectOnWellbore : IObjectReference
8 | {
9 | public string Uid { get; init; }
10 | public string WellUid { get; init; }
11 | public string WellboreUid { get; init; }
12 | public string Name { get; set; }
13 | public string WellName { get; init; }
14 | public string WellboreName { get; init; }
15 | public abstract IWitsmlQueryType ToWitsml();
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/contexts/MuiThemeProvider.tsx:
--------------------------------------------------------------------------------
1 | import { ThemeProvider } from "@mui/material";
2 | import { useOperationState } from "hooks/useOperationState";
3 | import { ReactElement, ReactNode } from "react";
4 | import { getTheme } from "styles/material-eds";
5 |
6 | interface MuiThemeProviderProps {
7 | children: ReactNode;
8 | }
9 |
10 | export const MuiThemeProvider = ({
11 | children
12 | }: MuiThemeProviderProps): ReactElement => {
13 | const {
14 | operationState: { theme }
15 | } = useOperationState();
16 |
17 | return {children};
18 | };
19 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/Constants.tsx:
--------------------------------------------------------------------------------
1 | export const WITSML_INDEX_TYPE_MD = "measured depth";
2 | export const WITSML_INDEX_TYPE_DATE_TIME = "date time";
3 | export type WITSML_INDEX_TYPE =
4 | | typeof WITSML_INDEX_TYPE_MD
5 | | typeof WITSML_INDEX_TYPE_DATE_TIME;
6 | export const WITSML_LOG_ORDERTYPE_DECREASING = "decreasing";
7 |
8 | export const DateFormat = {
9 | DATE: "DD.MM.YYYY",
10 | DATETIME_S: "DD.MM.YYYY HH:mm:ss",
11 | DATETIME_MS: "DD.MM.YYYY HH:mm:ss.SSS"
12 | };
13 |
14 | export const MILLIS_IN_SECOND = 1000;
15 | export const SECONDS_IN_MINUTE = 60;
16 |
17 | export const MAX_URL_LENGTH = 2000;
18 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/documentation----.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: "Documentation \U0001F4D8 "
3 | about: Use this template for documentation issues
4 | title: "\U0001F4D8"
5 | labels: documentation
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Documentation Is:📘 **
11 |
12 |
13 |
14 | - [ ] Missing
15 | - [ ] Needed
16 | - [ ] Confusing
17 | - [ ] Not Sure?
18 |
19 | **Please Explain in Detail**
20 |
21 | A clear and concise description of what the problem is.
22 |
23 | **Your Proposal for Changes**
24 |
25 | A clear and concise description of how you would like the documentation to be.
26 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/riskObject.tsx:
--------------------------------------------------------------------------------
1 | import CommonData from "models/commonData";
2 | import Measure from "models/measure";
3 | import ObjectOnWellbore from "models/objectOnWellbore";
4 |
5 | export default interface RiskObject extends ObjectOnWellbore {
6 | type: string;
7 | category: string;
8 | subCategory: string;
9 | extendCategory: string;
10 | affectedPersonnel: string;
11 | dTimEnd?: string;
12 | dTimStart?: string;
13 | mdBitStart: Measure;
14 | mdBitEnd: Measure;
15 | severityLevel: string;
16 | probabilityLevel: string;
17 | summary: string;
18 | details: string;
19 | commonData: CommonData;
20 | }
21 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Models/Reports/MissingDataReport.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace WitsmlExplorer.Api.Models.Reports
3 | {
4 | public class MissingDataReport : BaseReport { }
5 |
6 | public class MissingDataReportItem
7 | {
8 | public string ObjectType { get; set; }
9 | public string Property { get; init; }
10 | public string WellUid { get; init; }
11 | public string WellName { get; init; }
12 | public string WellboreUid { get; init; }
13 | public string WellboreName { get; init; }
14 | public string ObjectUid { get; init; }
15 | public string ObjectName { get; init; }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/templates/dataGrid/objects/common/properties/DataGridWellVerticalDepthCoordProperties.ts:
--------------------------------------------------------------------------------
1 | import { DataGridProperty } from "templates/dataGrid/DataGridProperty";
2 |
3 | export const dataGridWellVerticalDepthCoordProperties: DataGridProperty[] = [
4 | {
5 | name: "uom",
6 | documentation: "The unit of measure of the quantity value.",
7 | isAttribute: true
8 | },
9 | {
10 | name: "datum",
11 | documentation:
12 | "A pointer to the reference datum for this coordinate value as defined in WellDatum. If not given then the default WellDatum must be assumed.",
13 | isAttribute: true
14 | }
15 | ];
16 |
--------------------------------------------------------------------------------
/Src/Witsml/Metrics/WitsmlMetricsExtensions.cs:
--------------------------------------------------------------------------------
1 | using OpenTelemetry.Metrics;
2 |
3 | namespace Witsml.Metrics;
4 |
5 | public static class WitsmlMetricsExtensions
6 | {
7 | // ReSharper disable once UnusedMember.Global (For usage by external applications)
8 | public static MeterProviderBuilder AddWitsmlInstrumentation(this MeterProviderBuilder builder)
9 | {
10 | builder.AddMeter(WitsmlMetrics.MeterName);
11 | builder.AddView("witsml.requests.duration", new ExplicitBucketHistogramConfiguration()
12 | {
13 | Boundaries = [0.5, 1, 3, 5, 10, 15, 30, 60]
14 | });
15 | return builder;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/templates/dataGrid/objects/common/properties/DataGridFootageDirection.ts:
--------------------------------------------------------------------------------
1 | import { DataGridProperty } from "templates/dataGrid/DataGridProperty";
2 |
3 | export const dataGridFootageNorthSouth: DataGridProperty[] = [
4 | {
5 | name: "uom",
6 | documentation: "The unit of measure of the distance value.",
7 | isAttribute: true
8 | },
9 | {
10 | name: "ref",
11 | documentation:
12 | "Specifies the reference line that is the origin of the distance.",
13 | isAttribute: true
14 | }
15 | ];
16 |
17 | export const dataGridFootageEastWest: DataGridProperty[] = [
18 | ...dataGridFootageNorthSouth
19 | ];
20 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/routes/ErrorPage.tsx:
--------------------------------------------------------------------------------
1 | import styled from "styled-components";
2 | import { useErrorMessage } from "../hooks/useErrorMessage";
3 | import Icon from "../styles/Icons";
4 |
5 | export function ErrorPage() {
6 | const errorMessage = useErrorMessage();
7 |
8 | return (
9 | <>
10 |
11 |
12 | An error occurred!
13 |
14 | {errorMessage}
15 | >
16 | );
17 | }
18 |
19 | const ErrorTitleContainer = styled.div`
20 | display: flex;
21 | align-items: center;
22 | gap: 8px;
23 | `;
24 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/dataWorkOrder/dataSourceConfigurationSet.ts:
--------------------------------------------------------------------------------
1 | import DataSourceConfiguration from "models/dataWorkOrder/dataSourceConfiguration";
2 |
3 | export default interface DataSourceConfigurationSet {
4 | uid: string;
5 | dataSourceConfigurations: DataSourceConfiguration[];
6 | }
7 |
8 | export const getLastDataSourceConfiguration = (
9 | dataSourceConfigurationSet: DataSourceConfigurationSet
10 | ) =>
11 | dataSourceConfigurationSet?.dataSourceConfigurations?.reduce(
12 | (last, current) =>
13 | last == null || (current.versionNumber ?? 0) > (last.versionNumber ?? 0)
14 | ? current
15 | : last,
16 | null
17 | );
18 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/geologyInterval.tsx:
--------------------------------------------------------------------------------
1 | import Lithology from "models/lithology";
2 | import Measure from "models/measure";
3 | import MeasureWithDatum from "models/measureWithDatum";
4 |
5 | export default interface GeologyInterval {
6 | uid: string;
7 | typeLithology: string;
8 | mdTop: MeasureWithDatum;
9 | mdBottom: MeasureWithDatum;
10 | tvdTop: MeasureWithDatum;
11 | tvdBase: MeasureWithDatum;
12 | ropAv: Measure;
13 | wobAv: Measure;
14 | tqAv: Measure;
15 | currentAv: Measure;
16 | rpmAv: Measure;
17 | wtMudAv: Measure;
18 | ecdTdAv: Measure;
19 | dxcAv: string;
20 | description: string;
21 | lithologies: Lithology[];
22 | }
23 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/server.ts:
--------------------------------------------------------------------------------
1 | export interface Server {
2 | id: string | undefined;
3 | name: string;
4 | description: string;
5 | url: string;
6 | roles: string[];
7 | credentialIds: string[];
8 | currentUsername?: string;
9 | usernames?: string[];
10 | depthLogDecimals: number;
11 | isPriority: boolean;
12 | }
13 |
14 | export function emptyServer(): Server {
15 | return {
16 | id: undefined,
17 | name: "",
18 | description: "",
19 | url: "",
20 | roles: [],
21 | credentialIds: [],
22 | currentUsername: undefined,
23 | usernames: [],
24 | depthLogDecimals: 0,
25 | isPriority: false
26 | };
27 | }
28 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/HttpHandlers/RiskHandler.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Threading.Tasks;
3 |
4 | using Microsoft.AspNetCore.Http;
5 | using Microsoft.AspNetCore.Mvc;
6 |
7 | using WitsmlExplorer.Api.Models;
8 | using WitsmlExplorer.Api.Services;
9 | namespace WitsmlExplorer.Api.HttpHandlers
10 | {
11 | public static class RiskHandler
12 | {
13 | [Produces(typeof(IEnumerable))]
14 | public static async Task GetRisks(string wellUid, string wellboreUid, IRiskService riskService)
15 | {
16 | return TypedResults.Ok(await riskService.GetRisks(wellUid, wellboreUid));
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Models/LogCurvePriority.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Text.Json;
3 | using System.Text.Json.Serialization;
4 |
5 | using WitsmlExplorer.Api.Repositories;
6 |
7 | namespace WitsmlExplorer.Api.Models
8 | {
9 | public class LogCurvePriority : DbDocument
10 | {
11 | public LogCurvePriority(string id) : base(id)
12 | {
13 | }
14 |
15 | [JsonPropertyName("prioritizedcurves")]
16 | public IList PrioritizedCurves { get; set; }
17 |
18 | public override string ToString()
19 | {
20 | return JsonSerializer.Serialize(this);
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/dataWorkOrder/channelRequirement.ts:
--------------------------------------------------------------------------------
1 | import { RequirementPurpose } from "models/dataWorkOrder/requirementPurpose";
2 | import Measure from "models/measure";
3 |
4 | export default interface ChannelRequirement {
5 | uid: string;
6 | purpose: RequirementPurpose;
7 | minInterval: Measure;
8 | maxInterval: Measure;
9 | minPrecision: Measure;
10 | maxPrecision: Measure;
11 | minValue: Measure;
12 | maxValue: Measure;
13 | minStep: Measure;
14 | maxStep: Measure;
15 | minDelta: Measure;
16 | maxDelta: Measure;
17 | latency: Measure;
18 | mdThreshold: Measure;
19 | dynamicMdThreshold: boolean;
20 | comments: string;
21 | }
22 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Tubular/WitsmlSensor.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | using Witsml.Data.Measures;
4 |
5 | namespace Witsml.Data.Tubular
6 | {
7 | public class WitsmlSensor
8 | {
9 | [XmlAttribute("uid")]
10 | public string Uid { get; set; }
11 |
12 | [XmlElement("typeMeasurement")]
13 | public string TypeMeasurement { get; set; }
14 |
15 | [XmlElement("offsetBot")]
16 | public Measure OffsetBot { get; set; }
17 |
18 | [XmlElement("comments")]
19 | public string Comments { get; set; }
20 |
21 | [XmlElement("customData")]
22 | public WitsmlCustomData CustomData { get; set; }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/WitsmlIndexedObject.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace Witsml.Data
4 | {
5 | public class WitsmlIndexedObject
6 | {
7 |
8 | [XmlText]
9 | public string Value { get; set; }
10 |
11 | [XmlAttribute("index")]
12 | public string Index { get; set; }
13 |
14 | [XmlAttribute("name")]
15 | public string Name { get; set; }
16 |
17 | [XmlAttribute("uom")]
18 | public string Uom { get; set; }
19 |
20 | [XmlAttribute("description")]
21 | public string Description { get; set; }
22 |
23 | [XmlAttribute("uid")]
24 | public string Uid { get; set; }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/ContextMenus/UidMappingUtils.tsx:
--------------------------------------------------------------------------------
1 | import { UidMappingDbQuery } from "../../models/uidMapping.tsx";
2 | import UidMappingService from "../../services/uidMappingService.tsx";
3 |
4 | export const getTargetWellboreID = async (dbQuery: UidMappingDbQuery) => {
5 | const mappings = await UidMappingService.queryUidMapping(dbQuery);
6 | if (mappings.length > 0) {
7 | return {
8 | targetWellId: mappings[0].targetWellId,
9 | targetWellboreId: mappings[0].targetWellboreId
10 | };
11 | } else {
12 | return {
13 | targetWellId: dbQuery.sourceWellId,
14 | targetWellboreId: dbQuery.sourceWellboreId
15 | };
16 | }
17 | };
18 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/TimeConversionUtils.tsx:
--------------------------------------------------------------------------------
1 | export const timePattern = /^([01]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/;
2 |
3 | export const convertMillisecondsToTimeString = (ms: number): string => {
4 | const date = new Date(ms);
5 | return (
6 | ("" + date.getUTCHours()).padStart(2, "0") +
7 | ":" +
8 | ("" + date.getUTCMinutes()).padStart(2, "0") +
9 | ":" +
10 | ("" + date.getUTCSeconds()).padStart(2, "0")
11 | );
12 | };
13 |
14 | export const convertTimeStringToMilliseconds = (time: string): number => {
15 | const [hours, minutes, seconds] = time.split(":").map(Number);
16 | return (hours * 3600 + minutes * 60 + seconds) * 1000;
17 | };
18 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/WitsmlTrajRawData.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | using Witsml.Data.Measures;
4 |
5 | namespace Witsml.Data
6 | {
7 | public class WitsmlTrajRawData
8 | {
9 | [XmlElement("gravAxialRaw")] public Measure GravAxialRaw { get; set; }
10 | [XmlElement("gravTran1Raw")] public Measure GravTran1Raw { get; set; }
11 | [XmlElement("gravTran2Raw")] public Measure GravTran2Raw { get; set; }
12 | [XmlElement("magAxialRaw")] public Measure MagAxialRaw { get; set; }
13 | [XmlElement("magTran1Raw")] public Measure MagTran1Raw { get; set; }
14 | [XmlElement("magTran2Raw")] public Measure MagTran2Raw { get; set; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/Select.tsx:
--------------------------------------------------------------------------------
1 | import { NativeSelect } from "@equinor/eds-core-react";
2 | import styled from "styled-components";
3 | import { Colors } from "styles/Colors";
4 |
5 | export const StyledNativeSelect = styled(NativeSelect)<{ colors: Colors }>`
6 | select {
7 | background: ${(props) => props.colors.text.staticTextFieldDefault};
8 | color: ${(props) => props.colors.text.staticIconsDefault};
9 | option {
10 | background: ${(props) => props.colors.ui.backgroundLight};
11 | color: ${(props) => props.colors.text.staticIconsDefault};
12 | }
13 | }
14 | label {
15 | color: ${(props) => props.colors.text.staticIconsDefault};
16 | }
17 | `;
18 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/jobs/jobInfo.tsx:
--------------------------------------------------------------------------------
1 | import JobStatus from "models/jobStatus";
2 | import ReportType from "models/reportType";
3 |
4 | export default interface JobInfo {
5 | jobType: string;
6 | description: string;
7 | id: string;
8 | username: string;
9 | witsmlTargetUsername: string;
10 | witsmlSourceUsername: string;
11 | sourceServer: string;
12 | targetServer: string;
13 | wellName: string;
14 | wellboreName: string;
15 | objectName: string;
16 | startTime: string;
17 | endTime: string;
18 | killTime: string;
19 | status: JobStatus;
20 | failedReason: string;
21 | progress: number;
22 | isCancelable: boolean;
23 | reportType: ReportType;
24 | }
25 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/styles/global.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: "Equinor";
3 | src: url("/assets/fonts/Equinor-Regular.woff2");
4 | font-weight: normal;
5 | font-style: normal;
6 | }
7 | @font-face {
8 | font-family: "EquinorRegular";
9 | src: url("/assets/fonts/Equinor-Regular.woff2");
10 | font-weight: normal;
11 | font-style: normal;
12 | }
13 | @font-face {
14 | font-family: "EquinorBold";
15 | src: url("/assets/fonts/Equinor-Bold.woff2");
16 | font-weight: normal;
17 | font-style: normal;
18 | }
19 | @font-face {
20 | font-family: "EquinorMedium";
21 | src: url("/assets/fonts/Equinor-Medium.woff2");
22 | font-weight: normal;
23 | font-style: normal;
24 | }
25 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/templates/dataGrid/objects/common/properties/DataGridRefObjectStringProperties.ts:
--------------------------------------------------------------------------------
1 | import { DataGridProperty } from "templates/dataGrid/DataGridProperty";
2 |
3 | export const dataGridRefObjectStringProperties: DataGridProperty[] = [
4 | {
5 | name: "object",
6 | documentation:
7 | "The type of data-object being referenced (e.g., 'well', 'wellbore').",
8 | isAttribute: true
9 | },
10 | {
11 | name: "uidRef",
12 | documentation:
13 | "A reference to the unique identifier (uid attribute) in the object referenced by the name value. This attribute is required within the context of a WITSML server.",
14 | isAttribute: true
15 | }
16 | ];
17 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Configuration/ConfigConstants.cs:
--------------------------------------------------------------------------------
1 | namespace WitsmlExplorer.Api.Configuration
2 | {
3 | public static class ConfigConstants
4 | {
5 | public static readonly string WitsmlServerCredsSection = "WitsmlCreds";
6 | public static readonly string KVWitsmlServerCreds = "KVWitsmlServerCreds";
7 | public static readonly string OAuth2Enabled = "OAuth2Enabled";
8 | public static readonly string LogQueries = "LogQueries";
9 | public static readonly string NotificationsKey = "NotificationsKey";
10 | public static readonly string IsDesktopApp = "IsDesktopApp";
11 | public static readonly string EnableHttp = "EnableHttp";
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/bhaRun.tsx:
--------------------------------------------------------------------------------
1 | import CommonData from "models/commonData";
2 | import Measure from "models/measure";
3 | import ObjectOnWellbore from "models/objectOnWellbore";
4 | import RefNameString from "models/refNameString";
5 |
6 | export default interface BhaRun extends ObjectOnWellbore {
7 | numStringRun: string;
8 | tubular: RefNameString;
9 | dTimStart: string;
10 | dTimStop: string;
11 | dTimStartDrilling: string;
12 | dTimStopDrilling: string;
13 | planDogleg: Measure;
14 | actDogleg: Measure;
15 | actDoglegMx: Measure;
16 | statusBha: string;
17 | numBitRun: string;
18 | reasonTrip: string;
19 | objectiveBha: string;
20 | commonData: CommonData;
21 | }
22 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/dataWorkOrder/dataWorkOrder.ts:
--------------------------------------------------------------------------------
1 | import CommonData from "models/commonData";
2 | import AssetContact from "models/dataWorkOrder/assetContact";
3 | import DataSourceConfigurationSet from "models/dataWorkOrder/dataSourceConfigurationSet";
4 | import ObjectOnWellbore from "models/objectOnWellbore";
5 |
6 | export default interface DataWorkOrder extends ObjectOnWellbore {
7 | field: string;
8 | dataProvider: string;
9 | dataConsumer: string;
10 | description: string;
11 | dTimPlannedStart: string;
12 | dTimPlannedStop: string;
13 | assetContacts: AssetContact[];
14 | dataSourceConfigurationSets: DataSourceConfigurationSet[];
15 | commonData: CommonData;
16 | }
17 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/jobs/deleteJobs.ts:
--------------------------------------------------------------------------------
1 | import ComponentReferences from "models/jobs/componentReferences";
2 | import ObjectReferences from "models/jobs/objectReferences";
3 | import WellboreReference from "models/jobs/wellboreReference";
4 |
5 | export interface DeleteObjectsJob {
6 | toDelete: ObjectReferences;
7 | }
8 |
9 | export interface DeleteComponentsJob {
10 | toDelete: ComponentReferences;
11 | }
12 |
13 | export interface DeleteWellboreJob {
14 | toDelete: WellboreReference;
15 | cascadedDelete: boolean;
16 | }
17 |
18 | export interface DeleteWellJob {
19 | toDelete: {
20 | wellUid: string;
21 | wellName: string;
22 | };
23 | cascadedDelete: boolean;
24 | }
25 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/templates/dataGrid/objects/common/properties/DataGridMeasuredDepthCoordProperties.ts:
--------------------------------------------------------------------------------
1 | import { DataGridProperty } from "templates/dataGrid/DataGridProperty";
2 |
3 | export const dataGridMeasuredDepthCoordProperties: DataGridProperty[] = [
4 | {
5 | name: "uom",
6 | documentation: "The unit of measure of the quantity value.",
7 | isAttribute: true
8 | },
9 | {
10 | name: "datum",
11 | documentation:
12 | "A pointer to the reference datum for this coordinate value as defined in WellDatum. This value is assumed to match the uid value in a WellDatum. If not given then the default WellDatum must be assumed.",
13 | isAttribute: true
14 | }
15 | ];
16 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/hooks/useErrorMessage.tsx:
--------------------------------------------------------------------------------
1 | import { isRouteErrorResponse, useRouteError } from "react-router-dom";
2 |
3 | export function useErrorMessage() {
4 | const error = useRouteError();
5 |
6 | let errorMessage: string;
7 | if (isRouteErrorResponse(error)) {
8 | errorMessage = error.statusText;
9 | } else if (error instanceof Error) {
10 | errorMessage = error.message;
11 | } else if (typeof error === "string") {
12 | errorMessage = error;
13 | } else {
14 | console.error(error);
15 | errorMessage =
16 | "Unknown error. You can find more information by checking the 'Console' tab in the developer tools.";
17 | }
18 |
19 | return errorMessage;
20 | }
21 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Jobs/Common/WellReference.cs:
--------------------------------------------------------------------------------
1 | namespace WitsmlExplorer.Api.Jobs.Common
2 | {
3 | public class WellReference : IReference
4 | {
5 | public string WellUid { get; set; }
6 | public string WellName { get; set; }
7 |
8 | public string Description()
9 | {
10 | return $"WellUid: {WellUid}; ";
11 | }
12 |
13 | public string GetObjectName()
14 | {
15 | return null;
16 | }
17 |
18 | public string GetWellboreName()
19 | {
20 | return null;
21 | }
22 |
23 | public string GetWellName()
24 | {
25 | return WellName;
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Pages/Error.cshtml.cs:
--------------------------------------------------------------------------------
1 | using System.Diagnostics;
2 |
3 | using Microsoft.AspNetCore.Mvc;
4 | using Microsoft.AspNetCore.Mvc.RazorPages;
5 |
6 | namespace WitsmlExplorer.Api.Pages
7 | {
8 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
9 | public class ErrorModel : PageModel
10 | {
11 | public ErrorModel()
12 | {
13 | }
14 |
15 | public string RequestId { get; set; }
16 |
17 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
18 |
19 | public void OnGet()
20 | {
21 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Services/CapService.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using System.Threading.Tasks;
4 |
5 | using Witsml.Data;
6 |
7 | namespace WitsmlExplorer.Api.Services
8 | {
9 | public interface ICapService
10 | {
11 | Task GetCap();
12 | }
13 |
14 | public class CapService : WitsmlService, ICapService
15 | {
16 | public CapService(IWitsmlClientProvider witsmlClientProvider) : base(witsmlClientProvider) { }
17 |
18 | public async Task GetCap()
19 | {
20 | return (await _witsmlClient.GetCap()).ServerCapabilities?.FirstOrDefault();
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/StyledComponents/Checkbox.tsx:
--------------------------------------------------------------------------------
1 | import { Checkbox as EdsCheckbox } from "@equinor/eds-core-react";
2 | import styled from "styled-components";
3 | import { Colors } from "styles/Colors";
4 |
5 | export const Checkbox = styled(EdsCheckbox)<{
6 | colors: Colors;
7 | disabled?: boolean;
8 | }>`
9 | span {
10 | color: ${(props) =>
11 | props.disabled
12 | ? props.colors.text.disabledText
13 | : props.colors.infographic.primaryMossGreen};
14 | }
15 | input[type="checkbox"] + svg {
16 | fill: ${(props) =>
17 | props.disabled
18 | ? props.colors.text.disabledText
19 | : props.colors.infographic.primaryMossGreen};
20 | }
21 | `;
22 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/HttpHandlers/ChangeLogHandler.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Threading.Tasks;
3 |
4 | using Microsoft.AspNetCore.Http;
5 | using Microsoft.AspNetCore.Mvc;
6 |
7 | using WitsmlExplorer.Api.Models;
8 | using WitsmlExplorer.Api.Services;
9 |
10 | namespace WitsmlExplorer.Api.HttpHandlers
11 | {
12 | public static class ChangeLogHandler
13 | {
14 | [Produces(typeof(IEnumerable))]
15 | public static async Task GetChangeLogs(string wellUid, string wellboreUid, IChangeLogService changeLogService)
16 | {
17 | return TypedResults.Ok(await changeLogService.GetChangeLogs(wellUid, wellboreUid));
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Jobs/ModifyWellJob.cs:
--------------------------------------------------------------------------------
1 | using WitsmlExplorer.Api.Models;
2 |
3 | namespace WitsmlExplorer.Api.Jobs
4 | {
5 | public record ModifyWellJob : Job
6 | {
7 | public Well Well { get; init; }
8 |
9 | public override string Description()
10 | {
11 | return $"ToModify - WellUid: {Well.Uid};";
12 | }
13 |
14 | public override string GetObjectName()
15 | {
16 | return null;
17 | }
18 |
19 | public override string GetWellboreName()
20 | {
21 | return null;
22 | }
23 |
24 | public override string GetWellName()
25 | {
26 | return Well.Name;
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/trajectory.tsx:
--------------------------------------------------------------------------------
1 | import CommonData from "models/commonData";
2 | import MeasureWithDatum from "models/measureWithDatum";
3 | import ObjectOnWellbore from "models/objectOnWellbore";
4 | import TrajectoryStation from "models/trajectoryStation";
5 |
6 | export default interface Trajectory extends ObjectOnWellbore {
7 | mdMin: MeasureWithDatum;
8 | mdMax: MeasureWithDatum;
9 | aziRef: string;
10 | dTimTrajStart: string;
11 | dTimTrajEnd: string;
12 | serviceCompany?: string;
13 | trajectoryStations: TrajectoryStation[];
14 | commonData: CommonData;
15 | }
16 |
17 | export const aziRefValues = [
18 | "unknown",
19 | "grid north",
20 | "magnetic north",
21 | "true north"
22 | ];
23 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Jobs/CreateWellJob.cs:
--------------------------------------------------------------------------------
1 | using WitsmlExplorer.Api.Models;
2 |
3 | namespace WitsmlExplorer.Api.Jobs
4 | {
5 | public record CreateWellJob : Job
6 | {
7 | public Well Well { get; init; }
8 |
9 | public override string Description()
10 | {
11 | return $"Create Well - WellUid: {Well.Uid};";
12 | }
13 |
14 | public override string GetObjectName()
15 | {
16 | return null;
17 | }
18 |
19 | public override string GetWellboreName()
20 | {
21 | return null;
22 | }
23 |
24 | public override string GetWellName()
25 | {
26 | return Well.Name;
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Models/Reports/DeleteEmptyMnemonicsReport.cs:
--------------------------------------------------------------------------------
1 | using WitsmlExplorer.Api.Jobs.Common;
2 |
3 | namespace WitsmlExplorer.Api.Models.Reports
4 | {
5 | public class DeleteEmptyMnemonicsReport : BaseReport
6 | {
7 | }
8 |
9 | public class DeleteEmptyMnemonicsReportItem
10 | {
11 | public string WellName { get; init; }
12 | public string WellUid { get; init; }
13 | public string WellboreName { get; init; }
14 | public string WellboreUid { get; init; }
15 | public string LogName { get; init; }
16 | public string LogUid { get; init; }
17 | public string LogIndexType { get; init; }
18 | public string Mnemonic { get; init; }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/Modals/ConfigurationChangeReasonModal/AffectedGroup/AffectedGroup.tsx:
--------------------------------------------------------------------------------
1 | import React, { FC, PropsWithChildren } from "react";
2 | import {
3 | AffectedChannels,
4 | AffectedLayout,
5 | ListLabel,
6 | StyledListItem
7 | } from "./style.ts";
8 |
9 | type AffectedGroupProps = PropsWithChildren<{
10 | color: string;
11 | label: string;
12 | }>;
13 |
14 | const AffectedGroup: FC = ({ color, label, children }) => (
15 |
16 |
17 | {label}
18 | {children}
19 |
20 |
21 | );
22 |
23 | export default AffectedGroup;
24 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/logObject.tsx:
--------------------------------------------------------------------------------
1 | import CommonData from "models/commonData";
2 | import ObjectOnWellbore from "models/objectOnWellbore";
3 |
4 | export default interface LogObject extends ObjectOnWellbore {
5 | indexType?: string;
6 | startIndex?: string;
7 | endIndex?: string;
8 | objectGrowing?: boolean;
9 | serviceCompany?: string;
10 | runNumber?: string;
11 | indexCurve?: string;
12 | direction?: string;
13 | mnemonics?: string;
14 | commonData?: CommonData;
15 | sameNameIndex?: string;
16 | }
17 |
18 | export const indexToNumber = (index: string): number => {
19 | if (index == null || index === "") {
20 | return NaN;
21 | }
22 | return Number(index.replace(/[^\d.-]/g, ""));
23 | };
24 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/reports/BaseReport.tsx:
--------------------------------------------------------------------------------
1 | export default interface BaseReport {
2 | title: string;
3 | summary: string;
4 | reportItems: any[];
5 | dateTimeColumns?: string[];
6 | warningMessage?: string;
7 | hasFile?: boolean;
8 | jobDetails?: string;
9 | }
10 |
11 | export const createReport = (
12 | title = "",
13 | summary = "",
14 | reportItems: any[] = [],
15 | dateTimeColumns: string[] = null,
16 | warningMessage: string = null,
17 | hasFile: boolean = null,
18 | jobDetails: string = null
19 | ): BaseReport => {
20 | return {
21 | title,
22 | summary,
23 | reportItems,
24 | dateTimeColumns,
25 | warningMessage,
26 | hasFile,
27 | jobDetails
28 | };
29 | };
30 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/enhancement.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Enhancement
3 | about: Used for improvements such as code refactor, added tests etc
4 | title: ''
5 | labels: enhancement
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/routes/utils/checkIsUrlTooLong.ts:
--------------------------------------------------------------------------------
1 | import { MAX_URL_LENGTH } from "components/Constants";
2 | import { URLSearchParamsInit, createSearchParams } from "react-router-dom";
3 |
4 | export const checkIsUrlTooLong = (
5 | pathname: string,
6 | searchParams: URLSearchParamsInit | string
7 | ): boolean => {
8 | let searchParamsUrlFormat = "";
9 | if (typeof searchParams === "string") {
10 | searchParamsUrlFormat = searchParams;
11 | } else {
12 | searchParamsUrlFormat = createSearchParams(searchParams).toString();
13 | }
14 | const pathnameLength = pathname.length;
15 | const searchParamsLength = searchParamsUrlFormat.length;
16 | return pathnameLength + searchParamsLength > MAX_URL_LENGTH;
17 | };
18 |
--------------------------------------------------------------------------------
/Src/Witsml/Extensions/UriExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Witsml.Extensions;
4 |
5 | public static class UriExtensions
6 | {
7 | ///
8 | /// Determines whether two specified Uri objects have the same value ignore case.
9 | ///
10 | /// The first Uri to compare.
11 | /// The second Uri to compare.
12 | /// True if the value of the parameter is equal to the value of the , otherwise return false.
13 | public static bool EqualsIgnoreCase(this Uri firstUri, Uri secondUri)
14 | {
15 | return string.Equals(firstUri?.AbsoluteUri, secondUri?.AbsoluteUri, StringComparison.OrdinalIgnoreCase);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Tests/WitsmlExplorer.Api.Tests/Workers/CopyTestsUtils.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | using Moq;
4 |
5 | using Witsml;
6 | using Witsml.Data;
7 |
8 | namespace WitsmlExplorer.Api.Tests.Workers
9 | {
10 | public class CopyTestsUtils
11 | {
12 | public static IEnumerable SetupAddInStoreAsync(Mock witsmlClient) where T : IWitsmlQueryType
13 | {
14 | List addedObject = new();
15 | witsmlClient.Setup(client => client.AddToStoreAsync(It.IsAny()))
16 | .Callback((o) => addedObject.Add((T)o))
17 | .ReturnsAsync(new QueryResult(true));
18 | return addedObject;
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature-request---.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: "Feature request \U0001F4A1"
3 | about: Suggest an idea for this project
4 | title: "\U0001F4A1"
5 | labels: feature request
6 | assignees: ''
7 |
8 | ---
9 |
10 | **💡 Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Models/UidMappingCollection.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Text.Json;
3 | using System.Text.Json.Serialization;
4 |
5 | using WitsmlExplorer.Api.Repositories;
6 |
7 | namespace WitsmlExplorer.Api.Models
8 | {
9 | public class UidMappingCollection : DbDocument
10 | {
11 | public UidMappingCollection(string id) : base(id)
12 | {
13 | MappingCollection = new List();
14 | }
15 |
16 | [JsonPropertyName("mappingCollection")]
17 | public List MappingCollection { get; set; }
18 |
19 | public override string ToString()
20 | {
21 | return JsonSerializer.Serialize(this);
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/dataWorkOrder/channelConfiguration.ts:
--------------------------------------------------------------------------------
1 | import { ChannelCriticality } from "models/dataWorkOrder/channelCriticality";
2 | import ChannelRequirement from "models/dataWorkOrder/channelRequirement";
3 | import { LogIndexType } from "models/dataWorkOrder/logIndexType";
4 | import Measure from "models/measure";
5 |
6 | export default interface ChannelConfiguration {
7 | uid: string;
8 | mnemonic: string;
9 | uom: string;
10 | globalMnemonic: string;
11 | indexType: LogIndexType;
12 | toolName: string;
13 | service: string;
14 | sensorOffset: Measure;
15 | criticality: ChannelCriticality;
16 | logName: string;
17 | description: string;
18 | comments: string;
19 | requirements: ChannelRequirement[];
20 | }
21 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/hooks/query/useGetWell.tsx:
--------------------------------------------------------------------------------
1 | import { QueryObserverResult } from "@tanstack/react-query";
2 | import { Server } from "../../models/server";
3 | import Well from "../../models/well";
4 | import { QueryOptions } from "./queryOptions";
5 | import { useGetWells } from "./useGetWells";
6 |
7 | type WellQueryResult = Omit<
8 | QueryObserverResult,
9 | "data" | "refetch"
10 | > & {
11 | well: Well | undefined;
12 | };
13 |
14 | export const useGetWell = (
15 | server: Server,
16 | wellUid: string,
17 | options?: QueryOptions
18 | ): WellQueryResult => {
19 | const { wells, ...state } = useGetWells(server, options);
20 | const well = wells?.find((w) => w.uid === wellUid);
21 | return { well, ...state };
22 | };
23 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/templates/dataGrid/objects/common/properties/DataGridWellElevationCoordProperties.ts:
--------------------------------------------------------------------------------
1 | import { DataGridProperty } from "templates/dataGrid/DataGridProperty";
2 |
3 | export const dataGridWellElevationCoordProperties: DataGridProperty[] = [
4 | {
5 | name: "uom",
6 | documentation:
7 | "The unit of measure of the quantity value. If not given then the default unit of measure of the explicitly or implicitly given datum must be assumed.",
8 | isAttribute: true
9 | },
10 | {
11 | name: "datum",
12 | documentation:
13 | "A pointer to the reference datum for this coordinate value as defined in WellDatum. If not given then the default WellDatum must be assumed.",
14 | isAttribute: true
15 | }
16 | ];
17 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/WitsmlObjectReference.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace Witsml.Data
4 | {
5 | public class WitsmlObjectReference
6 | {
7 | [XmlAttribute("object")]
8 | public string Object { get; set; }
9 |
10 | [XmlAttribute("uidRef")]
11 | public string UidRef { get; set; }
12 |
13 | [XmlText]
14 | public string Value { get; set; }
15 |
16 | public WitsmlObjectReference() { }
17 |
18 | public WitsmlObjectReference(string obj, string uidRef)
19 | {
20 | Object = obj;
21 | UidRef = uidRef;
22 | }
23 |
24 | public override string ToString()
25 | {
26 | return $"{Object}{UidRef}";
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/rig.tsx:
--------------------------------------------------------------------------------
1 | import CommonData from "models/commonData";
2 | import Measure from "models/measure";
3 | import ObjectOnWellbore from "models/objectOnWellbore";
4 |
5 | export default interface Rig extends ObjectOnWellbore {
6 | airGap: Measure;
7 | approvals: string;
8 | commonData: CommonData;
9 | classRig: string;
10 | dTimEndOp: string;
11 | dTimStartOp: string;
12 | emailAddress: string;
13 | faxNumber: string;
14 | itemState?: string;
15 | isOffshore?: boolean;
16 | manufacturer: string;
17 | nameContact: string;
18 | owner: string;
19 | ratingDrillDepth: Measure;
20 | ratingWaterDepth: Measure;
21 | registration: string;
22 | telNumber: string;
23 | typeRig: string;
24 | yearEntService: string;
25 | }
26 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/uidMapping.tsx:
--------------------------------------------------------------------------------
1 | export interface UidMapping {
2 | sourceServerId: string;
3 | sourceWellId: string;
4 | sourceWellboreId: string;
5 | targetServerId: string;
6 | targetWellId: string;
7 | targetWellboreId: string;
8 | username?: string;
9 | timestamp?: string;
10 | }
11 |
12 | export type UidMappingDbQuery = Required<
13 | Pick
14 | > &
15 | Partial<
16 | Pick<
17 | UidMapping,
18 | "sourceWellId" | "sourceWellboreId" | "targetWellId" | "targetWellboreId"
19 | >
20 | >;
21 |
22 | export interface UidMappingBasicInfo {
23 | sourceWellId: string;
24 | sourceWellboreId: string;
25 | targetServerId: string;
26 | targetServerName: string;
27 | }
28 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Curves/Row.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Globalization;
3 | using System.Linq;
4 |
5 | namespace Witsml.Data.Curves
6 | {
7 | public class Row
8 | {
9 | public Index Index { get; }
10 | public IEnumerable Values { get; }
11 |
12 | public Row(string commaSeparated)
13 | {
14 | string[] row = commaSeparated.Split(CommonConstants.DataSeparator);
15 | Index = DateTimeIndex.TryParseISODate(row.First(), out DateTimeIndex witsmlDateTime)
16 | ? witsmlDateTime
17 | : new DepthIndex(double.Parse(row.First(), CultureInfo.InvariantCulture));
18 |
19 | Values = row[1..].Select(CurveValue.From);
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/serverCapabilities.tsx:
--------------------------------------------------------------------------------
1 | export interface ServerCapabilities {
2 | apiVers: string;
3 | contact: ContactInformation;
4 | description: string;
5 | name: string;
6 | vendor: string;
7 | version: string;
8 | schemaVersion: string;
9 | maxRequestLatestValues: number;
10 | functions: ServerCapabilitiesFunction[];
11 | }
12 |
13 | export interface ServerCapabilitiesFunction {
14 | name: string;
15 | dataObjects: ServerCapabilitiesFunctionDataObject[];
16 | }
17 |
18 | export interface ServerCapabilitiesFunctionDataObject {
19 | name: string;
20 | maxDataNodes: number;
21 | maxDataPoints: number;
22 | }
23 |
24 | export interface ContactInformation {
25 | name: string;
26 | email: string;
27 | phone: string;
28 | }
29 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/generic-issue---.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: "Generic issue \U0001F449"
3 | about: Use this template to create issues where none of the other templates apply
4 | title: "\U0001F449"
5 | labels: question
6 | assignees: ''
7 |
8 | ---
9 |
10 | **👉 Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/WitsmlObjectOnWellbore.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 |
4 | namespace Witsml.Data
5 | {
6 | public abstract class WitsmlObjectOnWellbore
7 | {
8 | public abstract IWitsmlQueryType AsItemInWitsmlList();
9 |
10 | [XmlAttribute("uidWell")]
11 | public string UidWell { get; set; }
12 | [XmlAttribute("uidWellbore")]
13 | public string UidWellbore { get; set; }
14 | [XmlAttribute("uid")]
15 | public string Uid { get; set; }
16 | [XmlElement("nameWell")]
17 | public string NameWell { get; set; }
18 | [XmlElement("nameWellbore")]
19 | public string NameWellbore { get; set; }
20 | [XmlElement("name")]
21 | public string Name { get; set; }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Models/CommonTime.cs:
--------------------------------------------------------------------------------
1 | using Witsml.Data;
2 |
3 | using WitsmlExplorer.Api.Services;
4 |
5 | namespace WitsmlExplorer.Api.Models
6 | {
7 | public class CommonTime
8 | {
9 | public string DTimCreation { get; init; }
10 | public string DTimLastChange { get; init; }
11 | }
12 |
13 | public static class CommonTimeExtensions
14 | {
15 | public static WitsmlCommonTime ToWitsml(this CommonTime commonTime)
16 | {
17 | return new WitsmlCommonTime
18 | {
19 | DTimCreation = StringHelpers.ToUniversalDateTimeString(commonTime.DTimCreation),
20 | DTimLastChange = StringHelpers.ToUniversalDateTimeString(commonTime.DTimLastChange)
21 | };
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Jobs/ModifyWellboreJob.cs:
--------------------------------------------------------------------------------
1 | using WitsmlExplorer.Api.Models;
2 |
3 | namespace WitsmlExplorer.Api.Jobs
4 | {
5 | public record ModifyWellboreJob : Job
6 | {
7 | public Wellbore Wellbore { get; init; }
8 |
9 | public override string Description()
10 | {
11 | return $"ToModify - WellUid: {Wellbore.WellUid}; WellboreUid: {Wellbore.Uid};";
12 | }
13 |
14 | public override string GetObjectName()
15 | {
16 | return null;
17 | }
18 |
19 | public override string GetWellboreName()
20 | {
21 | return Wellbore.Name;
22 | }
23 |
24 | public override string GetWellName()
25 | {
26 | return Wellbore.WellName;
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Tests/WitsmlExplorer.Api.Tests/WitsmlExplorer.Api.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net8.0
5 | latestMajor
6 | false
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Rig/WitsmlRigs.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using System.Xml.Serialization;
4 |
5 | namespace Witsml.Data.Rig
6 | {
7 | [XmlRoot("rigs", Namespace = "http://www.witsml.org/schemas/1series")]
8 | public class WitsmlRigs : IWitsmlObjectList
9 | {
10 | [XmlAttribute("version")]
11 | public string Version = "1.4.1.1";
12 |
13 | [XmlElement("rig")]
14 | public List Rigs { get; set; } = new List();
15 |
16 | public string TypeName => "rig";
17 |
18 | [XmlIgnore]
19 | public IEnumerable Objects
20 | {
21 | get => Rigs;
22 | set => Rigs = value.Select(obj => (WitsmlRig)obj).ToList();
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/WitsmlRisks.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using System.Xml.Serialization;
4 |
5 | namespace Witsml.Data
6 | {
7 | [XmlRoot("risks", Namespace = "http://www.witsml.org/schemas/1series")]
8 | public class WitsmlRisks : IWitsmlObjectList
9 | {
10 | [XmlAttribute("version")]
11 | public string Version = "1.4.1.1";
12 |
13 | [XmlElement("risk")]
14 | public List Risks { get; set; } = new List();
15 |
16 | public string TypeName => "risk";
17 |
18 | [XmlIgnore]
19 | public IEnumerable Objects
20 | {
21 | get => Risks;
22 | set => Risks = value.Select(obj => (WitsmlRisk)obj).ToList();
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/tools/logSameNamesHelper.tsx:
--------------------------------------------------------------------------------
1 | import LogObject from "models/logObject";
2 |
3 | export const getNameOccurrenceSuffix = (
4 | logObjects: LogObject[],
5 | logObject: LogObject
6 | ): string => {
7 | if (logObject.runNumber) {
8 | return ` (${logObject.runNumber})`;
9 | }
10 |
11 | const filteredObjects = logObjects
12 | .filter(
13 | (obj) =>
14 | obj.name === logObject.name &&
15 | obj.indexType === logObject.indexType &&
16 | !obj.runNumber
17 | )
18 | .sort((a, b) => a.uid.localeCompare(b.uid));
19 |
20 | if (filteredObjects.length > 1) {
21 | const index = filteredObjects.findIndex((obj) => obj.uid === logObject.uid);
22 | return ` [${String.fromCharCode(97 + index)}]`;
23 | }
24 |
25 | return "";
26 | };
27 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/WitsmlLogs.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using System.Xml.Serialization;
4 |
5 | namespace Witsml.Data
6 | {
7 | [XmlRoot("logs", Namespace = "http://www.witsml.org/schemas/1series")]
8 | public class WitsmlLogs : IWitsmlGrowingDataQueryType, IWitsmlObjectList
9 | {
10 | [XmlAttribute("version")]
11 | public string Version = "1.4.1.1";
12 |
13 | [XmlElement("log")]
14 | public List Logs { get; set; } = new();
15 |
16 | public string TypeName => "log";
17 |
18 | [XmlIgnore]
19 | public IEnumerable Objects
20 | {
21 | get => Logs;
22 | set => Logs = value.Select(obj => (WitsmlLog)obj).ToList();
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Jobs/CheckLogHeaderJob.cs:
--------------------------------------------------------------------------------
1 | using WitsmlExplorer.Api.Models;
2 |
3 | namespace WitsmlExplorer.Api.Jobs
4 | {
5 | public record CheckLogHeaderJob : Job
6 | {
7 | public LogObject LogReference { get; init; }
8 |
9 | public override string Description()
10 | {
11 | return $"Check Log Headers - Log: {LogReference.Name}";
12 | }
13 |
14 | public override string GetObjectName()
15 | {
16 | return LogReference.Name;
17 | }
18 |
19 | public override string GetWellboreName()
20 | {
21 | return LogReference.WellboreName;
22 | }
23 |
24 | public override string GetWellName()
25 | {
26 | return LogReference.WellName;
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Jobs/CreateWellboreJob.cs:
--------------------------------------------------------------------------------
1 | using WitsmlExplorer.Api.Models;
2 |
3 | namespace WitsmlExplorer.Api.Jobs
4 | {
5 | public record CreateWellboreJob : Job
6 | {
7 | public Wellbore Wellbore { get; init; }
8 |
9 | public override string Description()
10 | {
11 | return $"Create Wellbore - WellUid: {Wellbore.WellUid}; WellboreUid: {Wellbore.Uid};";
12 | }
13 |
14 | public override string GetObjectName()
15 | {
16 | return null;
17 | }
18 |
19 | public override string GetWellboreName()
20 | {
21 | return Wellbore.Name;
22 | }
23 |
24 | public override string GetWellName()
25 | {
26 | return Wellbore.WellName;
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Jobs/IDeleteJob.cs:
--------------------------------------------------------------------------------
1 | using WitsmlExplorer.Api.Jobs.Common;
2 |
3 | namespace WitsmlExplorer.Api.Jobs
4 | {
5 | public record IDeleteJob : Job where T : IReference
6 | {
7 | public T ToDelete { get; init; }
8 |
9 | public override string Description()
10 | {
11 | return $"ToDelete - {ToDelete.Description()}";
12 | }
13 |
14 | public override string GetObjectName()
15 | {
16 | return ToDelete.GetObjectName();
17 | }
18 |
19 | public override string GetWellboreName()
20 | {
21 | return ToDelete.GetWellboreName();
22 | }
23 |
24 | public override string GetWellName()
25 | {
26 | return ToDelete.GetWellName();
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Models/TrajRawData.cs:
--------------------------------------------------------------------------------
1 | using Witsml.Data;
2 |
3 | using WitsmlExplorer.Api.Models.Measure;
4 |
5 | namespace WitsmlExplorer.Api.Models
6 | {
7 | public class TrajRawData
8 | {
9 | public LengthMeasure MagTran1Raw { get; init; }
10 | public LengthMeasure MagTran2Raw { get; init; }
11 | }
12 |
13 | public static class TrajRawDataExtensions
14 | {
15 | public static WitsmlTrajRawData ToWitsml(this TrajRawData trajRawData)
16 | {
17 | return new WitsmlTrajRawData
18 | {
19 | MagTran1Raw = trajRawData.MagTran1Raw?.ToWitsml(),
20 | MagTran2Raw = trajRawData.MagTran2Raw?.ToWitsml()
21 | };
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/StyledComponents/Banner.tsx:
--------------------------------------------------------------------------------
1 | import { Banner as EdsBanner } from "@equinor/eds-core-react";
2 | import styled from "styled-components";
3 | import { Colors } from "styles/Colors";
4 |
5 | export const Banner = styled(EdsBanner)<{ colors: Colors }>`
6 | background-color: ${(props) => props.colors.ui.backgroundDefault};
7 | span {
8 | background-color: ${(props) => props.colors.ui.backgroundDefault};
9 | color: ${(props) => props.colors.infographic.primaryMossGreen};
10 | }
11 | div {
12 | background-color: ${(props) => props.colors.ui.backgroundDefault};
13 | }
14 | p {
15 | color: ${(props) => props.colors.infographic.primaryMossGreen};
16 | }
17 | hr {
18 | background-color: ${(props) => props.colors.ui.backgroundDefault};
19 | }
20 | `;
21 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/hooks/useDocumentDimensions.ts:
--------------------------------------------------------------------------------
1 | import { useEffect, useState } from "react";
2 |
3 | function getDocumentDimensions() {
4 | const { clientWidth: width, clientHeight: height } = document.documentElement;
5 | return {
6 | width,
7 | height
8 | };
9 | }
10 |
11 | export default function useDocumentDimensions() {
12 | const [documentDimensions, setDocumentDimensions] = useState({
13 | width: 0,
14 | height: 0
15 | });
16 |
17 | useEffect(() => {
18 | function handleResize() {
19 | setDocumentDimensions(getDocumentDimensions());
20 | }
21 | handleResize();
22 | window.addEventListener("resize", handleResize);
23 | return () => window.removeEventListener("resize", handleResize);
24 | }, []);
25 |
26 | return documentDimensions;
27 | }
28 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "http://localhost:11578",
7 | "sslPort": 44351
8 | }
9 | },
10 | "profiles": {
11 | "IIS Express": {
12 | "commandName": "IISExpress",
13 | "launchBrowser": true,
14 | "environmentVariables": {
15 | "ASPNETCORE_ENVIRONMENT": "Development"
16 | }
17 | },
18 | "WitsmlExplorer.Api": {
19 | "commandName": "Project",
20 | "launchBrowser": false,
21 | "applicationUrl": "https://localhost:5001;http://localhost:5000",
22 | "environmentVariables": {
23 | "ASPNETCORE_ENVIRONMENT": "Development"
24 | }
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Jobs/Common/MixedObjectsReferences.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | using WitsmlExplorer.Api.Models;
4 |
5 | namespace WitsmlExplorer.Api.Jobs.Common;
6 |
7 | public class MixedObjectsReferences : IReference
8 | {
9 | public WellboreReference WellboreReference { get; set; }
10 | public List SelectedObjects { get; set; }
11 | public string Description()
12 | {
13 | return "Objects on wellbore";
14 | }
15 |
16 | public string GetWellName()
17 | {
18 | return WellboreReference.WellName;
19 | }
20 |
21 | public string GetWellboreName()
22 | {
23 | return WellboreReference.WellboreName;
24 | }
25 |
26 | public string GetObjectName()
27 | {
28 | return string.Empty;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/models/riskAffectedPersonnel.ts:
--------------------------------------------------------------------------------
1 | export const riskAffectedPersonnel = [
2 | "cementer",
3 | "company man",
4 | "contractor",
5 | "directional driller",
6 | "driller",
7 | "drilling engineer",
8 | "drilling superintendent",
9 | "drilling team",
10 | "facility engineer",
11 | "field service manager",
12 | "foreman",
13 | "general service supervisor",
14 | "geologist",
15 | "member",
16 | "mud engineer",
17 | "mud logger",
18 | "MWD or LWD engineer",
19 | "perform engineer",
20 | "petrophysicist",
21 | "production engineer",
22 | "remotely operated vehicle engineer",
23 | "safety manger",
24 | "sales engineer",
25 | "service supervisor",
26 | "technical support",
27 | "tool pusher",
28 | "wireline engineer"
29 | ].sort((a, b) => a.localeCompare(b));
30 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/WitsmlBhaRuns.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using System.Xml.Serialization;
4 |
5 | namespace Witsml.Data
6 | {
7 | [XmlRoot("bhaRuns", Namespace = "http://www.witsml.org/schemas/1series")]
8 | public class WitsmlBhaRuns : IWitsmlObjectList
9 | {
10 | [XmlAttribute("version")]
11 | public string Version = "1.4.1.1";
12 |
13 | [XmlElement("bhaRun")]
14 | public List BhaRuns { get; set; } = new List();
15 |
16 | public string TypeName => "bhaRun";
17 |
18 | [XmlIgnore]
19 | public IEnumerable Objects
20 | {
21 | get => BhaRuns;
22 | set => BhaRuns = value.Select(obj => (WitsmlBhaRun)obj).ToList();
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Models/Reports/CountLogDataReport.cs:
--------------------------------------------------------------------------------
1 | namespace WitsmlExplorer.Api.Models.Reports;
2 |
3 | ///
4 | /// The report contains the number of rows for each mnemonic.
5 | ///
6 | public class CountLogDataReport : BaseReport
7 | {
8 | ///
9 | /// Log object data.
10 | ///
11 | public LogObject LogReference { get; init; }
12 | }
13 |
14 | ///
15 | /// The item contains the number of log data rows for the mnemonic.
16 | ///
17 | public class CountLogDataReportItem
18 | {
19 | ///
20 | /// Mnemonic identifier.
21 | ///
22 | public string Mnemonic { get; set; }
23 |
24 | ///
25 | /// Number of logData rows.
26 | ///
27 | public int LogDataCount { get; set; }
28 | }
29 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Workers/RequestUtils.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ServiceModel;
3 | using System.Threading.Tasks;
4 |
5 | using Microsoft.Extensions.Logging;
6 |
7 | namespace WitsmlExplorer.Api.Workers
8 | {
9 | public class RequestUtils
10 | {
11 | public static async Task WithRetry(Func> func, ILogger logger)
12 | {
13 | try
14 | {
15 | return await Task.Run(func);
16 | }
17 | catch (Exception ex) when (ex is TimeoutException or CommunicationException)
18 | {
19 | logger?.LogWarning("Attempting retry after an exception has occured: {Exception}", ex);
20 | }
21 | await Task.Delay(60000);
22 | return await Task.Run(func);
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Serilog": {
3 | "Using": ["Serilog.Expressions"],
4 | "MinimumLevel": {
5 | "Default": "Debug",
6 | "Override": {
7 | "System": "Warning",
8 | "Microsoft": "Information"
9 | }
10 | },
11 | "WriteTo": [
12 | { "Name": "Console", "Args": {"theme": "Serilog.Sinks.SystemConsole.Themes.AnsiConsoleTheme::Code, Serilog.Sinks.Console"} }
13 | ],
14 | "Filter": [
15 | {
16 | "Name": "ByExcluding",
17 | "Args": {
18 | "expression": "SourceContext = 'Microsoft.AspNetCore.Http.Result.OkObjectResult' or SourceContext = 'Microsoft.AspNetCore.Routing.EndpointMiddleware'"
19 | }
20 | }
21 | ],
22 | "Enrich": ["FromLogContext"]
23 | },
24 | "LogQueries": true
25 | }
26 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/WitsmlMessages.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using System.Xml.Serialization;
4 |
5 | namespace Witsml.Data
6 | {
7 | [XmlRoot("messages", Namespace = "http://www.witsml.org/schemas/1series")]
8 | public class WitsmlMessages : IWitsmlObjectList
9 | {
10 |
11 | [XmlAttribute("version")]
12 | public string Version = "1.4.1.1";
13 |
14 | [XmlElement("message")]
15 | public List Messages { get; set; } = new List();
16 |
17 | public string TypeName => "message";
18 |
19 | [XmlIgnore]
20 | public IEnumerable Objects
21 | {
22 | get => Messages;
23 | set => Messages = value.Select(obj => (WitsmlMessage)obj).ToList();
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/WitsmlReferencePoint.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Xml.Serialization;
7 |
8 | namespace Witsml.Data
9 | {
10 | public class WitsmlReferencePoint
11 | {
12 | [XmlElement("name")]
13 | public string Name { get; set; }
14 | [XmlElement("location")]
15 | public List Location { get; set; }
16 |
17 | public static WitsmlReferencePoint ToFetch()
18 | {
19 | return new()
20 | {
21 | Name = string.Empty,
22 | Location = new List()
23 | {
24 | WitsmlLocation.ToFetch()
25 | }
26 | };
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Models/Tubular.cs:
--------------------------------------------------------------------------------
1 | using Witsml.Data.Tubular;
2 |
3 | namespace WitsmlExplorer.Api.Models
4 | {
5 | public class Tubular : ObjectOnWellbore
6 | {
7 | public string TypeTubularAssy { get; init; }
8 | public CommonData CommonData { get; init; }
9 |
10 | public override WitsmlTubulars ToWitsml()
11 | {
12 | return new WitsmlTubular
13 | {
14 | UidWell = WellUid,
15 | NameWell = WellName,
16 | UidWellbore = WellboreUid,
17 | NameWellbore = WellboreName,
18 | Uid = Uid,
19 | Name = Name,
20 | TypeTubularAssy = TypeTubularAssy,
21 | CommonData = CommonData?.ToWitsml(),
22 | }.AsItemInWitsmlList();
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Desktop/electron-builder.json:
--------------------------------------------------------------------------------
1 | {
2 | "appId": "WEx-Desktop-App",
3 | "productName": "Witsml Explorer Desktop",
4 | "directories": {
5 | "output": "dist",
6 | "buildResources": "resources"
7 | },
8 | "files": [
9 | "resources/**/*",
10 | "dist/api/**/*",
11 | "dist/main/**/*",
12 | "dist/preload/**/*",
13 | "dist/renderer/**/*"
14 | ],
15 | "asar": true,
16 | "asarUnpack": ["dist/api/**/*"],
17 | "win": {
18 | "target": ["nsis"],
19 | "icon": "resources/logo.png"
20 | },
21 | "nsis": {
22 | "artifactName": "WExDesktopInstaller.Windows.x64.${version}.${ext}",
23 | "oneClick": false,
24 | "perMachine": false,
25 | "allowToChangeInstallationDirectory": true,
26 | "deleteAppDataOnUninstall": false,
27 | "createStartMenuShortcut": true
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Curves/DepthUnit.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Witsml.Data.Curves
4 | {
5 | public class DepthUnit : Unit
6 | {
7 | public static readonly DepthUnit Meter = new(CommonConstants.Unit.Meter);
8 | public static readonly DepthUnit Feet = new(CommonConstants.Unit.Feet);
9 |
10 | public DepthUnit(string unitCode) : base(unitCode) { }
11 |
12 | public static DepthUnit FromString(string unitCode)
13 | {
14 | return CommonConstants.Unit.Meter.Equals(unitCode, StringComparison.InvariantCulture)
15 | ? Meter
16 | : (CommonConstants.Unit.Feet.Equals(unitCode, StringComparison.InvariantCulture)
17 | ? Feet
18 | : throw new ArgumentException($"Unit \"{unitCode}\" is not supported!"));
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/WitsmlAttachments.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using System.Xml.Serialization;
4 |
5 | namespace Witsml.Data
6 | {
7 | [XmlRoot("attachments", Namespace = "http://www.witsml.org/schemas/1series")]
8 | public class WitsmlAttachments : IWitsmlObjectList
9 | {
10 | [XmlAttribute("version")]
11 | public string Version = "1.4.1.1";
12 |
13 | [XmlElement("attachment")]
14 | public List Attachments { get; set; } = new();
15 |
16 | public string TypeName => "attachment";
17 |
18 | [XmlIgnore]
19 | public IEnumerable Objects
20 | {
21 | get => Attachments;
22 | set => Attachments = value.Select(obj => (WitsmlAttachment)obj).ToList();
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/WitsmlIndex.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | using Witsml.Data.Curves;
4 |
5 | namespace Witsml.Data
6 | {
7 | public class WitsmlIndex
8 | {
9 | [XmlAttribute("uom")]
10 | public string Uom { get; set; } = string.Empty;
11 |
12 | [XmlText]
13 | public string Value { get; set; } = string.Empty;
14 |
15 | public WitsmlIndex() { }
16 |
17 | public WitsmlIndex(DepthIndex depthIndex)
18 | {
19 | Uom = depthIndex.Uom.ToString();
20 | Value = depthIndex.GetValueAsString();
21 | }
22 |
23 | public WitsmlIndex(string value)
24 | {
25 | Value = value;
26 | }
27 |
28 | public override string ToString()
29 | {
30 | return $"{Value}{Uom}";
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/contexts/CompactEdsProvider/CompactEdsProvider.tsx:
--------------------------------------------------------------------------------
1 | import React, { FC, ReactNode } from "react";
2 | import { useOperationState } from "../../hooks/useOperationState.tsx";
3 | import { EdsProvider as NativeEdsProvider } from "@equinor/eds-core-react";
4 | import { normaliseThemeForEds } from "../../tools/themeHelpers.ts";
5 | import { UserTheme } from "../operationStateReducer.tsx";
6 |
7 | const CompactEdsProvider: FC<{ children: ReactNode }> = ({ children }) => {
8 | const {
9 | operationState: { theme }
10 | } = useOperationState();
11 |
12 | if (theme === UserTheme.Compact)
13 | return (
14 |
15 | {children}
16 |
17 | );
18 |
19 | return children;
20 | };
21 |
22 | export default CompactEdsProvider;
23 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/MudLog/WitsmlMudLogs.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using System.Xml.Serialization;
4 |
5 | namespace Witsml.Data.MudLog
6 | {
7 | [XmlRoot("mudLogs", Namespace = "http://www.witsml.org/schemas/1series")]
8 | public class WitsmlMudLogs : IWitsmlGrowingDataQueryType, IWitsmlObjectList
9 | {
10 | [XmlAttribute("version")]
11 | public string Version = "1.4.1.1";
12 |
13 | [XmlElement("mudLog")]
14 | public List MudLogs { get; set; } = new();
15 |
16 | public string TypeName => "mudLog";
17 |
18 | [XmlIgnore]
19 | public IEnumerable Objects
20 | {
21 | get => MudLogs;
22 | set => MudLogs = value.Select(obj => (WitsmlMudLog)obj).ToList();
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Tubular/WitsmlTubulars.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using System.Xml.Serialization;
4 |
5 | namespace Witsml.Data.Tubular
6 | {
7 | [XmlRoot("tubulars", Namespace = "http://www.witsml.org/schemas/1series")]
8 | public class WitsmlTubulars : IWitsmlObjectList
9 | {
10 | [XmlAttribute("version")]
11 | public string Version = "1.4.1.1";
12 |
13 | [XmlElement("tubular")]
14 | public List Tubulars { get; set; } = new List();
15 |
16 | public string TypeName => "tubular";
17 |
18 | [XmlIgnore]
19 | public IEnumerable Objects
20 | {
21 | get => Tubulars;
22 | set => Tubulars = value.Select(obj => (WitsmlTubular)obj).ToList();
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Console/Injection/TypeResolver.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Spectre.Console.Cli;
4 |
5 | namespace WitsmlExplorer.Console.Injection
6 | {
7 | public sealed class TypeResolver : ITypeResolver, IDisposable
8 | {
9 | private readonly IServiceProvider _provider;
10 |
11 | public TypeResolver(IServiceProvider provider)
12 | {
13 | _provider = provider ?? throw new ArgumentNullException(nameof(provider));
14 | }
15 |
16 | public object Resolve(Type type)
17 | {
18 | return type == null ? null : _provider.GetService(type);
19 | }
20 |
21 | public void Dispose()
22 | {
23 | if (_provider is IDisposable disposable)
24 | {
25 | disposable.Dispose();
26 | }
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/templates/dataGrid/objects/common/properties/DataGridIndexedObjectProperties.ts:
--------------------------------------------------------------------------------
1 | import { DataGridProperty } from "templates/dataGrid/DataGridProperty";
2 |
3 | export const dataGridIndexedObjectProperties: DataGridProperty[] = [
4 | {
5 | name: "index",
6 | documentation:
7 | "Indexes things with the same name. That is the first one, the second one, etc.",
8 | isAttribute: true
9 | },
10 | {
11 | name: "name",
12 | documentation: "",
13 | isAttribute: true
14 | },
15 | {
16 | name: "uom",
17 | documentation: "",
18 | isAttribute: true
19 | },
20 | {
21 | name: "description",
22 | documentation: "",
23 | isAttribute: true
24 | },
25 | {
26 | name: "uid",
27 | documentation: "Unique identifier for the node.",
28 | isAttribute: true
29 | }
30 | ];
31 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Curves/DoubleValue.cs:
--------------------------------------------------------------------------------
1 | using System.Globalization;
2 |
3 | namespace Witsml.Data.Curves
4 | {
5 | public class DoubleValue : CurveValue
6 | {
7 | private readonly double _value;
8 |
9 | public DoubleValue(double value)
10 | {
11 | _value = value;
12 | }
13 |
14 | public DoubleValue(string value)
15 | {
16 | _value = double.Parse(value, CultureInfo.InvariantCulture);
17 | }
18 |
19 | public double Get()
20 | {
21 | return _value;
22 | }
23 |
24 | public override string GetAsString()
25 | {
26 | return _value.ToString(CultureInfo.InvariantCulture);
27 | }
28 |
29 | public override string ToString()
30 | {
31 | return GetAsString();
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/Tubular/WitsmlMwdTool.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Xml.Serialization;
3 |
4 | using Witsml.Data.Measures;
5 |
6 | namespace Witsml.Data.Tubular
7 | {
8 | public class WitsmlMwdTool
9 | {
10 | [XmlElement("flowrateMn")]
11 | public Measure FlowrateMn { get; set; }
12 |
13 |
14 | [XmlElement("flowrateMx")]
15 | public Measure FlowrateMx { get; set; }
16 |
17 |
18 | [XmlElement("tempMx")]
19 | public Measure TempMx { get; set; }
20 |
21 |
22 | [XmlElement("idEquv")]
23 | public Measure IdEquv { get; set; }
24 |
25 |
26 | [XmlElement("sensor")]
27 | public List Sensor { get; set; }
28 |
29 |
30 | [XmlElement("customData")]
31 | public WitsmlCustomData CustomData { get; set; }
32 |
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Jobs/ReplaceObjectsJob.cs:
--------------------------------------------------------------------------------
1 | namespace WitsmlExplorer.Api.Jobs
2 | {
3 | public record ReplaceObjectsJob : Job
4 | {
5 | public DeleteObjectsJob DeleteJob { get; init; }
6 | public CopyObjectsJob CopyJob { get; init; }
7 |
8 | public override string Description()
9 | {
10 | return $"{GetType().Name} - {DeleteJob.Description()}\t\n{CopyJob.Description()};";
11 | }
12 |
13 | public override string GetObjectName()
14 | {
15 | return CopyJob.GetObjectName();
16 | }
17 |
18 | public override string GetWellboreName()
19 | {
20 | return CopyJob.GetWellboreName();
21 | }
22 |
23 | public override string GetWellName()
24 | {
25 | return CopyJob.GetWellName();
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Models/TubularComponent.cs:
--------------------------------------------------------------------------------
1 | using WitsmlExplorer.Api.Models.Measure;
2 |
3 | namespace WitsmlExplorer.Api.Models
4 | {
5 | public class TubularComponent
6 | {
7 | public string Uid { get; set; }
8 | public string TypeTubularComponent { get; set; }
9 | public int? Sequence { get; set; }
10 | public string Description { get; set; }
11 | public LengthMeasure Id { get; set; }
12 | public LengthMeasure Od { get; set; }
13 | public LengthMeasure Len { get; set; }
14 | public int? NumJointStand { get; set; }
15 | public LengthMeasure WtPerLen { get; set; }
16 | public string ConfigCon { get; set; }
17 | public string TypeMaterial { get; set; }
18 | public string Vendor { get; set; }
19 | public string Model { get; set; }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/WitsmlFluidsReports.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using System.Xml.Serialization;
4 |
5 | namespace Witsml.Data
6 | {
7 | [XmlRoot("fluidsReports", Namespace = "http://www.witsml.org/schemas/1series")]
8 | public class WitsmlFluidsReports : IWitsmlObjectList
9 | {
10 | [XmlAttribute("version")]
11 | public string Version = "1.4.1.1";
12 |
13 | [XmlElement("fluidsReport")]
14 | public List FluidsReports { get; set; } = new();
15 |
16 | public string TypeName => "fluidsReport";
17 |
18 | [XmlIgnore]
19 | public IEnumerable Objects
20 | {
21 | get => FluidsReports;
22 | set => FluidsReports = value.Select(obj => (WitsmlFluidsReport)obj).ToList();
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/Modals/ConfigurationChangeReasonModal/AffectedGroup/style.ts:
--------------------------------------------------------------------------------
1 | import styled, { css } from "styled-components";
2 | import { Typography } from "@equinor/eds-core-react";
3 |
4 | export const StyledListItem = styled.li<{ color: string }>`
5 | &:not(:last-child) {
6 | padding-bottom: 0.5rem;
7 | }
8 |
9 | ${({ color }) => css`
10 | color: ${`${color} !important`};
11 |
12 | *,
13 | & p {
14 | color: ${color} !important;
15 | }
16 | `}
17 | `;
18 |
19 | export const AffectedLayout = styled.div`
20 | display: flex;
21 | flex-direction: column;
22 | gap: 0.25rem;
23 | width: 100%;
24 | `;
25 |
26 | export const ListLabel = styled(Typography)`
27 | font-size: 14px;
28 | `;
29 |
30 | export const AffectedChannels = styled(Typography)`
31 | font-size: 12px;
32 | font-style: italic;
33 | `;
34 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/MudLog/WitsmlMudGas.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | using Witsml.Data.Measures;
4 |
5 | namespace Witsml.Data.MudLog
6 | {
7 | public class WitsmlMudGas
8 | {
9 | [XmlElement("gasAv")]
10 | public Measure GasAv { get; set; }
11 |
12 | [XmlElement("gasPeak")]
13 | public Measure GasPeak { get; set; }
14 |
15 | [XmlElement("gasPeakType")]
16 | public string GasPeakType { get; set; }
17 |
18 | [XmlElement("gasBackgnd")]
19 | public Measure GasBackgnd { get; set; }
20 |
21 | [XmlElement("gasConAv")]
22 | public Measure GasConAv { get; set; }
23 |
24 | [XmlElement("gasConMx")]
25 | public Measure GasConMx { get; set; }
26 |
27 | [XmlElement("gasTrip")]
28 | public Measure GasTrip { get; set; }
29 |
30 | }
31 | }
32 |
33 |
34 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/WitsmlWbGeometrys.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using System.Xml.Serialization;
4 |
5 | namespace Witsml.Data
6 | {
7 | [XmlRoot("wbGeometrys", Namespace = "http://www.witsml.org/schemas/1series")]
8 | public class WitsmlWbGeometrys : IWitsmlObjectList
9 | {
10 | [XmlAttribute("version")]
11 | public string Version = "1.4.1.1";
12 |
13 | [XmlElement("wbGeometry")]
14 | public List WbGeometrys { get; set; } = new List();
15 |
16 | public string TypeName => "wbGeometry";
17 |
18 | [XmlIgnore]
19 | public IEnumerable Objects
20 | {
21 | get => WbGeometrys;
22 | set => WbGeometrys = value.Select(obj => (WitsmlWbGeometry)obj).ToList();
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/ContentViews/SearchListView.tsx:
--------------------------------------------------------------------------------
1 | import ObjectSearchListView from "components/ContentViews/ObjectSearchListView";
2 | import { WellboreSearchListView } from "components/ContentViews/WellboreSearchListView";
3 | import {
4 | FilterType,
5 | isObjectFilterType,
6 | isWellboreFilterType
7 | } from "contexts/filter";
8 | import { ReactElement } from "react";
9 | import { useParams } from "react-router-dom";
10 | import { PageNotFound } from "routes/PageNotFound";
11 |
12 | export const SearchListView = (): ReactElement => {
13 | const { filterType } = useParams<{ filterType: FilterType }>();
14 |
15 | if (isObjectFilterType(filterType)) {
16 | return ;
17 | } else if (isWellboreFilterType(filterType)) {
18 | return ;
19 | }
20 |
21 | return ;
22 | };
23 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/templates/dataGrid/objects/common/properties/DataGridRefWellWellboreProperties.ts:
--------------------------------------------------------------------------------
1 | import { DataGridProperty } from "templates/dataGrid/DataGridProperty";
2 | import { dataGridRefNameStringProperties } from "templates/dataGrid/objects/common/properties/DataGridRefNameStringProperties";
3 |
4 | export const dataGridRefWellWellboreProperties: DataGridProperty[] = [
5 | {
6 | name: "wellboreReference",
7 | documentation: "A pointer the wellbore with which there is a relationship.",
8 | properties: dataGridRefNameStringProperties
9 | },
10 | {
11 | name: "wellParent",
12 | documentation:
13 | "A pointer to the well that contains the wellboreReference. This is not needed unless the referenced wellbore is outside the context of a common parent well.",
14 | properties: dataGridRefNameStringProperties
15 | }
16 | ];
17 |
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 | # Security Policy
2 |
3 | ## Reporting a Vulnerability
4 |
5 | If there are any vulnerabilities in `witsml-explorer`, don't hesitate to report them.
6 |
7 | Report to the maintainers of this repo by visiting the [Security](https://github.com/equinor/witsml-explorer/security) tab on the project page.
8 |
9 | Describe the vulnerability.
10 |
11 | If you have a fix, that is most welcome -- please attach or summarize it in your message!
12 |
13 | We will evaluate the vulnerability and, if necessary, release a fix or mitigating steps to address it. We will contact you to let you know the outcome, and will credit you in the report.
14 |
15 | Please do not disclose the vulnerability publicly until a fix is released!
16 |
17 | Once we have either a) published a fix, or b) declined to address the vulnerability for whatever reason, you are free to publicly disclose it.
18 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/HttpHandlers/WellHandler.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Threading.Tasks;
3 |
4 | using Microsoft.AspNetCore.Http;
5 | using Microsoft.AspNetCore.Mvc;
6 |
7 | using WitsmlExplorer.Api.Models;
8 | using WitsmlExplorer.Api.Services;
9 |
10 | namespace WitsmlExplorer.Api.HttpHandlers
11 | {
12 | public static class WellHandler
13 | {
14 | [Produces(typeof(IEnumerable))]
15 | public static async Task GetAllWells(IWellService wellService)
16 | {
17 | return TypedResults.Ok(await wellService.GetWells());
18 | }
19 |
20 | [Produces(typeof(Well))]
21 | public static async Task GetWell(string wellUid, IWellService wellService)
22 | {
23 | return TypedResults.Ok(await wellService.GetWell(wellUid));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/templates/dataGrid/objects/common/properties/DataGridRefWellboreTrajectoryProperties.ts:
--------------------------------------------------------------------------------
1 | import { DataGridProperty } from "templates/dataGrid/DataGridProperty";
2 | import { dataGridRefNameStringProperties } from "templates/dataGrid/objects/common/properties/DataGridRefNameStringProperties";
3 |
4 | export const dataGridRefWellboreTrajectoryProperties: DataGridProperty[] = [
5 | {
6 | name: "trajectoryReference",
7 | documentation: "A pointer to the trajectory within the wellbore.",
8 | properties: dataGridRefNameStringProperties
9 | },
10 | {
11 | name: "wellboreParent",
12 | documentation:
13 | "A pointer to the wellbore that contains the trajectoryReference. This is not needed unless the trajectory is outside the context of a common parent wellbore.",
14 | properties: dataGridRefNameStringProperties
15 | }
16 | ];
17 |
--------------------------------------------------------------------------------
/Src/Witsml/Data/WitsmlTrajectories.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using System.Xml.Serialization;
4 |
5 | namespace Witsml.Data
6 | {
7 | [XmlRoot("trajectorys", Namespace = "http://www.witsml.org/schemas/1series")]
8 | public class WitsmlTrajectories : IWitsmlGrowingDataQueryType, IWitsmlObjectList
9 | {
10 | [XmlAttribute("version")]
11 | public string Version = "1.4.1.1";
12 |
13 | [XmlElement("trajectory")]
14 | public List Trajectories { get; set; } = new();
15 |
16 | public string TypeName => "trajectory";
17 |
18 | [XmlIgnore]
19 | public IEnumerable Objects
20 | {
21 | get => Trajectories;
22 | set => Trajectories = value.Select(obj => (WitsmlTrajectory)obj).ToList();
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Frontend/components/Sidebar/SearchFilter/StartAdornment/StartAdornment.tsx:
--------------------------------------------------------------------------------
1 | import { Box } from "@mui/material";
2 | import { Button } from "../../../StyledComponents/Button.tsx";
3 | import { Icon } from "@equinor/eds-core-react";
4 | import React, { FC } from "react";
5 |
6 | type StartAdornmentProps = {
7 | onOpenOptions: () => void;
8 | color: string;
9 | disabled: boolean;
10 | };
11 |
12 | const StartAdornment: FC = ({
13 | onOpenOptions,
14 | disabled,
15 | color
16 | }) => (
17 |
18 |
26 |
27 | );
28 |
29 | export default StartAdornment;
30 |
--------------------------------------------------------------------------------
/Src/WitsmlExplorer.Api/Models/Reports/BaseReport.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Text.Json.Serialization;
3 |
4 | namespace WitsmlExplorer.Api.Models.Reports
5 | {
6 | public class BaseReport
7 | {
8 | public string Title { get; set; }
9 | public string Summary { get; init; }
10 | public IEnumerable