Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Factory migration #4413

Merged
merged 92 commits into from
Apr 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
0547c7c
Move factory
mshaposhnik Feb 17, 2017
be5d143
fix GWT build
mshaposhnik Feb 17, 2017
bc20c72
Merge branch 'master' into factory_move
mshaposhnik Feb 21, 2017
f82f499
Update version
mshaposhnik Feb 21, 2017
41385e4
Fix pom
mshaposhnik Feb 22, 2017
a673655
Cde fixes
mshaposhnik Feb 22, 2017
33afa83
Merge branch 'master' into factory_move
mshaposhnik Feb 22, 2017
b8ae593
Add factory assembly
mshaposhnik Feb 22, 2017
30da6d5
Init factory schema
Feb 21, 2017
ff7e372
Add persist test module generator
Feb 21, 2017
852e698
Enable FactoryDao tck tests
Feb 21, 2017
53ffdad
Use persist module generator for account
Feb 21, 2017
796e975
Use persist module generator for recipe & snapshot
Feb 21, 2017
362ec05
Use persist module generator for ssh
Feb 21, 2017
bd1ec5d
Use persist module generator for user
Feb 21, 2017
7da8120
Use persist module generator for workspace
Feb 21, 2017
a388195
Use persist module generator for cascade removal test
Feb 21, 2017
436c5c8
Use persist module generator for postgresql tck
Feb 21, 2017
3e117b2
Merge branch 'master' into factory_move
mshaposhnik Feb 23, 2017
5888b11
Merge branch 'factory_move' into factory_migration
mshaposhnik Feb 23, 2017
b91df03
Fix pom's
mshaposhnik Feb 23, 2017
cca0734
Enable factory api
mshaposhnik Feb 23, 2017
2af8593
Try to move factory into Che
mshaposhnik Feb 27, 2017
62ff65c
Try to move factory into Che
mshaposhnik Feb 27, 2017
f1053ca
Try to move factory into Che
mshaposhnik Feb 27, 2017
8671ffd
Filter fixup
mshaposhnik Feb 27, 2017
389a09f
CHE-4150 and CHE-4059: Doesn't perform DeleteResourceAction into par…
AndrienkoAleksandr Feb 23, 2017
033619e
Disable file saving on editor closing (#4077)
Feb 23, 2017
30ad50a
Revert automatically file saving after editor close
Feb 24, 2017
0bfdb5f
RELEASE: add bugfix version to cli versions
Feb 24, 2017
5184249
Fix setting workspace attributes (#4215)
Feb 24, 2017
be24d87
CODENVY-1607: add action to button in Team section (#3965)
Feb 24, 2017
982599d
init shared
Feb 22, 2017
e38f602
add pull-request-ide module
Feb 23, 2017
84326bc
fixup! add pull-request-ide module
Feb 23, 2017
1e6eeaf
add pull-request server part
Feb 23, 2017
e7b12fb
move github pullrequest
Feb 24, 2017
7a8b9d4
Merge branch 'factory_dashboard' into factory_migration
mshaposhnik Feb 28, 2017
089a6eb
Merge branch 'master' into factory_migration
mshaposhnik Feb 28, 2017
20081c0
Merge branch 'factory_migration' into pr_plugin_init
Feb 28, 2017
f272149
Add rewrite for shortened facory url-s
mshaposhnik Feb 28, 2017
e01d41c
Fix shortcut
mshaposhnik Mar 1, 2017
14eb8f4
Merge branch 'factory_migration' into pr_plugin_init
Mar 1, 2017
5de85b5
Merge with master
mshaposhnik Mar 3, 2017
3ecb917
Merge branch 'factory_migration' of github.com:eclipse/che into facto…
mshaposhnik Mar 3, 2017
8eec9be
Merge with master
mshaposhnik Mar 3, 2017
ab75a25
Test fix
mshaposhnik Mar 3, 2017
a73197a
Move and rework factory and user services in che dashboard
ashumilova Mar 9, 2017
66e1a1f
Merge remote-tracking branch 'origin' into factory_migration
ashumilova Mar 9, 2017
c31660f
Merge branch 'master' into factory_migration
mshaposhnik Mar 9, 2017
4cac845
fixup! Move and rework factory and user services in che dashboard
ashumilova Mar 9, 2017
7f5d35d
Merge branch 'master' into factory_migration
mshaposhnik Mar 9, 2017
4ef431c
Merge branch 'factory_migration' of github.com:eclipse/che into facto…
mshaposhnik Mar 10, 2017
7e8e514
Remove factory war & set-up redirects to dashboard
mshaposhnik Mar 10, 2017
cbd8465
fixup! Remove factory war & set-up redirects to dashboard
mshaposhnik Mar 10, 2017
326f3a4
Mode factory url plugins
mshaposhnik Mar 10, 2017
b37fd2a
Master merge
mshaposhnik Mar 13, 2017
fb6ee7e
fixup! Master merge
mshaposhnik Mar 13, 2017
acdc8e2
Merge branch 'master' into factory_migration
mshaposhnik Mar 14, 2017
b3276bf
che-4291: add factory validation to dashboard
ashumilova Mar 14, 2017
f1ac3fe
PR fixups
mshaposhnik Mar 14, 2017
68c2aa5
Merge branch 'factory_migration' of github.com:eclipse/che into facto…
ashumilova Mar 14, 2017
888e566
Fixup
mshaposhnik Mar 14, 2017
c715442
Fix named factory
mshaposhnik Mar 14, 2017
342cd7a
Added parameter resolver
mshaposhnik Mar 15, 2017
161a84e
Merge branch 'master' into factory_migration
mshaposhnik Mar 16, 2017
c5beb99
Update schema version
mshaposhnik Mar 16, 2017
8d33495
Cleanup factory sources
ashumilova Mar 17, 2017
f00adf0
Version and namings fixes
mshaposhnik Mar 17, 2017
46a1a60
Merge branch 'master' into factory_migration
mshaposhnik Mar 20, 2017
e9ff612
che-4457: fix stack selection on factory details page
ashumilova Mar 20, 2017
fa407dd
CODENVY-566; Remove outdated policies.match parameter; (#4480)
mshaposhnik Mar 20, 2017
6adfe61
CHE-4372; add unique constraing for factory name + user (#4521)
mshaposhnik Mar 23, 2017
844e660
Merge branch 'master' of github.com:eclipse/che into factory_migration
Mar 23, 2017
3bb3148
Fix merge with master
mshaposhnik Mar 23, 2017
e9c7147
CHE-4499; support legaсy filenames for github factories (#4548)
mshaposhnik Mar 27, 2017
c3b568f
PR panel: for Github workflow, use https remote instead of ssh to avo…
sunix Mar 24, 2017
27a285a
PR panel: Fix empty ContributeToBranchName when project is not commin…
sunix Mar 24, 2017
f6ec0aa
fixup! PR panel: Fix empty ContributeToBranchName when project is not…
sunix Mar 27, 2017
5b65009
Supress jetty debug output
mshaposhnik Mar 27, 2017
1f0e296
Merge branch 'master' of github.com:eclipse/che into factory_migration
Mar 28, 2017
34dabe1
Fix migration scripts
Mar 28, 2017
49a0a01
refactor parser interace
mshaposhnik Mar 28, 2017
308f0f5
Merge branch 'master' into factory_migration
mshaposhnik Mar 30, 2017
c804821
Merge branch 'master' into factory_migration
mshaposhnik Mar 31, 2017
35bec4d
Merge with master
mshaposhnik Mar 31, 2017
6988ff0
Merge with master
mshaposhnik Mar 31, 2017
2f0824a
CHE-4619; Move factory functionality into core (#4655)
mshaposhnik Mar 31, 2017
f68207a
Fixup dep-s
mshaposhnik Mar 31, 2017
156bcca
Merge branch 'master' of github.com:eclipse/che into factory_migration
Apr 3, 2017
83e925e
CODENVY-1921 Bitbucket server adaptations
Apr 3, 2017
cda2e97
Fix pom
Apr 3, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions assembly/assembly-ide-war/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@
<groupId>org.eclipse.che.plugin</groupId>
<artifactId>che-plugin-github-oauth2</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.plugin</groupId>
<artifactId>che-plugin-github-pullrequest</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.plugin</groupId>
<artifactId>che-plugin-github-shared</artifactId>
Expand Down Expand Up @@ -243,6 +247,14 @@
<groupId>org.eclipse.che.plugin</groupId>
<artifactId>che-plugin-product-info</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.plugin</groupId>
<artifactId>che-plugin-pullrequest-ide</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.plugin</groupId>
<artifactId>che-plugin-pullrequest-shared</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.plugin</groupId>
<artifactId>che-plugin-python-lang-ide</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@

RewriteRule ^/api/(.*)$ /wsmaster/api/$1 [L]
RewriteRule ^/factory\\?(.*)$ /dashboard/#/load-factory/$1 [R,NE]
RewriteRule ^/factory/(.*)$ /dashboard/#/load-factory/$1 [R,NE]
RewriteRule ^/f/?(.*)$ /dashboard/#/load-factory/$1 [R,NE]
RewriteRule ^/f\\?(.*)$ /dashboard/#/load-factory/$1 [R,NE]
21 changes: 16 additions & 5 deletions assembly/assembly-wsmaster-war/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-api-core</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-api-factory</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-api-machine</artifactId>
Expand Down Expand Up @@ -178,6 +182,10 @@
<groupId>org.eclipse.che.plugin</groupId>
<artifactId>che-plugin-docker-machine</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.plugin</groupId>
<artifactId>che-plugin-github-factory-resolver</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.plugin</groupId>
<artifactId>che-plugin-github-oauth2</artifactId>
Expand All @@ -198,10 +206,18 @@
<groupId>org.eclipse.che.plugin</groupId>
<artifactId>che-plugin-openshift-client</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.plugin</groupId>
<artifactId>che-plugin-pullrequest-server</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.plugin</groupId>
<artifactId>che-plugin-ssh-machine</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.plugin</groupId>
<artifactId>che-plugin-url-factory</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
Expand Down Expand Up @@ -237,11 +253,6 @@
<artifactId>logback-classic</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-api-factory</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-commons-test</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,18 @@
import org.eclipse.che.api.core.rest.CheJsonProvider;
import org.eclipse.che.api.core.rest.MessageBodyAdapter;
import org.eclipse.che.api.core.rest.MessageBodyAdapterInterceptor;
import org.eclipse.che.api.factory.server.FactoryAcceptValidator;
import org.eclipse.che.api.factory.server.FactoryCreateValidator;
import org.eclipse.che.api.factory.server.FactoryEditValidator;
import org.eclipse.che.api.factory.server.FactoryParametersResolver;
import org.eclipse.che.api.machine.shared.Constants;
import org.eclipse.che.api.user.server.TokenValidator;
import org.eclipse.che.api.workspace.server.WorkspaceConfigMessageBodyAdapter;
import org.eclipse.che.api.workspace.server.WorkspaceMessageBodyAdapter;
import org.eclipse.che.api.workspace.server.stack.StackMessageBodyAdapter;
import org.eclipse.che.core.db.schema.SchemaInitializer;
import org.eclipse.che.inject.DynaModule;
import org.eclipse.che.plugin.github.factory.resolver.GithubFactoryParametersResolver;
import org.flywaydb.core.internal.util.PlaceholderReplacer;

import javax.sql.DataSource;
Expand All @@ -62,6 +67,18 @@ protected void configure() {
bind(org.eclipse.che.core.db.DBInitializer.class).asEagerSingleton();
bind(PlaceholderReplacer.class).toProvider(org.eclipse.che.core.db.schema.impl.flyway.PlaceholderReplacerProvider.class);

//factory
bind(FactoryAcceptValidator.class).to(org.eclipse.che.api.factory.server.impl.FactoryAcceptValidatorImpl.class);
bind(FactoryCreateValidator.class).to(org.eclipse.che.api.factory.server.impl.FactoryCreateValidatorImpl.class);
bind(FactoryEditValidator.class).to(org.eclipse.che.api.factory.server.impl.FactoryEditValidatorImpl.class);
bind(org.eclipse.che.api.factory.server.FactoryService.class);
install(new org.eclipse.che.api.factory.server.jpa.FactoryJpaModule());

Multibinder<FactoryParametersResolver> factoryParametersResolverMultibinder =
Multibinder.newSetBinder(binder(), FactoryParametersResolver.class);
factoryParametersResolverMultibinder.addBinding()
.to(GithubFactoryParametersResolver.class);

install(new org.eclipse.che.plugin.docker.compose.ComposeModule());

bind(org.eclipse.che.api.user.server.CheUserCreator.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@
<class>org.eclipse.che.api.machine.server.model.impl.SnapshotImpl</class>
<class>org.eclipse.che.api.machine.server.recipe.RecipeImpl</class>

<class>org.eclipse.che.api.factory.server.model.impl.FactoryImpl</class>
<class>org.eclipse.che.api.factory.server.model.impl.OnAppClosedImpl</class>
<class>org.eclipse.che.api.factory.server.model.impl.OnProjectsLoadedImpl</class>
<class>org.eclipse.che.api.factory.server.model.impl.OnAppLoadedImpl</class>
<class>org.eclipse.che.api.factory.server.model.impl.PoliciesImpl</class>
<class>org.eclipse.che.api.factory.server.model.impl.ActionImpl</class>
<class>org.eclipse.che.api.factory.server.model.impl.AuthorImpl</class>
<class>org.eclipse.che.api.factory.server.model.impl.ButtonAttributesImpl</class>
<class>org.eclipse.che.api.factory.server.model.impl.ButtonImpl</class>
<class>org.eclipse.che.api.factory.server.model.impl.IdeImpl</class>
<class>org.eclipse.che.api.factory.server.FactoryImage</class>

<class>org.eclipse.che.api.ssh.server.model.impl.SshPairImpl</class>

<exclude-unlisted-classes>true</exclude-unlisted-classes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ public interface Policies {
*/
Long getUntil();

/**
* Re-open projects on factory 2-nd click
*/
String getMatch();

/**
* Workspace creation strategy
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public class CheCacheDisablingFilter extends CacheDisablingFilter {

private Set<Pattern> actionPatterns = new HashSet<>();

@Override
public void init(FilterConfig filterConfig) {
Enumeration<String> names = filterConfig.getInitParameterNames();
while (names.hasMoreElements()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public class CheCacheForcingFilter extends CacheForcingFilter {

private Set<Pattern> actionPatterns = new HashSet<>();

@Override
public void init(FilterConfig filterConfig) {
Enumeration<String> names = filterConfig.getInitParameterNames();
while (names.hasMoreElements()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,23 +107,27 @@ public Object[][] cachedPathProvider() {
private class MockFilterConfig implements FilterConfig {
private final Map<String, String> filterParams = new HashMap<>();

public MockFilterConfig() {
MockFilterConfig() {
this.filterParams.put("pattern1", "^.*\\.nocache\\..*$");
this.filterParams.put("pattern2", "^.*/_app/.*$");
}

@Override
public String getFilterName() {
return this.getClass().getName();
}

@Override
public ServletContext getServletContext() {
throw new UnsupportedOperationException("The method does not supported in " + this.getClass());
}

@Override
public String getInitParameter(String key) {
return this.filterParams.get(key);
}

@Override
public Enumeration<String> getInitParameterNames() {
return Collections.enumeration(filterParams.keySet());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,23 +108,27 @@ public Object[][] nonCachedPathProvider() {
private class MockFilterConfig implements FilterConfig {
private final Map<String, String> filterParams = new HashMap<>();

public MockFilterConfig() {
MockFilterConfig() {
this.filterParams.put("pattern1", "^.*\\.cache\\..*$");
this.filterParams.put("pattern2", "^.*/_app/.*$");
}

@Override
public String getFilterName() {
return this.getClass().getName();
}

@Override
public ServletContext getServletContext() {
throw new UnsupportedOperationException("The method does not supported in " + this.getClass());
}

@Override
public String getInitParameter(String key) {
return this.filterParams.get(key);
}

@Override
public Enumeration<String> getInitParameterNames() {
return Collections.enumeration(filterParams.keySet());
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
/*
* Copyright (c) 2015-2017 Codenvy, S.A.
* 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:
* Codenvy, S.A. - initial API and implementation
*/
'use strict';

/**
* Defines controller of directive for displaying action box.
* @ngdoc controller
* @name factory.directive:FactoryActionBoxController
* @author Florent Benoit
*/
export class FactoryActionBoxController {
private $mdDialog: ng.material.IDialogService;
private actions: Array<any>;
private selectedAction: string;
private factoryObject: any;
private lifecycle: any;
private onChange: Function;

/**
* Default constructor that is using resource injection
* @ngInject for Dependency injection
*/
constructor($mdDialog: ng.material.IDialogService) {
this.$mdDialog = $mdDialog;

this.actions = [];
this.actions.push({name : 'RunCommand', id: 'runcommand'});
this.actions.push({name : 'openFile', id: 'openfile'});
this.selectedAction = this.actions[0].id;
}

/**
* Edit the action based on the provided index
* @param $event the mouse event
* @param index the index in the array of factory actions
*/
editAction($event: any, index: number): void {
let action = this.factoryObject.ide[this.lifecycle].actions[index];
this.$mdDialog.show({
targetEvent: $event,
controller: 'FactoryActionDialogEditController',
controllerAs: 'factoryActionDialogEditCtrl',
bindToController: true,
clickOutsideToClose: true,
locals: {
callbackController: this,
index: index,
// selectedAction: action
selectedValue: action.properties
},
templateUrl: 'app/factories/create-factory/action/factory-action-edit.html'
});
}

/**
* Edit action callback.
*
* @param index the index in the array of factory actions
* @param newValue new value
*/
callbackEditAction(index: number, newValue: any): void {
this.factoryObject.ide[this.lifecycle].actions[index].properties = newValue;

this.onChange();
}

addAction(): void {
if (!this.factoryObject.ide) {
this.factoryObject.ide = {};
}
if (!this.factoryObject.ide[this.lifecycle]) {
this.factoryObject.ide[this.lifecycle] = {};
this.factoryObject.ide[this.lifecycle].actions = [];
}

let actionToAdd;
if ('openfile' === this.selectedAction) {
actionToAdd = {
"properties": {
"file": this.selectedParam
},
"id": "openFile"
};
} else if ('runcommand' === this.selectedAction) {
actionToAdd = {
"properties": {
"name": this.selectedParam
},
"id": "runCommand"
};
}
if (actionToAdd) {
this.factoryObject.ide[this.lifecycle].actions.push(actionToAdd);
}

this.onChange();
}

/**
* Remove action based on the provided index
* @param index the index in the array of factory actions
*/
removeAction(index: number): void {
this.factoryObject.ide[this.lifecycle].actions.splice(index, 1);

this.onChange();
}
}
Loading