import angular from 'angular';
import edgeStackModule from './views/edge-stacks';
import { reactModule } from './react';
angular
.module('portainer.edge', [edgeStackModule, reactModule])
.config(function config($stateRegistryProvider) {
const edge = {
name: 'edge',
url: '/edge',
parent: 'root',
abstract: true,
};
const groups = {
name: 'edge.groups',
url: '/groups',
views: {
'content@': {
component: 'edgeGroupsView',
},
data: {
docs: '/user/edge/groups',
const groupsNew = {
name: 'edge.groups.new',
url: '/new',
component: 'createEdgeGroupView',
const groupsEdit = {
name: 'edge.groups.edit',
url: '/:groupId',
component: 'editEdgeGroupView',
const stacks = {
name: 'edge.stacks',
url: '/stacks',
component: 'edgeStacksView',
docs: '/user/edge/stacks',
const stacksNew = {
name: 'edge.stacks.new',
component: 'createEdgeStackView',
const stacksEdit = {
name: 'edge.stacks.edit',
url: '/:stackId?tab&status',
component: 'editEdgeStackView',
params: {
status: {
dynamic: true,
const edgeJobs = {
name: 'edge.jobs',
url: '/jobs',
component: 'edgeJobsView',
docs: '/user/edge/jobs',
const edgeJob = {
name: 'edge.jobs.job',
url: '/:id',
component: 'edgeJobView',
tab: 0,
const edgeJobCreation = {
name: 'edge.jobs.new',
component: 'createEdgeJobView',
$stateRegistryProvider.register({
name: 'edge.devices',
url: '/devices',
});
if (process.env.PORTAINER_EDITION === 'BE') {
name: 'edge.devices.waiting-room',
url: '/waiting-room',
component: 'waitingRoomView',
docs: '/user/edge/devices',
}
$stateRegistryProvider.register(edge);
$stateRegistryProvider.register(groups);
$stateRegistryProvider.register(groupsNew);
$stateRegistryProvider.register(groupsEdit);
$stateRegistryProvider.register(stacks);
$stateRegistryProvider.register(stacksNew);
$stateRegistryProvider.register(stacksEdit);
$stateRegistryProvider.register(edgeJobs);
$stateRegistryProvider.register(edgeJob);
$stateRegistryProvider.register(edgeJobCreation);