namespace.html 8.4 KB
Newer Older
L
lepdou 已提交
1
<!doctype html>
L
lepdou 已提交
2
<html ng-app="namespace">
L
lepdou 已提交
3 4 5 6 7
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- 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">
L
lepdou 已提交
8
    <link rel="stylesheet" type="text/css" href="vendor/select2/select2.min.css">
L
lepdou 已提交
9 10 11 12 13 14 15
    <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>新建Namespace</title>
</head>

<body>

L
lepdou 已提交
16
<apollonav></apollonav>
L
lepdou 已提交
17

L
lepdou 已提交
18
<div class="container-fluid apollo-container" ng-controller="LinkNamespaceController">
L
lepdou 已提交
19 20 21 22 23

    <div class="row">
        <div class="col-md-8 col-md-offset-2">
            <div class="panel">
                <header class="panel-heading">
L
lepdou 已提交
24 25 26
                    <div class="row">
                        <div class="col-md-6">新建Namespace</div>
                        <div class="col-md-6 text-right">
L
update  
lepdou 已提交
27
                            <button type="button" class="btn btn-info" ng-click="back()">返回到项目首页
J
Jason Song 已提交
28
                            </button>
L
lepdou 已提交
29 30 31
                        </div>
                    </div>

L
lepdou 已提交
32 33 34
                </header>

                <div class="panel-body">
L
lepdou 已提交
35 36 37 38 39 40 41 42 43

                    <div class="row text-right" style="padding-right: 20px;">
                        <div class="btn-group btn-group-sm" role="group" aria-label="...">
                            <button type="button" class="btn btn-default" ng-class="{active:type=='link'}" ng-click="switchType('link')">关联已存在的Namespace</button>
                            <button type="button" class="btn btn-default" ng-class="{active:type=='create'}" ng-click="switchType('create')">创建新的Namespace</button>
                        </div>
                    </div>

                    <form class="form-horizontal" style="margin-top: 30px;" ng-show="step == 1" ng-submit="createNamespace()">
L
lepdou 已提交
44 45
                        <div class="form-group">
                            <label class="col-sm-3 control-label">应用ID</label>
L
lepdou 已提交
46 47
                            <div class="col-sm-6">
                                <label ng-bind="appId"></label>
L
lepdou 已提交
48 49
                            </div>
                        </div>
L
lepdou 已提交
50
                        <div class="form-horizontal" ng-show="type == 'link'">
L
lepdou 已提交
51
                            <div class="form-group">
L
lepdou 已提交
52 53 54
                                <label class="col-sm-3 control-label">
                                    <apollorequiredfiled></apollorequiredfiled>
                                    选择集群</label>
L
lepdou 已提交
55
                                <div class="col-sm-6">
56
                                    <apolloclusterselector apollo-app-id="appId" apollo-default-all-checked="true"
L
lepdou 已提交
57
                                                           apollo-select="collectSelectedClusters"></apolloclusterselector>
L
lepdou 已提交
58 59 60
                                </div>
                            </div>
                        </div>
L
lepdou 已提交
61
                        <div class="form-group" ng-show="type == 'create'">
L
lepdou 已提交
62 63 64
                            <label class="col-sm-3 control-label">
                                <apollorequiredfiled></apollorequiredfiled>
                                名称</label>
L
lepdou 已提交
65
                            <div class="col-sm-4">
L
lepdou 已提交
66
                                <div class="input-group" ng-show="appNamespace.isPublic">
J
Jason Song 已提交
67 68 69 70
                                    <span class="input-group-addon" ng-bind="appBaseInfo.namespacePrefix"></span>
                                    <input type="text" class="form-control" ng-model="appNamespace.name"
                                           ng-required="type == 'create'">
                                </div>
L
lepdou 已提交
71 72 73 74
                                <div ng-show="!appNamespace.isPublic">
                                    <input type="text" class="form-control" ng-model="appNamespace.name"
                                           ng-required="type == 'create'">
                                </div>
L
lepdou 已提交
75
                            </div>
L
lepdou 已提交
76 77 78 79 80 81 82
                            <div class="col-sm-2" ng-if="hasRootPermission">
                                <select class="form-control" ng-model="appNamespace.format">
                                    <option value="properties">properties</option>
                                    <option value="xml">xml</option>
                                </select>
                            </div>

L
lepdou 已提交
83
                            <span ng-show="appNamespace.isPublic" ng-bind="concatNamespace()" style="line-height: 34px;"></span>
L
lepdou 已提交
84
                        </div>
L
lepdou 已提交
85 86 87 88 89 90 91 92 93 94 95 96 97
                        <div class="form-group" ng-show="type == 'create' && hasRootPermission">
                            <label class="col-sm-3 control-label">
                                <apollorequiredfiled></apollorequiredfiled>
                                类型</label>
                            <div class="col-sm-4">
                                <label class="radio-inline">
                                    <input type="radio" name="namespaceType" value="true" ng-value="true" ng-model="appNamespace.isPublic"> public
                                </label>
                                <label class="radio-inline">
                                    <input type="radio" name="namespaceType" value="false" ng-value="false" ng-model="appNamespace.isPublic"> private
                                </label>
                            </div>
                        </div>
L
lepdou 已提交
98 99 100 101
                        <div class="form-group" ng-show="type == 'create'">
                            <label class="col-sm-3 control-label">备注</label>
                            <div class="col-sm-7">
                                <textarea class="form-control" rows="3" ng-model="appNamespace.comment"></textarea>
L
lepdou 已提交
102 103
                            </div>
                        </div>
L
lepdou 已提交
104
                        <div class="form-group" ng-show="type == 'link'">
L
lepdou 已提交
105 106 107
                            <label class="col-sm-3 control-label">
                                <apollorequiredfiled></apollorequiredfiled>
                                namespace</label>
L
lepdou 已提交
108
                            <div class="col-sm-4">
J
Jason Song 已提交
109 110 111
                                <select id="namespaces">
                                    <option></option>
                                </select>
L
lepdou 已提交
112 113 114 115
                            </div>
                        </div>

                        <div class="form-group">
L
lepdou 已提交
116
                            <div class="col-sm-offset-3 col-sm-10">
117
                                <button type="submit" class="btn btn-primary" ng-disabled="submitBtnDisabled">提交</button>
L
lepdou 已提交
118 119 120
                            </div>
                        </div>
                    </form>
L
lepdou 已提交
121 122 123 124 125

                    <div class="row text-center" ng-show="step == 2">
                        <img src="img/sync-succ.png" style="height: 100px; width: 100px">
                        <h3>创建成功!</h3>
                    </div>
L
lepdou 已提交
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
                </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 -->
L
lepdou 已提交
142
<script src="vendor/jquery.min.js" type="text/javascript"></script>
L
lepdou 已提交
143

L
lepdou 已提交
144 145
<script src="vendor/select2/select2.min.js" type="text/javascript"></script>

L
lepdou 已提交
146 147 148 149 150 151

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

<script type="application/javascript" src="scripts/app.js"></script>
<script type="application/javascript" src="scripts/services/AppService.js"></script>
L
lepdou 已提交
152
<script type="application/javascript" src="scripts/services/EnvService.js"></script>
L
lepdou 已提交
153
<script type="application/javascript" src="scripts/services/UserService.js"></script>
L
lepdou 已提交
154
<script type="application/javascript" src="scripts/services/NamespaceService.js"></script>
L
lepdou 已提交
155
<script type="application/javascript" src="scripts/services/PermissionService.js"></script>
L
lepdou 已提交
156 157
<script type="application/javascript" src="scripts/AppUtils.js"></script>

L
lepdou 已提交
158
<!--directive-->
L
lepdou 已提交
159
<script type="application/javascript" src="scripts/directive/directive.js"></script>
L
lepdou 已提交
160

L
lepdou 已提交
161
<script type="application/javascript" src="scripts/controller/NamespaceController.js"></script>
L
lepdou 已提交
162 163 164 165


</body>
</html>