cluster.html 6.95 KB
Newer Older
lepdou committed
1 2 3 4
<!doctype html>
<html ng-app="cluster">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
zhangle committed
5
    <link rel="icon" href="./img/config.png">
lepdou committed
6 7 8 9 10 11 12 13 14 15 16 17
    <!-- styles -->
    <link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="vendor/angular/angular-toastr-1.4.1.min.css">
    <link rel="stylesheet" type="text/css" href="vendor/select2/select2.min.css">
    <link rel="stylesheet" type="text/css" media='all' href="vendor/angular/loading-bar.min.css">
    <link rel="stylesheet" type="text/css" href="styles/common-style.css">
    <title>新建集群</title>
</head>

<body>

<apollonav></apollonav>
lepdou committed
18
<div class="container-fluid apollo-container hidden" ng-controller="ClusterController">
lepdou committed
19 20 21 22 23 24 25 26 27 28

    <div class="row">
        <div class="col-md-8 col-md-offset-2">
            <div class="panel">
                <header class="panel-heading">
                    <div class="row">
                        <div class="col-md-6">
                            <h4>创建集群</h4>
                        </div>
                        <div class="col-md-6 text-right">
lepdou committed
29
                            <a type="button" class="btn btn-info" href="/config.html?#/appid={{appId}}">返回到项目首页
lepdou committed
30 31 32 33 34 35 36
                            </a>
                        </div>
                    </div>

                </header>

                <div class="panel-body">
zhangle committed
37 38


lepdou committed
39
                    <div class="alert alert-info no-radius" role="alert">
zhangle committed
40 41 42
                        <strong>Tips:</strong>
                        <ul>
                            <li>通过添加集群,可以使同一份程序在不同的集群(如不同的数据中心)使用不同的配置</li>
43
                            <li>如果不同集群使用一样的配置,则没有必要创建集群</li>
zhangle committed
44 45 46 47 48 49 50
                            <li>
                                Apollo默认会读取机器上/opt/settings/server.properties(linux)或C:\opt\settings\server.properties(windows)文件中的idc属性作为集群名字,
                                如SHAJQ(金桥数据中心)、SHAOY(欧阳数据中心)
                            </li>
                            <li>在这里创建的集群名字需要和机器上server.properties中的idc属性一致</li>
                        </ul>
                    </div>
lepdou committed
51 52
                    <form class="form-horizontal" name="clusterForm" valdr-type="Cluster" ng-show="step == 1"
                          ng-submit="create()">
lepdou committed
53 54
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
lepdou committed
55
                                <apollorequiredfield></apollorequiredfield>
lepdou committed
56
                                应用AppId</label>
lepdou committed
57 58
                            <div class="col-sm-6">
                                <label class="form-control-static" ng-bind="appId"></label>
lepdou committed
59 60
                            </div>
                        </div>
lepdou committed
61
                        <div class="form-group" valdr-form-group>
lepdou committed
62
                            <label class="col-sm-2 control-label">
lepdou committed
63
                                <apollorequiredfield></apollorequiredfield>
lepdou committed
64 65
                                集群名称</label>
                            <div class="col-sm-6">
lepdou committed
66
                                <input type="text" class="form-control" name="clusterName" ng-model="clusterName">
lepdou committed
67 68 69 70 71
                                <small>(部署集群如:SHAJQ,SHAOY 或自定义集群如:SHAJQ-xx,SHAJQ-yy)</small>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
lepdou committed
72
                                <apollorequiredfield></apollorequiredfield>
lepdou committed
73 74 75 76
                                选择环境</label>
                            <div class="col-sm-5">
                                <table class="table table-hover" style="width: 100px">
                                    <tbody>
lepdou committed
77 78
                                    <tr style="cursor: pointer" ng-repeat="env in envs"
                                        ng-click="toggleEnvCheckedStatus(env)">
lepdou committed
79 80
                                        <td width="10%"><input type="checkbox" ng-checked="env.checked"
                                                               ng-click="switchChecked(env, $event)"></td>
lepdou committed
81 82 83 84 85 86 87 88 89 90
                                        <td width="30%" ng-bind="env.name"></td>
                                    </tr>
                                    </tbody>
                                </table>

                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">

lepdou committed
91 92 93
                                <button type="submit" class="btn btn-primary"
                                        ng-disabled="clusterForm.$invalid || submitBtnDisabled">提交
                                </button>
lepdou committed
94 95 96
                            </div>
                        </div>
                    </form>
lepdou committed
97 98 99 100
                    <div class="row text-center" ng-show="step == 2">
                        <img src="img/sync-succ.png" style="height: 100px; width: 100px">
                        <h3>创建成功!</h3>
                    </div>
lepdou committed
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
                </div>
            </div>
        </div>
    </div>
</div>

<div ng-include="'views/common/footer.html'"></div>

<!--angular-->
<script src="vendor/angular/angular.min.js"></script>
<script src="vendor/angular/angular-resource.min.js"></script>
<script src="vendor/angular/angular-toastr-1.4.1.tpls.min.js"></script>
<script src="vendor/angular/loading-bar.min.js"></script>

<!-- jquery.js -->
<script src="vendor/jquery.min.js" type="text/javascript"></script>
<script src="vendor/select2/select2.min.js" type="text/javascript"></script>

<!-- bootstrap.js -->
<script src="vendor/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>

lepdou committed
122 123 124 125
<!--valdr-->
<script src="vendor/valdr/valdr.min.js" type="text/javascript"></script>
<script src="vendor/valdr/valdr-message.min.js" type="text/javascript"></script>

lepdou committed
126 127 128 129
<script type="application/javascript" src="scripts/app.js"></script>
<script type="application/javascript" src="scripts/services/AppService.js"></script>
<script type="application/javascript" src="scripts/services/EnvService.js"></script>
<script type="application/javascript" src="scripts/services/UserService.js"></script>
130
<script type="application/javascript" src="scripts/services/CommonService.js"></script>
lepdou committed
131 132
<script type="application/javascript" src="scripts/services/ClusterService.js"></script>
<script type="application/javascript" src="scripts/AppUtils.js"></script>
lepdou committed
133
<script type="application/javascript" src="scripts/directive/directive.js"></script>
134
<script type="application/javascript" src="scripts/services/PermissionService.js"></script>
lepdou committed
135 136

<script type="application/javascript" src="scripts/controller/ClusterController.js"></script>
lepdou committed
137 138

<script src="scripts/valdr.js" type="text/javascript"></script>
lepdou committed
139 140
</body>
</html>