summaryrefslogtreecommitdiffstats
path: root/testapi/opnfv_testapi/ui/components/scenarios/scenario
diff options
context:
space:
mode:
Diffstat (limited to 'testapi/opnfv_testapi/ui/components/scenarios/scenario')
-rw-r--r--testapi/opnfv_testapi/ui/components/scenarios/scenario/scenario.html4
-rw-r--r--testapi/opnfv_testapi/ui/components/scenarios/scenario/scenarioController.js21
2 files changed, 14 insertions, 11 deletions
diff --git a/testapi/opnfv_testapi/ui/components/scenarios/scenario/scenario.html b/testapi/opnfv_testapi/ui/components/scenarios/scenario/scenario.html
index 2a73e9b..4f0a580 100644
--- a/testapi/opnfv_testapi/ui/components/scenarios/scenario/scenario.html
+++ b/testapi/opnfv_testapi/ui/components/scenarios/scenario/scenario.html
@@ -12,6 +12,10 @@
<td width="90%" class="podsTableLeftTd">{{ctrl.data.scenarios[0].name}}</td>
</tr>
<tr style="padding:9px">
+ <td class="podsTableTd">Creator&nbsp;:</td>
+ <td width="90%" class="podsTableLeftTd">{{ctrl.data.scenarios[0].creator}}</td>
+ </tr>
+ <tr style="padding:9px">
<td class="podsTableTd">Created&nbsp;at&nbsp;:</td>
<td width="90%" class="podsTableLeftTd">{{ctrl.data.scenarios[0].creation_date}}</td>
</tr>
diff --git a/testapi/opnfv_testapi/ui/components/scenarios/scenario/scenarioController.js b/testapi/opnfv_testapi/ui/components/scenarios/scenario/scenarioController.js
index 9935649..a0cd5eb 100644
--- a/testapi/opnfv_testapi/ui/components/scenarios/scenario/scenarioController.js
+++ b/testapi/opnfv_testapi/ui/components/scenarios/scenario/scenarioController.js
@@ -219,7 +219,7 @@
var data = {
"installers": installers
}
- confirmModal("Delete",ctrl.deleteInstaller,data);
+ confirmModal("Delete", 'installers', ctrl.deleteInstaller, data);
}
function addInstaller(installer){
@@ -273,7 +273,7 @@
"version": versions,
"installer": installer
}
- confirmModal("Delete",ctrl.deleteVersion,data);
+ confirmModal("Delete", "version", ctrl.deleteVersion, data);
}
function deleteVersion(data){
@@ -359,7 +359,7 @@
"version": version,
"installer": installer
}
- confirmModal("Delete",ctrl.deleteCustom,data);
+ confirmModal("Delete", 'customs', ctrl.deleteCustom, data);
}
function deleteCustom(data){
@@ -402,7 +402,7 @@
"version": version,
"installer": installer
}
- confirmModal("Delete",ctrl.deleteProject,data);
+ confirmModal("Delete", 'projects', ctrl.deleteProject, data);
}
function deleteProject(data){
@@ -434,16 +434,15 @@
ctrl.confirm = confirm;
ctrl.cancel = cancel;
ctrl.data = angular.copy(data);
- ctrl.open = open;
+ ctrl.customs = [];
- /**
- * Initiate confirmation and call the success handler with the
- * inputs.
- */
function confirm() {
- ctrl.customs = []
- ctrl.customs.push(ctrl.custom)
+ var custom = ctrl.custom;
+ if(custom!="" && custom!=undefined ){
+ ctrl.customs = custom.split(/[ ,]+/).filter(Boolean);
+ }
+ console.log(ctrl.customs)
ctrl.data.successHandler(ctrl.customs,ctrl.data.project,ctrl.data.version,ctrl.data.installer);
$uibModalInstance.dismiss('cancel');