-
Notifications
You must be signed in to change notification settings - Fork 723
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5522 from e-cuellar/DEV
[BACKLOG-39531] RunInBackground functionality still existing in the Platform
- Loading branch information
Showing
5 changed files
with
52 additions
and
726 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,17 +14,20 @@ | |
* See the GNU Lesser General Public License for more details. | ||
* | ||
* | ||
* Copyright (c) 2002-2023 Hitachi Vantara. All rights reserved. | ||
* Copyright (c) 2002-2024 Hitachi Vantara. All rights reserved. | ||
* | ||
*/ | ||
|
||
package org.pentaho.mantle.client; | ||
|
||
import com.google.gwt.http.client.RequestBuilder; | ||
import com.google.gwt.http.client.RequestException; | ||
import org.pentaho.gwt.widgets.client.filechooser.RepositoryFile; | ||
import org.pentaho.mantle.client.events.EventBusUtil; | ||
import org.pentaho.mantle.client.events.GenericEvent; | ||
import org.pentaho.mantle.client.events.SolutionFileHandler; | ||
import org.pentaho.mantle.client.solutionbrowser.SolutionBrowserPanel; | ||
import org.pentaho.mantle.client.solutionbrowser.filelist.FileItem; | ||
import org.pentaho.mantle.client.ui.PerspectiveManager; | ||
|
||
public class MantleUtils { | ||
|
@@ -33,7 +36,6 @@ public class MantleUtils { | |
setupNativeHooks( new MantleUtils() ); | ||
} | ||
|
||
|
||
public void setSchedulesPerspective() { | ||
PerspectiveManager.getInstance().setPerspective( PerspectiveManager.SCHEDULES_PERSPECTIVE ); | ||
} | ||
|
@@ -61,6 +63,34 @@ public void fireRefreshFolderEvent( String outputLocation ) { | |
EventBusUtil.EVENT_BUS.fireEvent( event ); | ||
} | ||
|
||
public void handleRepositoryFileSelection( String solutionPath, Boolean isAdhoc) { | ||
final SolutionBrowserPanel sbp = SolutionBrowserPanel.getInstance(); | ||
sbp.getFile( solutionPath, new SolutionFileHandler() { | ||
@Override | ||
public void handle( RepositoryFile repositoryFile ) { | ||
if( isAdhoc ) { | ||
openAdhocDialog( true ); | ||
} else { | ||
FileItem fileItem = new FileItem( repositoryFile, null, null, false, null ); | ||
checkSchedulePermissionAndDialog( fileItem.getRepositoryFile().getId(), fileItem.getPath() ); | ||
} | ||
} | ||
} ); | ||
} | ||
|
||
private native void openAdhocDialog( boolean feedback ) /*-{ | ||
$wnd.pho.showDialog(feedback); | ||
}-*/; | ||
|
||
private native void checkSchedulePermissionAndDialog( String repositoryFileId, String repositoryFilePath ) /*-{ | ||
$wnd.pho.checkSchedulePermissionAndDialog(repositoryFileId, repositoryFilePath); | ||
}-*/; | ||
|
||
public boolean checkSelectedPerspective() { | ||
return !PerspectiveManager.getInstance().getActivePerspective().getId().equals( | ||
PerspectiveManager.SCHEDULES_PERSPECTIVE ); | ||
} | ||
|
||
public static native String getSchedulerPluginContextURL()/*-{ | ||
if (typeof $wnd.pho.getSchedulerPluginContextURL !== "undefined" ) { | ||
return $wnd.pho.getSchedulerPluginContextURL(); | ||
|
@@ -93,5 +123,15 @@ private static native void setupNativeHooks( MantleUtils utils ) | |
//CHECKSTYLE IGNORE LineLength FOR NEXT 1 LINES | ||
[email protected]::fireRefreshFolderEvent(Ljava/lang/String;)(outputLocation); | ||
} | ||
$wnd.mantle.handleRepositoryFileSelection = function(solutionPath, isAdhoc) { | ||
//CHECKSTYLE IGNORE LineLength FOR NEXT 1 LINES | ||
[email protected]::handleRepositoryFileSelection(Ljava/lang/String;Ljava/lang/Boolean;)(solutionPath, isAdhoc); | ||
} | ||
$wnd.mantle.checkSelectedPerspective = function() { | ||
//CHECKSTYLE IGNORE LineLength FOR NEXT 1 LINES | ||
return [email protected]::checkSelectedPerspective()(); | ||
} | ||
}-*/; | ||
} |
220 changes: 0 additions & 220 deletions
220
...console/src/main/java/org/pentaho/mantle/client/commands/AdhocRunInBackgroundCommand.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.