diff options
author | SerenaFeng <feng.xiaowei@zte.com.cn> | 2018-01-05 14:39:12 +0800 |
---|---|---|
committer | thuva4 <tharma.thuva@gmail.com> | 2018-01-09 19:56:56 +0530 |
commit | 349609818abcf10cc94088b043f71b5c8bc504a1 (patch) | |
tree | 3a59930127379f50121c066041121a3cc96a7ff2 /testapi/opnfv_testapi/ui/components/scenarios/modals | |
parent | 8dbe224064851d439b18ad4254e119aff7f02e30 (diff) |
Design the scenario create method
design scenario create method in modal way.
design scenario page.
Add,delete for installers,versions, projects, customs, trust
indicators and scores are implemented.
tests are not included. validations are not added.
Change-Id: I999229c00869fcd5a4efa97cb2679a08fc24b271
Signed-off-by: thuva4 <tharma.thuva@gmail.com>
Diffstat (limited to 'testapi/opnfv_testapi/ui/components/scenarios/modals')
8 files changed, 463 insertions, 0 deletions
diff --git a/testapi/opnfv_testapi/ui/components/scenarios/modals/customModal.html b/testapi/opnfv_testapi/ui/components/scenarios/modals/customModal.html new file mode 100644 index 0000000..987cb1e --- /dev/null +++ b/testapi/opnfv_testapi/ui/components/scenarios/modals/customModal.html @@ -0,0 +1,28 @@ +<div class="ball" style="padding:5px;"> + <div class="modal-body"> + <div class="form-horizontal"> + <fieldset> + <div class="form-group"> + <legend>{{customModalCtrl.data.text}}</legend> + <div class="row"> + <div class="update-project"> + <label for="cpid" class="control-label col-sm-4">Custom: </label> + <div class="col-sm-6"> + <input type="text" class="form-control" ng-model="customModalCtrl.custom"/> + <p class="help-block"></p> + </div> + </div> + </div> + </div> + </fieldset> + </div> + </div> + <div class="modal-footer"> + <div ng-show="customModalCtrl.showCreateError" style="padding:0px;" class="col-md-6 alert alert-danger" role="alert"> + <span class="pull-right"> {{customModalCtrl.error}}</span> + <span class="glyphicon glyphicon-exclamation-sign pull-right" aria-hidden="true" >Error:</span> + </div> + <button class="btn btn-primary" ng-click="customModalCtrl.confirm()">Ok</button> + <button class="btn btn-default" ng-click="customModalCtrl.cancel()">Cancel</button> + </div> + </div>
\ No newline at end of file diff --git a/testapi/opnfv_testapi/ui/components/scenarios/modals/installerModal.html b/testapi/opnfv_testapi/ui/components/scenarios/modals/installerModal.html new file mode 100644 index 0000000..4be1375 --- /dev/null +++ b/testapi/opnfv_testapi/ui/components/scenarios/modals/installerModal.html @@ -0,0 +1,59 @@ +<div class="ball" style="padding:5px;"> + <div class="modal-body"> + <div class="form-horizontal"> + <fieldset> + <div class="form-group"> + <legend>{{installerModalCtrl.data.text}}</legend> + <div class="row"> + <div class="update-project"> + <div class="col-sm-4"> + <label for="cpid" class="control-label col-sm-2"> Name: </label> + </div> + <div class="col-sm-6"> + <input type="text" class="form-control" ng-model="installerModalCtrl.installer.installer"/> + <p class="help-block"></p> + </div> + </div> + <div class="update-project"> + <div class="col-sm-4"> + <label for="cpid" class="control-label col-sm-2"> Version: </label> + </div> + <div class="col-sm-6"> + <button class="btn btn-primary" ng-click="installerModalCtrl.openVersionModal()">Add Version</button> + <p class="help-block"></p> + </div> + </div> + </div> + </div> + </fieldset> + </div> + <div class='clo-md-12' style="padding-right:0px"> + <h3>Version</h3> + <div class="table-responsive"> + <table class="table table-bordered table-hover" ng-data="installerModalCtrl.installer.versions"> + <thead> + <tr style=" + text-align: center;"> + <th style="width: 19%;">Version</th> + </tr> + </thead> + <tbody> + <tr ng-repeat-start="(index, version) in installerModalCtrl.installer.versions" style="padding:9px"> + <td>{{version.version}}</td> + </tr> + <tr ng-repeat-end=> + </tr> + </tbody> + </table> + </div> + </div> + </div> + <div class="modal-footer"> + <div ng-show="installerModalCtrl.showCreateError" style="padding:0px;" class="col-md-6 alert alert-danger" role="alert"> + <span class="pull-right"> {{installerModalCtrl.error}}</span> + <span class="glyphicon glyphicon-exclamation-sign pull-right" aria-hidden="true" >Error:</span> + </div> + <button class="btn btn-primary" ng-click="installerModalCtrl.confirm()">Ok</button> + <button class="btn btn-default" ng-click="installerModalCtrl.cancel()">Cancel</button> + </div> + </div>
\ No newline at end of file diff --git a/testapi/opnfv_testapi/ui/components/scenarios/modals/projectModal.html b/testapi/opnfv_testapi/ui/components/scenarios/modals/projectModal.html new file mode 100644 index 0000000..5885a61 --- /dev/null +++ b/testapi/opnfv_testapi/ui/components/scenarios/modals/projectModal.html @@ -0,0 +1,121 @@ +<div class="ball" style="padding:5px;"> + <div class="modal-body"> + <div class="form-horizontal"> + <fieldset> + <div class="form-group"> + <legend>{{projectModalCtrl.data.text}}</legend> + <div class="row"> + <div class="update-project"> + <div class="col-sm-4"> + <label for="cpid" class="control-label"> Project Name: </label> + </div> + <div class="col-sm-6"> + <input type="text" class="form-control" ng-model="projectModalCtrl.project.project"/> + <p class="help-block"></p> + </div> + </div> + <div class="update-project"> + <div class="col-sm-4"> + <label for="cpid" class="control-label"> Trust Indicator: </label> + </div> + <div class="col-sm-6"> + <button class="btn btn-primary" ng-click="projectModalCtrl.openTrustIndicatorModal()">Add Trust Indicator</button> + <p class="help-block"></p> + </div> + </div> + <div class="update-project"> + <div class="col-sm-4"> + <label for="cpid" class="control-label"> Score: </label> + </div> + <div class="col-sm-6"> + <button class="btn btn-primary" ng-click="projectModalCtrl.openScoreModal()">Add Score</button> + <p class="help-block"></p> + </div> + </div> + <div class="update-project"> + <div class="col-sm-4"> + <label for="cpid" class="control-label"> Custom: </label> + </div> + <div class="col-sm-6"> + <button class="btn btn-primary" ng-click="projectModalCtrl.openCustomModal()">Add Custom</button> + <p class="help-block"></p> + </div> + </div> + </div> + </div> + </fieldset> + </div> + <div class='clo-md-12' style="padding-right:0px"> + <h3>Scores</h3> + <div class="table-responsive"> + <table class="table table-bordered table-hover" ng-data="projectModalCtrl.project.scores"> + <thead> + <tr style=" + text-align: center;"> + <th style="width: 1%;">Score</th> + <th style="width: 19%;">Date</th> + </tr> + </thead> + <tbody> + <tr ng-repeat-start="(index, score) in projectModalCtrl.project.scores" style="padding:9px"> + <td>{{score.score}}</td> + <td>{{score.date}}</td> + </tr> + <tr ng-repeat-end=> + </tr> + </tbody> + </table> + </div> + </div> + <div class='clo-md-12' style="padding-right:0px"> + <h3>Trust Indicator</h3> + <div class="table-responsive"> + <table class="table table-bordered table-hover" ng-data="projectModalCtrl.project.trust_indicators"> + <thead> + <tr style=" + text-align: center;"> + <th style="width: 1%;">Status</th> + <th style="width: 19%;">Date</th> + </tr> + </thead> + <tbody> + <tr ng-repeat-start="(index, trustIndicator) in projectModalCtrl.project.trust_indicators" style="padding:9px"> + <td>{{trustIndicator.status}}</td> + <td>{{trustIndicator.date}}</td> + </tr> + <tr ng-repeat-end=> + </tr> + </tbody> + </table> + </div> + </div> + <div class='clo-md-12' style="padding-right:0px"> + <h3>Customs</h3> + <div class="table-responsive"> + <table class="table table-bordered table-hover" ng-data="projectModalCtrl.project.customs"> + <thead> + <tr style=" + text-align: center;"> + <th style="width: 1%;">Custom</th> + </tr> + </thead> + <tbody> + <tr ng-repeat-start="(index, custom) in projectModalCtrl.project.customs" style="padding:9px"> + <td>{{custom}}</td> + </tr> + <tr ng-repeat-end=> + </tr> + </tbody> + </table> + </div> + </div> + </div> + <div class="modal-footer"> + <div ng-show="projectModalCtrl.showCreateError" style="padding:0px;" class="col-md-6 alert alert-danger" role="alert"> + <span class="pull-right"> {{projectModalCtrl.error}}</span> + <span class="glyphicon glyphicon-exclamation-sign pull-right" aria-hidden="true" >Error:</span> + </div> + <button class="btn btn-primary" ng-click="projectModalCtrl.confirm()">Ok</button> + <button class="btn btn-default" ng-click="projectModalCtrl.cancel()">Cancel</button> + </div> + </div>
\ No newline at end of file diff --git a/testapi/opnfv_testapi/ui/components/scenarios/modals/scenarioModal.html b/testapi/opnfv_testapi/ui/components/scenarios/modals/scenarioModal.html new file mode 100644 index 0000000..2b5ba9e --- /dev/null +++ b/testapi/opnfv_testapi/ui/components/scenarios/modals/scenarioModal.html @@ -0,0 +1,59 @@ +<div class="ball" style="padding:5px;"> + <div class="modal-body"> + <div class="form-horizontal"> + <fieldset> + <div class="form-group"> + <legend>{{scenarioModalController.data.text}}</legend> + <div class="row"> + <div class="update-project"> + <div class="col-sm-4"> + <label for="cpid" class="control-label col-sm-2"> Name: </label> + </div> + <div class="col-sm-6"> + <input type="text" class="form-control" ng-model="scenarioModalController.scenario.name"/> + <p class="help-block"></p> + </div> + </div> + <div class="update-project"> + <div class="col-sm-4"> + <label for="cpid" class="control-label col-sm-2"> Installer: </label> + </div> + <div class="col-sm-6"> + <button class="btn btn-primary" ng-click="scenarioModalController.openInstallerModal()">Add Installer</button> + <p class="help-block"></p> + </div> + </div> + </div> + </div> + </fieldset> + </div> + <div class='clo-md-12' style="padding-right:0px"> + <h3>Installers</h3> + <div class="table-responsive"> + <table class="table table-bordered table-hover" ng-data="scenarioModalController.scenario"> + <thead> + <tr style=" + text-align: center;"> + <th style="width: 19%;">Installers</th> + </tr> + </thead> + <tbody> + <tr ng-repeat-start="(index, installer) in scenarioModalController.scenario.installers" style="padding:9px"> + <td>{{installer.installer}}</td> + </tr> + <tr ng-repeat-end=> + </tr> + </tbody> + </table> + </div> + </div> + </div> + <div class="modal-footer"> + <div ng-show="scenarioModalController.showCreateError" style="padding:0px;" class="col-md-6 alert alert-danger" role="alert"> + <span class="pull-right"> {{scenarioModalController.error}}</span> + <span class="glyphicon glyphicon-exclamation-sign pull-right" aria-hidden="true" >Error:</span> + </div> + <button class="btn btn-primary" ng-click="scenarioModalController.confirm()">Ok</button> + <button class="btn btn-default" ng-click="scenarioModalController.cancel()">Cancel</button> + </div> +</div>
\ No newline at end of file diff --git a/testapi/opnfv_testapi/ui/components/scenarios/modals/scenarioNameUpdate.html b/testapi/opnfv_testapi/ui/components/scenarios/modals/scenarioNameUpdate.html new file mode 100644 index 0000000..e793c05 --- /dev/null +++ b/testapi/opnfv_testapi/ui/components/scenarios/modals/scenarioNameUpdate.html @@ -0,0 +1,28 @@ +<div class="ball" style="padding:5px;"> + <div class="modal-body"> + <div class="form-horizontal"> + <fieldset> + <div class="form-group"> + <legend>{{ScenarioNameUpdateCtrl.data.text}}</legend> + <div class="row"> + <div class="update-project"> + <label for="cpid" class="control-label col-sm-4">Name: </label> + <div class="col-sm-6"> + <input type="text" class="form-control" ng-model="ScenarioNameUpdateCtrl.name"/> + <p class="help-block"></p> + </div> + </div> + </div> + </div> + </fieldset> + </div> + </div> + <div class="modal-footer"> + <div ng-show="ScenarioNameUpdateCtrl.showCreateError" style="padding:0px;" class="col-md-6 alert alert-danger" role="alert"> + <span class="pull-right"> {{ScenarioNameUpdateCtrl.error}}</span> + <span class="glyphicon glyphicon-exclamation-sign pull-right" aria-hidden="true" >Error:</span> + </div> + <button class="btn btn-primary" ng-click="ScenarioNameUpdateCtrl.confirm()">Ok</button> + <button class="btn btn-default" ng-click="ScenarioNameUpdateCtrl.cancel()">Cancel</button> + </div> + </div>
\ No newline at end of file diff --git a/testapi/opnfv_testapi/ui/components/scenarios/modals/scoreModal.html b/testapi/opnfv_testapi/ui/components/scenarios/modals/scoreModal.html new file mode 100644 index 0000000..55b5cfd --- /dev/null +++ b/testapi/opnfv_testapi/ui/components/scenarios/modals/scoreModal.html @@ -0,0 +1,51 @@ + + + <div class="ball" style="padding:5px;"> + <div class="modal-body"> + <div class="form-horizontal"> + <fieldset> + <div class="form-group"> + <legend>{{scoreModalCtrl.data.text}}</legend> + <div class="row"> + <div class="update-project"> + <label for="cpid" class="control-label col-sm-4">Score: </label> + <div class="col-sm-6"> + <input type="text" class="form-control" ng-model="scoreModalCtrl.score.score"/> + <p class="help-block"></p> + </div> + </div> + <div class="update-project"> + <div> + <div class="col-md-4" style="text-align:right;"> + <span style="margin-top:6px;">Date: </span> + </div> + <div class="col-md-6"> + <p class="input-group" style="display:inline-flex;"> + <input type="text" class="form-control" + uib-datepicker-popup="{{scoreModalCtrl.format}}" + ng-model="scoreModalCtrl.score.date" is-open="scoreModalCtrl.endOpen" + close-text="Close" /> + <span class="input-group-btn"> + <button type="button" class="btn btn-default" ng-click="scoreModalCtrl.open($event, 'endOpen')"> + <i class="glyphicon glyphicon-calendar"></i> + </button> + </span> + </p> + </div> + </div> + </div> + </div> + </div> + </div> + </fieldset> + </div> + </div> + <div class="modal-footer"> + <div ng-show="scoreModalCtrl.showCreateError" style="padding:0px;" class="col-md-6 alert alert-danger" role="alert"> + <span class="pull-right"> {{scoreModalCtrl.error}}</span> + <span class="glyphicon glyphicon-exclamation-sign pull-right" aria-hidden="true" >Error:</span> + </div> + <button class="btn btn-primary" ng-click="scoreModalCtrl.confirm()">Ok</button> + <button class="btn btn-default" ng-click="scoreModalCtrl.cancel()">Cancel</button> + </div> + </div>
\ No newline at end of file diff --git a/testapi/opnfv_testapi/ui/components/scenarios/modals/trustIndicatorModal.html b/testapi/opnfv_testapi/ui/components/scenarios/modals/trustIndicatorModal.html new file mode 100644 index 0000000..b84bd5d --- /dev/null +++ b/testapi/opnfv_testapi/ui/components/scenarios/modals/trustIndicatorModal.html @@ -0,0 +1,49 @@ +<div class="ball" style="padding:5px;"> + <div class="modal-body"> + <div class="form-horizontal"> + <fieldset> + <div class="form-group"> + <legend>{{trustIndicatorModalCtrl.data.text}}</legend> + <div class="row"> + <div class="update-project"> + <label for="cpid" class="control-label col-sm-4">Status: </label> + <div class="col-sm-6"> + <input type="text" class="form-control" ng-model="trustIndicatorModalCtrl.ti.status"/> + <p class="help-block"></p> + </div> + </div> + <div class="update-project"> + <div> + <div class="col-md-4" style="text-align:right;"> + <span style="margin-top:6px;">Date: </span> + </div> + <div class="col-md-6"> + <p class="input-group" style="display:inline-flex;"> + <input type="text" class="form-control" + uib-datepicker-popup="{{trustIndicatorModalCtrl.format}}" + ng-model="trustIndicatorModalCtrl.ti.date" is-open="trustIndicatorModalCtrl.endOpen" + close-text="Close" /> + <span class="input-group-btn"> + <button type="button" class="btn btn-default" ng-click="trustIndicatorModalCtrl.open($event, 'endOpen')"> + <i class="glyphicon glyphicon-calendar"></i> + </button> + </span> + </p> + </div> + </div> + </div> + </div> + </div> + </div> + </fieldset> + </div> + </div> + <div class="modal-footer"> + <div ng-show="trustIndicatorModalCtrl.showCreateError" style="padding:0px;" class="col-md-6 alert alert-danger" role="alert"> + <span class="pull-right"> {{trustIndicatorModalCtrl.error}}</span> + <span class="glyphicon glyphicon-exclamation-sign pull-right" aria-hidden="true" >Error:</span> + </div> + <button class="btn btn-primary" ng-click="trustIndicatorModalCtrl.confirm()">Ok</button> + <button class="btn btn-default" ng-click="trustIndicatorModalCtrl.cancel()">Cancel</button> + </div> + </div>
\ No newline at end of file diff --git a/testapi/opnfv_testapi/ui/components/scenarios/modals/versionModal.html b/testapi/opnfv_testapi/ui/components/scenarios/modals/versionModal.html new file mode 100644 index 0000000..f679f0b --- /dev/null +++ b/testapi/opnfv_testapi/ui/components/scenarios/modals/versionModal.html @@ -0,0 +1,68 @@ +<div class="ball" style="padding:5px;"> + <div class="modal-body"> + <div class="form-horizontal"> + <fieldset> + <div class="form-group"> + <legend>{{versionModalCtrl.data.text}}</legend> + <div class="row"> + <div class="update-project"> + <div class="col-sm-4"> + <label for="cpid" class="control-label col-sm-2"> Version: </label> + </div> + <div class="col-sm-6"> + <input type="text" class="form-control" ng-model="versionModalCtrl.version.version"/> + <p class="help-block"></p> + </div> + </div> + <div class="update-project"> + <div class="col-sm-4"> + <label for="cpid" class="control-label col-sm-2"> Owner: </label> + </div> + <div class="col-sm-6"> + <input type="text" class="form-control" ng-model="versionModalCtrl.version.owner"/> + <p class="help-block"></p> + </div> + </div> + <div class="update-project"> + <div class="col-sm-4"> + <label for="cpid" class="control-label col-sm-2"> Project: </label> + </div> + <div class="col-sm-4"> + <button class="btn btn-primary" ng-click="versionModalCtrl.openProjectModal()">Add Project:</button> + <p class="help-block"></p> + </div> + </div> + </div> + </div> + </fieldset> + </div> + <div class='clo-md-12' style="padding-right:0px"> + <h3>Projects</h3> + <div class="table-responsive"> + <table class="table table-bordered table-hover" ng-data="versionModalCtrl.version.projects"> + <thead> + <tr style=" + text-align: center;"> + <th style="width: 19%;">Project</th> + </tr> + </thead> + <tbody> + <tr ng-repeat-start="(index, project) in versionModalCtrl.version.projects" style="padding:9px"> + <td>{{project.project}}</td> + </tr> + <tr ng-repeat-end=> + </tr> + </tbody> + </table> + </div> + </div> + </div> + <div class="modal-footer"> + <div ng-show="versionModalCtrl.showCreateError" style="padding:0px;" class="col-md-6 alert alert-danger" role="alert"> + <span class="pull-right"> {{versionModalCtrl.error}}</span> + <span class="glyphicon glyphicon-exclamation-sign pull-right" aria-hidden="true" >Error:</span> + </div> + <button class="btn btn-primary" ng-click="versionModalCtrl.confirm()">Ok</button> + <button class="btn btn-default" ng-click="versionModalCtrl.cancel()">Cancel</button> + </div> + </div>
\ No newline at end of file |