mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 13:29:41 +02:00
* refactor(sidebar): migrate sidebar to react [EE-2907] fixes [EE-2907] feat(sidebar): show label for help fix(sidebar): apply changes from ddExtension fix(sidebar): resolve conflicts style(ts): add explanation for ddExtension fix(sidebar): use enum for status refactor(sidebar): rename to EdgeComputeSidebar refactor(sidebar): removed the need of `ident` prop style(sidebar): add ref for mobile breakpoint refactor(app): document testing props refactor(sidebar): use single sidebar item refactor(sidebar): use section for nav refactor(sidebar): rename sidebarlink to link refactor(sidebar): memoize menu paths fix(kubectl-shell): infinite loop on hooks dependencies refactor(sidebar): use authorized element feat(k8s/shell): track open shell refactor(k8s/shell): remove memoization refactor(settings): move settings queries to queries fix(sidebar): close sidebar on mobile refactor(settings): use mutation helpers refactor(sidebar): remove memo refactor(sidebar): rename sidebar item for storybook refactor(sidebar): move to react gprefactor(sidebar): remove dependence on EndProvider feat(environments): rename settings type feat(kube): move kubeconfig button fix(sidebar): open submenus fix(sidebar): open on expand fix(sibebar): show kube shell correctly * fix(sidebar): import from react component * chore(tests): fix missing prop
86 lines
2.6 KiB
JavaScript
86 lines
2.6 KiB
JavaScript
import angular from 'angular';
|
|
|
|
import { DashboardViewAngular } from './Dashboard/DashboardView';
|
|
import { containerInstancesModule } from './ContainerInstances';
|
|
import { reactModule } from './react';
|
|
|
|
angular
|
|
.module('portainer.azure', ['portainer.app', containerInstancesModule, reactModule])
|
|
.config([
|
|
'$stateRegistryProvider',
|
|
function ($stateRegistryProvider) {
|
|
'use strict';
|
|
|
|
var azure = {
|
|
name: 'azure',
|
|
url: '/azure',
|
|
parent: 'endpoint',
|
|
abstract: true,
|
|
onEnter: /* @ngInject */ function onEnter($async, $state, endpoint, EndpointProvider, Notifications, StateManager) {
|
|
return $async(async () => {
|
|
if (endpoint.Type !== 3) {
|
|
$state.go('portainer.home');
|
|
return;
|
|
}
|
|
try {
|
|
EndpointProvider.setEndpointID(endpoint.Id);
|
|
EndpointProvider.setEndpointPublicURL(endpoint.PublicURL);
|
|
EndpointProvider.setOfflineModeFromStatus(endpoint.Status);
|
|
await StateManager.updateEndpointState(endpoint, []);
|
|
} catch (e) {
|
|
Notifications.error('Failed loading environment', e);
|
|
$state.go('portainer.home', {}, { reload: true });
|
|
}
|
|
});
|
|
},
|
|
};
|
|
|
|
var containerInstances = {
|
|
name: 'azure.containerinstances',
|
|
url: '/containerinstances',
|
|
views: {
|
|
'content@': {
|
|
templateUrl: './views/containerinstances/containerinstances.html',
|
|
controller: 'AzureContainerInstancesController',
|
|
},
|
|
},
|
|
};
|
|
|
|
var containerInstance = {
|
|
name: 'azure.containerinstances.container',
|
|
url: '/:id',
|
|
views: {
|
|
'content@': {
|
|
component: 'containerInstanceDetails',
|
|
},
|
|
},
|
|
};
|
|
|
|
var containerInstanceCreation = {
|
|
name: 'azure.containerinstances.new',
|
|
url: '/new/',
|
|
views: {
|
|
'content@': {
|
|
component: 'createContainerInstanceView',
|
|
},
|
|
},
|
|
};
|
|
|
|
var dashboard = {
|
|
name: 'azure.dashboard',
|
|
url: '/dashboard',
|
|
views: {
|
|
'content@': {
|
|
component: 'dashboardView',
|
|
},
|
|
},
|
|
};
|
|
|
|
$stateRegistryProvider.register(azure);
|
|
$stateRegistryProvider.register(containerInstances);
|
|
$stateRegistryProvider.register(containerInstance);
|
|
$stateRegistryProvider.register(containerInstanceCreation);
|
|
$stateRegistryProvider.register(dashboard);
|
|
},
|
|
])
|
|
.component('dashboardView', DashboardViewAngular);
|