mirror of https://github.com/portainer/portainer
fix js console error for access control and stack page (#7347)
parent
423dd5e394
commit
0f617f7f87
|
@ -6,7 +6,7 @@ import { r2a } from '@/react-tools/react2angular';
|
||||||
import { TeamMembership, Role } from '@/portainer/teams/types';
|
import { TeamMembership, Role } from '@/portainer/teams/types';
|
||||||
import { useUserMembership } from '@/portainer/users/queries';
|
import { useUserMembership } from '@/portainer/users/queries';
|
||||||
|
|
||||||
import { Table, TableContainer, TableTitle } from '@@/datatables';
|
import { TableContainer, TableTitle } from '@@/datatables';
|
||||||
import { Button } from '@@/buttons';
|
import { Button } from '@@/buttons';
|
||||||
|
|
||||||
import { ResourceControlType, ResourceId } from '../types';
|
import { ResourceControlType, ResourceId } from '../types';
|
||||||
|
@ -48,33 +48,31 @@ export function AccessControlPanel({
|
||||||
<div className="col-sm-12">
|
<div className="col-sm-12">
|
||||||
<TableContainer>
|
<TableContainer>
|
||||||
<TableTitle label="Access control" icon="eye" featherIcon />
|
<TableTitle label="Access control" icon="eye" featherIcon />
|
||||||
<Table className="no-padding">
|
<AccessControlPanelDetails
|
||||||
<AccessControlPanelDetails
|
resourceType={resourceType}
|
||||||
resourceType={resourceType}
|
resourceControl={resourceControl}
|
||||||
resourceControl={resourceControl}
|
/>
|
||||||
/>
|
|
||||||
|
|
||||||
{!isEditDisabled && !isEditMode && (
|
{!isEditDisabled && !isEditMode && (
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<div>
|
<div>
|
||||||
<Button color="link" onClick={toggleEditMode}>
|
<Button color="link" onClick={toggleEditMode}>
|
||||||
<Icon icon="edit" className="space-right" feather />
|
<Icon icon="edit" className="space-right" feather />
|
||||||
Change ownership
|
Change ownership
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
{isEditMode && (
|
{isEditMode && (
|
||||||
<AccessControlPanelForm
|
<AccessControlPanelForm
|
||||||
resourceControl={resourceControl}
|
resourceControl={resourceControl}
|
||||||
onCancelClick={() => toggleEditMode()}
|
onCancelClick={() => toggleEditMode()}
|
||||||
resourceId={resourceId}
|
resourceId={resourceId}
|
||||||
resourceType={resourceType}
|
resourceType={resourceType}
|
||||||
onUpdateSuccess={handleUpdateSuccess}
|
onUpdateSuccess={handleUpdateSuccess}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</Table>
|
|
||||||
</TableContainer>
|
</TableContainer>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -316,7 +316,7 @@ angular.module('portainer.app').controller('StackController', [
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadStack(id) {
|
function loadStack(id) {
|
||||||
return $async(() => {
|
return $async(async () => {
|
||||||
var agentProxy = $scope.applicationState.endpoint.mode.agentProxy;
|
var agentProxy = $scope.applicationState.endpoint.mode.agentProxy;
|
||||||
|
|
||||||
getEnvironments()
|
getEnvironments()
|
||||||
|
|
Loading…
Reference in New Issue