1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-07 14:55:27 +02:00

refactor(GPU): refactor to colocate and simplify UI work [EE-5127] (#8593)

* refactor to colocate and simplify

* fix(insights): text size to match portainer views

---------

Co-authored-by: testa113 <testa113>
This commit is contained in:
Ali 2023-03-09 22:06:57 +13:00 committed by GitHub
parent fb6e26a302
commit 2cc80e5e5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 52 additions and 61 deletions

View file

@ -1,16 +1,13 @@
import angular from 'angular';
import { r2a } from '@/react-tools/react2angular';
import { withControlledInput } from '@/react-tools/withControlledInput';
import { EdgeKeyDisplay } from '@/react/portainer/environments/ItemView/EdgeKeyDisplay';
import { KVMControl } from '@/react/portainer/environments/KvmView/KVMControl';
import { GpusList } from '@/react/docker/host/SetupView/GpusList';
export const environmentsModule = angular
.module('portainer.app.react.components.environments', [])
.component('edgeKeyDisplay', r2a(EdgeKeyDisplay, ['edgeKey']))
.component('kvmControl', r2a(KVMControl, ['deviceId', 'server', 'token']))
.component(
'gpusList',
r2a(withControlledInput(GpusList), ['value', 'onChange'])
'kvmControl',
r2a(KVMControl, ['deviceId', 'server', 'token'])
).name;

View file

@ -26,7 +26,6 @@ import { Slider } from '@@/form-components/Slider';
import { TagButton } from '@@/TagButton';
import { BETeaserButton } from '@@/BETeaserButton';
import { CodeEditor } from '@@/CodeEditor';
import { InsightsBox } from '@@/InsightsBox';
import { fileUploadField } from './file-upload-field';
import { switchField } from './switch-field';
@ -80,10 +79,6 @@ export const componentsModule = angular
.component('badge', r2a(Badge, ['type', 'className']))
.component('fileUploadField', fileUploadField)
.component('porSwitchField', switchField)
.component(
'insightsBox',
r2a(InsightsBox, ['header', 'content', 'setHtmlContent', 'insightCloseId'])
)
.component(
'passwordCheckHint',
r2a(withReactQuery(PasswordCheckHint), [

View file

@ -211,22 +211,7 @@
<!-- !open-amt info -->
<!-- gpus info -->
<div class="mb-4">
<insights-box
ng-if="isDockerStandaloneEnv"
header="'GPU settings update'"
set-html-content="true"
insight-close-id="'gpu-settings-update-closed'"
content="'
<p>
From 2.18 on, the set-up of available GPUs for a Docker Standalone environment has been shifted from Add environment and Environment details to Host -> Setup, so as to align with other settings.
</p>
<p>
A toggle has been introduced for enabling/disabling management of GPU settings in the Portainer UI - to alleviate the performance impact of showing those settings.
</p>
<p>
The UI has been updated to clarify that GPU settings support is only for Docker Standalone (and not Docker Swarm, which was never supported in the UI).
</p>'"
></insights-box>
<gpus-insights></gpus-insights>
</div>
<!-- gpus info -->
<div class="form-group">