@@ -0,0 +1,205 @@
@import "../../../../css/layout.css";
@import "../../../../css/ide.css";
@import "../../../../css/sections.css";
@import "../../../../css/images.css";
@import "../../../../css/theme.css";
@import "../../../../css/progress.css";
@import "../../../../css/wizard.css";


html, body {
min-width: 350px;
overflow: hidden;
}

.dialogFrame {
background-color: #fdfdfd;
}

#messageArea{
display: table-cell;
width: calc(100% - 16px);
}

#messageRow{
background: none repeat scroll 0 0 #FFFFFF;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.098), 0 1px 0 0 rgba(0, 0, 0, 0.098);
height: 25px;
padding: 3px 5px 2px 9px;
display: table;
width: calc(100% - 15px);
}

#messageButton{
right: -7px;
margin-top: 1px;
position: absolute;
top: 0;
}

.Spaces{
width: 100%;
}

select{
height: 24px;
width: 290px;
border: 1px solid #bbb;
}

.selectCell input {
height: 24px;
width: 290px;
margin-left: 0;
border: 1px solid #bbb;
}

.comboTextInputWrapper{
height: 24px;
width: 290px;
border: 1px solid #bbb;
}

.comboTextInputWrapper input{
font-size: inherit;
}

.comboTextInputField {
width: 260px !important;
height: 24px;
text-align: left;
margin-right: 0;
border: 0px !important;
}

.recentEntryButton {
margin-left: 0;
height: 22px;
background: none repeat scroll 0 0 #fff;
width: 25px;
}

.formTable{
font-family: Arial,sans-serif;
font-size: 14px;
width: 100%;
}

.selectCell {
padding-top: 4px;
text-align: left;
}

.listCell select {
height: inherit;
width: 190px;
}

#servicesAddRemoveButtonsCol{
text-align: center;
vertical-align: middle;
}

.messageContainer {
display: none;
padding-top: 2px;
position: absolute;
text-align: center;
box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
background-color: #dff0d8;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
margin-left: 5%;
margin-right: auto;
width: 90%;
padding-bottom: 5px;
padding-left: 5px;
padding-top: 5px;
}

.messageContainer.showing {
display: block;
transition: top 0.7s ease 0s;
}

.retryFields{
margin-top: 5px;
text-align: right;
}

.retryFields label {
margin-left: 5px;
}

.errorMessage input{
border-color: #eed3d7 !important;
}

.errorMessage button{
color: #b94a48 !important;
}

.errorMessage button:hover{
color: #FFFFFF !important;
}

.messageContainer.errorMessage{
background-color: #f2dede !important;
border: 1px solid #eed3d7 !important;
}

.errorMessage, .errorMessage a{
color: #b94a48 !important;
}

.messageLabel a{
color: #b94a48;
text-decoration: underline;
}

.messageLabel button{
border: none;
border-radius: 5px;
background: none repeat scroll 0 0 rgba(0, 0, 0, 0);
color: #b94a48;
font-family: Arial,Helvetica,Myriad,Tahoma,clean,sans-serif,Lucida Sans Unicode,Lucida Grande,Verdana;
font-size: 9pt;
cursor: pointer;
}

.messageLabel button:hover{
color: #FFFFFF;
}

.messageLabel {
color: #468847;
float: left;
max-height: 1000px;
overflow: hidden;
padding-left: 5px;
text-align: center;
}

.dialogTitle .closeDialog {
margin: 0;
cursor: pointer;
}

#memoryInput{
margin-right: 5px;
width: 235px;
}

#memoryUnit{
width: 50px;
}

input[type='number'] {
-moz-appearance:textfield;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
@@ -0,0 +1,34 @@
<html>
<head>
<link rel="stylesheet" type="text/css" href="genericDeploymentWizard.css" />
<script src="../../../../requirejs/require.js"></script>
<script type="text/javascript">
/*global require*/
require({
baseUrl: '../../../../',
packages: [],
paths: {
i18n: 'requirejs/i18n',
domReady: 'requirejs/domReady',
text: 'requirejs/text'
}
});
require(["cfui/plugins/wizards/generic/genericDeploymentWizard"]);
</script>
</head>
<body id="deployBody" class="dialogFrame">

<div class="dialogTitle" id="titleBar">
<span id="title" class="dialogTitleText layoutLeft">
</span>
<button aria-label="Close" class="dismissButton layoutRight core-sprite-close imageSprite closeDialog" id="closeDialog">
</button>
</div>

<div>
<div id="messageContainer" class="messageContainer"><span id="messageLabel" class="messageLabel"><span id="messageText" style="float:left;"></span><span id="messageButton"></span></span></div>
<div id="wizard"></div>
</div>

</body>
</html>
@@ -0,0 +1,172 @@
/*******************************************************************************
* @license
* Copyright (c) 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials are made
* available under the terms of the Eclipse Public License v1.0
* (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
* License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
*
* Contributors: IBM Corporation - initial API and implementation
******************************************************************************/
/*global parent window document define orion setTimeout*/

define(["orion/bootstrap", "orion/xhr", 'orion/webui/littlelib', 'orion/Deferred', 'orion/cfui/cFClient', 'orion/PageUtil', 'orion/selection',
'orion/URITemplate', 'orion/PageLinks', 'orion/preferences', 'orion/fileClient', 'cfui/cfUtil', 'cfui/plugins/wizards/common/wizardUtils', 'orion/objects', 'orion/widgets/input/ComboTextInput',
'orion/webui/Wizard', 'cfui/plugins/wizards/common/deploymentLogic', 'cfui/plugins/wizards/common/commonPaneBuilder', 'cfui/plugins/wizards/common/corePageBuilder',
'cfui/plugins/wizards/common/servicesPageBuilder', 'cfui/plugins/wizards/common/additionalParamPageBuilder'],
function(mBootstrap, xhr, lib, Deferred, CFClient, PageUtil, mSelection, URITemplate, PageLinks, Preferences, mFileClient, mCfUtil, mWizardUtils, objects, ComboTextInput, Wizard,
mDeploymentLogic, mCommonPaneBuilder, mCorePageBuilder, mServicesPageBuilder, mAdditionalParamPageBuilder) {

/* plugin-host communication */
var postMsg = mWizardUtils.defaultPostMsg;
var defaultDecorateError = mCfUtil.defaultDecorateError;
var postError = mWizardUtils.buildDefaultPostError(defaultDecorateError);
var closeFrame = mWizardUtils.defaultCloseFrame;

/* default utils */
var showMessage = mWizardUtils.defaultShowMessage;
var hideMessage = mWizardUtils.defaultHideMessage;
var showError = mWizardUtils.defaultShowError;

mBootstrap.startup().then(function(core) {

/* set up initial message */
document.getElementById('title').appendChild(document.createTextNode("Configure Application Deployment")); //$NON-NLS-1$//$NON-NLS-0$

/* allow the frame to be closed */
document.getElementById('closeDialog').addEventListener('click', closeFrame); //$NON-NLS-1$ //$NON-NLS-0$

/* allow frame to be dragged by title bar */
mWizardUtils.makeDraggable(this);

var pageParams = PageUtil.matchResourceParameters();
var resourceString = decodeURIComponent(pageParams.resource);
var resource = JSON.parse(resourceString);

var serviceRegistry = core.serviceRegistry;
var cfService = new CFClient.CFService(serviceRegistry);

/* compute relative content location */
var relativeFilePath = new URL(resource.ContentLocation).href;
var orionHomeUrl = new URL(PageLinks.getOrionHome());

if(relativeFilePath.indexOf(orionHomeUrl.origin) === 0)
relativeFilePath = relativeFilePath.substring(orionHomeUrl.origin.length);

if(relativeFilePath.indexOf(orionHomeUrl.pathname) === 0)
relativeFilePath = relativeFilePath.substring(orionHomeUrl.pathname.length);

var preferences = new Preferences.PreferencesService(serviceRegistry);
var fileClient = new mFileClient.FileClient(serviceRegistry);

/* built-in wizard error handler */
var handleError = mCfUtil.buildDefaultErrorHandler({
cFService : cfService,
showMessage : showMessage,
hideMessage : hideMessage,
showError : showError,
render : function(fields){
document.getElementById('messageText').appendChild(fields);
}
});

/* deployment plan */
var plan = resource.Plan;
var manifestApplication = plan.Manifest.applications[0];

Deferred.all([

mCfUtil.getTargets(preferences),
mWizardUtils.getDefaultTarget(fileClient, resource)

]).then(function(results){

var clouds = results[0];
var defaultTarget = results[1];

/* init common pane builder */
var commonPaneBuilder = new mCommonPaneBuilder.CommonPaneBuilder({
AppPath : resource.AppPath /* relative application path */
});

/* init core page builder */
var corePageBuilder = new mCorePageBuilder.CorePageBuilder({
Clouds : clouds,
DefaultTarget : defaultTarget,

ManifestApplication : manifestApplication,
serviceRegistry : serviceRegistry,
CFService : cfService,

showMessage : showMessage,
hideMessage : hideMessage,
handleError : handleError,
postError : postError
});

/* init services page builder */
var servicesPageBuilder = new mServicesPageBuilder.ServicesPageBuilder({
ManifestServices : manifestApplication.services,

CFService : cfService,
getTargetSelection : function(){
return corePageBuilder.getSelection();
},

showMessage : showMessage,
hideMessage : hideMessage,
handleError : handleError,
postError : postError
});

/* init additional parameters page builder */
var additionalParamPageBuilder = new mAdditionalParamPageBuilder.AdditionalParamPageBuilder({
ManifestApplication : manifestApplication
});

/* build pages */
var commonPane = commonPaneBuilder.build();
var page1 = corePageBuilder.build();
var page2 = servicesPageBuilder.build();
var page3 = additionalParamPageBuilder.build();

var wizard = new Wizard.Wizard({
parent: "wizard",
pages: [page1, page2, page3],
commonPane: commonPane,
onCancel: closeFrame,
buttonNames: { ok: "Deploy" },
size: { width: "420px", height: "180px" },
onSubmit: mDeploymentLogic.buildDeploymentTrigger({

showMessage : showMessage,
closeFrame : closeFrame,
disableUI : function(){
if(corePageBuilder._orgsDropdown)
corePageBuilder._orgsDropdown.disabled = true;

if(corePageBuilder._spacesDropdown)
corePageBuilder._spacesDropdown.disabled = true;
},

postMsg : postMsg,
postError : postError,

CFService : cfService,
getTargetSelection : function(){
return corePageBuilder.getSelection();
},

saveManifest : function(){
var checkbox = commonPaneBuilder._saveManifestCheckbox;
return checkbox ? checkbox.checked : false;
},

Manifest : plan.Manifest,
ContentLocation : resource.ContentLocation,
AppPath : resource.AppPath
})
});
}, postError);
});
});
@@ -0,0 +1,55 @@
<!DOCTYPE html>
<html>
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2014." >
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="../../../requirejs/require.js"></script>
<script type="text/javascript">
/*eslint-env browser, amd*/
require({
baseUrl: '../../../',
// set the paths to our library packages
packages: [],
paths: {
text: 'requirejs/text',
i18n: 'requirejs/i18n',
domReady: 'requirejs/domReady'
}
});

require(["../../../orion/plugin.js"], function(PluginProvider){

var headers = {
name : "Cloud Foundry Generic Deployment Wizard",
version : "1.0",
description : "This plugin provides a generic deployment wizard integrating with Cloud Foundry."
};

function GenericDeploymentWizard(){};
GenericDeploymentWizard.prototype = {
constructor : GenericDeploymentWizard,

getInitializationParameters : function(){
return {
LocationTemplate : "{+OrionHome}/cfui/plugins/wizards/generic/genericDeploymentWizard.html",
Width : "450px",
Height : "350px"
};
}
};

var genericDeploymentWizard = new GenericDeploymentWizard();

var provider = new PluginProvider(headers);
provider.registerServiceProvider("orion.project.deploy.wizard",
genericDeploymentWizard, {
id : "org.eclipse.orion.client.cf.wizard.generic"
});

provider.connect();
});
</script>
</head>
<body>
</body>
</html>
@@ -0,0 +1,55 @@
<!DOCTYPE html>
<html>
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2014." >
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="../../../requirejs/require.js"></script>
<script type="text/javascript">
/*eslint-env browser, amd*/
require({
baseUrl: '../../../',
// set the paths to our library packages
packages: [],
paths: {
text: 'requirejs/text',
i18n: 'requirejs/i18n',
domReady: 'requirejs/domReady'
}
});

require(["../../../orion/plugin.js"], function(PluginProvider){

var headers = {
name : "Cloud Foundry Node.js Deployment Wizard",
version : "1.0",
description : "This plugin provides a node.js deployment wizard integrating with Cloud Foundry."
};

function NodeJSDeploymentWizard(){};
NodeJSDeploymentWizard.prototype = {
constructor : NodeJSDeploymentWizard,

getInitializationParameters : function(){
return {
LocationTemplate : "{+OrionHome}/cfui/plugins/wizards/nodejs/nodeJSDeploymentWizard.html",
Width : "450px",
Height : "350px"
};
}
};

var nodeJSDeploymentWizard = new NodeJSDeploymentWizard();

var provider = new PluginProvider(headers);
provider.registerServiceProvider("orion.project.deploy.wizard",
nodeJSDeploymentWizard, {
id : "org.eclipse.orion.client.cf.wizard.nodejs"
});

provider.connect();
});
</script>
</head>
<body>
</body>
</html>
@@ -0,0 +1,205 @@
@import "../../../../css/layout.css";
@import "../../../../css/ide.css";
@import "../../../../css/sections.css";
@import "../../../../css/images.css";
@import "../../../../css/theme.css";
@import "../../../../css/progress.css";
@import "../../../../css/wizard.css";


html, body {
min-width: 350px;
overflow: hidden;
}

.dialogFrame {
background-color: #fdfdfd;
}

#messageArea{
display: table-cell;
width: calc(100% - 16px);
}

#messageRow{
background: none repeat scroll 0 0 #FFFFFF;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.098), 0 1px 0 0 rgba(0, 0, 0, 0.098);
height: 25px;
padding: 3px 5px 2px 9px;
display: table;
width: calc(100% - 15px);
}

#messageButton{
right: -7px;
margin-top: 1px;
position: absolute;
top: 0;
}

.Spaces{
width: 100%;
}

select{
height: 24px;
width: 290px;
border: 1px solid #bbb;
}

.selectCell input {
height: 24px;
width: 290px;
margin-left: 0;
border: 1px solid #bbb;
}

.comboTextInputWrapper{
height: 24px;
width: 290px;
border: 1px solid #bbb;
}

.comboTextInputWrapper input{
font-size: inherit;
}

.comboTextInputField {
width: 260px !important;
height: 24px;
text-align: left;
margin-right: 0;
border: 0px !important;
}

.recentEntryButton {
margin-left: 0;
height: 22px;
background: none repeat scroll 0 0 #fff;
width: 25px;
}

.formTable{
font-family: Arial,sans-serif;
font-size: 14px;
width: 100%;
}

.selectCell {
padding-top: 4px;
text-align: left;
}

.listCell select {
height: inherit;
width: 190px;
}

#servicesAddRemoveButtonsCol{
text-align: center;
vertical-align: middle;
}

.messageContainer {
display: none;
padding-top: 2px;
position: absolute;
text-align: center;
box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
background-color: #dff0d8;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
margin-left: 5%;
margin-right: auto;
width: 90%;
padding-bottom: 5px;
padding-left: 5px;
padding-top: 5px;
}

.messageContainer.showing {
display: block;
transition: top 0.7s ease 0s;
}

.retryFields{
margin-top: 5px;
text-align: right;
}

.retryFields label {
margin-left: 5px;
}

.errorMessage input{
border-color: #eed3d7 !important;
}

.errorMessage button{
color: #b94a48 !important;
}

.errorMessage button:hover{
color: #FFFFFF !important;
}

.messageContainer.errorMessage{
background-color: #f2dede !important;
border: 1px solid #eed3d7 !important;
}

.errorMessage, .errorMessage a{
color: #b94a48 !important;
}

.messageLabel a{
color: #b94a48;
text-decoration: underline;
}

.messageLabel button{
border: none;
border-radius: 5px;
background: none repeat scroll 0 0 rgba(0, 0, 0, 0);
color: #b94a48;
font-family: Arial,Helvetica,Myriad,Tahoma,clean,sans-serif,Lucida Sans Unicode,Lucida Grande,Verdana;
font-size: 9pt;
cursor: pointer;
}

.messageLabel button:hover{
color: #FFFFFF;
}

.messageLabel {
color: #468847;
float: left;
max-height: 1000px;
overflow: hidden;
padding-left: 5px;
text-align: center;
}

.dialogTitle .closeDialog {
margin: 0;
cursor: pointer;
}

#memoryInput{
margin-right: 5px;
width: 235px;
}

#memoryUnit{
width: 50px;
}

input[type='number'] {
-moz-appearance:textfield;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
@@ -0,0 +1,34 @@
<html>
<head>
<link rel="stylesheet" type="text/css" href="nodeJSDeploymentWizard.css" />
<script src="../../../../requirejs/require.js"></script>
<script type="text/javascript">
/*global require*/
require({
baseUrl: '../../../../',
packages: [],
paths: {
i18n: 'requirejs/i18n',
domReady: 'requirejs/domReady',
text: 'requirejs/text'
}
});
require(["cfui/plugins/wizards/nodejs/nodeJSDeploymentWizard"]);
</script>
</head>
<body id="deployBody" class="dialogFrame">

<div class="dialogTitle" id="titleBar">
<span id="title" class="dialogTitleText layoutLeft">
</span>
<button aria-label="Close" class="dismissButton layoutRight core-sprite-close imageSprite closeDialog" id="closeDialog">
</button>
</div>

<div>
<div id="messageContainer" class="messageContainer"><span id="messageLabel" class="messageLabel"><span id="messageText" style="float:left;"></span><span id="messageButton"></span></span></div>
<div id="wizard"></div>
</div>

</body>
</html>
@@ -0,0 +1,224 @@
/*******************************************************************************
* @license
* Copyright (c) 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials are made
* available under the terms of the Eclipse Public License v1.0
* (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
* License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
*
* Contributors: IBM Corporation - initial API and implementation
******************************************************************************/
/*global parent window document define orion setTimeout*/

define(["orion/bootstrap", "orion/xhr", 'orion/webui/littlelib', 'orion/Deferred', 'orion/cfui/cFClient', 'orion/PageUtil', 'orion/selection',
'orion/URITemplate', 'orion/PageLinks', 'orion/preferences', 'orion/fileClient', 'cfui/cfUtil', 'cfui/plugins/wizards/common/wizardUtils', 'orion/objects', 'orion/widgets/input/ComboTextInput', 'orion/i18nUtil',
'orion/webui/Wizard', 'cfui/plugins/wizards/common/deploymentLogic', 'cfui/plugins/wizards/common/commonPaneBuilder', 'cfui/plugins/wizards/common/corePageBuilder',
'cfui/plugins/wizards/common/servicesPageBuilder', 'cfui/plugins/wizards/common/additionalParamPageBuilder'],
function(mBootstrap, xhr, lib, Deferred, CFClient, PageUtil, mSelection, URITemplate, PageLinks, Preferences, mFileClient, mCfUtil, mWizardUtils, objects, ComboTextInput, i18nUtil, Wizard,
mDeploymentLogic, mCommonPaneBuilder, mCorePageBuilder, mServicesPageBuilder, mAdditionalParamPageBuilder) {

/* plugin-host communication */
var postMsg = mWizardUtils.defaultPostMsg;
var defaultDecorateError = mCfUtil.defaultDecorateError;
var postError = mWizardUtils.buildDefaultPostError(defaultDecorateError);
var closeFrame = mWizardUtils.defaultCloseFrame;

/* default utils */
var showMessage = mWizardUtils.defaultShowMessage;
var hideMessage = mWizardUtils.defaultHideMessage;
var showError = mWizardUtils.defaultShowError;

mBootstrap.startup().then(function(core) {

/* set up initial message */
document.getElementById('title').appendChild(document.createTextNode("Configure Application Deployment")); //$NON-NLS-1$//$NON-NLS-0$

/* allow the frame to be closed */
document.getElementById('closeDialog').addEventListener('click', closeFrame); //$NON-NLS-1$ //$NON-NLS-0$

/* allow frame to be dragged by title bar */
mWizardUtils.makeDraggable(this);

var pageParams = PageUtil.matchResourceParameters();
var resourceString = decodeURIComponent(pageParams.resource);
var resource = JSON.parse(resourceString);

var serviceRegistry = core.serviceRegistry;
var cfService = new CFClient.CFService(serviceRegistry);

/* compute relative content location */
var relativeFilePath = new URL(resource.ContentLocation).href;
var orionHomeUrl = new URL(PageLinks.getOrionHome());

if(relativeFilePath.indexOf(orionHomeUrl.origin) === 0)
relativeFilePath = relativeFilePath.substring(orionHomeUrl.origin.length);

if(relativeFilePath.indexOf(orionHomeUrl.pathname) === 0)
relativeFilePath = relativeFilePath.substring(orionHomeUrl.pathname.length);

var preferences = new Preferences.PreferencesService(serviceRegistry);
var fileClient = new mFileClient.FileClient(serviceRegistry);

/* built-in wizard error handler */
var handleError = mCfUtil.buildDefaultErrorHandler({
cFService : cfService,
showMessage : showMessage,
hideMessage : hideMessage,
showError : showError,
render : function(fields){
document.getElementById('messageText').appendChild(fields);
}
});

/* deployment plan */
var plan = resource.Plan;
var manifestApplication = plan.Manifest.applications[0];

Deferred.all([

mCfUtil.getTargets(preferences),
mWizardUtils.getDefaultTarget(fileClient, resource)

]).then(function(results){

var clouds = results[0];
var defaultTarget = results[1];

/* welcome page */
var defaultSelection;
var page0 = new Wizard.WizardPage({
template: "<div class=\"deployMessage\" id=\"planMessage\"></div>",

render: function(){
this.wizard.validate();
var target = clouds[0];

showMessage("Loading deployment configuration...");
cfService.getOrgs(target).then(function(resp){
hideMessage();

var org = resp.Orgs[0];
var space = org.Spaces[0];

target.Org = org.Name;
target.Space = space.Name;

defaultSelection = new mSelection.Selection(serviceRegistry, "orion.Spaces.selection"); //$NON-NLS-0$
defaultSelection.setSelections(target);

var messageTemplate = "<b>${0}</b> is going to be deployed as a <b>node.js</b> application to <b>${1}</b> @ <b>${2}</b> "+
"using target <b>${3}</b>. Click \"Deploy\" to proceed or \"Next\" to change the deployment parameters.";

var message = i18nUtil.formatMessage(messageTemplate, manifestApplication.name,
space.Name, org.Name, defaultTarget.Name || defaultTarget.Url || target.Name || target.Url);

var messageDiv = document.getElementById("planMessage");
messageDiv.innerHTML = message;

}, function(error){
handleError(error, target, function(){ return page0.render(); });
});
},

validate: function(setValid){
setValid(true);
return;
},

getResults: function(){
return {};
}
});

/* init common pane builder */
var commonPaneBuilder = new mCommonPaneBuilder.CommonPaneBuilder({
AppPath : resource.AppPath /* relative application path */
});

/* init core page builder */
var corePageBuilder = new mCorePageBuilder.CorePageBuilder({
Clouds : clouds,
DefaultTarget : defaultTarget,

ManifestApplication : manifestApplication,
serviceRegistry : serviceRegistry,
CFService : cfService,

showMessage : showMessage,
hideMessage : hideMessage,
handleError : handleError,
postError : postError
});

/* init services page builder */
var servicesPageBuilder = new mServicesPageBuilder.ServicesPageBuilder({
ManifestServices : manifestApplication.services,

CFService : cfService,
getTargetSelection : function(){
return corePageBuilder.getSelection();
},

showMessage : showMessage,
hideMessage : hideMessage,
handleError : handleError,
postError : postError
});

/* init additional parameters page builder */
var additionalParamPageBuilder = new mAdditionalParamPageBuilder.AdditionalParamPageBuilder({
ManifestApplication : manifestApplication
});

/* build pages */
var commonPane = commonPaneBuilder.build();
var page1 = corePageBuilder.build();
var page2 = servicesPageBuilder.build();
var page3 = additionalParamPageBuilder.build();

var wizard = new Wizard.Wizard({
parent: "wizard",
pages: [page0, page1, page2, page3],
commonPane: commonPane,
onCancel: closeFrame,
buttonNames: { ok: "Deploy" },
size: { width: "420px", height: "180px" },
onSubmit: mDeploymentLogic.buildDeploymentTrigger({

showMessage : showMessage,
closeFrame : closeFrame,
disableUI : function(){
if(corePageBuilder._orgsDropdown)
corePageBuilder._orgsDropdown.disabled = true;

if(corePageBuilder._spacesDropdown)
corePageBuilder._spacesDropdown.disabled = true;
},

postMsg : postMsg,
postError : postError,

CFService : cfService,
getTargetSelection : function(){

var selection = corePageBuilder.getSelection();
if(typeof selection === "undefined" && defaultSelection)
return defaultSelection;

return selection;
},

saveManifest : function(){
var checkbox = commonPaneBuilder._saveManifestCheckbox;
return checkbox ? checkbox.checked : false;
},

Manifest : plan.Manifest,
ContentLocation : resource.ContentLocation,
AppPath : resource.AppPath
})
});

}, postError);
});
});
341 changes: 341 additions & 0 deletions bundles/org.eclipse.orion.client.cf/web/orion/cfui/cFClient.js
@@ -0,0 +1,341 @@
/*******************************************************************************
* @license
* Copyright (c) 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials are made
* available under the terms of the Eclipse Public License v1.0
* (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
* License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
*
* Contributors: IBM Corporation - initial API and implementation
******************************************************************************/

/*eslint-env browser, amd*/
define(['require', 'orion/xhr', 'orion/Deferred', 'orion/operation'], function(require, xhr, Deferred, operation) {

var eclipse = eclipse || {};

eclipse.CFService = (function(){

var contentType = "application/json; charset=UTF-8";

/**
* Creates a new CF service.
*
* @class Provides operations for interacting with Cloud Foundry
* @name org.eclipse.orion.client.cf.CFService
*/
function CFService(serviceRegistry) {
if (serviceRegistry) {
this._serviceRegistry = serviceRegistry;
this._serviceRegistration = serviceRegistry.registerService(
"orion.cf.service", this);
}
}

CFService.prototype = /** @lends org.eclipse.orion.client.cf.CFService.prototype */
{
_getServiceResponse : function(deferred, result) {
var response = result.response ? JSON.parse(result.response) : null;

if (result.xhr && result.xhr.status === 202) {
var def = operation.handle(response.Location);
def.then(function(data) {
try {
deferred.resolve(JSON.parse(data));
} catch (e) {
deferred.resolve(data);
}
}, function(data) {
data.failedOperation = response.Location;
deferred.reject(data);
}, deferred.progress);
deferred.then(null, function(error) {
def.reject(error);
});
return;
}
deferred.resolve(response);
return;
},

_handleServiceResponseError: function(deferred, error){
deferred.reject(this._translateResponseToStatus(error));
},

_translateResponseToStatus: function(response) {
var json;
try {
json = JSON.parse(response.responseText);
} catch (e) {
json = {
Message : "Problem while performing the action"
};
}
json.HttpCode = response.status;
return json;
},

_xhrV1 : function(method, url, data) {
var self = this;
var clientDeferred = new Deferred();

xhr(method, url, { headers : { "CF-Version" : "1",
"Content-Type" : contentType
},
timeout : 15000,
handleAs : "json",
data : JSON.stringify(data)
}).then(function(result) {
self._getServiceResponse(clientDeferred, result);
}, function(error) {
self._handleServiceResponseError(clientDeferred, error);
});

return clientDeferred;
},

// Target CF v2 operations

setTarget: function(url, org, space) {
var targetObject = {
'Url': url
};
if (org) targetObject.Org = org;
if (space) targetObject.Space = space;

return this._xhrV1("POST", require.toUrl("cfapi/target"), targetObject);
},

login: function(url, username, password, org, space) {
var loginData = {};

if (url) loginData.Url = url;
if (username) {
loginData.Username = username;
loginData.Password = password;
}

return this._xhrV1("POST", require.toUrl("cfapi/target"), loginData);
},

logout: function() {
return this._xhrV1("DELETE", require.toUrl("cfapi/target"));
},

getLogs: function(target, applicationName, logFileName, instance){
if(!applicationName){
var deferred = new Deferred();
deferred.reject("Application name not set");
}
var location = require.toUrl("cfapi/logs/" + applicationName);
if(logFileName){
location+=("/" + logFileName);
}
if(instance){
location+=("/" + instance);
}
if(target){
location += ("?Target=" + JSON.stringify(target));
}
return this._xhrV1("GET", location);
},

getTarget: function() {
return this._xhrV1("GET", require.toUrl("cfapi/target"));
},

getInfo: function() {
return this._xhrV1("GET", require.toUrl("cfapi/info"));
},

// Apps CF v2 operations

pushApp: function(target, name, contentLocation, manifest, saveManifest) {
var pushReq = {};

if (name)
pushReq.Name = name;

if (contentLocation)
pushReq.ContentLocation = contentLocation;

if (target)
pushReq.Target = target;

if(manifest)
pushReq.Manifest = manifest;

if(saveManifest)
pushReq.Persist = saveManifest;

return this._xhrV1("PUT", require.toUrl("cfapi/apps"), pushReq);
},

getApp: function(target, name, contentLocation) {
var url = require.toUrl("cfapi/apps");

if (name) {
url += "?Name=" + name;
} else if (contentLocation) {
url += "?ContentLocation=" + contentLocation;
}

if (target)
url += "&Target=" + JSON.stringify(target);

return this._xhrV1("GET", url);
},

getApps: function(target) {
var url = require.toUrl("cfapi/apps");

if (target)
url += "?Target=" + JSON.stringify(target);

return this._xhrV1("GET", url);
},

startApp: function(target, name, contentLocation, timeout) {
var startReq = {
Name: name,
ContentLocation: contentLocation,
Timeout: timeout,
State: "Started"
};

if (target)
startReq.Target = target;

return this._xhrV1("PUT", require.toUrl("cfapi/apps"), startReq);
},

stopApp: function(target, name, contentLocation) {
var stopReq = {
Name: name,
ContentLocation: contentLocation,
State: "Stopped"
};

if (target)
stopReq.Target = target;

return this._xhrV1("PUT", require.toUrl("cfapi/apps"), stopReq);
},

getOrgs: function(target) {
var url = require.toUrl("cfapi/orgs");

if (target)
url += "?Target=" + JSON.stringify(target);

return this._xhrV1("GET", url);
},

getRoutes: function(target) {
var url = require.toUrl("cfapi/routes");

if (target)
url += "?Target=" + JSON.stringify(target);

return this._xhrV1("GET", url);
},

getServices: function(target) {
var url = require.toUrl("cfapi/services");

if (target)
url += "?Target=" + JSON.stringify(target);

return this._xhrV1("GET", url);
},

createRoute: function(target, domainName, hostName) {
var routeObj = {
DomainName: domainName,
Host: hostName
};

if (target)
routeObj.Target = target;

return this._xhrV1("PUT", require.toUrl("cfapi/routes"), routeObj);
},

deleteRoute: function(target, domainName, hostName) {
var routeObj = {
DomainName: domainName,
Host: hostName
};

var url = require.toUrl("cfapi/routes");
url += "?Route=" + encodeURIComponent(JSON.stringify(routeObj));

if (target)
url += "&Target=" + JSON.stringify(target);

return this._xhrV1("DELETE", url);
},

deleteRouteById: function(target, routeId) {
var url = require.toUrl("cfapi/routes/" + routeId);

if (target)
url += "?Target=" + JSON.stringify(target);

return this._xhrV1("DELETE", url);
},

deleteOrphanedRoutes: function (target) {
var url = require.toUrl("cfapi/routes");
url += "?Orphaned=true";

if (target)
url += "&Target=" + JSON.stringify(target);

return this._xhrV1("DELETE", url);
},

mapRoute: function(target, appId, routeId) {
var url = require.toUrl("cfapi/apps/" + appId + "/routes/" + routeId);
if (target)
url += "?Target=" + JSON.stringify(target);

return this._xhrV1("PUT", url);
},

unmapRoute: function(target, appId, routeId) {
var url = require.toUrl("cfapi/apps/" + appId + "/routes/" + routeId);
if (target)
url += "?Target=" + JSON.stringify(target);

return this._xhrV1("DELETE", url);
},

getManifestInfo: function(relFilePath){
var url = require.toUrl("cfapi/manifests" + relFilePath);
return this._xhrV1("GET", url);
},

getDeploymentPlans: function(relFilePath){
var url = require.toUrl("cfapi/plans" + relFilePath);
return this._xhrV1("GET", url);
},

getLogz: function(target, appName){
if(!appName){
var deferred = new Deferred();
deferred.reject("App name is missing");
}
var url = require.toUrl("cfapi/logz/" + appName);
if(target){
url += ("?Target=" + JSON.stringify(target));
}
return this._xhrV1("GET", url);
},
};

return CFService;
}());

return eclipse;
});
214 changes: 214 additions & 0 deletions bundles/org.eclipse.orion.client.cf/web/orion/cfui/logView.js
@@ -0,0 +1,214 @@
/*******************************************************************************
* Copyright (c) 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials are made
* available under the terms of the Eclipse Public License v1.0
* (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
* License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
*
* Contributors: IBM Corporation - initial API and implementation
******************************************************************************/

/*eslint-env browser, amd*/
define([
'orion/editor/textModel',
'orion/editorView',
'orion/inputManager',
'orion/objects',
'orion/Deferred',
'orion/globalCommands',
'orion/URL-shim'
], function(mTextModel, mEditorView, mInputManager, objects, Deferred, mGlobalCommands) {

function handleError(statusService, error) {
if (!statusService) {
window.console.log(error);
return;
}
if (error.status === 0) {
error = {
Severity: "Error", //$NON-NLS-0$
Message: "No response"
};
} else {
var responseText = error.responseText;
if (responseText) {
try {
error = JSON.parse(responseText);
} catch(e) {
error = {
//HTML: true,
Severity: "Error", //$NON-NLS-0$
Message: responseText
};
}
}
}
statusService.setProgressResult(error);
}

function LogInputManager(options){
mInputManager.InputManager.apply(this, [options]);
this.cFClient = options.cFClient;
this.commandRegistry = options.commandRegistry;
}

LogInputManager.prototype = new mInputManager.InputManager({});

objects.mixin(LogInputManager.prototype, {
_read: function(location, readOptions){
var deferred = new Deferred();
var currentInstance = this.applicationInfo.instance || Object.keys(this.applicationInfo.logs)[0];
this.cFClient.getLogs(this.applicationInfo.Target, this.applicationInfo.Application, location, this.applicationInfo.instance).then(function(logInfo){
var log = logInfo[currentInstance];
log.Instance = currentInstance;
deferred.resolve(log);

mGlobalCommands.setPageTarget({
task: "Cloud Foundry Logs",
target: log,
breadcrumbTarget: log,
serviceRegistry: this.serviceRegistry,
commandService: this.commandRegistry});
}.bind(this));
return deferred;
},
setApplicationInfo: function(appInfo){
this.applicationInfo = appInfo;
},
getApplicationInfo: function(){
return this.applicationInfo;
},
load: function(){
var logName = this.getInput();
if(!logName){
this.lastLogLoaded = null;
this.lastLogInstance = null;
return;
}

var progressTimeout = null;

var clearTimeout = function() {
this.reportStatus("");
if (progressTimeout) {
window.clearTimeout(progressTimeout);
}
}.bind(this);

var errorHandler = function(error) {
clearTimeout();
var statusService = this.serviceRegistry.getService("orion.page.message"); //$NON-NLS-0$
handleError(statusService, error);
this._setNoInput();
}.bind(this);

this._acceptPatch = null;

if((!this.lastLogLoaded || this.lastLogLoaded!==logName) || (this.applicationInfo.instance !== null && this.lastLogInstance !== this.applicationInfo.instance)){
// Read the log
this.progressService.showWhile(this._read(logName, true), "Loading " + logName).then(function(metadata) {
this.lastLogLoaded = logName;
this.lastLogInstance = metadata.Instance;
this._setInputContents(this._parsedLocation, logName, metadata.Contents, metadata);
}.bind(this), errorHandler);
} else {
progressTimeout = window.setTimeout(function() {
progressTimeout = null;
this.reportStatus("Fetching " + logName);
}.bind(this), 800);

var found = false;
var currentInstance = this.applicationInfo.instance || Object.keys(this.applicationInfo.logs)[0];
this.cFClient.getLogs(this.applicationInfo.Target, this.applicationInfo.Application).then(function(logs){
this.applicationInfo.logs[currentInstance].forEach(function(log){
if(log.Name === logName){
logs[currentInstance].forEach(function(log2){
if(log2.Name === logName){
if(log.Size!==log2.Size){
found = true;
this._read(logName, true).then(function(metadata) {
this._setInputContents(this._parsedLocation, logName, metadata.Contents, metadata);
this.lastLogLoaded = logName;
}.bind(this), errorHandler);
}
clearTimeout();
}
}.bind(this));
}
}.bind(this));

if(!found){
clearTimeout();
}
this.applicationInfo.logs = logs;

}.bind(this), errorHandler);
}
},
constructor: LogInputManager
});

function LogEditorView(options) {
this.options = options;
this._parent = options.parent;
this.serviceRegistry = options.serviceRegistry;
this.contentTypeRegistry = options.contentTypeRegistry;
this.commandRegistry = options.commandRegistry;
this.progress = options.progressService;
this.undoStack = options.undoStack;
this._createInputManager();
}
LogEditorView.prototype = {
_createInputManager: function(){
this.inputManager = new LogInputManager(this.options);
var defaultOptions = {
parent: this._parent,
model: new mTextModel.TextModel(),
undoStack: this.options.undoStack,
serviceRegistry: this.options.serviceRegistry,
pluginRegistry: this.options.pluginRegistry,
commandRegistry: this.options.commandRegistry,
contentTypeRegistry: this.options.contentTypeRegistry,
inputManager: this.inputManager,
readonly: true,
preferences: this.options.preferences,
searcher: this.options.searcher,
selection: this.options.selection,
fileService: this.options.fileClient,
fileClient:this.options.fileClient,
statusReporter: this.options.statusReporter,
statusService: this.options.statusService,
progressService: this.options.progressService
};
this.editorView = new mEditorView.EditorView(defaultOptions);
},
create: function() {
if(!this.editorCreated){
this.editorView.create();
this.editorCreated = true;

this.inputListener = function(evt) {
evt.editor = this.editorView.editor;
}.bind(this);

this.inputManager.addEventListener("InputChanged", this.inputListener);
this.inputManager.lastLogLoaded = null;
this.inputManager.lastLogInstance = null;
}

},
destroy: function() {
if (this.editorCreated) {
this.editorView.destroy();
if(this.inputListener){
this.inputManager.removeEventListener("InputChanged", this.inputListener);
}
}
this.editorCreated = false;
}
};

return {
LogEditorView: LogEditorView
};
});
169 changes: 169 additions & 0 deletions bundles/org.eclipse.orion.client.cf/web/orion/cfui/logsExplorer.js
@@ -0,0 +1,169 @@
/*******************************************************************************
* @license
* Copyright (c) 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials are made
* available under the terms of the Eclipse Public License v1.0
* (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
* License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
*
* Contributors: IBM Corporation - initial API and implementation
******************************************************************************/

/*eslint-env browser, amd*/
define([
'orion/webui/littlelib',
'orion/explorers/explorer',
'orion/objects',
'orion/URITemplate'
],
function(lib, mExplorer, objects,URITemplate){


function LogsModel(application, prefix){
this.root = application;
this.numberOfInstances = Object.keys(this.root.logs).length;
this.prefix = prefix;
}

LogsModel.prototype = new mExplorer.ExplorerModel();

objects.mixin(LogsModel.prototype, {
getRoot: function(onItem){
onItem(this.root);
},
getChildren: function(parentItem, onComplete){
if(parentItem === this.root){

if(this.numberOfInstances===1){
var instance = Object.keys(this.root.logs)[0];
this.root.children = this.root.logs[instance];
this.root.children.forEach(function(child){
child.parent = this.root;
child.Target = this.root.Target;
child.Instance = instance;
}.bind(this));
onComplete(this.root.children);
} else {
var children = [];
for(var instanceVal in this.root.logs){
children.push({Instance: instanceVal, Children: this.root.logs[instanceVal], Type: "Instance", parent: parentItem});
}
this.root.children = children;
onComplete(children);
}

} else if(parentItem.Instance){
var children = parentItem.Children;
children.forEach(function(child){
child.parent = parentItem;
child.Instance = parentItem.Instance;
child.Target = this.root.Target;
}.bind(this));
parentItem.children = children;
onComplete(children);
}else{
onComplete([]);
}
},
getId: function(item){
if(item === this.root) return this.prefix + this.root.Application;
if(item.Instance && item.Children) return this.prefix + this.root.Application + "_" + item.Instance;
if(item.Instance && item.Name) return this.prefix + this.root.Application + "_" + item.Instance + "_" + item.Name;
return this.prefix + this.root.Application + "_" + item.Name;
},
constructor: LogsModel
});

function LogsRenderer(options, explorer){
this._init(options);
this.explorer = explorer;
this.commandService = options.commandRegistry;
this.actionScopeId = options.actionScopeId;
this.colorLightDarkRows = options.isMiniNav;
}

LogsRenderer.prototype = new mExplorer.SelectionRenderer();
LogsRenderer.prototype.constructor = LogsRenderer;

objects.mixin(LogsRenderer.prototype, {
getCellElement: function(col_no, item, tableRow){
if(col_no!==0){
return null;
}
var col = document.createElement('td'); //$NON-NLS-0$
var span = document.createElement("span"); //$NON-NLS-0$
span.id = tableRow.id+"MainCol"; //$NON-NLS-0$
span.setAttribute("role", "presentation"); //$NON-NLS-1$ //$NON-NLS-0$
col.appendChild(span);
col.setAttribute("role", "presentation"); //$NON-NLS-1$ //$NON-NLS-0$
span.className = "mainNavColumn"; //$NON-NLS-0$

if(item.Type === "Log"){
var image = document.createElement("span");
image.className = "coreImageSprite core-sprite-file";
image.style.paddingLeft = "16px";
span.appendChild(image);
var a = document.createElement("a");
a.appendChild(document.createTextNode(item.Name));
var params = item.Target ? objects.clone(item.Target) : {};
objects.mixin(params, {instance: item.Instance, log: item.Name});
a.href = new URITemplate("#{,resource,params*}").expand({resource: item.Application, params: params});
span.appendChild(a);
} else if(item.Type === "Instance"){
this.getExpandImage(tableRow, span);
span.appendChild(document.createTextNode("Instance: " + item.Instance));
}
col.appendChild(span);
return col;
},
rowsChanged: function() {
mExplorer.SelectionRenderer.prototype.rowsChanged.apply(this, arguments);
if(this.colorLightDarkRows){
lib.$$array(".darkSectionTreeTableRow", this.tableNode).forEach(function(node, i) {
node.classList.remove("darkSectionTreeTableRow");
});
lib.$$array(".lightSectionTreeTableRow", this.tableNode).forEach(function(node, i) {
node.classList.remove("lightSectionTreeTableRow");
});
}
},
prototype: LogsRenderer
});


function LogsExplorer(serviceRegistry, selection, commandRegistry, parent, titleNode, isMiniNav) {
this.parent = parent;
this.titleNode = titleNode;
mExplorer.Explorer.apply(this, [serviceRegistry, selection, new LogsRenderer({
singleSelection: true,
checkbox: false,
commandRegistry: commandRegistry,
isMiniNav: isMiniNav
}, this), commandRegistry]);
}

LogsExplorer.prototype = Object.create(mExplorer.Explorer.prototype);

objects.mixin(LogsExplorer.prototype, {
load: function(logs){
this.logs = logs;
if(logs.Application && this.titleNode){
lib.empty(this.titleNode);
var span = document.createElement("span");
span.id = "LogsNavigationTitle";
span.className = "filesystemName layoutLeft";
span.appendChild(document.createTextNode(logs.Application));
this.titleNode.appendChild(span);
}
var model = new LogsModel(logs, this.parent.id);
this.createTree(this.parent, model, {indent: '8px'});
this.initNavHandler();
},
constructor: LogsExplorer
});

//return module exports
return {
LogsExplorer: LogsExplorer
};
});
409 changes: 409 additions & 0 deletions bundles/org.eclipse.orion.client.cf/web/orion/cfui/manifestEditor.js

Large diffs are not rendered by default.

@@ -0,0 +1,56 @@
/*******************************************************************************
* @license
* Licensed Materials - Property of IBM
* (c) Copyright IBM Corporation 2011. All Rights Reserved.
*
* Note to U.S. Government Users Restricted Rights: Use,
* duplication or disclosure restricted by GSA ADP Schedule
* Contract with IBM Corp.
*******************************************************************************/
/*eslint-env browser, amd*/
define(['orion/webui/dialog'], function(dialog) {

/**
* @param options {{
* title: string, //title of window ("Jazz Login" used if not provided)
* func: function, //callback function
* }}
*/
function CfLoginDialog(options){
this._init(options);
}

CfLoginDialog.prototype = new dialog.Dialog();

CfLoginDialog.prototype.TEMPLATE =
'<div style="padding: 5px;" id="userIdRow">'+
'<div style="float: left; width: 150px;"><label id="userIdLabel" for="userId"></label></div>'+
'<input id="userId" style="width: 200px;" value="">'+
'</div>'+
'<div style="padding: 5px;" id="passwordRow">'+
'<div style="float: left; width: 150px;"><label id="passwordLabel" for="password"></label></div>'+
'<input type="password" id="password" style="width: 200px;" value="">'+
'</div>';

CfLoginDialog.prototype._init = function(options) {
this.options = options || {};
this.title = this.options.title || "Cloud Foundry Login";
this.modal = true;
this.buttons = [{text: 'OK', isDefault: true, callback: this.done.bind(this)}];
this._func = options.func;
this._initialize();
};
CfLoginDialog.prototype._bindToDom = function() {
this.$userIdLabel.appendChild(document.createTextNode("User Id:"));
this.$passwordLabel.appendChild(document.createTextNode("Password:"));
};

CfLoginDialog.prototype.done = function() {
this.options.func(this.$userId.value, this.$password.value);
this.hide();
};

CfLoginDialog.prototype.constructor = CfLoginDialog;

return CfLoginDialog;
});
@@ -0,0 +1,159 @@
/*******************************************************************************
* @license
* Licensed Materials - Property of IBM
* (c) Copyright IBM Corporation 2011, 2014. All Rights Reserved.
*
* Note to U.S. Government Users Restricted Rights: Use,
* duplication or disclosure restricted by GSA ADP Schedule
* Contract with IBM Corp.
*******************************************************************************/
/*global dojo dijit eclipse widgets define */
/*eslint-env browser*/

define(['orion/uiUtils', 'orion/explorers/explorer', 'orion/webui/dialog', 'orion/selection', 'orion/commands', 'orion/commandRegistry'],
function(mUtil, mExplorer, dialog, mSelection, mCommands, mCommandRegistry) {

function SelectAppDialogRenderer (options, explorer) {
this.explorer = explorer;
this._init(options);
}
SelectAppDialogRenderer.prototype = new mExplorer.SelectionRenderer();
SelectAppDialogRenderer.prototype.constructor = SelectAppDialogRenderer;
SelectAppDialogRenderer.prototype.getLabelColumnIndex = function() {
return 0;
};
SelectAppDialogRenderer.prototype.getCellElement = function(col_no, item, tableRow){
var col = document.createElement("td"); //$NON-NLS-0$
tableRow.appendChild(col);
var span = document.createElement("span"); //$NON-NLS-0$
span.id = tableRow.id+"navSpan"; //$NON-NLS-0$
col.appendChild(span);
span.className = "mainNavColumn singleNavColumn"; //$NON-NLS-0$
if (item instanceof Array){
this.getExpandImage(tableRow, span);
span.appendChild(document.createTextNode("Root"));
} else {
span.appendChild(document.createTextNode(item.Name));
}
};


/**
* @param options {{
func : function(item) Function to be called with the selected item
title : String (Optional) Dialog title
apps: Applications
serviceRegistry: Service Registry
}}
*/

function SelectAppDialog(options) {
this._init(options);
}

SelectAppDialog.prototype = new dialog.Dialog();

SelectAppDialog.prototype.TEMPLATE =
'<div id="message" style="width: 25em; padding-bottom: 5px;"></div>' + //$NON-NLS-0$
'<div id="createArea" style="width: 25em; padding-bottom: 5px;"></div>' + //$NON-NLS-0$
'<div id="appsTree" class="explorerTreeClass" style="width:30em; min-height: 25em; max-height:30em; height: auto; overflow-y: auto;"></div>'; //$NON-NLS-0$

SelectAppDialog.prototype._init = function(options) {
this.title = options.title || "Select Project to Add";
this._serviceRegistry = options.serviceRegistry;
this.cfClient = options.cfClient;
this.commandService = options.commandRegistry;
this.modal = true;
this.buttons = [{id: "okbutton", text: 'OK', callback: this.done.bind(this)}];
this._func = options.func;
this.apps = options.apps;
this._initialize();
};

SelectAppDialog.prototype._bindToDom = function(parent) {
this.loadApps(this.apps); // workspace root
if (this._message) {
this.$message.appendChild(document.createTextNode(this._message));
} else {
this.$message.style.display = "none"; //$NON-NLS-0$
}
this.$appsTree.focus();
};


SelectAppDialog.prototype.loadApps = function(item) {
var progressService = this._serviceRegistry.getService("orion.page.progress");
var myTreeModel = new mExplorer.ExplorerModel();

myTreeModel.cfClient = this.cfClient;
myTreeModel.root = item;

myTreeModel.getRoot = function(onItem){
onItem(this.root);
};

myTreeModel.getId = function(/* item */ item){
if (item.Guid) {
var result = item.Guid;
// remove all non valid chars to make a dom id.
return result.replace(/[^\.\:\-\_0-9A-Za-z]/g, "");
}

return "root";
};

myTreeModel.mayHaveChildren = function(/* dojo.data.Item */ parentItem){
return false;
};

myTreeModel.getChildren = function(/* dojo.data.Item */ parentItem, /* function(items) */ onComplete){
if (parentItem instanceof Array) {
onComplete(parentItem);
} else {
onComplete([]);
}
};

this.createExplorer(myTreeModel);
};

SelectAppDialog.prototype.createExplorer = function(myTreeModel){
var self = this;
if(this.canCreate){
this.commandService.renderCommands(this.$createArea.id, this.$createArea, {}, this, "tool");
}

this.selection = new mSelection.Selection(this._serviceRegistry, "orion.cf.SelectApp.selection"); //$NON-NLS-0$

this.selection.addEventListener("selectionChanged", self.validate.bind(self));

this.explorer = new mExplorer.Explorer(this._serviceRegistry, this.selection); //$NON-NLS-0$
this.explorer.renderer = new SelectAppDialogRenderer({checkbox: false, singleSelection: true, treeTableClass: "directoryPrompter" }, this.explorer);

this.explorer.createTree(this.$appsTree.id, myTreeModel, {setFocus: true, selectionPolicy: this.explorer.renderer.selectionPolicy, onCollapse: function(model){if(self.getNavHandler()){self.getNavHandler().onCollapse(model);}}});
};

SelectAppDialog.prototype.validate = function(){
var self = this;
this.selection.getSelection(function(selection) {
if(selection===null){
self.$okbutton.classList.add(this.DISABLED);
return;
}
self.$okbutton.classList.remove(this.DISABLED);
});
};

SelectAppDialog.prototype.done = function() {
this.selection.getSelection(function(selection) {
this.hide();
this._func(selection);
}.bind(this));
};

SelectAppDialog.prototype.constructor = SelectAppDialog;

//return the module exports
return {SelectAppDialog: SelectAppDialog};

});
4 changes: 2 additions & 2 deletions bundles/org.eclipse.orion.client.core/.settings/.jsdtscope
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
<classpathentry kind="src" path=""/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary/StandardBrowser/html5"/>
<classpathentry excluding="orion/Deferred.js|requirejs/**" kind="src" path="web"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path=""/>
</classpath>
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
line.separator=\n
@@ -0,0 +1,39 @@
eclipse.preferences.version=1
org.eclipse.wst.jsdt.core.compiler.problem.deprecation=warning
org.eclipse.wst.jsdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.wst.jsdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.wst.jsdt.core.compiler.problem.discouragedReference=warning
org.eclipse.wst.jsdt.core.compiler.problem.duplicateLocalVariables=warning
org.eclipse.wst.jsdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.wst.jsdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.wst.jsdt.core.compiler.problem.fieldHiding=ignore
org.eclipse.wst.jsdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
org.eclipse.wst.jsdt.core.compiler.problem.forbiddenReference=error
org.eclipse.wst.jsdt.core.compiler.problem.hiddenCatchBlock=warning
org.eclipse.wst.jsdt.core.compiler.problem.indirectStaticAccess=ignore
org.eclipse.wst.jsdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.wst.jsdt.core.compiler.problem.looseVarDecleration=warning
org.eclipse.wst.jsdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.wst.jsdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
org.eclipse.wst.jsdt.core.compiler.problem.nullReference=ignore
org.eclipse.wst.jsdt.core.compiler.problem.optionalSemicolon=warning
org.eclipse.wst.jsdt.core.compiler.problem.parameterAssignment=ignore
org.eclipse.wst.jsdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
org.eclipse.wst.jsdt.core.compiler.problem.potentialNullReference=ignore
org.eclipse.wst.jsdt.core.compiler.problem.redundantNullCheck=ignore
org.eclipse.wst.jsdt.core.compiler.problem.undefinedField=warning
org.eclipse.wst.jsdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.wst.jsdt.core.compiler.problem.uninitializedGlobalVariable=ignore
org.eclipse.wst.jsdt.core.compiler.problem.uninitializedLocalVariable=ignore
org.eclipse.wst.jsdt.core.compiler.problem.unnecessaryElse=ignore
org.eclipse.wst.jsdt.core.compiler.problem.unresolvedFieldReference=error
org.eclipse.wst.jsdt.core.compiler.problem.unresolvedMethodReference=error
org.eclipse.wst.jsdt.core.compiler.problem.unresolvedTypeReference=error
org.eclipse.wst.jsdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
org.eclipse.wst.jsdt.core.compiler.problem.unusedLabel=warning
org.eclipse.wst.jsdt.core.compiler.problem.unusedLocal=ignore
org.eclipse.wst.jsdt.core.compiler.problem.unusedParameter=ignore
org.eclipse.wst.jsdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
org.eclipse.wst.jsdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
org.eclipse.wst.jsdt.core.compiler.problem.unusedPrivateMember=warning
semanticValidation=enabled
3 changes: 1 addition & 2 deletions bundles/org.eclipse.orion.client.core/META-INF/MANIFEST.MF
Expand Up @@ -3,6 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-Localization: bundle
Bundle-SymbolicName: org.eclipse.orion.client.core;singleton:=true
Bundle-Version: 0.2.0.qualifier
Bundle-Version: 2.0.0.qualifier
Bundle-Vendor: %Bundle-Vendor
Eclipse-BundleShape: dir
Expand Up @@ -14,18 +14,19 @@
<booleanAttribute key="default" value="false"/>
<booleanAttribute key="includeOptional" value="false"/>
<stringAttribute key="location" value="${workspace_loc}/../web"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms256m -Xmx768m&#13;&#10;-Dorg.eclipse.equinox.http.jetty.http.port=8080"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
<stringAttribute key="selected_target_plugins" value="com.ibm.icu@default:default,com.jcraft.jsch@default:default,com.jcraft.jsch@default:default,javax.servlet@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security@default:default,org.eclipse.jdt.junit.runtime@default:default,org.eclipse.jsch.core@default:default,org.eclipse.osgi.services*3.3.0.v20110411@default:default,org.eclipse.osgi.services*3.3.0.v20110513@default:default,org.eclipse.osgi@-1:true,org.eclipse.osgi@-1:true,org.eclipse.team.core@default:default,org.hamcrest.core@default:default,org.mortbay.jetty.server@default:default,org.mortbay.jetty.util@default:default"/>
<stringAttribute key="selected_workspace_plugins" value="aa.compute.bundle.ee@default:default,ch.qos.logback.classic@default:default,ch.qos.logback.core@default:default,ch.qos.logback.slf4j@default:false,com.jcraft.jsch@default:default,org.dojotoolkit@default:default,org.eclipse.core.tests.harness@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.help.base@default:default,org.eclipse.help.webapp@default:default,org.eclipse.jdt.doc.user@default:default,org.eclipse.jgit@default:default,org.eclipse.mylyn.help.ui@default:default,org.eclipse.mylyn.wikitext.core@default:default,org.eclipse.mylyn.wikitext.mediawiki.core@default:default,org.eclipse.orion.client.core@default:default,org.eclipse.orion.client.editor@default:default,org.eclipse.orion.client.git@default:default,org.eclipse.orion.client.users.ui@default:default,org.eclipse.orion.doc.isv@default:default,org.eclipse.orion.doc.user@default:default,org.eclipse.orion.dojo@default:default,org.eclipse.orion.server.authentication.basic@default:default,org.eclipse.orion.server.authentication.form.core@default:default,org.eclipse.orion.server.authentication.form@default:default,org.eclipse.orion.server.authentication.formopenid@default:default,org.eclipse.orion.server.authentication.openid.core@default:default,org.eclipse.orion.server.authentication.openid@default:default,org.eclipse.orion.server.configurator@default:default,org.eclipse.orion.server.core@default:default,org.eclipse.orion.server.git@default:default,org.eclipse.orion.server.hosting@default:default,org.eclipse.orion.server.logback.config@default:false,org.eclipse.orion.server.search@default:default,org.eclipse.orion.server.servlets@default:default,org.eclipse.orion.server.tests@default:default,org.eclipse.orion.server.user.securestorage@default:default,org.eclipse.orion.server.useradmin@default:default,org.eclipse.osgi@-1:true,org.eclipse.pde.doc.user@default:default,org.eclipse.platform.doc.isv@default:default,org.eclipse.platform.doc.user@default:default,org.eclipse.sdk@default:default,org.eclipse.test.performance@default:default,org.json@default:default,org.mozilla.javascript@default:default,org.openid4java@default:default,org.slf4j.api@default:default,org.slf4j.jcl@default:default,zzJohn@default:default"/>
<stringAttribute key="selected_workspace_plugins" value="ch.qos.logback.classic@default:default,ch.qos.logback.core@default:default,ch.qos.logback.slf4j@default:false,com.jcraft.jsch@default:default,org.dojotoolkit@default:default,org.eclipse.core.tests.harness@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.help.base@default:default,org.eclipse.help.webapp@default:default,org.eclipse.jdt.doc.user@default:default,org.eclipse.jgit@default:default,org.eclipse.mylyn.help.ui@default:default,org.eclipse.mylyn.wikitext.core@default:default,org.eclipse.mylyn.wikitext.mediawiki.core@default:default,org.eclipse.orion.client.core@default:default,org.eclipse.orion.client.editor@default:default,org.eclipse.orion.client.git@default:default,org.eclipse.orion.client.users@default:default,org.eclipse.orion.doc.isv@default:default,org.eclipse.orion.doc.user@default:default,org.eclipse.orion.dojo@default:default,org.eclipse.orion.server.authentication@default:default,org.eclipse.orion.server.core@default:default,org.eclipse.orion.server.git@default:default,org.eclipse.orion.server.hosting@default:default,org.eclipse.orion.server.logback.config@default:false,org.eclipse.orion.server.search@default:default,org.eclipse.orion.server.servlets@default:default,org.eclipse.orion.server.tests@default:default,org.eclipse.orion.server.useradmin@default:default,org.eclipse.osgi@-1:true,org.eclipse.pde.doc.user@default:default,org.eclipse.platform.doc.isv@default:default,org.eclipse.platform.doc.user@default:default,org.eclipse.sdk@default:default,org.eclipse.test.performance@default:default,org.json@default:default,org.mozilla.javascript@default:default,org.slf4j.api@default:default,org.slf4j.jcl@default:default,zzJohn@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useCustomFeatures" value="false"/>
<booleanAttribute key="useDefaultConfig" value="true"/>
<booleanAttribute key="useDefaultConfigArea" value="true"/>
<booleanAttribute key="useProduct" value="false"/>
</launchConfiguration>
</launchConfiguration>
16 changes: 6 additions & 10 deletions bundles/org.eclipse.orion.client.core/about.html
Expand Up @@ -2,13 +2,13 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>About</title>
</head>
<body lang="EN-US">
<h2>About This Content</h2>

<p>April 8, 2011</p>
<p>January 31, 2013</p>
<h3>License</h3>

<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
Expand All @@ -33,19 +33,15 @@ <h3>Third Party Content</h3>
terms and conditions of use.</p>

<h4>Dojo Foundation</h4>
<p>The plug-in includes software developed by The Dojo Foundation as part of the Dojo toolkit.</p>

<p>The Dojo toolkit source code can be found in src.zip in the following files:</p>

<p>The plug-in includes software developed by The Dojo Foundation as part of the require.js project.</p>
<p>The require.js source code can be found in src.zip in the following directories:</p>
<ul>
<li>web\orion\widgets\eWebBorderContainer.js</li>
<li>web/requirejs</li>
</ul>

<p>Your use of the Dojo Toolkit code is subject to the terms and conditions of the Academic Free License >= 2.1 OR the modified BSD license.
<p>Your use of the require.js code is subject to the terms and conditions of the Academic Free License >= 2.1 OR the modified BSD license.
A copy of the license is contained in the file <a href="about_files/DOJO-LICENSE" target="_blank">DOJO-LICENSE</a> and is also available at <a href="http://dojotoolkit.org/license" target="_blank">http://dojotoolkit.org/license</a>.
</p>

<small>Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle Corporation in the United States and other countries.</small>

</body>
</html>
24 changes: 24 additions & 0 deletions bundles/org.eclipse.orion.client.core/about.ini
@@ -0,0 +1,24 @@
###############################################################################
# Copyright (c) 2014 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# IBM Corporation - initial API and implementation
###############################################################################
# about.ini
# contains information about a feature
# java.io.Properties file (ISO 8859-1 with "\" escapes)
# "%key" are externalized strings defined in about.properties
# This file does not need to be translated.

# Property "appName" contains name of the application (translated)
appName=%appName

# Property "aboutText" contains blurb for "About" dialog (translated)
aboutText=%aboutText

# Property "featureImage" contains path to feature image (32x32)
featureImage=orion-32.png
29 changes: 29 additions & 0 deletions bundles/org.eclipse.orion.client.core/about.properties
@@ -0,0 +1,29 @@
###############################################################################
# Copyright (c) 2014 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# IBM Corporation - initial API and implementation
###############################################################################
# about.properties
# contains externalized strings for feature.xml
# "%foo" in feature.xml corresponds to the key "foo" in this file
# java.io.Properties file (ISO 8859-1 with "\" escapes)
# This file should be translated.

# "appName" property - name of the feature
appName=Orion Client Feature

# "description" property - description of the feature
aboutText=\
Version: {featureVersion}\n\
Build id: @qualifier@\n\
\n\
Copyright (c) 2011, 2014 IBM Corporation and others.\n\
\n\
Orion is an open source platform for cloud based development\n\
Visit https://www.eclipse.org/orion/

@@ -0,0 +1,31 @@
Software License Agreement (BSD License)

Copyright (c) 2009-2011, Kevin Decker <kpdecker@gmail.com>

All rights reserved.

Redistribution and use of this software in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above
copyright notice, this list of conditions and the
following disclaimer.

* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the
following disclaimer in the documentation and/or other
materials provided with the distribution.

* Neither the name of Kevin Decker nor the names of its
contributors may be used to endorse or promote products
derived from this software without specific prior
written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12 changes: 7 additions & 5 deletions bundles/org.eclipse.orion.client.core/build.properties
@@ -1,19 +1,21 @@
###############################################################################
# Copyright (c) 2010, 2011 IBM Corporation and others.
# Copyright (c) 2010, 2014 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials are made
# available under the terms of the Eclipse Public License v1.0
# (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
# License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
#
# Contributors: IBM Corporation - initial API and implementation
###############################################################################

bin.includes = META-INF/,\
web/,\
bundle.properties,\
about.html,\
about_files/,\
about.html
about.ini,\
about.properties,\
orion-32.png
src.includes = web/,\
about_files/,\
about.html
about.html,\
about_files/

2 changes: 1 addition & 1 deletion bundles/org.eclipse.orion.client.core/bundle.properties
Expand Up @@ -9,4 +9,4 @@
###############################################################################

Bundle-Vendor = Eclipse.org - Orion
Bundle-Name = Orion Client Core (Incubation)
Bundle-Name = Orion Client Core
10 changes: 0 additions & 10 deletions bundles/org.eclipse.orion.client.core/jsTestDriver.conf

This file was deleted.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions bundles/org.eclipse.orion.client.core/pom.xml
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2013, SAP AG and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
(http://www.eclipse.org/legal/epl-v10.html),
and the Eclipse Distribution License v1.0
(http://www.eclipse.org/org/documents/edl-v10.html).
Contributors:
Matthias Sohn - initial implementation
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.eclipse.orion</groupId>
<artifactId>org.eclipse.orion.client.core</artifactId>
<version>2.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

<parent>
<groupId>org.eclipse.orion</groupId>
<artifactId>org.eclipse.orion.client.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>

</project>
88 changes: 85 additions & 3 deletions bundles/org.eclipse.orion.client.core/web-ide.conf
Expand Up @@ -4,21 +4,57 @@
#uncomment this line to use hierarchical user content layout based on user id
#orion.file.layout=userTree

#uncomment this line to specify the root location to use for user content and metadata
#orion.file.content.location=/opt/orion/web-content

#uncomment this line to activate per-process file locking for user metadata
#orion.file.content.locking=true

#uncomment this line to specify the root location to store the Orion search indices
#orion.search.index.location=/opt/orion/web-search

#uncomment this line to enable the disk usage calculation support
#orion.file.diskUsageEnabled=true

#uncomment this line to allow only the admin user to create accounts
#orion.auth.user.creation=admin

#uncomment this line to force users to add email while account creation. Valid only when mail.* configuration is uncommented.
#orion.auth.user.creation.force.email=true

#uncomment this line to set a URI to forward to for registrations for your application
#this only applies if orion.auth.user.creation is set
#orion.auth.registration.uri=http://eclipse.org/orion

#uncomment this line to cause newly created projects to be initialized as git repositories
#orion.file.defaultSCM=git

#uncomment one of these lines to enable linking files outside the server workspace location
#orion.file.allowedPaths=/home/orion
#orion.file.allowedPaths=C:\\workspaces\\orion

#comment out this line to disable anonymous read access to files in your launched server
orion.file.anonymous.read=true
#uncomment the line below to enable npm commands
#orion.npmPath=C:\\Program Files\\nodejs\\npm.cmd

#uncomment this line to configure virtual hosts used for site launching
#uncomment out this line to enable anonymous read access to files in your launched server
#orion.file.anonymous.read=true

#uncomment this line to configure virtual hosts used for site launching.
#orion.site.virtualHosts=127.0.0.1,127.0.0.2
#orion.site.virtualHosts=http://*.orionhub.org:8080

#uncomment this line and set a password to create an admin user
#orion.auth.admin.default.password={password}

#uncomment this line to enable the log provider support
#orion.logs.logProviderEnabled=true

#uncomment this line to provide custom log buffer size used while downloading log files.
#The default value is 64 KB, the buffer size is given in bytes.
#orion.logs.logBufferSize=65536

#uncomment this line to specify to use the legacy metastore rather than the default simple metastore
#orion.core.metastore=legacy

#uncomment the lines below and specify the keystore location and passwords to launch your server over https
#jetty.https.enabled=true
Expand All @@ -27,3 +63,49 @@ orion.file.anonymous.read=true
#jetty.ssl.password={password}
#jetty.ssl.keypassword={password}
#jetty.ssl.protocol=SSLv3

#uncomment and update these lines to configure the smtp host for sending mail
#mail.smtp.host={smtp_host}
#mail.smtp.port=25
#mail.smtp.user={smtp_user}
#mail.smtp.password={password}
#mail.smtp.auth=true
#mail.smtp.starttls.enable=true
#mail.from={sender_of_mails}
#mail.debug=false

#uncomment this line to specify the uri for the docker server
#orion.core.docker.uri=http://localhost:4243

#uncomment this line to specify the proxy for the docker server used by the Orion client if required
#orion.core.docker.proxy.uri=http://localhost:4243

#uncomment this line to specify the UID of the process running the orion server, default is 1000
#orion.core.docker.uid=1000

#uncomment this line to specify the GID of the process running the orion server, default is 1000
#orion.core.docker.gid=1000

#uncomment this line to specify the start port of the range of ports exposed to clients for the docker server
#orion.core.docker.port.start=12000

#uncomment this line to specify the end port of the range of ports exposed to clients for the docker server
#orion.core.docker.port.end=13000

#uncomment this line to specify the username for the MQTT message broker
#orion.events.user={username}

#uncomment this line to specify the password for the MQTT message broker
#orion.events.password={password}

#uncomment this line to specify the URI for the MQTT message broker
#orion.events.uri=tcp://localhost:1883

#uncomment this line to enable access logs in NCSA format on the Jetty server
#orion.jetty.access.logs.enable=true

#uncomment and update these lines and specify the oauth client and secret keys
#orion.oauth.google.client={client_key}
#orion.oauth.google.secret={secret_key}
#orion.oauth.github.client={client_key}
#orion.oauth.github.secret={secret_key}
8 changes: 5 additions & 3 deletions bundles/org.eclipse.orion.client.core/web-ide.launch
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
<?xml version="1.0" encoding="UTF-8"?><launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
<setAttribute key="additional_plugins"/>
<booleanAttribute key="append.args" value="true"/>
<booleanAttribute key="automaticAdd" value="false"/>
Expand All @@ -14,6 +13,7 @@
<stringAttribute key="featureDefaultLocation" value="workspace"/>
<stringAttribute key="featurePluginResolution" value="workspace"/>
<booleanAttribute key="includeOptional" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -console&#13;&#10;-data ${workspace_loc}/../foo -clean -product org.eclipse.orion.product"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dorg.eclipse.equinox.http.jetty.http.port=8080 &#13;&#10;-Dorg.eclipse.equinox.http.jetty.autostart=false&#13;&#13;&#10;-Dorion.core.configFile=${project_loc:org.eclipse.orion.client.core}/web-ide.conf"/>
Expand All @@ -23,10 +23,12 @@
<setEntry value="org.eclipse.orion.client.feature:default"/>
<setEntry value="org.eclipse.orion.server.authentication.feature:default"/>
<setEntry value="org.eclipse.orion.server.feature:default"/>
<setEntry value="org.eclipse.orion.server.hosting.feature:default"/>
<setEntry value="org.eclipse.orion.server.jetty.feature:default"/>
<setEntry value="org.eclipse.orion.server.search.feature:default"/>
</setAttribute>
<booleanAttribute key="show_selected_only" value="false"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useCustomFeatures" value="true"/>
<booleanAttribute key="useDefaultConfigArea" value="true"/>
</launchConfiguration>
</launchConfiguration>
4,613 changes: 4,613 additions & 0 deletions bundles/org.eclipse.orion.client.core/web/chai/chai.js

Large diffs are not rendered by default.

17 changes: 0 additions & 17 deletions bundles/org.eclipse.orion.client.core/web/compare/compare.css

This file was deleted.

58 changes: 0 additions & 58 deletions bundles/org.eclipse.orion.client.core/web/compare/compare.html

This file was deleted.

108 changes: 0 additions & 108 deletions bundles/org.eclipse.orion.client.core/web/compare/compare.js

This file was deleted.

61 changes: 0 additions & 61 deletions bundles/org.eclipse.orion.client.core/web/css/UploaderFileList.css

This file was deleted.

39 changes: 0 additions & 39 deletions bundles/org.eclipse.orion.client.core/web/css/breadcrumbs.css

This file was deleted.

68 changes: 0 additions & 68 deletions bundles/org.eclipse.orion.client.core/web/css/commands.css

This file was deleted.

29 changes: 0 additions & 29 deletions bundles/org.eclipse.orion.client.core/web/css/customsplitter.css

This file was deleted.

56 changes: 0 additions & 56 deletions bundles/org.eclipse.orion.client.core/web/css/default-theme.css

This file was deleted.