mirror of https://github.com/portainer/portainer
feat(openai): remove OpenAI BE-12018 (#873)
parent
a3bfe7cb0c
commit
2c08becf6c
|
@ -258,9 +258,6 @@ func (m *Migrator) initMigrations() {
|
|||
|
||||
m.addMigrations("2.33.0-rc1", m.migrateEdgeGroupEndpointsToRoars_2_33_0)
|
||||
|
||||
//m.addMigrations("2.33.0", m.migrateEdgeGroupEndpointsToRoars_2_33_0)
|
||||
// when we release 2.33.0 it will also run the rc-1 migration function
|
||||
|
||||
// Add new migrations above...
|
||||
// One function per migration, each versions migration funcs in the same file.
|
||||
}
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
import { useField } from 'formik';
|
||||
|
||||
import { FormControl } from '@@/form-components/FormControl';
|
||||
import { Switch } from '@@/form-components/SwitchField/Switch';
|
||||
|
||||
const fieldKey = 'OpenAIIntegration';
|
||||
|
||||
export function EnableOpenAIIntegrationSwitch() {
|
||||
const [inputProps, meta, helpers] = useField<boolean>(fieldKey);
|
||||
|
||||
return (
|
||||
<FormControl
|
||||
inputId="experimental_openAI"
|
||||
label="Enable OpenAI integration"
|
||||
size="medium"
|
||||
errors={meta.error}
|
||||
>
|
||||
<Switch
|
||||
id="experimental_openAI"
|
||||
data-cy="enable-openai-integration-switch"
|
||||
name={fieldKey}
|
||||
className="space-right"
|
||||
checked={inputProps.value}
|
||||
onChange={handleChange}
|
||||
/>
|
||||
</FormControl>
|
||||
);
|
||||
|
||||
function handleChange(enable: boolean) {
|
||||
helpers.setValue(enable);
|
||||
}
|
||||
}
|
|
@ -10,14 +10,9 @@ import { useUpdateExperimentalSettingsMutation } from '@/react/portainer/setting
|
|||
import { LoadingButton } from '@@/buttons/LoadingButton';
|
||||
import { TextTip } from '@@/Tip/TextTip';
|
||||
|
||||
import { EnableOpenAIIntegrationSwitch } from './EnableOpenAIIntegrationSwitch';
|
||||
interface FormValues {}
|
||||
|
||||
interface FormValues {
|
||||
OpenAIIntegration: boolean;
|
||||
}
|
||||
const validation = yup.object({
|
||||
OpenAIIntegration: yup.boolean(),
|
||||
});
|
||||
const validation = yup.object({});
|
||||
|
||||
interface Props {
|
||||
settings: ExperimentalFeatures;
|
||||
|
@ -30,12 +25,9 @@ export function ExperimentalFeaturesSettingsForm({ settings }: Props) {
|
|||
|
||||
const { mutate: updateSettings } = mutation;
|
||||
|
||||
const handleSubmit = useCallback(
|
||||
(variables: FormValues) => {
|
||||
const handleSubmit = useCallback(() => {
|
||||
updateSettings(
|
||||
{
|
||||
OpenAIIntegration: variables.OpenAIIntegration,
|
||||
},
|
||||
{},
|
||||
{
|
||||
onSuccess() {
|
||||
notifySuccess(
|
||||
|
@ -45,9 +37,7 @@ export function ExperimentalFeaturesSettingsForm({ settings }: Props) {
|
|||
},
|
||||
}
|
||||
);
|
||||
},
|
||||
[updateSettings]
|
||||
);
|
||||
}, [updateSettings]);
|
||||
|
||||
return (
|
||||
<Formik<FormValues>
|
||||
|
@ -76,8 +66,6 @@ export function ExperimentalFeaturesSettingsForm({ settings }: Props) {
|
|||
experimental feature will prevent access to it.
|
||||
</div>
|
||||
|
||||
<EnableOpenAIIntegrationSwitch />
|
||||
|
||||
<div className="form-group">
|
||||
<div className="col-sm-12">
|
||||
<LoadingButton
|
||||
|
|
|
@ -7,7 +7,6 @@ import { PageHeader } from '@@/PageHeader';
|
|||
|
||||
import { useSettings } from '../queries';
|
||||
import { Settings } from '../types';
|
||||
import { isBE } from '../../feature-flags/feature-flags.service';
|
||||
|
||||
import { ApplicationSettingsPanel } from './ApplicationSettingsPanel';
|
||||
import { BackupSettingsPanel } from './BackupSettingsView';
|
||||
|
@ -15,7 +14,6 @@ import { HelmCertPanel } from './HelmCertPanel';
|
|||
import { HiddenContainersPanel } from './HiddenContainersPanel/HiddenContainersPanel';
|
||||
import { KubeSettingsPanel } from './KubeSettingsPanel';
|
||||
import { SSLSettingsPanelWrapper } from './SSLSettingsPanel/SSLSettingsPanel';
|
||||
import { ExperimentalFeatures } from './ExperimentalFeatures';
|
||||
|
||||
export function SettingsView() {
|
||||
const settingsQuery = useSettings();
|
||||
|
@ -50,8 +48,6 @@ export function SettingsView() {
|
|||
|
||||
<SSLSettingsPanelWrapper />
|
||||
|
||||
{isBE && <ExperimentalFeatures />}
|
||||
|
||||
<HiddenContainersPanel />
|
||||
|
||||
<BackupSettingsPanel />
|
||||
|
|
|
@ -99,9 +99,7 @@ export interface DefaultRegistry {
|
|||
Hide: boolean;
|
||||
}
|
||||
|
||||
export interface ExperimentalFeatures {
|
||||
OpenAIIntegration: boolean;
|
||||
}
|
||||
export interface ExperimentalFeatures {}
|
||||
|
||||
export interface Settings {
|
||||
LogoURL: string;
|
||||
|
|
Loading…
Reference in New Issue