Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
$scope: any,
utilSrv: UtilSrv,
$rootScope: GrafanaRootScope,
contextSrv: ContextSrv,
bridgeSrv: BridgeSrv,
backendSrv: BackendSrv,
timeSrv: TimeSrv,
linkSrv: LinkSrv,
datasourceSrv: DatasourceSrv,
keybindingSrv: KeybindingSrv,
dashboardSrv: DashboardSrv,
angularLoader: AngularLoader
) {
// make angular loader service available to react components
setAngularLoader(angularLoader);
setBackendSrv(backendSrv);
setDataSourceSrv(datasourceSrv);
setTimeSrv(timeSrv);
setLinkSrv(linkSrv);
setKeybindingSrv(keybindingSrv);
setDashboardSrv(dashboardSrv);
const store = configureStore();
setLocationSrv({
update: (opt: LocationUpdate) => {
store.dispatch(updateLocation(opt));
},
});
$scope.init = () => {
$scope.contextSrv = contextSrv;
$scope.appSubUrl = config.appSubUrl;
constructor(
$scope: any,
utilSrv: UtilSrv,
$rootScope: GrafanaRootScope,
contextSrv: ContextSrv,
bridgeSrv: BridgeSrv,
backendSrv: BackendSrv,
timeSrv: TimeSrv,
linkSrv: LinkSrv,
datasourceSrv: DatasourceSrv,
keybindingSrv: KeybindingSrv,
angularLoader: AngularLoader
) {
// make angular loader service available to react components
setAngularLoader(angularLoader);
setBackendSrv(backendSrv);
setDataSourceSrv(datasourceSrv);
setTimeSrv(timeSrv);
setLinkSrv(linkSrv);
setKeybindingSrv(keybindingSrv);
const store = configureStore();
setLocationSrv({
update: (opt: LocationUpdate) => {
store.dispatch(updateLocation(opt));
},
});
$scope.init = () => {
$scope.contextSrv = contextSrv;
$scope.appSubUrl = config.appSubUrl;
$scope._ = _;