-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX-2194 Witsml Explorer Desktop (#2357)
Co-authored-by: Jan-Marius Vatle (Omega AS) <[email protected]>
- Loading branch information
1 parent
fa8d13f
commit 43a2bae
Showing
22 changed files
with
2,265 additions
and
419 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# production | ||
/build | ||
/out | ||
|
||
# misc | ||
.DS_Store | ||
.env*.local | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
.ignore* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Witsml Explorer Desktop Edition | ||
|
||
Witsml Explorer Desktop Edition is an easy-to-install version of Witsml Explorer. However, this edition does not support all features as the web application. | ||
|
||
## Supported operating systems | ||
|
||
- Windows 64-bit | ||
|
||
<!-- ## Installation guide | ||
The installer can be downloaded from our [GitHub releases page](https://github.com/equinor/witsml-explorer/releases). Download and run the installer. --> | ||
|
||
## Configuration | ||
|
||
A configuration file is created in '%AppData%\Roaming\WEx-Desktop\config.json'. It can be edited to change the API port and the path of logging and database files. | ||
|
||
## For developers | ||
|
||
Install dependencies: | ||
|
||
```sh | ||
cd Src/WitsmlExplorer.Desktop/ | ||
# Download dependencies | ||
yarn | ||
``` | ||
|
||
Run in developer mode: | ||
|
||
```sh | ||
# From Src/WitsmlExplorer.Desktop/ run: | ||
yarn dev | ||
``` | ||
|
||
Run production preview: | ||
|
||
```sh | ||
# From Src/WitsmlExplorer.Desktop/ run: | ||
yarn preview | ||
``` | ||
|
||
Build an installer and install it on your computer: | ||
|
||
```sh | ||
# From Src/WitsmlExplorer.Desktop/ run: | ||
yarn electron:dist | ||
``` | ||
|
||
The installer can be found in `Src/WitsmlExplorer.Desktop/dist/WEx-Desktop Setup <version>.exe`. Run it and follow the instructions. | ||
|
||
### API log files for debugging | ||
|
||
Check the [Configuration](#configuration) file to see where the logging files are placed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"LogQueries": false, | ||
"AllowedHosts": "localhost", | ||
"AllowedOrigin": "http://localhost:3000", | ||
"Witsml": { | ||
"ClientCapabilities": { | ||
"Name": "Witsml Explorer Desktop", | ||
"Description": "Desktop interface for Witsml servers" | ||
} | ||
}, | ||
"OAuth2Enabled": false, | ||
"IsDesktopApp": true, | ||
"Serilog": { | ||
"MinimumLevel": { | ||
"Default": "Information", | ||
"Override": { | ||
"System": "Warning", | ||
"Microsoft": "Information" | ||
} | ||
}, | ||
"WriteTo": [ | ||
{ | ||
"Name": "Console", | ||
"Args": { | ||
"theme": "Serilog.Sinks.SystemConsole.Themes.AnsiConsoleTheme::Code, Serilog.Sinks.Console" | ||
} | ||
}, | ||
{ | ||
"Name": "File", | ||
"Args": { | ||
"path": "api-.log", | ||
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message}{NewLine}{Exception}", | ||
"rollOnFileSizeLimit": true, | ||
"fileSizeLimitBytes": 20971520, | ||
"retainedFileCountLimit": 100, | ||
"rollingInterval": "Day" | ||
} | ||
} | ||
], | ||
"Enrich": ["FromLogContext"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"appId": "WEx-Desktop-App", | ||
"productName": "Witsml Explorer Desktop", | ||
"directories": { | ||
"output": "dist" | ||
}, | ||
"files": ["dist/**/*"], | ||
"asar": true, | ||
"asarUnpack": ["dist/api/**/*"], | ||
"win": { | ||
"target": ["nsis"] | ||
}, | ||
"nsis": { | ||
"artifactName": "WExDesktop.x64.${version}.${ext}", | ||
"oneClick": false, | ||
"perMachine": false, | ||
"allowToChangeInstallationDirectory": true, | ||
"deleteAppDataOnUninstall": false, | ||
"createStartMenuShortcut": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import react from "@vitejs/plugin-react"; | ||
import { defineConfig } from "electron-vite"; | ||
import { dirname, resolve } from "path"; | ||
import { fileURLToPath } from "url"; | ||
import tsconfigPaths from "vite-tsconfig-paths"; | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = dirname(__filename); | ||
|
||
export default defineConfig({ | ||
main: { | ||
build: { | ||
outDir: "dist/main" | ||
} | ||
}, | ||
preload: { | ||
build: { | ||
outDir: "dist/preload" | ||
} | ||
}, | ||
renderer: { | ||
root: resolve(__dirname, "../WitsmlExplorer.Frontend"), | ||
plugins: [react(), tsconfigPaths()], | ||
build: { | ||
rollupOptions: { | ||
input: { | ||
index: resolve(__dirname, "../WitsmlExplorer.Frontend/index.html") | ||
} | ||
}, | ||
outDir: "dist/renderer" | ||
}, | ||
server: { | ||
port: 3000 | ||
} | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"name": "WEx-Desktop", | ||
"description": "Witsml Explorer Desktop Edition", | ||
"version": "1.0.0", | ||
"private": true, | ||
"author": "Witsml Explorer Team", | ||
"scripts": { | ||
"dev": "electron-vite dev -w", | ||
"build:api": "dotnet publish -o ./dist/api --os win --arch x64 --self-contained true /p:IncludeApiConfig=true /p:CONFIG_PATH=../WitsmlExplorer.Desktop/api.config.json ../WitsmlExplorer.Api/WitsmlExplorer.Api.csproj", | ||
"build:frontend": "electron-vite build", | ||
"build": "yarn build:api && yarn build:frontend", | ||
"preview": "yarn build:api && electron-vite preview", | ||
"electron:pack": "yarn build && electron-builder --dir -c electron-builder.json", | ||
"electron:dist": "yarn build && electron-builder -c electron-builder.json" | ||
}, | ||
"main": "./dist/main/main.js", | ||
"lint-staged": { | ||
"**/*.{js,ts,tsx}": [ | ||
"eslint --fix", | ||
"prettier -w" | ||
] | ||
}, | ||
"eslintIgnore": [ | ||
"node_modules/", | ||
"dist/", | ||
"out/" | ||
], | ||
"devDependencies": { | ||
"@types/cross-spawn": "^6.0.6", | ||
"cross-spawn": "^7.0.3", | ||
"electron": "^29.3.0", | ||
"electron-builder": "^24.13.3", | ||
"electron-vite": "^2.1.0", | ||
"vite-tsconfig-paths": "^4.3.2", | ||
"@vitejs/plugin-react": "^4.2.1", | ||
"lint-staged": "^13.0.3" | ||
} | ||
} |
Oops, something went wrong.