mirror of https://github.com/portainer/portainer
fix(be-teaser): mute styles [EE-6035] (#10350)
parent
8f42ba0254
commit
b60f32a25b
@ -1,5 +1,5 @@
|
||||
<a class="vertical-center be-indicator ml-5" href="{{ $ctrl.url }}" target="_blank" rel="noopener" ng-if="$ctrl.limitedToBE">
|
||||
<ng-transclude></ng-transclude>
|
||||
<pr-icon icon="'briefcase'" class-name="'space-right be-indicator-icon'"></pr-icon>
|
||||
<span class="be-indicator-label">Business Edition Feature</span>
|
||||
<span class="be-indicator-label">Business Feature</span>
|
||||
</a>
|
||||
|
@ -1,88 +1,78 @@
|
||||
<rd-widget>
|
||||
<rd-widget-body>
|
||||
<div ng-if="$ctrl.index > 0" style="margin-bottom: 10px">
|
||||
<span class="text-muted small"> Extra search configuration </span>
|
||||
<button
|
||||
class="btn btn-sm btn-danger"
|
||||
type="button"
|
||||
ng-click="$ctrl.onRemoveClick($ctrl.index)"
|
||||
limited-feature-dir="{{::$ctrl.limitedFeatureId}}"
|
||||
limited-feature-tabindex="-1"
|
||||
>
|
||||
<pr-icon icon="'trash-2'"></pr-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="w-full px-5 pt-3">
|
||||
<div ng-if="$ctrl.index > 0" style="margin-bottom: 10px">
|
||||
<span class="text-muted small"> Extra search configuration </span>
|
||||
<button
|
||||
class="btn btn-sm btn-danger"
|
||||
type="button"
|
||||
ng-click="$ctrl.onRemoveClick($ctrl.index)"
|
||||
limited-feature-dir="{{::$ctrl.limitedFeatureId}}"
|
||||
limited-feature-tabindex="-1"
|
||||
>
|
||||
<pr-icon icon="'trash-2'"></pr-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<ldap-settings-dn-builder
|
||||
label="Group Search Path (optional)"
|
||||
suffix="{{ $ctrl.domainSuffix }}"
|
||||
ng-model="$ctrl.config.GroupBaseDN"
|
||||
on-change="($ctrl.onChangeBaseDN)"
|
||||
limited-feature-id="$ctrl.limitedFeatureId"
|
||||
></ldap-settings-dn-builder>
|
||||
<ldap-settings-dn-builder
|
||||
label="Group Search Path (optional)"
|
||||
suffix="{{ $ctrl.domainSuffix }}"
|
||||
ng-model="$ctrl.config.GroupBaseDN"
|
||||
on-change="($ctrl.onChangeBaseDN)"
|
||||
limited-feature-id="$ctrl.limitedFeatureId"
|
||||
></ldap-settings-dn-builder>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 col-md-2 control-label text-left"> Group Base DN </label>
|
||||
<div class="col-sm-8 col-md-10">
|
||||
{{ $ctrl.config.GroupBaseDN }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 col-md-2 control-label text-left"> Group Base DN </label>
|
||||
<div class="col-sm-8 col-md-10">
|
||||
{{ $ctrl.config.GroupBaseDN }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 vertical-center" style="margin-bottom: 5px">
|
||||
<label class="control-label !pt-0 text-left">Groups</label>
|
||||
<span class="label label-default interactive vertical-center" style="margin-left: 10px" ng-click="$ctrl.addGroup()">
|
||||
<pr-icon icon="'plus-circle'"></pr-icon>
|
||||
add another group
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-sm-12" ng-if="$ctrl.groups.length">
|
||||
<rd-widget>
|
||||
<rd-widget-body>
|
||||
<div class="form-group no-margin-last-child" ng-repeat="entry in $ctrl.groups">
|
||||
<div class="col-sm-4">
|
||||
<select
|
||||
class="form-control"
|
||||
ng-model="entry.type"
|
||||
ng-change="$ctrl.onGroupsChange()"
|
||||
limited-feature-dir="{{::$ctrl.limitedFeatureId}}"
|
||||
limited-feature-tabindex="-1"
|
||||
>
|
||||
<option value="ou">OU Name</option>
|
||||
<option value="cn">Folder Name</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<input
|
||||
class="form-control"
|
||||
ng-model="entry.value"
|
||||
ng-change="$ctrl.onGroupsChange()"
|
||||
limited-feature-dir="{{::$ctrl.limitedFeatureId}}"
|
||||
limited-feature-tabindex="-1"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-sm-3 text-right">
|
||||
<button
|
||||
class="btn btn-md btn-danger"
|
||||
type="button"
|
||||
ng-click="$ctrl.removeGroup($index)"
|
||||
limited-feature-dir="{{::$ctrl.limitedFeatureId}}"
|
||||
limited-feature-tabindex="-1"
|
||||
>
|
||||
<pr-icon icon="'trash-2'" size="'md'"></pr-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</rd-widget-body>
|
||||
</rd-widget>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 vertical-center" style="margin-bottom: 5px">
|
||||
<label class="control-label !pt-0 text-left">Groups</label>
|
||||
<span class="label label-default interactive vertical-center" style="margin-left: 10px" ng-click="$ctrl.addGroup()">
|
||||
<pr-icon icon="'plus-circle'"></pr-icon>
|
||||
add another group
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-sm-12" ng-if="$ctrl.groups.length">
|
||||
<div class="w-full px-5 pt-3">
|
||||
<div class="form-group no-margin-last-child" ng-repeat="entry in $ctrl.groups">
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control" ng-model="entry.type" ng-change="$ctrl.onGroupsChange()" limited-feature-dir="{{::$ctrl.limitedFeatureId}}" limited-feature-tabindex="-1">
|
||||
<option value="ou">OU Name</option>
|
||||
<option value="cn">Folder Name</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<input
|
||||
class="form-control"
|
||||
ng-model="entry.value"
|
||||
ng-change="$ctrl.onGroupsChange()"
|
||||
limited-feature-dir="{{::$ctrl.limitedFeatureId}}"
|
||||
limited-feature-tabindex="-1"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-sm-3 text-right">
|
||||
<button
|
||||
class="btn btn-md btn-danger"
|
||||
type="button"
|
||||
ng-click="$ctrl.removeGroup($index)"
|
||||
limited-feature-dir="{{::$ctrl.limitedFeatureId}}"
|
||||
limited-feature-tabindex="-1"
|
||||
>
|
||||
<pr-icon icon="'trash-2'" size="'md'"></pr-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group no-margin-last-child">
|
||||
<label class="col-sm-4 col-md-2 control-label text-left"> Group Filter </label>
|
||||
<div class="col-sm-8 col-md-10">
|
||||
{{ $ctrl.config.GroupFilter }}
|
||||
</div>
|
||||
<div class="form-group no-margin-last-child">
|
||||
<label class="col-sm-4 col-md-2 control-label text-left"> Group Filter </label>
|
||||
<div class="col-sm-8 col-md-10">
|
||||
{{ $ctrl.config.GroupFilter }}
|
||||
</div>
|
||||
</rd-widget-body>
|
||||
</rd-widget>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,101 +1,99 @@
|
||||
<rd-widget>
|
||||
<rd-widget-body>
|
||||
<div ng-if="$ctrl.index > 0" style="margin-bottom: 10px">
|
||||
<span class="text-muted small"> Extra search configuration </span>
|
||||
<button
|
||||
ng-if="$ctrl.index > 0"
|
||||
class="btn btn-sm btn-danger"
|
||||
type="button"
|
||||
ng-click="$ctrl.onRemoveClick($ctrl.index)"
|
||||
limited-feature-dir="{{::$ctrl.limitedFeatureId}}"
|
||||
limited-feature-tabindex="-1"
|
||||
>
|
||||
<pr-icon icon="'trash-2'"></pr-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="w-full px-5 pt-3">
|
||||
<div ng-if="$ctrl.index > 0" style="margin-bottom: 10px">
|
||||
<span class="text-muted small"> Extra search configuration </span>
|
||||
<button
|
||||
ng-if="$ctrl.index > 0"
|
||||
class="btn btn-sm btn-danger"
|
||||
type="button"
|
||||
ng-click="$ctrl.onRemoveClick($ctrl.index)"
|
||||
limited-feature-dir="{{::$ctrl.limitedFeatureId}}"
|
||||
limited-feature-tabindex="-1"
|
||||
>
|
||||
<pr-icon icon="'trash-2'"></pr-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-if="$ctrl.showUsernameFormat">
|
||||
<div class="col-sm-4" style="margin-bottom: 5px">
|
||||
<label class="control-label text-left">Username Format</label>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<button
|
||||
class="btn btn-primary"
|
||||
ng-model="$ctrl.config.UserNameAttribute"
|
||||
uib-btn-radio="'sAMAccountName'"
|
||||
style="margin-left: 0px"
|
||||
limited-feature-dir="{{::$ctrl.limitedFeatureId}}"
|
||||
limited-feature-tabindex="-1"
|
||||
>username</button
|
||||
>
|
||||
<button
|
||||
class="btn btn-primary"
|
||||
ng-model="$ctrl.config.UserNameAttribute"
|
||||
uib-btn-radio="'userPrincipalName'"
|
||||
limited-feature-dir="{{::$ctrl.limitedFeatureId}}"
|
||||
limited-feature-tabindex="-1"
|
||||
>user@domainname</button
|
||||
>
|
||||
</div>
|
||||
<div class="form-group" ng-if="$ctrl.showUsernameFormat">
|
||||
<div class="col-sm-4" style="margin-bottom: 5px">
|
||||
<label class="control-label text-left">Username Format</label>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<button
|
||||
class="btn btn-primary"
|
||||
ng-model="$ctrl.config.UserNameAttribute"
|
||||
uib-btn-radio="'sAMAccountName'"
|
||||
style="margin-left: 0px"
|
||||
limited-feature-dir="{{::$ctrl.limitedFeatureId}}"
|
||||
limited-feature-tabindex="-1"
|
||||
>username</button
|
||||
>
|
||||
<button
|
||||
class="btn btn-primary"
|
||||
ng-model="$ctrl.config.UserNameAttribute"
|
||||
uib-btn-radio="'userPrincipalName'"
|
||||
limited-feature-dir="{{::$ctrl.limitedFeatureId}}"
|
||||
limited-feature-tabindex="-1"
|
||||
>user@domainname</button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label text-left"> Root Domain </label>
|
||||
<div class="col-sm-8">
|
||||
{{ $ctrl.config.BaseDN }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label text-left"> Root Domain </label>
|
||||
<div class="col-sm-8">
|
||||
{{ $ctrl.config.BaseDN }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ldap-settings-dn-builder
|
||||
ng-model="$ctrl.config.BaseDN"
|
||||
label="User Search Path (optional)"
|
||||
suffix="{{ $ctrl.domainSuffix }}"
|
||||
on-change="($ctrl.onBaseDNChange)"
|
||||
limited-feature-id="$ctrl.limitedFeatureId"
|
||||
></ldap-settings-dn-builder>
|
||||
<ldap-settings-dn-builder
|
||||
ng-model="$ctrl.config.BaseDN"
|
||||
label="User Search Path (optional)"
|
||||
suffix="{{ $ctrl.domainSuffix }}"
|
||||
on-change="($ctrl.onBaseDNChange)"
|
||||
limited-feature-id="$ctrl.limitedFeatureId"
|
||||
></ldap-settings-dn-builder>
|
||||
|
||||
<div class="form-group no-margin-last-child">
|
||||
<div class="col-sm-12" style="margin-bottom: 5px">
|
||||
<label class="control-label text-left">Allowed Groups (optional)</label>
|
||||
<button
|
||||
type="button"
|
||||
class="label label-default interactive vertical-center"
|
||||
style="margin-left: 10px; border: 0"
|
||||
ng-click="$ctrl.addGroup()"
|
||||
limited-feature-dir="{{::$ctrl.limitedFeatureId}}"
|
||||
limited-feature-tabindex="-1"
|
||||
>
|
||||
<pr-icon icon="'plus-circle'"></pr-icon>
|
||||
add another group
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div ng-repeat="group in $ctrl.groups track by $index" style="margin-bottom: 10px">
|
||||
<rd-widget>
|
||||
<rd-widget-body>
|
||||
<ldap-settings-group-dn-builder
|
||||
ng-model="group"
|
||||
index="$index"
|
||||
suffix="{{ $ctrl.domainSuffix }}"
|
||||
on-change="($ctrl.onGroupChange)"
|
||||
on-remove-click="($ctrl.removeGroup)"
|
||||
limited-feature-id="$ctrl.limitedFeatureId"
|
||||
></ldap-settings-group-dn-builder>
|
||||
</rd-widget-body>
|
||||
</rd-widget>
|
||||
</div>
|
||||
<div class="form-group no-margin-last-child">
|
||||
<div class="col-sm-12" style="margin-bottom: 5px">
|
||||
<label class="control-label text-left">Allowed Groups (optional)</label>
|
||||
<button
|
||||
type="button"
|
||||
class="label label-default interactive vertical-center"
|
||||
style="margin-left: 10px; border: 0"
|
||||
ng-click="$ctrl.addGroup()"
|
||||
limited-feature-dir="{{::$ctrl.limitedFeatureId}}"
|
||||
limited-feature-tabindex="-1"
|
||||
>
|
||||
<pr-icon icon="'plus-circle'"></pr-icon>
|
||||
add another group
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div ng-repeat="group in $ctrl.groups track by $index" style="margin-bottom: 10px">
|
||||
<rd-widget>
|
||||
<rd-widget-body>
|
||||
<ldap-settings-group-dn-builder
|
||||
ng-model="group"
|
||||
index="$index"
|
||||
suffix="{{ $ctrl.domainSuffix }}"
|
||||
on-change="($ctrl.onGroupChange)"
|
||||
on-remove-click="($ctrl.removeGroup)"
|
||||
limited-feature-id="$ctrl.limitedFeatureId"
|
||||
></ldap-settings-group-dn-builder>
|
||||
</rd-widget-body>
|
||||
</rd-widget>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label text-left"> User Filter </label>
|
||||
<div class="col-sm-8">
|
||||
{{ $ctrl.config.Filter }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label text-left"> User Filter </label>
|
||||
<div class="col-sm-8">
|
||||
{{ $ctrl.config.Filter }}
|
||||
</div>
|
||||
</rd-widget-body>
|
||||
</rd-widget>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -0,0 +1,30 @@
|
||||
import { Briefcase } from 'lucide-react';
|
||||
|
||||
import { Icon } from '@@/Icon';
|
||||
import { Tooltip } from '@@/Tip/Tooltip';
|
||||
|
||||
interface Props {
|
||||
url?: string;
|
||||
}
|
||||
|
||||
export function LimitedToBeBoxSelectorIndicator({ url }: Props) {
|
||||
return (
|
||||
<div className="absolute left-0 top-0 w-full">
|
||||
<div className="mx-auto flex max-w-fit items-center rounded-b-lg border border-t-0 border-solid border-gray-6 bg-transparent px-3 py-1 text-gray-6">
|
||||
<a
|
||||
className="inline-flex items-center text-xs text-gray-6"
|
||||
href={url}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
<Icon icon={Briefcase} className="!mr-1" />
|
||||
<span>Business Feature</span>
|
||||
</a>
|
||||
<Tooltip
|
||||
size="sm"
|
||||
message="Select this option to preview this business feature."
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
import { HelpCircle } from 'lucide-react';
|
||||
import clsx from 'clsx';
|
||||
|
||||
import { TooltipWithChildren } from '@@/Tip/TooltipWithChildren';
|
||||
|
||||
interface Props {
|
||||
tooltipId: string;
|
||||
url?: string;
|
||||
}
|
||||
|
||||
export function LimitedToBeIndicator({ tooltipId, url }: Props) {
|
||||
return (
|
||||
<div className="absolute left-0 top-0 w-full">
|
||||
<div className="mx-auto flex max-w-fit items-center gap-1 rounded-b-lg bg-warning-4 py-1 px-3 text-sm th-dark:bg-[color:var(--bg-BE-only)]">
|
||||
<a
|
||||
className="text-warning-9 th-dark:text-blue-8"
|
||||
href={url}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
BE Feature
|
||||
</a>
|
||||
<TooltipWithChildren
|
||||
position="bottom"
|
||||
className={clsx(tooltipId, 'portainer-tooltip')}
|
||||
heading="Business Edition feature."
|
||||
message="This feature is currently limited to Business Edition users only."
|
||||
>
|
||||
<HelpCircle
|
||||
className="ml-1 !text-warning-7 th-dark:!text-blue-8"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</TooltipWithChildren>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
Loading…
Reference in new issue