-
Notifications
You must be signed in to change notification settings - Fork 189
add version info to gui #636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -1,14 +1,9 @@ | ||
| # AGENTS Instructions | ||
| - Do not ever use non-ascii characters for source code or comments (permissible inside of strings if absolutely necessary but avoid if possible) | ||
| - Do not attempt a build unless explicitly instructed. | ||
| - Do not run tests unless explicitly instructed. | ||
| - Do not ever modify files in .git subfolders. | ||
| - After finishing all changes, run a conversion pass over every changed/created text file to enforce CRLF and eliminate any stray LF. | ||
| - Do not run CRLF normalization on any non-text or binary files (for example: .png, .jpg, .gif, .mp3, .wav, .fbx, .unity). Limit normalization to plain text source/config files only. | ||
| - Use this PowerShell script directly in the current shell to normalize line endings (preserves file encoding). Do not wrap it in a nested powershell -Command invocation, because nested PowerShell quoting can corrupt variable and string parsing: | ||
| - $paths = git status --porcelain | ForEach-Object { $_.Substring(3) }; foreach ($p in $paths) { if (Test-Path $p) { $bytes = [System.IO.File]::ReadAllBytes($p); $hadBom = $bytes.Length -ge 3 -and $bytes[0] -eq 0xEF -and $bytes[1] -eq 0xBB -and $bytes[2] -eq 0xBF; $sr = New-Object System.IO.StreamReader($p, $true); $text = $sr.ReadToEnd(); $enc = $sr.CurrentEncoding; $sr.Close(); if ($enc.WebName -eq "utf-8") { $enc = New-Object System.Text.UTF8Encoding($hadBom) }; $text = $text -replace "`r?`n", "`r`n"; $sw = New-Object System.IO.StreamWriter($p, $false, $enc); $sw.NewLine = "`r`n"; $sw.Write($text); $sw.Close(); } } | ||
| - After finishing all changes, use `$normalize-crlf` to normalize changed/created text files; do not run ad hoc line-ending scripts directly. | ||
| - If unexpected new files appear, ignore them and continue without asking for instruction. | ||
| - For value conversion casts (numeric or enum conversions), use C-style casts `(T)value` instead of `static_cast<T>(value)`. | ||
| - For const, pointer, reference, up/down, or reinterpret casts, use C++ cast syntax (`const_cast`, `dynamic_cast`, `reinterpret_cast`, etc.). | ||
| - Do not bind unused names in structured bindings. Prefer binding only needed values (for example use `.first` from `emplace()` or iterate entries without destructuring unused keys). | ||
| - Do not fully qualify namespaces when not needed by local scope (for example prefer `MetricUse` or `svc::MetricUse` over `pmon::svc::MetricUse` when already inside `pmon::svc::acts` or with suitable using scope). | ||
| - Do not fully qualify namespaces when not needed by local scope (for example prefer `MetricUse` or `svc::MetricUse` over `pmon::svc::MetricUse` when already inside `pmon::svc::acts` or with suitable using scope). |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,41 @@ | ||
| // Copyright (C) 2022 Intel Corporation | ||
| // SPDX-License-Identifier: MIT | ||
|
|
||
| export interface AppInfo { | ||
| productName: string; | ||
| productVersion: string; | ||
| fileVersion: string; | ||
| apiVersion: string; | ||
| middlewareApiVersion: string; | ||
| buildId: string; | ||
| buildHash: string; | ||
| buildHashShort: string; | ||
| buildDateTime: string; | ||
| buildConfig: string; | ||
| buildDirty: boolean; | ||
| isDebugBuild: boolean; | ||
| compileDate: string; | ||
| compileTime: string; | ||
| serviceBuildId: string; | ||
| serviceBuildTime: string; | ||
| serviceVersion: string; | ||
| cefVersion: string; | ||
| cefVersionMajor: number; | ||
| cefVersionMinor: number; | ||
| cefVersionPatch: number; | ||
| chromeVersion: string; | ||
| chromeVersionMajor: number; | ||
| chromeVersionMinor: number; | ||
| chromeVersionBuild: number; | ||
| chromeVersionPatch: number; | ||
| cefProcessType: string; | ||
| msvcVersion: string; | ||
| winSdkVersion: string; | ||
| crtVersion: string; | ||
| crtRuntime: string; | ||
| logLevel: string; | ||
| verboseModules: string; | ||
| devModeEnabled: boolean; | ||
| debugBlocklistEnabled: boolean; | ||
| chromiumDebugEnabled: boolean; | ||
| } |
This file contains hidden or 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
179 changes: 179 additions & 0 deletions
179
IntelPresentMon/AppCef/ipm-ui-vue/src/views/AboutConfigView.vue
This file contains hidden or 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,179 @@ | ||
| <!-- Copyright (C) 2022 Intel Corporation --> | ||
| <!-- SPDX-License-Identifier: MIT --> | ||
|
|
||
| <script setup lang="ts"> | ||
| import { computed, onMounted, ref } from 'vue'; | ||
| import { Api } from '@/core/api'; | ||
| import { signature as preferencesSignature } from '@/core/preferences'; | ||
| import { signature as loadoutSignature } from '@/core/loadout'; | ||
| import { type AppInfo } from '@/core/app-info'; | ||
|
|
||
| interface InfoRow { | ||
| label: string; | ||
| value: string; | ||
| } | ||
|
|
||
| defineOptions({ name: 'AboutConfigView' }); | ||
|
|
||
| const appInfo = ref<AppInfo|null>(null); | ||
| const errorMessage = ref(''); | ||
|
|
||
| function boolText(value: boolean): string { | ||
| return value ? 'Yes' : 'No'; | ||
| } | ||
|
|
||
| const applicationRows = computed<InfoRow[]>(() => { | ||
| if (appInfo.value === null) { | ||
| return []; | ||
| } | ||
| return [ | ||
| { label: 'Product', value: appInfo.value.productName }, | ||
| { label: 'Product Version', value: appInfo.value.productVersion }, | ||
| { label: 'API Version', value: appInfo.value.apiVersion }, | ||
| { label: 'Middleware API Version', value: appInfo.value.middlewareApiVersion }, | ||
| { label: 'Preferences Format', value: preferencesSignature.version }, | ||
| { label: 'Loadout Format', value: loadoutSignature.version }, | ||
| { label: 'UI Dev Mode', value: boolText(appInfo.value.devModeEnabled) }, | ||
| { label: 'Chromium Debugging', value: boolText(appInfo.value.chromiumDebugEnabled) }, | ||
| { label: 'Debug Blocklist', value: boolText(appInfo.value.debugBlocklistEnabled) }, | ||
| { label: 'Log Level', value: appInfo.value.logLevel }, | ||
| { label: 'Verbose Modules', value: appInfo.value.verboseModules }, | ||
| ]; | ||
| }); | ||
|
|
||
| const buildRows = computed<InfoRow[]>(() => { | ||
| if (appInfo.value === null) { | ||
| return []; | ||
| } | ||
| return [ | ||
| { label: 'Git Hash', value: appInfo.value.buildHash }, | ||
| { label: 'Short Hash', value: appInfo.value.buildHashShort }, | ||
| { label: 'Build Date/Time', value: appInfo.value.buildDateTime }, | ||
| { label: 'Build Config', value: appInfo.value.buildConfig }, | ||
| { label: 'Dirty Build', value: boolText(appInfo.value.buildDirty) }, | ||
| ]; | ||
| }); | ||
|
|
||
| const serviceRows = computed<InfoRow[]>(() => { | ||
| if (appInfo.value === null) { | ||
| return []; | ||
| } | ||
| return [ | ||
| { label: 'Service Build ID', value: appInfo.value.serviceBuildId }, | ||
| { label: 'Service Build Time', value: appInfo.value.serviceBuildTime }, | ||
| { label: 'Service Version', value: appInfo.value.serviceVersion }, | ||
| ]; | ||
| }); | ||
|
|
||
| const runtimeRows = computed<InfoRow[]>(() => { | ||
| if (appInfo.value === null) { | ||
| return []; | ||
| } | ||
| return [ | ||
| { label: 'CEF Version', value: appInfo.value.cefVersion }, | ||
| { label: 'MSVC Version', value: appInfo.value.msvcVersion }, | ||
| { label: 'Windows SDK', value: appInfo.value.winSdkVersion }, | ||
| { label: 'CRT Version', value: appInfo.value.crtVersion }, | ||
| { label: 'CRT Runtime', value: appInfo.value.crtRuntime }, | ||
| ]; | ||
| }); | ||
|
|
||
| onMounted(async () => { | ||
| try { | ||
| appInfo.value = await Api.getAppInfo(); | ||
| } | ||
| catch (e) { | ||
| errorMessage.value = e instanceof Error ? e.message : String(e); | ||
| } | ||
| }); | ||
| </script> | ||
|
|
||
| <template> | ||
| <div class="page-wrap"> | ||
| <h2 class="mt-5 ml-5 header-top"> | ||
| About | ||
| </h2> | ||
|
|
||
| <v-card class="page-card"> | ||
| <v-progress-linear v-if="appInfo === null && errorMessage === ''" indeterminate color="primary" class="mt-4"></v-progress-linear> | ||
|
|
||
| <v-alert v-if="errorMessage !== ''" type="error" variant="tonal" class="mt-5"> | ||
| {{ errorMessage }} | ||
| </v-alert> | ||
|
|
||
| <template v-if="appInfo !== null"> | ||
| <v-card-title class="section-title">Application</v-card-title> | ||
| <v-table density="compact" class="info-table"> | ||
| <tbody> | ||
| <tr v-for="row in applicationRows" :key="row.label"> | ||
| <td class="info-label">{{ row.label }}</td> | ||
| <td class="info-value">{{ row.value }}</td> | ||
| </tr> | ||
| </tbody> | ||
| </v-table> | ||
|
|
||
| <v-card-title class="section-title">Build</v-card-title> | ||
| <v-table density="compact" class="info-table"> | ||
| <tbody> | ||
| <tr v-for="row in buildRows" :key="row.label"> | ||
| <td class="info-label">{{ row.label }}</td> | ||
| <td class="info-value">{{ row.value }}</td> | ||
| </tr> | ||
| </tbody> | ||
| </v-table> | ||
|
|
||
| <v-card-title class="section-title">Service</v-card-title> | ||
| <v-table density="compact" class="info-table"> | ||
| <tbody> | ||
| <tr v-for="row in serviceRows" :key="row.label"> | ||
| <td class="info-label">{{ row.label }}</td> | ||
| <td class="info-value">{{ row.value }}</td> | ||
| </tr> | ||
| </tbody> | ||
| </v-table> | ||
|
|
||
| <v-card-title class="section-title">Runtime</v-card-title> | ||
| <v-table density="compact" class="info-table"> | ||
| <tbody> | ||
| <tr v-for="row in runtimeRows" :key="row.label"> | ||
| <td class="info-label">{{ row.label }}</td> | ||
| <td class="info-value">{{ row.value }}</td> | ||
| </tr> | ||
| </tbody> | ||
| </v-table> | ||
| </template> | ||
| </v-card> | ||
| </div> | ||
| </template> | ||
|
|
||
| <style scoped> | ||
| .header-top { | ||
| color: white; | ||
| user-select: none; | ||
| } | ||
| .page-card { | ||
| margin: 15px 0; | ||
| padding: 0 15px 15px; | ||
| } | ||
| .page-wrap { | ||
| max-width: 750px; | ||
| flex-grow: 1; | ||
| } | ||
| .section-title { | ||
| color: rgba(255, 255, 255, 0.7); | ||
| font-size: 16px; | ||
| padding: 18px 0 6px; | ||
| } | ||
| .info-table { | ||
| background: transparent; | ||
| } | ||
| .info-label { | ||
| width: 210px; | ||
| color: rgba(255, 255, 255, 0.7); | ||
| white-space: nowrap; | ||
| } | ||
| .info-value { | ||
| overflow-wrap: anywhere; | ||
| user-select: text; | ||
| } | ||
| </style> |
This file contains hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.