If you have cloned the Cockpit application, you could remove the datapoint explorer plugin from your application. The plugin is imported in the ng1.ts file, because it is still written in AngularJS. Remove this import from the file:
I followed what you wrote and successfully blocked access to “Data Explorer” via the link.
In addition;
I wanted to do the same blocking on the “Reports” button.
I also moved the “Reports” button away from the menu and then
From ng1.ts file import '@c8y/ng1-modules/cockpit-reports/cumulocity.json'; I deleted the partition.
But nothing worked.
As a solution;
in app.module.ts file
I made the “ReportDashboardModules” as a comment line as below.
and in this way, access to the “Reports” menu on the link was successfully blocked.
import {
CockpitDashboardModule
//ReportDashboardModule
} from '@c8y/ngx-components/context-dashboard';
@NgModule({
imports: [
// Upgrade module must be the first
UpgradeModule,
BrowserAnimationsModule,
RouterModule.forRoot(),
ReportsModule,
NgRouterModule.forRoot([...UPGRADE_ROUTES], { enableTracing: false, useHash: true }),
CoreModule.forRoot(),
NgUpgradeModule,
AssetsNavigatorModule,
DashboardUpgradeModule,
CockpitDashboardModule,
SensorPhoneModule,
//ReportDashboardModule,
BinaryFileDownloadModule,
SearchModule,
SubAssetsModule,
ChildDevicesModule,
CockpitConfigModule,
DatapointLibraryModule.forRoot(),
WidgetsModule
]
})