Editing a tool

Edit the files of a tool in the tool editor of Cloudera Agent Studio, and then save the changes as a draft or publish them as a new version.

When you click Edit, Agent Studio opens a working copy of the tool in your authoring workspace. The tool editor shows a file tree and a tab for each open file. A published version in the catalog does not change when you edit the working copy. The version history of a tool is immutable, and publishing your changes creates a new version.

To open the tool editor:
  1. Launch the Cloudera Agent Studio console.
  2. In the left navigation pane, click Assets > Tool Catalog.
    The Tools page is displayed.
  3. In the row of the tool, click Actions and click Edit.
    If an authoring session is not ready, a progress dialog opens. Wait for the dialog to close.
    The tool editor opens.
To change a file:
  1. In the file tree, click the file.
    The file opens in a tab.
  2. Change the content of the file.
    Agent Studio automatically saves your changes to your workspace shortly after you stop typing. Automatic saves do not create a draft version of the tool.
To add a file or a folder:
  1. In the file tree, go to the target folder, click File actions, and select New file or New folder.
    The New file or New folder dialog opens.
  2. In Name, enter a name for the file or folder.
    The name cannot be empty, and it cannot contain a forward slash (/).
  3. Optional: To add the content from your computer, select Upload a file or Upload a .tar.gz bundle, and then drag the file into the drop zone or click the drop zone to select the file.
    If you leave Name blank for a file, the item keeps the uploaded file's name. For a folder, Agent Studio extracts the bundle into the new folder.
  4. Click Create.
    A confirmation message is displayed for the new file or folder. Click Cancel to close the dialog without creating the item.
To rename a file:
  1. In the file tree, go to the target file, click File actions, and click Rename.
    The Rename dialog box is displayed.
  2. In New name, enter the new name, and click Rename.
    A message confirming the change is displayed.
To delete a file or a folder:
  1. In the file tree, go to the item, click File actions, and click Delete.
    The Delete dialog box is displayed.
  2. Click Delete.
    To close the dialog box without deleting the item, click Cancel.
    Agent Studio permanently removes the file. For a folder, removal includes everything inside the folder.
To rename the tool:
  1. At the top of the tool editor, click More actions, and click Rename.
    The Rename dialog box is displayed. The Current name field displays the current name.
  2. In New name, enter a name and click Rename.
    If the tool was published under its old name, the dialog displays a warning. The next time you save a version, Agent Studio publishes it as a new, separate catalog entry instead of a new version of the original tool.
  3. To reload the files from your workspace, click More actions, and then click Reload files.
  4. To save or publish your changes, see Saving drafts and publishing a tool to the catalog.
  5. To leave the editor, click Back to catalog.
    Agent Studio saves your work as a draft, and returns you to the Tool Catalog page.

Your changes remain in your workspace. After you save a draft, the tool appears in the My Drafts section on the Tool Catalog page. The version history of the published tool does not change until you publish.