|
|
@ -44,6 +44,8 @@ import pSBC from 'shade-blend-color';
|
|
|
|
import { withConfigContext } from '../../../../../../../../../components/ConfigContext';
|
|
|
|
import { withConfigContext } from '../../../../../../../../../components/ConfigContext';
|
|
|
|
import ManagedConfigurationsIframe from './components/ManagedConfigurationsIframe';
|
|
|
|
import ManagedConfigurationsIframe from './components/ManagedConfigurationsIframe';
|
|
|
|
import { handleApiError } from '../../../../../../../../../services/utils/errorHandler';
|
|
|
|
import { handleApiError } from '../../../../../../../../../services/utils/errorHandler';
|
|
|
|
|
|
|
|
import Authorized from '../../../../../../../../../components/Authorized/Authorized';
|
|
|
|
|
|
|
|
import { isAuthorized } from '../../../../../../../../../services/utils/authorizationHandler';
|
|
|
|
|
|
|
|
|
|
|
|
const { Meta } = Card;
|
|
|
|
const { Meta } = Card;
|
|
|
|
const { Text, Title } = Typography;
|
|
|
|
const { Text, Title } = Typography;
|
|
|
@ -100,7 +102,15 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
componentDidMount() {
|
|
|
|
componentDidMount() {
|
|
|
|
this.getCategories();
|
|
|
|
if (
|
|
|
|
|
|
|
|
isAuthorized(
|
|
|
|
|
|
|
|
this.props.context.user,
|
|
|
|
|
|
|
|
'/permission/admin/app-mgt/publisher/application/update',
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
this.getCategories();
|
|
|
|
|
|
|
|
this.getTags();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
componentDidUpdate(prevProps, prevState, snapshot) {
|
|
|
|
componentDidUpdate(prevProps, prevState, snapshot) {
|
|
|
@ -130,7 +140,6 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
.then(res => {
|
|
|
|
.then(res => {
|
|
|
|
if (res.status === 200) {
|
|
|
|
if (res.status === 200) {
|
|
|
|
const categories = JSON.parse(res.data.data);
|
|
|
|
const categories = JSON.parse(res.data.data);
|
|
|
|
this.getTags();
|
|
|
|
|
|
|
|
const globalCategories = categories.map(category => {
|
|
|
|
const globalCategories = categories.map(category => {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<Option key={category.categoryName}>
|
|
|
|
<Option key={category.categoryName}>
|
|
|
@ -520,36 +529,48 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
<Spin spinning={loading} delay={500}>
|
|
|
|
<Spin spinning={loading} delay={500}>
|
|
|
|
<div style={{ textAlign: 'center' }}>
|
|
|
|
<div style={{ textAlign: 'center' }}>
|
|
|
|
{avatar}
|
|
|
|
{avatar}
|
|
|
|
<Title editable={{ onChange: this.handleNameSave }} level={2}>
|
|
|
|
<Authorized
|
|
|
|
{name}
|
|
|
|
permission="/permission/admin/app-mgt/publisher/application/update"
|
|
|
|
</Title>
|
|
|
|
yes={
|
|
|
|
|
|
|
|
<Title editable={{ onChange: this.handleNameSave }} level={2}>
|
|
|
|
|
|
|
|
{name}
|
|
|
|
|
|
|
|
</Title>
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
no={<Title level={2}>{name}</Title>}
|
|
|
|
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<Divider />
|
|
|
|
<Divider />
|
|
|
|
{/* display manage config button only if the app is public android app*/}
|
|
|
|
{/* display manage config button only if the app is public android app*/}
|
|
|
|
{app.isAndroidEnterpriseApp &&
|
|
|
|
{app.isAndroidEnterpriseApp &&
|
|
|
|
config.androidEnterpriseToken !== null && (
|
|
|
|
config.androidEnterpriseToken !== null && (
|
|
|
|
<div>
|
|
|
|
<Authorized
|
|
|
|
<div>
|
|
|
|
permission="/permission/admin/device-mgt/enterprise/user/modify"
|
|
|
|
<Text strong={true}>Set up managed configurations</Text>
|
|
|
|
yes={
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<div style={{ paddingTop: 16 }}>
|
|
|
|
<div>
|
|
|
|
<Text>
|
|
|
|
<Text strong={true}>Set up managed configurations</Text>
|
|
|
|
If you are developing apps for the enterprise market, you
|
|
|
|
</div>
|
|
|
|
may need to satisfy particular requirements set by a
|
|
|
|
<div style={{ paddingTop: 16 }}>
|
|
|
|
organization's policies. Managed configurations,
|
|
|
|
<Text>
|
|
|
|
previously known as application restrictions, allow the
|
|
|
|
If you are developing apps for the enterprise market,
|
|
|
|
organization's IT admin to remotely specify settings
|
|
|
|
you may need to satisfy particular requirements set by
|
|
|
|
for apps. This capability is particularly useful for
|
|
|
|
a organization's policies. Managed
|
|
|
|
organization-approved apps deployed to a work profile.
|
|
|
|
configurations, previously known as application
|
|
|
|
</Text>
|
|
|
|
restrictions, allow the organization's IT admin
|
|
|
|
</div>
|
|
|
|
to remotely specify settings for apps. This capability
|
|
|
|
<br />
|
|
|
|
is particularly useful for organization-approved apps
|
|
|
|
<ManagedConfigurationsIframe
|
|
|
|
deployed to a work profile.
|
|
|
|
style={{ paddingTop: 16 }}
|
|
|
|
</Text>
|
|
|
|
packageName={app.packageName}
|
|
|
|
</div>
|
|
|
|
/>
|
|
|
|
<br />
|
|
|
|
<Divider dashed={true} />
|
|
|
|
<ManagedConfigurationsIframe
|
|
|
|
</div>
|
|
|
|
style={{ paddingTop: 16 }}
|
|
|
|
|
|
|
|
packageName={app.packageName}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Divider dashed={true} />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
<Text strong={true}>Releases </Text>
|
|
|
|
<Text strong={true}>Releases </Text>
|
|
|
|
<div className="releases-details">
|
|
|
|
<div className="releases-details">
|
|
|
@ -640,34 +661,44 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
|
|
|
|
|
|
|
|
{/* display add new release only if app type is enterprise*/}
|
|
|
|
{/* display add new release only if app type is enterprise*/}
|
|
|
|
{app.type === 'ENTERPRISE' && (
|
|
|
|
{app.type === 'ENTERPRISE' && (
|
|
|
|
<div>
|
|
|
|
<Authorized
|
|
|
|
<Divider dashed={true} />
|
|
|
|
permission="/permission/admin/app-mgt/publisher/application/update"
|
|
|
|
<div style={{ paddingBottom: 16 }}>
|
|
|
|
yes={
|
|
|
|
<Text>Add new release for the application</Text>
|
|
|
|
<div>
|
|
|
|
</div>
|
|
|
|
<Divider dashed={true} />
|
|
|
|
<Link
|
|
|
|
<div style={{ paddingBottom: 16 }}>
|
|
|
|
to={`/publisher/apps/${app.deviceType}/${app.id}/add-release`}
|
|
|
|
<Text>Add new release for the application</Text>
|
|
|
|
>
|
|
|
|
</div>
|
|
|
|
<Button htmlType="button" type="primary" size="small">
|
|
|
|
<Link
|
|
|
|
Add
|
|
|
|
to={`/publisher/apps/${app.deviceType}/${app.id}/add-release`}
|
|
|
|
</Button>
|
|
|
|
>
|
|
|
|
</Link>
|
|
|
|
<Button htmlType="button" type="primary" size="small">
|
|
|
|
</div>
|
|
|
|
Add
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
</Link>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
<Divider dashed={true} />
|
|
|
|
<Divider dashed={true} />
|
|
|
|
|
|
|
|
|
|
|
|
<Text strong={true}>Description </Text>
|
|
|
|
<Text strong={true}>Description </Text>
|
|
|
|
{!isDescriptionEditEnabled && (
|
|
|
|
<Authorized
|
|
|
|
<Text
|
|
|
|
permission="/permission/admin/app-mgt/publisher/application/update"
|
|
|
|
style={{
|
|
|
|
yes={
|
|
|
|
color: config.theme.primaryColor,
|
|
|
|
!isDescriptionEditEnabled && (
|
|
|
|
cursor: 'pointer',
|
|
|
|
<Text
|
|
|
|
}}
|
|
|
|
style={{
|
|
|
|
onClick={this.enableDescriptionEdit}
|
|
|
|
color: config.theme.primaryColor,
|
|
|
|
>
|
|
|
|
cursor: 'pointer',
|
|
|
|
<Icon type="edit" />
|
|
|
|
}}
|
|
|
|
</Text>
|
|
|
|
onClick={this.enableDescriptionEdit}
|
|
|
|
)}
|
|
|
|
>
|
|
|
|
|
|
|
|
<Icon type="edit" />
|
|
|
|
|
|
|
|
</Text>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
{!isDescriptionEditEnabled && (
|
|
|
|
{!isDescriptionEditEnabled && (
|
|
|
|
<div>{ReactHtmlParser(description)}</div>
|
|
|
|
<div>{ReactHtmlParser(description)}</div>
|
|
|
@ -708,14 +739,22 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
|
|
|
|
|
|
|
|
<Divider dashed={true} />
|
|
|
|
<Divider dashed={true} />
|
|
|
|
<Text strong={true}>Categories </Text>
|
|
|
|
<Text strong={true}>Categories </Text>
|
|
|
|
{!isCategoriesEditEnabled && (
|
|
|
|
<Authorized
|
|
|
|
<Text
|
|
|
|
permission="/permission/admin/app-mgt/publisher/application/update"
|
|
|
|
style={{ color: config.theme.primaryColor, cursor: 'pointer' }}
|
|
|
|
yes={
|
|
|
|
onClick={this.enableCategoriesEdit}
|
|
|
|
!isCategoriesEditEnabled && (
|
|
|
|
>
|
|
|
|
<Text
|
|
|
|
<Icon type="edit" />
|
|
|
|
style={{
|
|
|
|
</Text>
|
|
|
|
color: config.theme.primaryColor,
|
|
|
|
)}
|
|
|
|
cursor: 'pointer',
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
onClick={this.enableCategoriesEdit}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<Icon type="edit" />
|
|
|
|
|
|
|
|
</Text>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/>
|
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
{isCategoriesEditEnabled && (
|
|
|
|
{isCategoriesEditEnabled && (
|
|
|
@ -767,14 +806,22 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
|
|
|
|
|
|
|
|
<Divider dashed={true} />
|
|
|
|
<Divider dashed={true} />
|
|
|
|
<Text strong={true}>Tags </Text>
|
|
|
|
<Text strong={true}>Tags </Text>
|
|
|
|
{!isTagsEditEnabled && (
|
|
|
|
<Authorized
|
|
|
|
<Text
|
|
|
|
permission="/permission/admin/app-mgt/publisher/application/update"
|
|
|
|
style={{ color: config.theme.primaryColor, cursor: 'pointer' }}
|
|
|
|
yes={
|
|
|
|
onClick={this.enableTagsEdit}
|
|
|
|
!isTagsEditEnabled && (
|
|
|
|
>
|
|
|
|
<Text
|
|
|
|
<Icon type="edit" />
|
|
|
|
style={{
|
|
|
|
</Text>
|
|
|
|
color: config.theme.primaryColor,
|
|
|
|
)}
|
|
|
|
cursor: 'pointer',
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
onClick={this.enableTagsEdit}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<Icon type="edit" />
|
|
|
|
|
|
|
|
</Text>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/>
|
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
{isTagsEditEnabled && (
|
|
|
|
{isTagsEditEnabled && (
|
|
|
@ -819,17 +866,22 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
})}
|
|
|
|
})}
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
|
|
|
|
<Authorized
|
|
|
|
<Divider dashed={true} />
|
|
|
|
permission="/permission/admin/app-mgt/publisher/review/view"
|
|
|
|
|
|
|
|
yes={
|
|
|
|
<div className="app-rate">
|
|
|
|
<div>
|
|
|
|
{app.applicationReleases.length > 0 && (
|
|
|
|
<Divider dashed={true} />
|
|
|
|
<DetailedRating
|
|
|
|
<div className="app-rate">
|
|
|
|
type="app"
|
|
|
|
{app.applicationReleases.length > 0 && (
|
|
|
|
uuid={app.applicationReleases[0].uuid}
|
|
|
|
<DetailedRating
|
|
|
|
/>
|
|
|
|
type="app"
|
|
|
|
)}
|
|
|
|
uuid={app.applicationReleases[0].uuid}
|
|
|
|
</div>
|
|
|
|
/>
|
|
|
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/>
|
|
|
|
</Spin>
|
|
|
|
</Spin>
|
|
|
|
</Drawer>
|
|
|
|
</Drawer>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|