mirror of https://github.com/portainer/portainer
refactor(app): create empty react structure [EE-3178] (#6926)
parent
668d526604
commit
1132c9ce87
|
@ -3,9 +3,10 @@ import angular from 'angular';
|
||||||
import { AzureSidebarAngular } from './AzureSidebar/AzureSidebar';
|
import { AzureSidebarAngular } from './AzureSidebar/AzureSidebar';
|
||||||
import { DashboardViewAngular } from './Dashboard/DashboardView';
|
import { DashboardViewAngular } from './Dashboard/DashboardView';
|
||||||
import { containerInstancesModule } from './ContainerInstances';
|
import { containerInstancesModule } from './ContainerInstances';
|
||||||
|
import { reactModule } from './react';
|
||||||
|
|
||||||
angular
|
angular
|
||||||
.module('portainer.azure', ['portainer.app', containerInstancesModule])
|
.module('portainer.azure', ['portainer.app', containerInstancesModule, reactModule])
|
||||||
.config([
|
.config([
|
||||||
'$stateRegistryProvider',
|
'$stateRegistryProvider',
|
||||||
function ($stateRegistryProvider) {
|
function ($stateRegistryProvider) {
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
import angular from 'angular';
|
||||||
|
|
||||||
|
export const componentsModule = angular.module(
|
||||||
|
'portainer.azure.react.components',
|
||||||
|
[]
|
||||||
|
).name;
|
|
@ -0,0 +1,9 @@
|
||||||
|
import angular from 'angular';
|
||||||
|
|
||||||
|
import { componentsModule } from './components';
|
||||||
|
import { viewsModule } from './views';
|
||||||
|
|
||||||
|
export const reactModule = angular.module('portainer.azure.react', [
|
||||||
|
viewsModule,
|
||||||
|
componentsModule,
|
||||||
|
]).name;
|
|
@ -0,0 +1,6 @@
|
||||||
|
import angular from 'angular';
|
||||||
|
|
||||||
|
export const viewsModule = angular.module(
|
||||||
|
'portainer.azure.react.views',
|
||||||
|
[]
|
||||||
|
).name;
|
|
@ -1,11 +1,13 @@
|
||||||
import angular from 'angular';
|
import angular from 'angular';
|
||||||
|
|
||||||
import { EnvironmentStatus } from '@/portainer/environments/types';
|
import { EnvironmentStatus } from '@/portainer/environments/types';
|
||||||
|
|
||||||
|
import { reactModule } from './react';
|
||||||
import containersModule from './containers';
|
import containersModule from './containers';
|
||||||
import { componentsModule } from './components';
|
import { componentsModule } from './components';
|
||||||
import { networksModule } from './networks';
|
import { networksModule } from './networks';
|
||||||
|
|
||||||
angular.module('portainer.docker', ['portainer.app', containersModule, componentsModule, networksModule]).config([
|
angular.module('portainer.docker', ['portainer.app', containersModule, componentsModule, networksModule, reactModule]).config([
|
||||||
'$stateRegistryProvider',
|
'$stateRegistryProvider',
|
||||||
function ($stateRegistryProvider) {
|
function ($stateRegistryProvider) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
import angular from 'angular';
|
||||||
|
|
||||||
|
export const componentsModule = angular.module(
|
||||||
|
'portainer.docker.react.components',
|
||||||
|
[]
|
||||||
|
).name;
|
|
@ -0,0 +1,9 @@
|
||||||
|
import angular from 'angular';
|
||||||
|
|
||||||
|
import { componentsModule } from './components';
|
||||||
|
import { viewsModule } from './views';
|
||||||
|
|
||||||
|
export const reactModule = angular.module('portainer.docker.react', [
|
||||||
|
viewsModule,
|
||||||
|
componentsModule,
|
||||||
|
]).name;
|
|
@ -0,0 +1,6 @@
|
||||||
|
import angular from 'angular';
|
||||||
|
|
||||||
|
export const viewsModule = angular.module(
|
||||||
|
'portainer.docker.react.views',
|
||||||
|
[]
|
||||||
|
).name;
|
|
@ -4,9 +4,10 @@ import edgeStackModule from './views/edge-stacks';
|
||||||
import edgeDevicesModule from './devices';
|
import edgeDevicesModule from './devices';
|
||||||
import { componentsModule } from './components';
|
import { componentsModule } from './components';
|
||||||
import { WaitingRoomViewAngular } from './EdgeDevices/WaitingRoomView';
|
import { WaitingRoomViewAngular } from './EdgeDevices/WaitingRoomView';
|
||||||
|
import { reactModule } from './react';
|
||||||
|
|
||||||
angular
|
angular
|
||||||
.module('portainer.edge', [edgeStackModule, edgeDevicesModule, componentsModule])
|
.module('portainer.edge', [edgeStackModule, edgeDevicesModule, componentsModule, reactModule])
|
||||||
.component('waitingRoomView', WaitingRoomViewAngular)
|
.component('waitingRoomView', WaitingRoomViewAngular)
|
||||||
.config(function config($stateRegistryProvider) {
|
.config(function config($stateRegistryProvider) {
|
||||||
const edge = {
|
const edge = {
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
import angular from 'angular';
|
||||||
|
|
||||||
|
export const componentsModule = angular.module(
|
||||||
|
'portainer.edge.react.components',
|
||||||
|
[]
|
||||||
|
).name;
|
|
@ -0,0 +1,9 @@
|
||||||
|
import angular from 'angular';
|
||||||
|
|
||||||
|
import { componentsModule } from './components';
|
||||||
|
import { viewsModule } from './views';
|
||||||
|
|
||||||
|
export const reactModule = angular.module('portainer.edge.react', [
|
||||||
|
viewsModule,
|
||||||
|
componentsModule,
|
||||||
|
]).name;
|
|
@ -0,0 +1,6 @@
|
||||||
|
import angular from 'angular';
|
||||||
|
|
||||||
|
export const viewsModule = angular.module(
|
||||||
|
'portainer.edge.react.views',
|
||||||
|
[]
|
||||||
|
).name;
|
|
@ -19,6 +19,7 @@ import { configApp } from './config';
|
||||||
|
|
||||||
import { init as initFeatureService } from './portainer/feature-flags/feature-flags.service';
|
import { init as initFeatureService } from './portainer/feature-flags/feature-flags.service';
|
||||||
import { Edition } from './portainer/feature-flags/enums';
|
import { Edition } from './portainer/feature-flags/enums';
|
||||||
|
import { nomadModule } from './nomad';
|
||||||
|
|
||||||
initFeatureService(Edition[process.env.PORTAINER_EDITION]);
|
initFeatureService(Edition[process.env.PORTAINER_EDITION]);
|
||||||
|
|
||||||
|
@ -46,6 +47,7 @@ angular
|
||||||
'portainer.azure',
|
'portainer.azure',
|
||||||
'portainer.docker',
|
'portainer.docker',
|
||||||
'portainer.kubernetes',
|
'portainer.kubernetes',
|
||||||
|
nomadModule,
|
||||||
'portainer.edge',
|
'portainer.edge',
|
||||||
'rzModule',
|
'rzModule',
|
||||||
'moment-picker',
|
'moment-picker',
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import registriesModule from './registries';
|
import registriesModule from './registries';
|
||||||
import customTemplateModule from './custom-templates';
|
import customTemplateModule from './custom-templates';
|
||||||
|
import { reactModule } from './react';
|
||||||
|
|
||||||
angular.module('portainer.kubernetes', ['portainer.app', registriesModule, customTemplateModule]).config([
|
angular.module('portainer.kubernetes', ['portainer.app', registriesModule, customTemplateModule, reactModule]).config([
|
||||||
'$stateRegistryProvider',
|
'$stateRegistryProvider',
|
||||||
function ($stateRegistryProvider) {
|
function ($stateRegistryProvider) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
import angular from 'angular';
|
||||||
|
|
||||||
|
export const componentsModule = angular.module(
|
||||||
|
'portainer.kubernetes.react.components',
|
||||||
|
[]
|
||||||
|
).name;
|
|
@ -0,0 +1,9 @@
|
||||||
|
import angular from 'angular';
|
||||||
|
|
||||||
|
import { componentsModule } from './components';
|
||||||
|
import { viewsModule } from './views';
|
||||||
|
|
||||||
|
export const reactModule = angular.module('portainer.kubernetes.react', [
|
||||||
|
viewsModule,
|
||||||
|
componentsModule,
|
||||||
|
]).name;
|
|
@ -0,0 +1,6 @@
|
||||||
|
import angular from 'angular';
|
||||||
|
|
||||||
|
export const viewsModule = angular.module(
|
||||||
|
'portainer.kubernetes.react.views',
|
||||||
|
[]
|
||||||
|
).name;
|
|
@ -0,0 +1,8 @@
|
||||||
|
import angular from 'angular';
|
||||||
|
|
||||||
|
import { reactModule } from './react';
|
||||||
|
|
||||||
|
export const nomadModule = angular.module('portainer.nomad', [
|
||||||
|
'portainer.app',
|
||||||
|
reactModule,
|
||||||
|
]).name;
|
|
@ -0,0 +1,6 @@
|
||||||
|
import angular from 'angular';
|
||||||
|
|
||||||
|
export const componentsModule = angular.module(
|
||||||
|
'portainer.nomad.react.components',
|
||||||
|
[]
|
||||||
|
).name;
|
|
@ -0,0 +1,9 @@
|
||||||
|
import angular from 'angular';
|
||||||
|
|
||||||
|
import { componentsModule } from './components';
|
||||||
|
import { viewsModule } from './views';
|
||||||
|
|
||||||
|
export const reactModule = angular.module('portainer.nomad.react', [
|
||||||
|
viewsModule,
|
||||||
|
componentsModule,
|
||||||
|
]).name;
|
|
@ -0,0 +1,6 @@
|
||||||
|
import angular from 'angular';
|
||||||
|
|
||||||
|
export const viewsModule = angular.module(
|
||||||
|
'portainer.nomad.react.views',
|
||||||
|
[]
|
||||||
|
).name;
|
|
@ -9,6 +9,7 @@ import servicesModule from './services';
|
||||||
import teamsModule from './teams';
|
import teamsModule from './teams';
|
||||||
import homeModule from './home';
|
import homeModule from './home';
|
||||||
import { accessControlModule } from './access-control';
|
import { accessControlModule } from './access-control';
|
||||||
|
import { reactModule } from './react';
|
||||||
|
|
||||||
async function initAuthentication(authManager, Authentication, $rootScope, $state) {
|
async function initAuthentication(authManager, Authentication, $rootScope, $state) {
|
||||||
authManager.checkAuthOnRefresh();
|
authManager.checkAuthOnRefresh();
|
||||||
|
@ -38,6 +39,7 @@ angular
|
||||||
servicesModule,
|
servicesModule,
|
||||||
teamsModule,
|
teamsModule,
|
||||||
accessControlModule,
|
accessControlModule,
|
||||||
|
reactModule,
|
||||||
])
|
])
|
||||||
.config([
|
.config([
|
||||||
'$stateRegistryProvider',
|
'$stateRegistryProvider',
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
import angular from 'angular';
|
||||||
|
|
||||||
|
export const componentsModule = angular.module(
|
||||||
|
'portainer.docker.react.components',
|
||||||
|
[]
|
||||||
|
).name;
|
|
@ -0,0 +1,9 @@
|
||||||
|
import angular from 'angular';
|
||||||
|
|
||||||
|
import { componentsModule } from './components';
|
||||||
|
import { viewsModule } from './views';
|
||||||
|
|
||||||
|
export const reactModule = angular.module('portainer.docker.react', [
|
||||||
|
viewsModule,
|
||||||
|
componentsModule,
|
||||||
|
]).name;
|
|
@ -0,0 +1,6 @@
|
||||||
|
import angular from 'angular';
|
||||||
|
|
||||||
|
export const viewsModule = angular.module(
|
||||||
|
'portainer.docker.react.views',
|
||||||
|
[]
|
||||||
|
).name;
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue