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:
-
Launch the Cloudera Agent Studio console.
-
In the left navigation pane, click .
The Tools page is displayed.
-
In the row of the tool, click
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:
-
In the file tree, click the file.
The file opens in a tab.
-
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:
-
In the file tree, go to the target folder, click
, and select New file or New folder.
The New file or New folder dialog
opens.
-
In Name, enter a name for the file or folder.
The name cannot be empty, and it cannot contain a forward slash
(/).
-
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.
-
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:
-
In the file tree, go to the target file, click
, and click Rename.
The Rename dialog box is displayed.
-
In New name, enter the new name, and click Rename.
A message confirming the change is displayed.
To delete a file or a folder:
-
In the file tree, go to the item, click
, and click Delete.
The Delete dialog box is displayed.
-
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:
-
At the top of the tool editor, click
, and click Rename.
The Rename dialog box is displayed. The
Current name field displays the current name.
-
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.
-
To reload the files from your workspace, click More actions, and then click Reload files.
-
To save or publish your changes, see Saving drafts and publishing a tool to the catalog.
-
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.