Skip to content

Commit

Permalink
feat(entities-plugins): add plugin scopes
Browse files Browse the repository at this point in the history
  • Loading branch information
Leopoldthecoder committed Jul 31, 2024
1 parent 47f2e28 commit 34b4751
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ describe('<PluginForm />', () => {
cy.get('.field-selectionGroup').find('.field-AutoSuggest').should('not.be.visible')
cy.get('.Scoped-check input').click()
cy.get('.field-selectionGroup').find('.field-AutoSuggest').should('be.visible')
cy.get('#service-id').should('not.exist') // ai-proxy only supports route scoping
cy.get('#service-id').should('be.visible')
cy.get('#route-id').should('be.visible')

// legacy form should not contain any KCollapse elements
Expand Down Expand Up @@ -1206,7 +1206,7 @@ describe('<PluginForm />', () => {
cy.get('.field-selectionGroup').find('.field-AutoSuggest').should('not.be.visible')
cy.get('.Scoped-check input').click()
cy.get('.field-selectionGroup').find('.field-AutoSuggest').should('be.visible')
cy.get('#service-id').should('not.exist') // ai-proxy only supports route scoping
cy.get('#service-id').should('be.visible')
cy.get('#route-id').should('be.visible')

// legacy form should not contain any KCollapse elements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ export const PLUGIN_METADATA: Record<string, Omit<PluginMetaData<I18nMessageSour
group: PluginGroup.AI,
isEnterprise: true,
nameKey: 'plugins.meta.ai-proxy.name',
scope: [PluginScope.ROUTE],
scope: [PluginScope.GLOBAL, PluginScope.SERVICE, PluginScope.ROUTE, PluginScope.CONSUMER, PluginScope.CONSUMER_GROUP],
useLegacyForm: true,
},
'ai-prompt-decorator': {
Expand All @@ -303,7 +303,7 @@ export const PLUGIN_METADATA: Record<string, Omit<PluginMetaData<I18nMessageSour
group: PluginGroup.AI,
isEnterprise: true,
nameKey: 'plugins.meta.ai-prompt-template.name',
scope: [PluginScope.GLOBAL, PluginScope.SERVICE, PluginScope.ROUTE],
scope: [PluginScope.GLOBAL, PluginScope.SERVICE, PluginScope.ROUTE, PluginScope.CONSUMER, PluginScope.CONSUMER_GROUP],
useLegacyForm: true,
},
'ai-prompt-guard': {
Expand All @@ -327,7 +327,7 @@ export const PLUGIN_METADATA: Record<string, Omit<PluginMetaData<I18nMessageSour
group: PluginGroup.AI,
isEnterprise: true,
nameKey: 'plugins.meta.ai-response-transformer.name',
scope: [PluginScope.GLOBAL, PluginScope.SERVICE, PluginScope.ROUTE],
scope: [PluginScope.GLOBAL, PluginScope.SERVICE, PluginScope.ROUTE, PluginScope.CONSUMER, PluginScope.CONSUMER_GROUP],
useLegacyForm: true,
},
'ai-rate-limiting-advanced': {
Expand Down

0 comments on commit 34b4751

Please sign in to comment.