mirror of https://github.com/portainer/portainer
feat(wizard): replace-the-add-envs-button-with-env-wizard-button EE-3001 (#7013)
* feat(envs): on env click, direct user to wizardremotes/origin/fix/EE-2141/add-pagination-to-kubeconfig-download-dialog
parent
0522032515
commit
eb4ff12744
|
@ -202,17 +202,6 @@ angular
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
var endpointCreation = {
|
|
||||||
name: 'portainer.endpoints.new',
|
|
||||||
url: '/new',
|
|
||||||
views: {
|
|
||||||
'content@': {
|
|
||||||
templateUrl: './views/endpoints/create/createendpoint.html',
|
|
||||||
controller: 'CreateEndpointController',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
var edgeDeviceCreation = {
|
var edgeDeviceCreation = {
|
||||||
name: 'portainer.endpoints.newEdgeDevice',
|
name: 'portainer.endpoints.newEdgeDevice',
|
||||||
url: '/newEdgeDevice',
|
url: '/newEdgeDevice',
|
||||||
|
@ -498,7 +487,6 @@ angular
|
||||||
$stateRegistryProvider.register(endpointAccess);
|
$stateRegistryProvider.register(endpointAccess);
|
||||||
$stateRegistryProvider.register(endpointKVM);
|
$stateRegistryProvider.register(endpointKVM);
|
||||||
$stateRegistryProvider.register(edgeDeviceCreation);
|
$stateRegistryProvider.register(edgeDeviceCreation);
|
||||||
$stateRegistryProvider.register(endpointCreation);
|
|
||||||
$stateRegistryProvider.register(deviceImport);
|
$stateRegistryProvider.register(deviceImport);
|
||||||
$stateRegistryProvider.register(addFDOProfile);
|
$stateRegistryProvider.register(addFDOProfile);
|
||||||
$stateRegistryProvider.register(editFDOProfile);
|
$stateRegistryProvider.register(editFDOProfile);
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
>
|
>
|
||||||
<i class="fa fa-trash-alt space-right" aria-hidden="true"></i>Remove
|
<i class="fa fa-trash-alt space-right" aria-hidden="true"></i>Remove
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-sm btn-primary" ui-sref="portainer.endpoints.new" data-cy="endpoint-addEndpointButton">
|
<button type="button" class="btn btn-sm btn-primary" ng-click="$ctrl.setRefferer()" ui-sref="portainer.wizard.endpoints" data-cy="endpoint-addEndpointButton">
|
||||||
<i class="fa fa-plus-circle space-right" aria-hidden="true"></i>Add environment
|
<i class="fa fa-plus-circle space-right" aria-hidden="true"></i>Add environment
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -34,6 +34,10 @@ angular.module('portainer.app').controller('EndpointsDatatableController', [
|
||||||
this.paginationChanged();
|
this.paginationChanged();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.setRefferer = function () {
|
||||||
|
window.localStorage.setItem('wizardRefferer', 'environments');
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Overridden
|
* Overridden
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -8,9 +8,9 @@ export function NoEnvironmentsInfoPanel({ isAdmin }: { isAdmin: boolean }) {
|
||||||
<TextTip>
|
<TextTip>
|
||||||
{isAdmin ? (
|
{isAdmin ? (
|
||||||
<span>
|
<span>
|
||||||
No environment available for management. Please head over the
|
No environment available for management. Please head over the{' '}
|
||||||
<Link to="portainer.endpoints.new"> environments view </Link>
|
<Link to="portainer.wizard.endpoints">environment wizard</Link> to
|
||||||
to add an environment.
|
add an environment.
|
||||||
</span>
|
</span>
|
||||||
) : (
|
) : (
|
||||||
<span>
|
<span>
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
label="Environments"
|
label="Environments"
|
||||||
path="portainer.endpoints"
|
path="portainer.endpoints"
|
||||||
is-sidebar-open="toggle"
|
is-sidebar-open="toggle"
|
||||||
children-paths="['portainer.endpoints.endpoint', 'portainer.endpoints.new', 'portainer.endpoints.endpoint.access', 'portainer.groups', 'portainer.groups.group', 'portainer.groups.group.access', 'portainer.groups.new', 'portainer.tags']"
|
children-paths="['portainer.endpoints.endpoint', 'portainer.wizard', 'portainer.endpoints.endpoint.access', 'portainer.groups', 'portainer.groups.group', 'portainer.groups.group.access', 'portainer.groups.new', 'portainer.tags']"
|
||||||
>
|
>
|
||||||
<sidebar-menu-item path="portainer.groups" class-name="sidebar-sublist" data-cy="portainerSidebar-endpointGroups" title="Groups">Groups</sidebar-menu-item>
|
<sidebar-menu-item path="portainer.groups" class-name="sidebar-sublist" data-cy="portainerSidebar-endpointGroups" title="Groups">Groups</sidebar-menu-item>
|
||||||
<sidebar-menu-item path="portainer.tags" class-name="sidebar-sublist" data-cy="portainerSidebar-endpointTags" title="Tags">Tags</sidebar-menu-item>
|
<sidebar-menu-item path="portainer.tags" class-name="sidebar-sublist" data-cy="portainerSidebar-endpointTags" title="Tags">Tags</sidebar-menu-item>
|
||||||
|
|
|
@ -118,6 +118,11 @@ export function EnvironmentCreationView() {
|
||||||
])
|
])
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
|
if (localStorage.getItem('wizardRefferer') === 'environments') {
|
||||||
|
localStorage.removeItem('wizardRefferer');
|
||||||
|
router.stateService.go('portainer.endpoints');
|
||||||
|
return;
|
||||||
|
}
|
||||||
router.stateService.go('portainer.home');
|
router.stateService.go('portainer.home');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue