Midas Desktop

From MIDAS Wiki
(Redirected from MIDASDesktop)
Jump to: navigation, search

MIDAS Desktop is a GUI application for synchronizing with a Midas Server. It allows both anonymous and authenticated access to the data on API-enabled Midas Servers.

Download Source

Download the source code for Midas Client from git:

git clone git://public.kitware.com/MIDAS/MidasClient.git

Building From Source

Run CMake on the source directory. Set the cache entry for BUILD_MIDAS_DESKTOP to ON and configure and generate into the build directory.

Note that you will need Qt to be installed for Midas Desktop to build. You can download the Qt SDK here.

Once you've successfully configured, you can build the project.

Enabling Server-Side Options

To enable the Web-API for MIDAS, you must first change

$MIDAS_WEB_API='0';

to

$MIDAS_WEB_API='1';

in your config.php file. (For newer versions of Midas Server, this is the default setting, so you might not have to change it.)

Usage

Midas Desktop uses terminology similar to Git. Resources are pulled or cloned from the server to the client, and stored on the client side in a SQLite database. The client can add local resources to their local repository, and then upload (push) the new resources to the Midas Server.

Creating a Database

The first step in using the application is to create a local SQLite database to use. You can create a Midas Client database on your local machine by choosing the menu item Settings->New Local Database.... A file dialog will appear, allowing you to select a location in your filesystem for your database. Once you create the new database, choose Settings->Choose Local Database... and select the database you created. You'll only need to do this once. Future instances of the application will remember the database to use.

Connecting to the Midas Server

In order to synchronize with the Midas Server, you must establish a connection with it. In order to do this, we will create a Profile, which corresponds to a user on a specific Midas Server. The Midas Server to which you connect must have the API enabled in its configuration options.

To create a profile, use the menu item Settings->Profile. This will open the Edit Profile dialog, shown here.

Create profile.jpg

The Edit Profile dialog.

You can choose either anonymous access to the server (which will allow you to pull resources, but not to push them), or to authenticate to the server using the API. In either case, you must enter the URL of the Midas Server's web API in the bottom text field, labeled "Server URL." Note: This should end in "/api/rest", which is the URL for the REST API with which the application will communicate.

Anonymous access

To use anonymous access, enter the desired profile name and check the "Anonymous" box at the top. Once you've entered the profile name and the server URL, click Save. Now you can reference this profile by the name you entered.

Authenticated access

You can also use Midas Desktop using your login credentials from the Midas Server. Uncheck the "Anonymous" checkbox and enter your email and password that you use to login on the server. When you're done, click Save.

Root Directory

You can choose a root directory for downloaded data corresponding to a specific profile. This isn't recommended unless you actually need profile-specific roots. If not, you can change the general root directory for downloaded resources in the Preferences dialog. If you do want a profile specific root directory for your data, check the Root Directory checkbox and enter the path to your desired root directory.

Sign in to the server

Once you have created a profile, you can sign in to the Midas Server. Use the menu item File->Sign In. The Sign In dialog is displayed; it shows a list of the user profiles you have created.

Sign in dialog.jpg

The Sign In dialog.

Select the user profile you want to use to connect to the server. Click OK. The application will connect to the server and fetch its list of resources, and display them as a tree in the Server Tree tab on the left-hand side of the GUI.

Using the Server and Client trees

Once you are connected to the server, you can view the contents of the server and client in tree form in the two tabs on the left hand side, labeled Server Tree and Client Tree. The client tree shows the contents of your local database. The server tree shows the contents of the Midas Server to which you are connected.

Initially, your client tree will be empty. You can populate it either by adding your own resources, or pulling resources from the server.

Pulling server resources

To pull resources from the server tree to your local repository, right click the item in the tree. In the context menu that opens, select Pull Resource. The Pull Resource dialog will display. When you pull a resource, all of its parent items in the tree will be pulled if they are not already in your client tree. You can optionally choose to pull all the children of the selected resource by checking the Pull Children box.

If you simply wish to copy the entire Midas Server's repository into your client repository, use the Clone Entire Repository radio button.

Adding resources via the client

You can add local resources on your client tree by right clicking in the tree. This will open the context menu allowing you to add resource types under given resources, or add a top level community if no resource is selected.

You can add bitstreams under an item by dragging them from your filesystem browser onto the item in the tree. This will add all selected bitstreams under the item.

Resources added on your tree which have not yet been pushed to the server are displayed in red. These are called "staged" resources and are ready to be pushed.

When you wish to upload your changes to the server repository, click the Push Resources button below the client tree.

Searching for resources

In the bottom right of the application is the Search area. This does a simple search for resources on the Midas Server. Type the word you want to search for, and press the Search button. The list of matching resources will appear in the table below. You can left-click one of the resources to view it in the server tree. You can right click it to get the context menu, which will allow you to either pull the resource or view it on the server in your web browser.

Auto-refresh settings

Midas Desktop can be configured to automatically refresh and show newly added resources on the server. To access the options for auto-refreshing, go to Settings->Auto-Refresh....

By default, Midas Desktop will automatically refresh every 5 minutes, but only when the application is minimized to the tray (done by clicking the "X" in the upper right corner). When new resources are found on the server, a message will appear from the tray icon alerting you of the changes.

New resources in the server tree will appear in red. Resources are considered new if they have not been seen in a previous refresh or initial connection to the server.

Log

The log can be accessed in the same tab container as the Search area. It contains all of the output from Midas Desktop. Error messages will appear here in red, normal output will appear in black text.

Progress Tab

The progress tab also appears in the bottom right tab container. It is useful when pulling or pushing a large dataset, as it will report more detailed progress information such as overall progress, current upload/download speed, and estimated time remaining.

Progress.jpg

The progress tab