aboutsummaryrefslogtreecommitdiffstats
path: root/gui/app/views/container.html
blob: ea5902996685d5003aaeadc9e248687af523f2f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<!--container management-->

<div class="content">
    <div style="display:flex;flex-direction:row;">
        <div style="width:750px;">

            <h3>{{envName}} -- Container
                <button class="btn btn-default" ng-click="goNext()" style="float:right">Next</button>

            </h3>
            <!--<p>In this process, you can input your define openrc config or upload a openrc file</p>-->

            <hr/>

            <select ng-model="selectContainer" data-ng-options="container as container.name for container in containerList">
                <option value="">Choose...</option>
            </select>

            <button class="btn btn-default" ng-click="createContainer()" ng-disabled="selectContainer==null">
                                    <div ng-show="!showloading">Create</div>
                                    <img src="images/loading2.gif" width="25" height="25" ng-if="showloading" />
            </button>

            <hr/>

            <div>
                <h4 ng-show="displayContainerInfo.length==0">No Container Data</h4>
                <div ng-show="displayContainerInfo.length!=0">
                    <h4>Current Container</h4>
                    <table class="table table-striped">

                        <tr>
                            <th>name</th>
                            <th>status</th>
                            <th>time</th>
                            <th>delete</th>

                        </tr>
                        <tr ng-repeat="con in displayContainerInfo">
                            <td>{{con.name}}</td>
                            <td>{{con.status}}</td>
                            <td>{{con.time}}</td>
                            <td>
                                <button class="btn btn-default btn-sm" ng-click="openDeleteEnv(con.id,'container')">Delete</button>
                            </td>


                        </tr>



                    </table>
                </div>
            </div>










        </div>


    </div>

</div>
<toaster-container></toaster-container>

<style>
    .form-control {
        border-radius: 5px;
        width: 200px;
        margin-bottom: 10px;
    }

    .uploadbutton {
        background-color: #007ACC;
        color: #fff;
        border: 0px;
        border-radius: 5px;
        height: 27px;
    }

    .edit-title {
        border: 0px;
        background-color: #ffffff;
        margin-bottom: 5px;
        font-size: 12px;
    }

    .null-edit-title {
        border: 1px solid #e5e6e7;
        border-radius: 5px;
        margin-bottom: 3px;
    }

    .item-info {
        display: flex;
        flex-direction: row;
    }

    .delete-img {
        width: 15px;
        height: 15px;
        opacity: 0.8;
        margin-left: -10px;
        margin-top: -3px;
        cursor: pointer;
    }

    .nextButton {
        margin-top: 30px;
        border: none;
        border-radius: 5px;
        padding: 6px;
        background-color: #339933;
        color: #ffffff;
        text-align: center;
        /* margin-left: 300px; */
    }

    select {
        height: 30px;
        border-radius: 5px;
        border: 1px solid #e8e8e8;
        width: 135px;
        margin-top: 20px;
        margin-left: 20px;
    }
</style>
CK_BRANCH})\", \"scenario\":\"${DEPLOY_SCENARIO}\", \"description\": \"yardstick ci scenario status\", \"criteria\":\"${1}\", \"start_date\":\"${2}\", \"stop_date\":\"${3}\", \"details\":\"\"}" \ "${REPORTING_TARGET}" } run_test() { echo echo "========== Running yardstick test suites ==========" mkdir -p /etc/yardstick cat << EOF > /etc/yardstick/yardstick.conf [DEFAULT] debug = False dispatcher = ${DISPATCHER_TYPE} [dispatcher_file] file_name = ${DISPATCHER_FILE_NAME} [dispatcher_http] timeout = 5 target = ${DISPATCHER_HTTP_TARGET} [dispatcher_influxdb] timeout = 5 target = ${DISPATCHER_INFLUXDB_TARGET} db_name = yardstick username = opnfv password = 0pnfv2015 EOF local failed=0 local start_date local stop_date if [ ${#SUITE_FILES[@]} -gt 0 ]; then start_date=$(date '+%Y-%m-%d %H:%M:%S') for suite in ${SUITE_FILES[*]}; do echo "---------------------------" echo "Running test suite: $suite" echo "---------------------------" if ! yardstick task start --suite $suite; then echo "test suite $suite FAILED"; # Mark the test suite failed but continue # running the remaining test suites. (( ++failed )) fi if [ ${DISPATCHER_TYPE} = file ]; then echo "---------------------------" echo "Dump test suite $suite result" echo "---------------------------" if [ -f ${DISPATCHER_FILE_NAME} ]; then cat ${DISPATCHER_FILE_NAME} else echo "Test result file ${DISPATCHER_FILE_NAME} is not exist" fi fi done stop_date=$(date '+%Y-%m-%d %H:%M:%S') local scenario_status="SUCCESS" if [ $failed -gt 0 ]; then scenario_status="FAILED" fi report "${scenario_status}" "${start_date}" "${stop_date}" if [ $failed -gt 0 ]; then echo "---------------------------" echo "$failed out of ${SUITE_FILES[*]} test suites FAILED" echo "---------------------------" exit 1 fi else echo "---------------------------" echo "Running samples/ping.yaml " echo "---------------------------" if ! yardstick task start samples/ping.yaml; then echo "Yardstick test FAILED" exit 1 fi if [ ${DISPATCHER_TYPE} = file ]; then echo "---------------------------" echo "Dump samples/ping.yaml test result" echo "---------------------------" if [ -f ${DISPATCHER_FILE_NAME} ]; then cat ${DISPATCHER_FILE_NAME} else echo "Test result file ${DISPATCHER_FILE_NAME} is not exist" fi fi fi } check_openstack(){ # check if some necessary variables is set if [ -z "$OS_AUTH_URL" ]; then echo "OS_AUTH_URL is unset or empty" exit 1 fi echo "OS_AUTH_URL is $OS_AUTH_URL" echo # check OpenStack services if [[ $OS_INSECURE ]] && [[ "$(echo $OS_INSECURE | tr '[:upper:]' '[:lower:]')" = "true" ]]; then SECURE="--insecure" else SECURE="" fi echo "Checking OpenStack services:" for cmd in "openstack ${SECURE} image list" "openstack ${SECURE} server list" "openstack ${SECURE} stack list"; do echo " checking ${cmd} ..." if ! $cmd >/dev/null; then echo "error: command \"$cmd\" failed" exit 1 fi done echo echo "Checking for External network:" for net in $(openstack network list --external -c Name -f value); do echo " external network: $net" done } main() { GITROOT=$(cd $(dirname $0) && git rev-parse --show-toplevel) cd $GITROOT export YARDSTICK_VERSION=$(git rev-parse HEAD) SUITE_FILES=() # find the test suite files for suite in $TEST_SUITES; do if [ -f $suite ]; then SUITE_FILES+=($suite) else tsdir=$GITROOT/tests/opnfv/test_suites if [ ! -f $tsdir/$suite ]; then echo "Test suite \"$suite\" does not exist" exit 1 fi SUITE_FILES+=($tsdir/$suite) fi done echo echo "========== Running Yardstick CI with following parameters ==========" echo "Script options: ${SCRIPT} $SCRIPT_ARGS" echo "Dispatcher: ${DISPATCHER_TYPE} ${DISPATCHER_FILE_NAME}" echo "YARDSTICK_VERSION: ${YARDSTICK_VERSION}" echo "Number of test suites: ${#SUITE_FILES[@]}" for suite in ${SUITE_FILES[*]}; do echo " $suite" done echo trap "error_exit" EXIT SIGTERM if [[ "${DEPLOY_SCENARIO:0:2}" == "os" ]];then check_openstack source $YARDSTICK_REPO_DIR/tests/ci/clean_images.sh source $YARDSTICK_REPO_DIR/tests/ci/load_images.sh fi install_storperf run_test remove_storperf } main