mirror of https://github.com/portainer/portainer
feat(docker): label gpu as nvidia only [EE-6999] (#11729)
parent
6e14ac583b
commit
9797201c2a
|
@ -154,9 +154,12 @@
|
||||||
<!-- other -->
|
<!-- other -->
|
||||||
<div class="col-sm-12 form-section-title"> Other </div>
|
<div class="col-sm-12 form-section-title"> Other </div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12" ng-if="!$ctrl.isDockerStandaloneEnv">
|
||||||
<gpus-insights></gpus-insights>
|
<text-tip children="'Showing GPU in the UI is currently only available with Docker Standalone and is limited to NVIDIA graphics cards.'" color="'blue'" />
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<por-switch-field
|
<por-switch-field
|
||||||
label="'Show GPU in the UI'"
|
label="'Show GPU in the UI'"
|
||||||
|
@ -168,11 +171,20 @@
|
||||||
disabled="!$ctrl.isDockerStandaloneEnv"
|
disabled="!$ctrl.isDockerStandaloneEnv"
|
||||||
></por-switch-field>
|
></por-switch-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div ng-if="$ctrl.state.enableGPUManagement">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<text-tip children="'GPU support is currently limited to NVIDIA graphics cards only.'" color="'blue'" />
|
||||||
|
</div>
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<div class="pl-4">
|
<div class="pl-4">
|
||||||
<gpus-list ng-if="$ctrl.state.enableGPUManagement && $ctrl.endpoint" value="$ctrl.endpoint.Gpus" on-change="($ctrl.onGpusChange)"></gpus-list>
|
<gpus-list ng-if="$ctrl.state.enableGPUManagement" value="$ctrl.endpoint.Gpus" on-change="($ctrl.onGpusChange)"></gpus-list>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<por-switch-field
|
<por-switch-field
|
||||||
label="'Show image up to date indicators for Stacks, Services and Containers'"
|
label="'Show image up to date indicators for Stacks, Services and Containers'"
|
||||||
|
|
|
@ -37,6 +37,7 @@ import { TagButton } from '@@/TagButton';
|
||||||
import { BETeaserButton } from '@@/BETeaserButton';
|
import { BETeaserButton } from '@@/BETeaserButton';
|
||||||
import { CodeEditor } from '@@/CodeEditor';
|
import { CodeEditor } from '@@/CodeEditor';
|
||||||
import { HelpLink } from '@@/HelpLink';
|
import { HelpLink } from '@@/HelpLink';
|
||||||
|
import { TextTip } from '@@/Tip/TextTip';
|
||||||
|
|
||||||
import { fileUploadField } from './file-upload-field';
|
import { fileUploadField } from './file-upload-field';
|
||||||
import { switchField } from './switch-field';
|
import { switchField } from './switch-field';
|
||||||
|
@ -234,6 +235,17 @@ export const ngModule = angular
|
||||||
'onVersionChange',
|
'onVersionChange',
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
|
.component(
|
||||||
|
'textTip',
|
||||||
|
r2a(TextTip, [
|
||||||
|
'className',
|
||||||
|
'color',
|
||||||
|
'icon',
|
||||||
|
'inline',
|
||||||
|
'children',
|
||||||
|
'childrenWrapperClassName',
|
||||||
|
])
|
||||||
|
)
|
||||||
.component(
|
.component(
|
||||||
'groupAssociationTable',
|
'groupAssociationTable',
|
||||||
r2a(withReactQuery(GroupAssociationTable), [
|
r2a(withReactQuery(GroupAssociationTable), [
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { PropsWithChildren } from 'react';
|
import { ReactNode } from 'react';
|
||||||
import { AlertCircle } from 'lucide-react';
|
import { AlertCircle } from 'lucide-react';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ export interface Props {
|
||||||
className?: string;
|
className?: string;
|
||||||
childrenWrapperClassName?: string;
|
childrenWrapperClassName?: string;
|
||||||
inline?: boolean;
|
inline?: boolean;
|
||||||
|
children: ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function TextTip({
|
export function TextTip({
|
||||||
|
@ -20,8 +21,8 @@ export function TextTip({
|
||||||
inline = true,
|
inline = true,
|
||||||
className,
|
className,
|
||||||
children,
|
children,
|
||||||
childrenWrapperClassName = 'text-muted',
|
childrenWrapperClassName,
|
||||||
}: PropsWithChildren<Props>) {
|
}: Props) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={clsx(
|
className={clsx(
|
||||||
|
@ -32,7 +33,6 @@ export function TextTip({
|
||||||
role="status"
|
role="status"
|
||||||
>
|
>
|
||||||
<Icon icon={icon} mode={getMode(color)} className="!mt-0.5 flex-none" />
|
<Icon icon={icon} mode={getMode(color)} className="!mt-0.5 flex-none" />
|
||||||
|
|
||||||
<span className={childrenWrapperClassName}>{children}</span>
|
<span className={childrenWrapperClassName}>{children}</span>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue