After renaming pool Baculum user see warning with instruction what to do to finish the pool rename. User is able to re-assign volumes between pools and at the end remove original pool.
msgid "Please create a new volume for storage: %storage, pool: %pool, media type: %mediatype."
msgstr "Please create a new volume for storage: %storage, pool: %pool, media type: %mediatype."
+
+msgid "Assign volumes from selected pool"
+msgstr "Assign volumes from selected pool"
+
+msgid "This function enables re-assigning volumes from selected pool to this pool."
+msgstr "This function enables re-assigning volumes from selected pool to this pool."
+
+msgid "Please select a pool from which you would like to assign volumes to this pool."
+msgstr "Please select a pool from which you would like to assign volumes to this pool."
+
+msgid "Assigned volume count:"
+msgstr "Assigned volume count:"
+
+msgid "Assign volumes"
+msgstr "Assign volumes"
+
+msgid "No volumes in the pool to assign."
+msgstr "No volumes in the pool to assign."
+
+msgid "The pool has not been renamed but it has been copied with the new name. Please note that if the original pool contained volumes, they have not been moved and they are still assigned to the original pool in the catalog database. To re-assign volumes from the original pool to this one please go to the MAIN MENU ➤ Pools ➤ [NEW POOL] ➤ Tab: Actions and please use the 'Assign volumes' button. After re-assgning volumes you can delete the original pool."
+msgstr "The pool has not been renamed but it has been copied with the new name. Please note that if the original pool contained volumes, they have not been moved and they are still assigned to the original pool in the catalog database. To re-assign volumes from the original pool to this one please go to the MAIN MENU ➤ Pools ➤ [NEW POOL] ➤ Tab: Actions and please use the 'Assign volumes' button. After re-assgning volumes you can delete the original pool."
msgid "Please create a new volume for storage: %storage, pool: %pool, media type: %mediatype."
msgstr "Please create a new volume for storage: %storage, pool: %pool, media type: %mediatype."
+
+msgid "Assign volumes from selected pool"
+msgstr "Assign volumes from selected pool"
+
+msgid "This function enables re-assigning volumes from selected pool to this pool."
+msgstr "This function enables re-assigning volumes from selected pool to this pool."
+
+msgid "Please select a pool from which you would like to assign volumes to this pool."
+msgstr "Please select a pool from which you would like to assign volumes to this pool."
+
+msgid "Assigned volume count:"
+msgstr "Assigned volume count:"
+
+msgid "Assign volumes"
+msgstr "Assign volumes"
+
+msgid "No volumes in the pool to assign."
+msgstr "No volumes in the pool to assign."
+
+msgid "The pool has not been renamed but it has been copied with the new name. Please note that if the original pool contained volumes, they have not been moved and they are still assigned to the original pool in the catalog database. To re-assign volumes from the original pool to this one please go to the MAIN MENU ➤ Pools ➤ [NEW POOL] ➤ Tab: Actions and please use the 'Assign volumes' button. After re-assgning volumes you can delete the original pool."
+msgstr "The pool has not been renamed but it has been copied with the new name. Please note that if the original pool contained volumes, they have not been moved and they are still assigned to the original pool in the catalog database. To re-assign volumes from the original pool to this one please go to the MAIN MENU ➤ Pools ➤ [NEW POOL] ➤ Tab: Actions and please use the 'Assign volumes' button. After re-assgning volumes you can delete the original pool."
msgid "Please create a new volume for storage: %storage, pool: %pool, media type: %mediatype."
msgstr "Please create a new volume for storage: %storage, pool: %pool, media type: %mediatype."
+
+msgid "Assign volumes from selected pool"
+msgstr "Assign volumes from selected pool"
+
+msgid "This function enables re-assigning volumes from selected pool to this pool."
+msgstr "This function enables re-assigning volumes from selected pool to this pool."
+
+msgid "Please select a pool from which you would like to assign volumes to this pool."
+msgstr "Please select a pool from which you would like to assign volumes to this pool."
+
+msgid "Assigned volume count:"
+msgstr "Assigned volume count:"
+
+msgid "Assign volumes"
+msgstr "Assign volumes"
+
+msgid "No volumes in the pool to assign."
+msgstr "No volumes in the pool to assign."
+
+msgid "The pool has not been renamed but it has been copied with the new name. Please note that if the original pool contained volumes, they have not been moved and they are still assigned to the original pool in the catalog database. To re-assign volumes from the original pool to this one please go to the MAIN MENU ➤ Pools ➤ [NEW POOL] ➤ Tab: Actions and please use the 'Assign volumes' button. After re-assgning volumes you can delete the original pool."
+msgstr "The pool has not been renamed but it has been copied with the new name. Please note that if the original pool contained volumes, they have not been moved and they are still assigned to the original pool in the catalog database. To re-assign volumes from the original pool to this one please go to the MAIN MENU ➤ Pools ➤ [NEW POOL] ➤ Tab: Actions and please use the 'Assign volumes' button. After re-assgning volumes you can delete the original pool."
msgid "Please create a new volume for storage: %storage, pool: %pool, media type: %mediatype."
msgstr "Please create a new volume for storage: %storage, pool: %pool, media type: %mediatype."
+
+msgid "Assign volumes from selected pool"
+msgstr "Assign volumes from selected pool"
+
+msgid "This function enables re-assigning volumes from selected pool to this pool."
+msgstr "This function enables re-assigning volumes from selected pool to this pool."
+
+msgid "Please select a pool from which you would like to assign volumes to this pool."
+msgstr "Please select a pool from which you would like to assign volumes to this pool."
+
+msgid "Assigned volume count:"
+msgstr "Assigned volume count:"
+
+msgid "Assign volumes"
+msgstr "Assign volumes"
+
+msgid "No volumes in the pool to assign."
+msgstr "No volumes in the pool to assign."
+
+msgid "The pool has not been renamed but it has been copied with the new name. Please note that if the original pool contained volumes, they have not been moved and they are still assigned to the original pool in the catalog database. To re-assign volumes from the original pool to this one please go to the MAIN MENU ➤ Pools ➤ [NEW POOL] ➤ Tab: Actions and please use the 'Assign volumes' button. After re-assgning volumes you can delete the original pool."
+msgstr "The pool has not been renamed but it has been copied with the new name. Please note that if the original pool contained volumes, they have not been moved and they are still assigned to the original pool in the catalog database. To re-assign volumes from the original pool to this one please go to the MAIN MENU ➤ Pools ➤ [NEW POOL] ➤ Tab: Actions and please use the 'Assign volumes' button. After re-assgning volumes you can delete the original pool."
msgid "Please create a new volume for storage: %storage, pool: %pool, media type: %mediatype."
msgstr "Please create a new volume for storage: %storage, pool: %pool, media type: %mediatype."
+
+msgid "Assign volumes from selected pool"
+msgstr "Assign volumes from selected pool"
+
+msgid "This function enables re-assigning volumes from selected pool to this pool."
+msgstr "This function enables re-assigning volumes from selected pool to this pool."
+
+msgid "Please select a pool from which you would like to assign volumes to this pool."
+msgstr "Please select a pool from which you would like to assign volumes to this pool."
+
+msgid "Assigned volume count:"
+msgstr "Assigned volume count:"
+
+msgid "Assign volumes"
+msgstr "Assign volumes"
+
+msgid "No volumes in the pool to assign."
+msgstr "No volumes in the pool to assign."
+
+msgid "The pool has not been renamed but it has been copied with the new name. Please note that if the original pool contained volumes, they have not been moved and they are still assigned to the original pool in the catalog database. To re-assign volumes from the original pool to this one please go to the MAIN MENU ➤ Pools ➤ [NEW POOL] ➤ Tab: Actions and please use the 'Assign volumes' button. After re-assgning volumes you can delete the original pool."
+msgstr "The pool has not been renamed but it has been copied with the new name. Please note that if the original pool contained volumes, they have not been moved and they are still assigned to the original pool in the catalog database. To re-assign volumes from the original pool to this one please go to the MAIN MENU ➤ Pools ➤ [NEW POOL] ➤ Tab: Actions and please use the 'Assign volumes' button. After re-assgning volumes you can delete the original pool."
<com:TCallback ID="LoadDirectorResourcesConfig" OnCallback="loadDirectorResourcesConfig" />
<script>
function load_dir_res_config(resource) {
+ // hide pool warning
+ document.getElementById('director_view_rename_resource').style.display = 'none';
+
+ // do load Director resource request
var cb = <%=$this->LoadDirectorResourcesConfig->ActiveControl->Javascript%>;
cb.setCallbackParameter(resource);
cb.dispatch();
ShowCancelButton="false"
/>
</div>
+ <div id="director_view_rename_resource" class="w3-panel w3-pale-yellow w3-border" style="display: none">
+ <h3><%[ Warning ]%></h3>
+ <p><%[ The pool has not been renamed but it has been copied with the new name. Please note that if the original pool contained volumes, they have not been moved and they are still assigned to the original pool in the catalog database. To re-assign volumes from the original pool to this one please go to the MAIN MENU ➤ Pools ➤ [NEW POOL] ➤ Tab: Actions and please use the 'Assign volumes' button. After re-assgning volumes you can delete the original pool. ]%></p>
+ </div>
<div id="director_resources_config_form" class="subtab_item" style="display: none">
<com:Application.Web.Portlets.BaculaConfigResourceList
ID="DirectorResourcesConfig"
ComponentType="dir"
ResourceList="<%=[[ 'name' => 'Name', 'label' => 'Name' ]]%>"
+ OnRename="renameResource"
/>
</div>
</div>
* Bacula(R) is a registered trademark of Kern Sibbald.
*/
+Prado::using('System.Web.UI.TCommandEventParameter');
Prado::using('System.Web.UI.ActiveControls.TCallback');
Prado::using('Application.Web.Class.BaculumWebPage');
$this->getCallbackClient()->callClientFunction('init_graphical_director_status', [$client_status]);
}
+
+ public function renameResource($sender, $param) {
+ if ($param instanceof TCommandEventParameter) {
+ $res = $param->getCommandParameter();
+ if ($res['resource_type'] == 'Pool') {
+ $this->getCallbackClient()->show('director_view_rename_resource');
+ }
+ }
+ }
}
?>
<!-- Header -->
<header class="w3-container">
<h5>
- <b><i class="fa fa-desktop"></i> <%[ Pool details ]%></b>
+ <b><i class="fa fa-tape"></i> <%[ Pool details ]%></b>
</h5>
</header>
<h3 class="w3-margin-left">[PoolId <%=$this->getPoolId()%>] <%[ Pool: ]%> <%=$this->getPoolName()%></h3>
ClientSide.OnLoading="$('#status_pool_loading').show();"
ClientSide.OnSuccess="$('#status_pool_loading').hide();"
>
- <prop:Text><%=Prado::localize('Update pool')%> <i class="fa fa-wrench"></i></prop:Text>
+ <prop:Text><i class="fa fa-wrench"></i> <%=Prado::localize('Update pool')%></prop:Text>
</com:TActiveLinkButton>
<com:TActiveLinkButton
ID="UpdateAllVolInPoolBtn"
ClientSide.OnLoading="$('#status_pool_loading').show();"
ClientSide.OnSuccess="$('#status_pool_loading').hide();"
>
- <prop:Text><%=Prado::localize('Update all vols in pool')%> <i class="fa fa-wrench"></i></prop:Text>
+ <prop:Text><i class="fa fa-wrench"></i> <%=Prado::localize('Update all vols in pool')%></prop:Text>
</com:TActiveLinkButton>
+ <com:Application.Web.Portlets.AssignVolumesToPool
+ PoolId="<%=$this->getPoolId()%>"
+ />
<i id="status_pool_loading" class="fa fa-sync w3-spin" style="display: none; vertical-align: super;"></i>
<div class="w3-row">
<div class="w3-card w3-quarter w3-padding w3-margin-right details_card">
</table>
</div>
<div class="w3-container tab_item" id="pool_config" style="display: none">
+ <div id="pool_view_rename_resource" class="w3-panel w3-pale-yellow w3-border" style="display: none">
+ <h3><%[ Warning ]%></h3>
+ <p><%[ The pool has not been renamed but it has been copied with the new name. Please note that if the original pool contained volumes, they have not been moved and they are still assigned to the original pool in the catalog database. To re-assign volumes from the original pool to this one please go to the MAIN MENU ➤ Pools ➤ [NEW POOL] ➤ Tab: Actions and please use the 'Assign volumes' button. After re-assgning volumes you can delete the original pool. ]%></p>
+ </div>
<com:Application.Web.Portlets.BaculaConfigDirectives
ID="PoolConfig"
ComponentType="dir"
ResourceType="Pool"
ShowCancelButton="false"
+ OnRename="showAssignVolumesWarning"
/>
</div>
<script type="text/javascript">
}
}
+ public function showAssignVolumesWarning($sender, $param) {
+ $this->getCallbackClient()->show('pool_view_rename_resource');
+ }
}
?>
--- /dev/null
+<?php
+/*
+ * Bacula(R) - The Network Backup Solution
+ * Baculum - Bacula web interface
+ *
+ * Copyright (C) 2013-2021 Kern Sibbald
+ *
+ * The main author of Baculum is Marcin Haba.
+ * The original author of Bacula is Kern Sibbald, with contributions
+ * from many others, a complete list can be found in the file AUTHORS.
+ *
+ * You may use this file and others of this release according to the
+ * license defined in the LICENSE file, which includes the Affero General
+ * Public License, v3.0 ("AGPLv3") and some additional permissions and
+ * terms pursuant to its AGPLv3 Section 7.
+ *
+ * This notice must be preserved when any source code is
+ * conveyed and/or propagated.
+ *
+ * Bacula(R) is a registered trademark of Kern Sibbald.
+ */
+
+Prado::using('Application.Web.Portlets.Portlets');
+
+/**
+ * Assign volumes to pool control.
+ *
+ * @author Marcin Haba <marcin.haba@bacula.pl>
+ * @category Control
+ * @package Baculum Web
+ */
+class AssignVolumesToPool extends Portlets {
+
+ const POOL_ID = 'PoolId';
+
+ /**
+ * Set pool identifier.
+ *
+ * @return none;
+ */
+ public function setPoolId($pool) {
+ settype($pool, 'integer');
+ $this->setViewState(self::POOL_ID, $pool);
+ }
+
+ /**
+ * Get pool identifier.
+ *
+ * @return integer pool identifier
+ */
+ public function getPoolId() {
+ return $this->getViewState(self::POOL_ID, 0);
+ }
+
+ public function loadValues() {
+ $pools = $this->Application->getModule('api')->get(['pools']);
+ $pool_list = [];
+ if ($pools->error === 0) {
+ $curr_poolid = $this->getPoolId();
+ foreach($pools->output as $pool) {
+ if ($pool->poolid == $curr_poolid) {
+ continue;
+ }
+ $pool_list[$pool->poolid] = $pool->name;
+ }
+ }
+ $this->Pool->DataSource = $pool_list;
+ $this->Pool->dataBind();
+ }
+
+ public function loadVolumeList($sender, $param) {
+ $poolid = $this->Pool->SelectedValue;
+ $volumes = $this->getModule('api')->get(
+ ['pools', $poolid, 'volumes']
+ );
+ if ($volumes->error === 0) {
+ if (count($volumes->output) > 0) {
+ $this->getPage()->getCallbackClient()->callClientFunction(
+ 'oAssignVolumesToPool.load_volume_list_cb',
+ [$volumes->output]
+ );
+ } else {
+ $this->AssignVolumesLog->Text .= PHP_EOL . Prado::localize('No volumes in the pool to assign.');
+ $this->getPage()->getCallbackClient()->show('assign_volumes_log');
+ $this->getPage()->getCallbackClient()->callClientFunction(
+ 'oAssignVolumesToPool.show_loader',
+ [false]
+ );
+ }
+ }
+ }
+
+ public function assignVolume($sender, $param) {
+ $mediaid = $param->getCallbackParameter();
+ if (!is_numeric($mediaid) || $mediaid <= 0) {
+ return;
+ }
+ $mediaid = intval($mediaid);
+ if ($mediaid === 0) {
+ return;
+ }
+ $poolid = $this->getPoolId();
+ $result = $this->getModule('api')->set(
+ ['volumes', $mediaid],
+ ['poolid' => $poolid]
+ );
+ if ($result->error === 0) {
+ $this->getPage()->getCallbackClient()->callClientFunction('oAssignVolumesToPool.set_logbox_scroll');
+ $this->AssignVolumesLog->Text .= PHP_EOL . implode(PHP_EOL, $result->output);
+ $this->getPage()->getCallbackClient()->show('assign_volumes_log');
+ // try to assign next volume
+ $this->getPage()->getCallbackClient()->callClientFunction('oAssignVolumesToPool.assign_volume');
+ }
+ }
+}
+?>
--- /dev/null
+<com:TActiveLinkButton
+ CssClass="w3-button w3-green w3-margin-bottom"
+ OnClick="loadValues"
+>
+ <prop:Attributes.onclick>
+ oAssignVolumesToPool.show_window(true);
+ </prop:Attributes.onclick>
+ <i class="fa fa-pen-alt"></i> <%[ Assign volumes ]%>
+</com:TActiveLinkButton>
+<div id="assign_volumes_modal" class="w3-modal">
+ <div class="w3-modal-content w3-animate-top w3-card-4">
+ <header class="w3-container w3-teal">
+ <span onclick="oAssignVolumesToPool.show_window(false);" class="w3-button w3-display-topright">×</span>
+ <h2><%[ Assign volumes from selected pool ]%></h2>
+ </header>
+ <div class="w3-padding">
+ <p><%[ This function enables re-assigning volumes from selected pool to this pool. ]%></p>
+ <p><%[ Please select a pool from which you would like to assign volumes to this pool. ]%></p>
+ <div class="w3-row-padding w3-section">
+ <div class="w3-col w3-half"><com:TLabel ForControl="Pool" Text="<%[ Pool: ]%>" /></div>
+ <div class="w3-col w3-half">
+ <com:TActiveDropDownList ID="Pool" CssClass="w3-input w3-border" />
+ <com:TRequiredFieldValidator
+ ValidationGroup="AssignVolumesGroup"
+ ControlToValidate="Pool"
+ ErrorMessage="<%[ Field required. ]%>"
+ Display="Dynamic"
+ />
+ </div>
+ </div>
+ <div class="w3-row-padding w3-section">
+ <div class="w3-col w3-half"><com:TLabel ForControl="Pool" Text="<%[ Assigned volume count: ]%>" /></div>
+ <div class="w3-col w3-half"><strong id="assign_volumes_counter"></strong>/<strong id="assign_volumes_all"></strong></div>
+ </div>
+ <div class="w3-container w3-center w3-section">
+ <button type="button" class="w3-button w3-red" onclick="oAssignVolumesToPool.show_window(false);"><i class="fa fa-times"></i> <%[ Close ]%></button>
+ <com:TLinkButton
+ ID="AssignVolumesButton"
+ CausesValidation="true"
+ ValidationGroup="AssignVolumesGroup"
+ CssClass="w3-button w3-green"
+ Attributes.onclick="oAssignVolumesToPool.load_volume_list(); return false;"
+ >
+ <i class="fa fa-pen-alt"></i> <%[ Assign volumes ]%>
+ </com:TLinkButton>
+ <i id="assign_volumes_loading" class="fa fa-sync w3-spin" style="visibility: hidden;"></i>
+ </div>
+ <div id="assign_volumes_log" class="w3-panel w3-card w3-light-grey" style="display: none; max-height: 200px; overflow-x: auto;">
+ <div class="w3-code notranslate">
+ <pre><com:TActiveLabel ID="AssignVolumesLog" /></pre>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+<com:TCallback ID="LoadVolumeList" OnCallback="loadVolumeList" />
+<com:TCallback ID="AssignVolume" OnCallback="assignVolume" />
+<script>
+var oAssignVolumesToPool = {
+ volumes: [],
+ logbox_scroll: false,
+ ids: {
+ modal: 'assign_volumes_modal',
+ loader: 'assign_volumes_loading',
+ logbox: 'assign_volumes_log',
+ counter: 'assign_volumes_counter',
+ all: 'assign_volumes_all'
+ },
+ show_window: function(show) {
+ // clean up previous logs (if any)
+ this.cleanup_joblog();
+
+ // clear counter
+ this.clear_counter();
+
+ var win = document.getElementById(this.ids.modal);
+ win.style.display = show ? 'block' : 'none';
+ },
+ load_volume_list: function() {
+ oAssignVolumesToPool.show_loader(true);
+ oAssignVolumesToPool.clear_counter();
+
+ var cb = <%=$this->LoadVolumeList->ActiveControl->Javascript%>;
+ cb.dispatch();
+ },
+ load_volume_list_cb: function(volumes) {
+ for (var i = 0; i < volumes.length; i++) {
+ oAssignVolumesToPool.volumes.push(volumes[i].mediaid);
+ }
+ if (oAssignVolumesToPool.volumes.length > 0) {
+ // prepare log box
+ oAssignVolumesToPool.prepare_logbox();
+
+ // start assigning
+ oAssignVolumesToPool.assign_volume();
+ } else {
+ oAssignVolumesToPool.show_loader(false);
+ }
+ },
+ assign_volume: function() {
+ oAssignVolumesToPool.prepare_logbox();
+ oAssignVolumesToPool.set_counter();
+ if (oAssignVolumesToPool.volumes.length > 0) {
+ var cb = <%=$this->AssignVolume->ActiveControl->Javascript%>;
+ cb.setCallbackParameter(oAssignVolumesToPool.volumes.shift());
+ cb.dispatch();
+ } else {
+ oAssignVolumesToPool.show_loader(false);
+ }
+ },
+ show_loader: function(show) {
+ var loader = document.getElementById(oAssignVolumesToPool.ids.loader);
+ loader.style.visibility = show ? 'visible' : 'hidden';
+ },
+ prepare_logbox: function() {
+ var logbox = document.getElementById(this.ids.logbox);
+ logbox.style.display = '';
+ if (this.logbox_scroll) {
+ logbox.scrollTo(0, logbox.scrollHeight);
+ }
+ },
+ is_logbox_scroll_end: function() {
+ var logbox = document.getElementById(this.ids.logbox);
+ var pos = logbox.scrollHeight - logbox.clientHeight - logbox.scrollTop;
+ return (pos < 2);
+ },
+ set_logbox_scroll: function() {
+ oAssignVolumesToPool.logbox_scroll = oAssignVolumesToPool.is_logbox_scroll_end();
+ },
+ cleanup_joblog: function() {
+ var logbox = document.getElementById(this.ids.logbox);
+ logbox.style.display = 'none';
+ var logbox_content = document.getElementById('<%=$this->AssignVolumesLog->ClientID%>');
+ logbox_content.textContent = '';
+ },
+ set_counter: function() {
+ var counter = document.getElementById(this.ids.counter);
+ var cnt = parseInt(counter.textContent, 10);
+ var all = document.getElementById(this.ids.all);
+ var cnta = parseInt(all.textContent, 10);
+ if (cnt < cnta) {
+ counter.textContent = ++cnt;
+ }
+ if (all.textContent == 0) {
+ all.textContent = this.volumes.length;
+ }
+ },
+ clear_counter: function() {
+ var counter = document.getElementById(this.ids.counter);
+ counter.textContent = 0;
+ var all = document.getElementById(this.ids.all);
+ all.textContent = 0;
+ }
+};
+</script>
* Bacula(R) is a registered trademark of Kern Sibbald.
*/
+Prado::using('System.Web.UI.TCommandEventParameter');
Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
Prado::using('System.Web.UI.ActiveControls.TActivePanel');
// set new resource name
$this->setResourceName($res_name_dir);
$resource_name = $res_name_dir;
+ $param = new TCommandEventParameter('rename', [
+ 'resource_type' => $resource_type,
+ 'resource_name' => $resource_name
+ ]);
+ $this->onRename($param);
}
}
} else {
$host = null;
$resource_type = $this->getResourceType();
$resource_name = $this->getResourceName();
+
+ if ($resource_type == 'Pool') {
+ /**
+ * For Pools there is done copy resource, not rename, to allow users
+ * re-assigning volumes from original pool to new pool and at the end
+ * to remove original pool.
+ */
+ return true;
+ }
+
$config = $this->getConfigData($host, array($component_type));
$deps = $this->getModule('data_deps')->checkDependencies(
$component_type,
/**
* Set if buttons should be flexible and available at the bottom of the page.
*
- * @return none;
+ * @return none
*/
public function setShowBottomButtons($show) {
$show = TPropertyValue::ensureBoolean($show);
return $this->getViewState(self::SHOW_BOTTOM_BUTTONS, true);
}
+ /**
+ * On save event fired when resource is saved.
+ *
+ * @return none
+ */
public function onSave($param) {
$this->raiseEvent('OnSave', $this, $param);
}
+ /**
+ * On rename event fired when resource is renamed.
+ *
+ * @return none
+ */
+ public function onRename($param) {
+ $this->raiseEvent('OnRename', $this, $param);
+ }
+
+
/**
* Set if name field should be disabled.
*
$this->getPage()->getCallbackClient()->show($err_win_id);
}
+ public function renameResource($sender, $param) {
+ $this->onRename($param);
+ }
+
+ public function onRename($param) {
+ $this->raiseEvent('OnRename', $this, $param);
+ }
+
public function getHost() {
return $this->getViewState(self::HOST);
}
ShowBottomButtons="false"
SaveDirectiveActionOk="oBaculaConfigResourceWindow<%=$this->ClientID%>.close_resource_window();"
OnSave="loadResourceListTable"
+ OnRename="renameResource"
/>
</div>
</div>
</prop:Attributes.onclick>
<i class="fa fa-tag"></i> <%[ Label volume(s) ]%>
</com:TActiveLinkButton>
-</button>
<div id="label_volume" class="w3-modal">
<div class="w3-modal-content w3-animate-top w3-card-4">
<header class="w3-container w3-teal">