diff --git a/frontend/src/pages/application/index.vue b/frontend/src/pages/application/index.vue index 1c56ababcd..14d34abbf8 100644 --- a/frontend/src/pages/application/index.vue +++ b/frontend/src/pages/application/index.vue @@ -65,7 +65,7 @@ export default { }, computed: { ...mapState(useContextStore, ['team']), - ...mapState(useAccountSettingsStore, ['features', 'featuresCheck']), + ...mapState(useAccountSettingsStore, ['features']), ...mapState(useLiveStatusStore, { liveInstanceMetadata: 'instanceMetadata', statusChannelLive: 'live' }), navigation () { const routes = [ @@ -84,8 +84,7 @@ export default { { label: 'Dashboards', to: { name: 'ApplicationDashboards' }, - tag: 'application-dashboards', - hidden: !this.featuresCheck?.isEmbeddedDashboardEnabled + tag: 'application-dashboards' }, { label: 'Device Groups', diff --git a/frontend/src/pages/instance/index.vue b/frontend/src/pages/instance/index.vue index 007999ce57..fcf4720405 100644 --- a/frontend/src/pages/instance/index.vue +++ b/frontend/src/pages/instance/index.vue @@ -147,7 +147,7 @@ export default { return [ { label: 'Overview', to: { name: 'instance-overview', params: { id: this.instance.id } }, tag: 'instance-overview' }, { label: 'Devices', to: { name: 'instance-devices', params: { id: this.instance.id } }, tag: 'instance-remote' }, - { label: 'Dashboard', to: { name: 'instance-dashboard', params: { id: this.instance.id } }, tag: 'instance-dashboard', hidden: !this.hasDashboard2 || !this.featuresCheck.isEmbeddedDashboardEnabled }, + { label: 'Dashboard', to: { name: 'instance-dashboard', params: { id: this.instance.id } }, tag: 'instance-dashboard', hidden: !this.hasDashboard2 }, { label: 'Version History', to: versionHistoryRoute, tag: 'instance-version-history' }, { label: 'Assets', to: { name: 'instance-assets', params: { id: this.instance.id } }, tag: 'instance-assets', hidden: !this.hasPermission('project:files:list', { application: this.instance.application }) }, { label: 'Audit Log', to: { name: 'instance-audit-log', params: { id: this.instance.id } }, tag: 'instance-activity' }, diff --git a/frontend/src/pages/team/Instances.vue b/frontend/src/pages/team/Instances.vue index 0364a5b9fa..a3f75ed6a7 100644 --- a/frontend/src/pages/team/Instances.vue +++ b/frontend/src/pages/team/Instances.vue @@ -1,10 +1,9 @@ @@ -26,7 +25,6 @@ import TeamTrialBanner from '../../components/banners/TeamTrial.vue' import { Roles } from '../../utils/roles.js' import TeamDashboards from './Dashboards/index.vue' -import TeamInstances from './Instances.vue' import { useAccountAuthStore } from '@/stores/account-auth.js' import { useAccountSettingsStore } from '@/stores/account-settings.js' @@ -39,7 +37,6 @@ export default { name: 'TeamPage', components: { TeamDashboards, - TeamInstances, SubscriptionExpiredBanner, TeamSuspendedBanner, TeamTrialBanner @@ -57,7 +54,7 @@ export default { }, computed: { ...mapState(useContextStore, ['team', 'teamMembership']), - ...mapState(useAccountSettingsStore, ['requiresBilling', 'featuresCheck']), + ...mapState(useAccountSettingsStore, ['requiresBilling']), ...mapState(useAccountAuthStore, ['user', 'isAdminUser']), ...mapState(useUxToursStore, ['shouldPresentTour']), ...mapState(useProductExpertStore, ['shouldWakeUpAssistant']), @@ -73,9 +70,6 @@ export default { }, canAccessTeam: function () { return this.isAdminUser || this.teamMembership?.role >= Roles.Viewer - }, - isEmbeddedDashboardEnabled: function () { - return this.featuresCheck?.isEmbeddedDashboardEnabled } }, watch: { diff --git a/frontend/src/stores/account-settings.js b/frontend/src/stores/account-settings.js index 0a520f2dc9..abfe19f6b3 100644 --- a/frontend/src/stores/account-settings.js +++ b/frontend/src/stores/account-settings.js @@ -6,8 +6,7 @@ import { useAccountAuthStore } from '@/stores/account-auth.js' import { useContextStore } from '@/stores/context.js' export const POSTHOG_FLAGS = { - FF_FEATURE_FLAGS: 'FF_FEATURE_FLAGS', - EMBEDDED_DASHBOARD_ENABLED: 'EMBEDDED_DASHBOARD_ENABLED' + FF_FEATURE_FLAGS: 'FF_FEATURE_FLAGS' } export const useAccountSettingsStore = defineStore('account-settings', { @@ -50,7 +49,6 @@ export const useAccountSettingsStore = defineStore('account-settings', { // adding in PostHog Feature Flags checks.isPostHogFeatureFlagsEnabled = !!state.posthogFlags[POSTHOG_FLAGS.FF_FEATURE_FLAGS] - checks.isEmbeddedDashboardEnabled = !!state.posthogFlags[POSTHOG_FLAGS.EMBEDDED_DASHBOARD_ENABLED] return checks } diff --git a/frontend/src/stores/ux-navigation.js b/frontend/src/stores/ux-navigation.js index c4933a05c1..d21e718eea 100644 --- a/frontend/src/stores/ux-navigation.js +++ b/frontend/src/stores/ux-navigation.js @@ -251,8 +251,7 @@ export const useUxNavigationStore = defineStore('ux-navigation', { }, tag: 'team-dashboards', icon: ChartPieIcon, - disabled: requiresBilling, - hidden: features.isEmbeddedDashboardEnabled + disabled: requiresBilling }, { label: 'Groups', diff --git a/test/e2e/frontend/cypress/tests-ee/rbac/rbac-management.spec.js b/test/e2e/frontend/cypress/tests-ee/rbac/rbac-management.spec.js index b85d36b7bd..3a7a9b436c 100644 --- a/test/e2e/frontend/cypress/tests-ee/rbac/rbac-management.spec.js +++ b/test/e2e/frontend/cypress/tests-ee/rbac/rbac-management.spec.js @@ -303,16 +303,16 @@ describe('FlowFuse - RBAC GUI Management', () => { cy.get('[data-nav="user-access"]').should('not.exist') // checking that a plain dashboard user has access to all application instances when he has no additional rbac permissions set - cy.get('[data-el="instances-table"]').should('exist') - cy.get('[data-el="instances-table"] tbody tr').should('have.length', 5) + cy.get('[data-el="dashboards-table"]').should('exist') + cy.get('[data-el="dashboards-table"] tbody tr').should('have.length', 5) // application 1 should not be visible to anyone - cy.get('[data-el="instances-table"] [data-el="row-application-1-instance-1"]').should('not.exist') + cy.get('[data-el="dashboards-table"] [data-el="row-application-1-instance-1"]').should('not.exist') // application 2 should be visible to dashboard users - cy.get('[data-el="instances-table"] [data-el="row-application-2-instance-1"]').should('exist') - cy.get('[data-el="instances-table"] [data-el="row-application-3-instance-1"]').should('exist') - cy.get('[data-el="instances-table"] [data-el="row-application-4-instance-1"]').should('exist') - cy.get('[data-el="instances-table"] [data-el="row-application-5-instance-1"]').should('exist') - cy.get('[data-el="instances-table"] [data-el="row-application-6-instance-1"]').should('exist') + cy.get('[data-el="dashboards-table"] [data-el="row-application-2-instance-1"]').should('exist') + cy.get('[data-el="dashboards-table"] [data-el="row-application-3-instance-1"]').should('exist') + cy.get('[data-el="dashboards-table"] [data-el="row-application-4-instance-1"]').should('exist') + cy.get('[data-el="dashboards-table"] [data-el="row-application-5-instance-1"]').should('exist') + cy.get('[data-el="dashboards-table"] [data-el="row-application-6-instance-1"]').should('exist') }) }) }) diff --git a/test/e2e/frontend/cypress/tests/brokers/clients.spec.js b/test/e2e/frontend/cypress/tests/brokers/clients.spec.js index 3e1004a24f..4e83f41670 100644 --- a/test/e2e/frontend/cypress/tests/brokers/clients.spec.js +++ b/test/e2e/frontend/cypress/tests/brokers/clients.spec.js @@ -29,7 +29,7 @@ describe('FlowFuse - Brokers Clients', () => { cy.get('[data-nav="team-brokers"]').should('not.exist') cy.visit('team/ateam/brokers/team-broker/clients') - cy.get('[data-el="instances-table"]').should('exist') + cy.get('[data-el="dashboards-list"]').should('exist') }) }) }) diff --git a/test/e2e/frontend/cypress/tests/brokers/hierarchy.spec.js b/test/e2e/frontend/cypress/tests/brokers/hierarchy.spec.js index 9d70c5374b..0e52c41899 100644 --- a/test/e2e/frontend/cypress/tests/brokers/hierarchy.spec.js +++ b/test/e2e/frontend/cypress/tests/brokers/hierarchy.spec.js @@ -17,7 +17,7 @@ describe('FlowFuse - Brokers Hierarchy', () => { cy.get('[data-nav="team-unified-namespace"]').should('not.exist') cy.visit('team/ateam/brokers/team-broker/hierarchy') - cy.get('[data-el="instances-table"]').should('exist') + cy.get('[data-el="dashboards-list"]').should('exist') }) }) }) diff --git a/test/e2e/frontend/cypress/tests/team/instances.spec.js b/test/e2e/frontend/cypress/tests/team/instances.spec.js index 6ec7229dbe..a6cfb0355c 100644 --- a/test/e2e/frontend/cypress/tests/team/instances.spec.js +++ b/test/e2e/frontend/cypress/tests/team/instances.spec.js @@ -75,23 +75,21 @@ describe('Team - Instances', () => { cy.contains('There are no dashboards in this team.') }) - it('are shown a list of instances when dashboard instances are found', () => { + it('are shown a list of dashboards and can open one in the viewer', () => { cy.login('dashboard-dave', 'ddPassword') cy.visit('/team/ateam') cy.wait('@getTeam') - cy.contains('instance-1-2') - .closest('tr') - .within(() => { - cy.get('[data-action="open-dashboard"]').should('be.disabled') - }) + cy.get('[data-el="dashboards-table"]').within(() => { + cy.contains('instance-1-1') + cy.contains('instance-1-2') + }) - cy.contains('instance-1-1') - .closest('tr') - .within(() => { - cy.get('[data-action="open-dashboard"]').should('not.be.disabled') - }) + cy.contains('instance-1-1').closest('tr').click() + + cy.url().should('include', '/dashboards/') + cy.get('[data-el="dashboards-viewer"]').should('exist') }) }) })