mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Merge pull request #1025 from menakaj/application-mgt
Publisher UI modifications.
This commit is contained in:
commit
7e15b40860
@ -78,7 +78,7 @@ class Base extends Component {
|
||||
<Route exact path={"/assets/platforms"} component={PlatformListing}/>
|
||||
<Route exact path={"/assets/platforms/create"} component={PlatformCreate}/>
|
||||
{/*<Route exact path={"/assets/apps/:app"}/>*/}
|
||||
<Route exact path={"/assets/apps/edit/:app"} component={ApplicationEdit}/>
|
||||
<Route exact path={"/assets/apps/:app/edit"} component={ApplicationEdit}/>
|
||||
<Route exact path={"/assets/platforms/:platform"}/>
|
||||
<Route exact path={"/assets/platforms/:platform/edit"}/>
|
||||
<Route exact path={"/assets/reviews"}/>
|
||||
|
||||
@ -61,8 +61,12 @@ export default class ApplicationMgtApi {
|
||||
/**
|
||||
* Method to handle application release process.
|
||||
* */
|
||||
static releaseApplication(appId) {
|
||||
|
||||
static releaseApplication(appId, applicationRelease, file) {
|
||||
let release = new FormData();
|
||||
release.append('applicationRelease', applicationRelease);
|
||||
release.append('binaryFile', file);
|
||||
const headers = AuthHandler.createAuthenticationHeaders("multipart/form-data");
|
||||
return Axios.post(Constants.appManagerEndpoints.APP_RELEASE + appId, release, {headers: headers});
|
||||
}
|
||||
|
||||
/**
|
||||
@ -73,7 +77,8 @@ export default class ApplicationMgtApi {
|
||||
* URL Pattern : /application/1.0/
|
||||
* */
|
||||
static updateLifeCycleState(appId, nextState) {
|
||||
|
||||
const headers = AuthHandler.createAuthenticationHeaders("application/json");
|
||||
return Axios.put(Constants.appManagerEndpoints.GET_ALL_APPS + appId + "/lifecycle?state=" + nextState, {headers: headers});
|
||||
}
|
||||
|
||||
/**
|
||||
@ -81,6 +86,8 @@ export default class ApplicationMgtApi {
|
||||
* @param appId: The application uuid.
|
||||
*/
|
||||
static getNextLifeCycleState(appId) {
|
||||
const headers = AuthHandler.createAuthenticationHeaders("application/json");
|
||||
return Axios.get(Constants.appManagerEndpoints.GET_ALL_APPS + appId + "/lifecycle", {headers: headers});
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -32,20 +32,29 @@ class Constants {
|
||||
}
|
||||
|
||||
load() {
|
||||
let applicationApiContext = '/api/application-mgt/v1.0/applications/1.0.0/';
|
||||
let platformApiContext = '/api/application-mgt/v1.0/platforms/1.0.0';
|
||||
|
||||
let apiBaseUrl = 'https://' + Configuration.serverConfig.hostname + ':' + Configuration.serverConfig.apiPort;
|
||||
let httpBaseUrl = 'https://' + Configuration.serverConfig.hostname + ':' + Configuration.serverConfig.httpsPort;
|
||||
|
||||
this.appManagerEndpoints = {
|
||||
GET_ALL_APPS: apiBaseUrl + '/api/application-mgt/v1.0/applications/1.0.0/',
|
||||
CREATE_APP: apiBaseUrl + '/api/application-mgt/v1.0/applications/1.0.0/',
|
||||
UPLOAD_IMAGE_ARTIFACTS: apiBaseUrl + '/api/application-mgt/v1.0/applications/1.0.0/upload-image-artifacts/', //+appId
|
||||
GET_IMAGE_ARTIFACTS: apiBaseUrl + '/api/application-mgt/v1.0/applications/1.0.0/image-artifacts/'
|
||||
GET_ALL_APPS: apiBaseUrl + applicationApiContext,
|
||||
CREATE_APP: apiBaseUrl + applicationApiContext,
|
||||
UPLOAD_IMAGE_ARTIFACTS: apiBaseUrl + applicationApiContext + 'upload-image-artifacts/', //+appId
|
||||
GET_IMAGE_ARTIFACTS: apiBaseUrl + applicationApiContext + 'image-artifacts/',
|
||||
APP_RELEASE: apiBaseUrl + applicationApiContext + "release/", //+uuid
|
||||
GET_APP_RELEASE_ARTIFACTS: apiBaseUrl + applicationApiContext + "/release-artifacts/", //+AppId/version
|
||||
GET_NEXT_LIFECYCLE_STATE: apiBaseUrl + applicationApiContext //+ [uuid]/lifecycle
|
||||
};
|
||||
|
||||
this.platformManagerEndpoints = {
|
||||
CREATE_PLATFORM: apiBaseUrl + '/api/application-mgt/v1.0/platforms/1.0.0',
|
||||
GET_ENABLED_PLATFORMS: apiBaseUrl + '/api/application-mgt/v1.0/platforms/1.0.0?status=ENABLED',
|
||||
GET_PLATFORM: apiBaseUrl + '/api/application-mgt/v1.0/platforms/1.0.0/'
|
||||
CREATE_PLATFORM: apiBaseUrl + platformApiContext,
|
||||
GET_ENABLED_PLATFORMS: apiBaseUrl + platformApiContext + '?status=ENABLED',
|
||||
GET_PLATFORM: apiBaseUrl + platformApiContext, //+platformId
|
||||
GET_PLATFORMS: apiBaseUrl + platformApiContext,
|
||||
UPDATE_STATUS: apiBaseUrl + platformApiContext + "update-status/", // + platformId + ?status=
|
||||
EDIT_PLATFORM: apiBaseUrl + platformApiContext //+platformId
|
||||
};
|
||||
|
||||
this.userConstants = {
|
||||
|
||||
@ -194,7 +194,7 @@ class ApplicationListing extends Component {
|
||||
}
|
||||
|
||||
onAppEditClick(uuid) {
|
||||
this.props.history.push("apps/edit/" + uuid);
|
||||
this.props.history.push("apps/" + uuid + "/edit");
|
||||
}
|
||||
|
||||
closeDrawer() {
|
||||
|
||||
@ -254,7 +254,7 @@ class Step1 extends Component {
|
||||
</FormGroup>
|
||||
<FormGroup>
|
||||
<Label for="app-short-description">
|
||||
<FormattedMessage id="shortDescription" defaultMessage="shortDescription"/>*
|
||||
<FormattedMessage id="ShortDescription" defaultMessage="ShortDescription"/>*
|
||||
</Label>
|
||||
<Input
|
||||
required
|
||||
|
||||
@ -58,11 +58,14 @@ class Platform extends Component {
|
||||
</Row>
|
||||
<Row>
|
||||
<div className="platform-content-footer">
|
||||
<Button className="custom-flat grey">{platform.enabled ?
|
||||
<FormattedMessage id="Disable" defaultMessage="Disable"/> :
|
||||
<FormattedMessage id="Activate" defaultMessage="Activate"/>}
|
||||
</Button>
|
||||
<Button className="custom-flat grey">
|
||||
{platform.enabled ?
|
||||
<Button className="custom-flat danger-flat">
|
||||
<FormattedMessage id="Disable" defaultMessage="Disable"/>
|
||||
</Button> :
|
||||
<Button className="custom-flat primary-flat">
|
||||
<FormattedMessage id="Activate" defaultMessage="Activate"/>
|
||||
</Button>}
|
||||
<Button className="custom-flat primary-flat">
|
||||
<FormattedMessage id="Share.With.Tenants" defaultMessage="Share.With.Tenants"/>
|
||||
</Button>
|
||||
<Button className="custom-flat grey circle-button" onClick={this.unFold}>
|
||||
|
||||
@ -16,7 +16,6 @@
|
||||
* under the License.
|
||||
*/
|
||||
var path = require('path');
|
||||
import '!!style-loader!css-loader!src/css/font-wso2.css';
|
||||
|
||||
const config = {
|
||||
entry: {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user