2021-12-09 07:38:07 +00:00
|
|
|
import './assets/css';
|
|
|
|
|
2022-01-10 13:22:21 +00:00
|
|
|
import './i18n';
|
|
|
|
|
2021-12-09 07:38:07 +00:00
|
|
|
import angular from 'angular';
|
|
|
|
import { UI_ROUTER_REACT_HYBRID } from '@uirouter/react-hybrid';
|
|
|
|
|
|
|
|
import './matomo-setup';
|
|
|
|
|
2022-11-13 08:10:18 +00:00
|
|
|
import { Edition } from '@/react/portainer/feature-flags/enums';
|
|
|
|
import { init as initFeatureService } from '@/react/portainer/feature-flags/feature-flags.service';
|
|
|
|
|
|
|
|
import analyticsModule from './angulartics.matomo';
|
2021-12-09 07:38:07 +00:00
|
|
|
import './agent';
|
2022-07-26 19:44:08 +00:00
|
|
|
import { azureModule } from './azure';
|
2021-12-09 07:38:07 +00:00
|
|
|
import './docker/__module';
|
|
|
|
import './edge/__module';
|
|
|
|
import './portainer/__module';
|
|
|
|
|
|
|
|
import { onStartupAngular } from './app';
|
|
|
|
import { configApp } from './config';
|
2023-02-22 20:13:33 +00:00
|
|
|
import { constantsModule } from './ng-constants';
|
2021-12-09 07:38:07 +00:00
|
|
|
|
2022-05-17 04:22:44 +00:00
|
|
|
import { nomadModule } from './nomad';
|
2021-12-14 19:14:53 +00:00
|
|
|
|
2022-01-24 06:02:23 +00:00
|
|
|
initFeatureService(Edition[process.env.PORTAINER_EDITION]);
|
2021-12-14 19:14:53 +00:00
|
|
|
|
2021-12-09 07:38:07 +00:00
|
|
|
angular
|
|
|
|
.module('portainer', [
|
|
|
|
'ui.bootstrap',
|
|
|
|
'ui.router',
|
|
|
|
UI_ROUTER_REACT_HYBRID,
|
|
|
|
'ngSanitize',
|
|
|
|
'ngFileUpload',
|
|
|
|
'ngMessages',
|
|
|
|
'ngResource',
|
|
|
|
'angularUtils.directives.dirPagination',
|
|
|
|
'LocalStorageModule',
|
|
|
|
'angular-jwt',
|
|
|
|
'angular-json-tree',
|
|
|
|
'angular-loading-bar',
|
|
|
|
'angular-clipboard',
|
|
|
|
'ngFileSaver',
|
|
|
|
'luegg.directives',
|
|
|
|
'portainer.app',
|
|
|
|
'portainer.agent',
|
2022-07-26 19:44:08 +00:00
|
|
|
azureModule,
|
2021-12-09 07:38:07 +00:00
|
|
|
'portainer.docker',
|
|
|
|
'portainer.kubernetes',
|
2022-05-17 04:22:44 +00:00
|
|
|
nomadModule,
|
2021-12-09 07:38:07 +00:00
|
|
|
'portainer.edge',
|
|
|
|
'rzModule',
|
|
|
|
'moment-picker',
|
|
|
|
'angulartics',
|
|
|
|
analyticsModule,
|
2023-02-22 20:13:33 +00:00
|
|
|
constantsModule,
|
2021-12-09 07:38:07 +00:00
|
|
|
])
|
|
|
|
.run(onStartupAngular)
|
|
|
|
.config(configApp);
|
|
|
|
|
|
|
|
if (require) {
|
|
|
|
const req = require.context('./', true, /^(.*\.(js$))[^.]*$/im);
|
|
|
|
req
|
|
|
|
.keys()
|
|
|
|
.filter((path) => !path.includes('.test'))
|
|
|
|
.forEach(function (key) {
|
|
|
|
req(key);
|
|
|
|
});
|
|
|
|
}
|