teProfileActionService.editProfile(context);\n };\n h5.actions[\"vsphere.core.pbm.storage.cloneProfileAction\"] =\n function (actionEval, availableTargets, context) {\n if (!context) {\n return;\n }\n spbmCreateProfileActionService.cloneProfile(context);\n };\n }])\n .run(['spbmDspActionService', function (spbmDspActionService) {\n h5.actions[\"vsphere.core.pbm.storage.createDspAction\"] =\n function (actionEval, availableTargets, context) {\n spbmDspActionService.createProfile();\n };\n h5.actions[\"vsphere.core.pbm.storage.editDspAction\"] =\n function (actionEval, availableTargets, context) {\n if (context && context.length === 1) {\n spbmDspActionService.editProfile(context[0]);\n }\n };\n h5.actions[\"vsphere.core.pbm.storage.cloneDspAction\"] =\n function (actionEval, availableTargets, context) {\n if (context && context.length === 1) {\n spbmDspActionService.cloneProfile(context[0]);\n }\n };\n h5.actions[\"vsphere.core.pbm.storage.removeDspAction\"] =\n function (actionEval, availableTargets, context) {\n spbmDspActionService.removeProfiles(context);\n };\n }])\n .run(['spbmResetDefaultVsanProfileActionService',\n function (spbmResetDefaultVsanProfileActionService) {\n h5.actions[\"vsphere.core.pbm.storage.resetVsanDefaultProfileAction\"] =\n function (actionEval, availableTargets, context) {\n if (!context) {\n return;\n }\n spbmResetDefaultVsanProfileActionService.resetDefaultVsanProfile(context);\n };\n }]);\n})(spbm_ui || (spbm_ui = {}));\n\n\n\nvar spbm_ui;\n(function (spbm_ui) {\n var CapabilityProfilesCapacityPortletViewController = (function () {\n function CapabilityProfilesCapacityPortletViewController(navigation) {\n this.navigation = navigation;\n this.datastoreId = this.navigation.getRoute().objectId;\n }\n CapabilityProfilesCapacityPortletViewController.$inject = [\"navigation\"];\n return CapabilityProfilesCapacityPortletViewController;\n }());\n spbm_ui.CapabilityProfilesCapacityPortletViewController = CapabilityProfilesCapacityPortletViewController;\n angular.module(\"com.vmware.vsphere.client.spbm\").controller(\"CapabilityProfilesCapacityPortletViewController\", CapabilityProfilesCapacityPortletViewController);\n})(spbm_ui || (spbm_ui = {}));\n\n\n\nvar spbm_ui;\n(function (spbm_ui) {\n var DspViewController = (function () {\n function DspViewController(i18nService, $q) {\n this.i18nService = i18nService;\n this.$q = $q;\n this.detailsViewData = {\n tabsPromise: this.$q.when([\n {\n name: this.i18nService.getString(\"SpbmUi\", \"h5.profile.details.rules\"),\n templateUrl: \"spbm-ui/resources/spbm/views/profile/details/StorageProfileGeneralTab.html\",\n uid: \"profile.generalTab\"\n },\n {\n name: this.i18nService.getString(\"SpbmUi\", \"dataservice.tabs.usedInTitle\"),\n templateUrl: \"spbm-ui/resources/spbm/views/dsp/details/UsedInTab.html\",\n uid: \"profile.usedInTab\"\n }\n ])\n };\n }\n DspViewController.$inject = [\"i18nService\", \"$q\"];\n return DspViewController;\n }());\n angular.module(\"com.vmware.vsphere.client.spbm\")\n .controller(\"DspViewController\", DspViewController);\n})(spbm_ui || (spbm_ui = {}));\n\n\n\nvar spbm_ui;\n(function (spbm_ui) {\n var DspListViewController = (function () {\n function DspListViewController($scope, commonActionBarService, vuiConstants) {\n var _this = this;\n this.$scope = $scope;\n this.commonActionBarService = commonActionBarService;\n this.vuiConstants = vuiConstants;\n this.ACTION_BAR_ACTIONS = \"actions\";\n this.$scope.onSelectionChanged = function (newItems, oldItems) {\n if (newItems === oldItems) {\n return;\n }\n _this.selectedProfiles = newItems;\n $scope.masterDetailsViewContext.selectedItems = newItems;\n _this.updateActionBar();\n };\n this.actionBarOptions = {\n actions: []\n };\n this.updateActionBar();\n }\n DspListViewController.prototype.updateActionBar = function () {\n this.actionBarOptions.actions = [];\n this.commonActionBarService.updateActionBar(this.actionBarOptions, this.ACTION_BAR_ACTIONS, this.getProfilesIds(), this.getActions());\n };\n DspListViewController.prototype.getProfilesIds = function () {\n return _.pluck(this.selectedProfiles, \"id\");\n };\n DspListViewController.prototype.getActions = function () {\n var _this = this;\n var actionDefs = [];\n actionDefs.push({\n actionId: DspListViewController.CREATE_DSP_ACTION\n });\n actionDefs.push(this.vuiConstants.actions.SEPARATOR);\n actionDefs.push({\n actionId: DspListViewController.EDIT_DSP_ACTION,\n getActionInvocationContext: function () {\n return _this.getProfilesIds();\n },\n isActionVisible: function (actionDef) {\n return _this.selectedProfiles &&\n _this.selectedProfiles.length === 1 &&\n actionDef && actionDef.available;\n }\n });\n actionDefs.push({\n actionId: DspListViewController.CLONE_DSP_A