Commit 1aa251f1 by lepdou

{{}} 改成ng-bind

parent 10c707d6
...@@ -39,26 +39,25 @@ ...@@ -39,26 +39,25 @@
<tbody> <tbody>
<tr> <tr>
<th>应用ID:</th> <th>应用ID:</th>
<td>{{appBaseInfo.appId}}</td> <td ng-bind="appBaseInfo.appId"></td>
</tr> </tr>
<tr> <tr>
<th>应用名:</th> <th>应用名:</th>
<td>{{appBaseInfo.name}}</td> <td ng-bind="appBaseInfo.name"></td>
</tr> </tr>
<tr> <tr>
<th>Owner:</th> <th>Owner:</th>
<td>{{appBaseInfo.ownerName}}</td> <td ng-bind="appBaseInfo.ownerName"></td>
</tr> </tr>
<tr> <tr>
<th>Owner Email:</th> <th>Owner Email:</th>
<td>{{appBaseInfo.ownerEmail}}</td> <td ng-bind="appBaseInfo.ownerEmail"></td>
</tr> </tr>
<tr ng-show="missEnvs.length > 0"> <tr ng-show="missEnvs.length > 0">
<th>缺失的环境:</th> <th>缺失的环境:</th>
<td> <td>
<font ng-repeat="env in missEnvs"> <span ng-repeat="env in missEnvs" ng-bind="env">
{{env}} </span>
</font>
</td> </td>
</tr> </tr>
</tbody> </tbody>
...@@ -109,7 +108,7 @@ ...@@ -109,7 +108,7 @@
<div class="checkbox" ng-repeat="env in missEnvs"> <div class="checkbox" ng-repeat="env in missEnvs">
<label> <label>
<input type="checkbox" name="selectedEnvs[]" value="{{env}}" <input type="checkbox" name="selectedEnvs[]" value="{{env}}"
ng-checked="selectedEnvs.indexOf(env) > -1" ng-click="toggleSelection(env)">{{env}} ng-checked="selectedEnvs.indexOf(env) > -1" ng-click="toggleSelection(env)"><span ng-bind="env"><span/>
</label> </label>
</div> </div>
</div> </div>
...@@ -126,15 +125,15 @@ ...@@ -126,15 +125,15 @@
</div> </div>
<!--namespaces--> <!--namespaces-->
<div class="col-md-9 config-item-container" ng-controller="ConfigNamespaceController"> <div class="col-md-9 config-item-container hide" ng-controller="ConfigNamespaceController">
<div ng-repeat="namespace in namespaces"> <div ng-repeat="namespace in namespaces">
<div class="panel"> <div class="panel">
<header class="panel-heading"> <header class="panel-heading">
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">
<b>{{namespace.namespace.namespaceName}}</b> <b ng-bind="namespace.namespace.namespaceName"></b>
<span class="label label-primary" ng-show="namespace.itemModifiedCnt > 0">有修改 <span class="label label-primary" ng-show="namespace.itemModifiedCnt > 0">有修改
<span class="badge">{{namespace.itemModifiedCnt}}</span></span> <span class="badge" ng-bind="namespace.itemModifiedCnt"></span></span>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<div class="btn-toolbar" role="toolbar" aria-label="..."> <div class="btn-toolbar" role="toolbar" aria-label="...">
...@@ -204,8 +203,7 @@ ...@@ -204,8 +203,7 @@
<!--text view--> <!--text view-->
<textarea class="form-control" rows="{{namespace.itemCnt}}" style="border-radius: 0px" <textarea class="form-control" rows="{{namespace.itemCnt}}" style="border-radius: 0px"
ng-show="namespace.viewType == 'text'" ng-show="namespace.viewType == 'text'"
ng-disabled="!namespace.isTextEditing" ng-model="namespace.text"> ng-disabled="!namespace.isTextEditing" ng-model="namespace.text" ng-bind="namespace.text">
{{namespace.text}}
</textarea> </textarea>
<!--table view--> <!--table view-->
...@@ -237,23 +235,21 @@ ...@@ -237,23 +235,21 @@
ng-repeat="config in namespace.items" ng-class="{warning:config.modified}" ng-repeat="config in namespace.items" ng-class="{warning:config.modified}"
ng-if="config.item.key" ng-if="config.item.key"
ng-click="watchItem(config.item.key, config.item.value, config.oldValue)"> ng-click="watchItem(config.item.key, config.item.value, config.oldValue)">
<td width="25%"> <td width="25%" >
{{config.item.key | limitTo: 20}} {{config.item.key.length > 20 ? '...' : <span ng-bind="config.item.key | limitTo: 20"></span>
''}} <span ng-bind="config.item.key.length > 20 ? '...' :''"></span>
</td> </td>
<td width="30%"> <td width="30%" >
{{config.item.value | limitTo: 20}} {{config.item.value.length > 20 ? '...' <span ng-bind="config.item.value | limitTo: 20"></span>
: ''}} <span ng-bind="config.item.value.length > 20 ? '...': ''"></span>
</td> </td>
<td width="20%"> <td width="20%" >
{{config.item.comment | limitTo: 20}} {{config.item.comment.length > 20 ? <span ng-bind="config.item.comment | limitTo: 20"></span>
'...' : ''}} <span ng-bind="config.item.comment.length > 20 ?'...' : ''"></span>
</td> </td>
<td width="10%"> <td width="10%" ng-bind="config.item.lastModifiedBy">
{{config.item.lastModifiedBy}}
</td> </td>
<td width="15%"> <td width="15%" ng-bind="config.item.lastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'">
{{config.item.lastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'}}
</td> </td>
</tr> </tr>
......
...@@ -31,7 +31,8 @@ ...@@ -31,7 +31,8 @@
<button type="button" class="btn btn-primary" ng-show="syncItemStep < 2" <button type="button" class="btn btn-primary" ng-show="syncItemStep < 2"
ng-click="diff()">下一步 ng-click="diff()">下一步
</button> </button>
<button type="button" class="btn btn-success" ng-show="syncItemStep == 2 && hasDiff" ng-click="syncItems()">同步 <button type="button" class="btn btn-success" ng-show="syncItemStep == 2 && hasDiff"
ng-click="syncItems()">同步
</button> </button>
<button type="button" class="btn btn-success" data-dismiss="modal" ng-show="syncItemStep == 3" <button type="button" class="btn btn-success" data-dismiss="modal" ng-show="syncItemStep == 3"
ng-click="backToAppHomePage()">返回 ng-click="backToAppHomePage()">返回
...@@ -58,8 +59,8 @@ ...@@ -58,8 +59,8 @@
<tr ng-repeat="namespaceIdentifer in namespaceIdentifers"> <tr ng-repeat="namespaceIdentifer in namespaceIdentifers">
<td width="10%"><input type="checkbox" ng-checked="namespaceIdentifer.checked" <td width="10%"><input type="checkbox" ng-checked="namespaceIdentifer.checked"
ng-click="switchSelect(namespaceIdentifer)"></td> ng-click="switchSelect(namespaceIdentifer)"></td>
<td width="30%">{{namespaceIdentifer.env}}</td> <td width="30%" ng-bind="namespaceIdentifer.env"></td>
<td width="60%">{{namespaceIdentifer.name}}</td> <td width="60%" ng-bind="namespaceIdentifer.name"></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
...@@ -88,11 +89,17 @@ ...@@ -88,11 +89,17 @@
<tr ng-repeat="item in sourceItems"> <tr ng-repeat="item in sourceItems">
<td width="10%"><input type="checkbox" ng-checked="item.checked" <td width="10%"><input type="checkbox" ng-checked="item.checked"
ng-click="switchSelect(item)"></td> ng-click="switchSelect(item)"></td>
<td width="20%">{{item.key | limitTo: 30}} {{item.key.length > 30 ? '...' : ''}}</td> <td width="20%">
<td width="50%">{{item.value | limitTo: 45}} {{item.value.length > 45 ? '...' : ''}} <span ng-bind="item.key | limitTo: 30"></span>
<span ng-bind="item.key.length > 30 ? '...' : ''"></span>
</td> </td>
<td width="20%">{{item.comment | limitTo: 15}}{{item.comment.length > 15 ? '...' : <td width="50%">
''}} <span ng-bind="item.value | limitTo: 45"></span>
<span ng-bind="item.value.length > 45 ? '...' : ''"></span>
</td>
<td width="20%">
<span ng-bind="item.comment | limitTo: 15"></span>
<span ng-bind="item.comment.length > 15 ? '...' :''"></span>
</td> </td>
</tr> </tr>
</tbody> </tbody>
...@@ -105,7 +112,8 @@ ...@@ -105,7 +112,8 @@
<!--step 2--> <!--step 2-->
<div class="row" ng-show="syncItemStep == 2" ng-repeat="diff in diffs"> <div class="row" ng-show="syncItemStep == 2" ng-repeat="diff in diffs">
<h4 class="text-center">环境:{{diff.namespace.env}} 集群:{{diff.namespace.clusterName}} <h4 class="text-center">环境:<span ng-bind="diff.namespace.env"></span>
集群:<span ng-bind="diff.namespace.clusterName"></span>
<em ng-show="diff.diffs.createItems.length == 0 && diff.diffs.updateItems.length == 0">没有更新的配置</em> <em ng-show="diff.diffs.createItems.length == 0 && diff.diffs.updateItems.length == 0">没有更新的配置</em>
</h4> </h4>
<hr> <hr>
...@@ -124,9 +132,9 @@ ...@@ -124,9 +132,9 @@
</thead> </thead>
<tbody> <tbody>
<tr ng-repeat="createItem in diff.diffs.createItems"> <tr ng-repeat="createItem in diff.diffs.createItems">
<td width="30%">{{createItem.key}}</td> <td width="30%" ng-bind="createItem.key"></td>
<td width="40%">{{createItem.value}}</td> <td width="40%" ng-bind="createItem.value"></td>
<td width="30%">{{createItem.comment}}</td> <td width="30%" ng-bind="createItem.comment"></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
...@@ -148,9 +156,9 @@ ...@@ -148,9 +156,9 @@
</thead> </thead>
<tbody> <tbody>
<tr ng-repeat="updateItem in diff.diffs.updateItems"> <tr ng-repeat="updateItem in diff.diffs.updateItems">
<td width="30%">{{updateItem.key}}</td> <td width="30%" ng-bind="updateItem.key"></td>
<td width="40%">{{updateItem.value}}</td> <td width="40%" ng-bind="updateItem.value"></td>
<td width="30%">{{updateItem.comment}}</td> <td width="30%" ng-bind="updateItem.comment"></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<body ng-controller="IndexController"> <body ng-controller="IndexController">
<div class="site-notice">当前站点支持 <div class="site-notice">当前站点支持
&nbsp;<a ng-repeat="env in envs" ng-class="{selected:selectedEnv == env}" ng-click="switchEnv(env)"><em>{{env}} &nbsp;<a ng-repeat="env in envs" ng-class="{selected:selectedEnv == env}" ng-click="switchEnv(env)"><em ng-bind="env">
</em></a>&nbsp; </em></a>&nbsp;
环境点击切换 环境点击切换
</div> </div>
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<div class="row"> <div class="row">
<div class="col-xs-12"><h1>Apollo</h1> <div class="col-xs-12"><h1>Apollo</h1>
<p>携程统一配置中心<br> <p>携程统一配置中心<br>
<span class="package-amount">共收录了 <strong>{{appsCount}}</strong> 个项目</span> <span class="package-amount">共收录了 <strong ng-bind="appsCount"></strong> 个项目</span>
<a class="btn btn-success" href="app.html">创建项目</a> <a class="btn btn-success" href="app.html">创建项目</a>
</p> </p>
...@@ -45,15 +45,15 @@ ...@@ -45,15 +45,15 @@
<a class="package list-group-item" target="_blank" href="config.html?#/appid={{app.appId}}" <a class="package list-group-item" target="_blank" href="config.html?#/appid={{app.appId}}"
ng-repeat="app in apps "> ng-repeat="app in apps ">
<div class="row"> <div class="row">
<div class="col-md-3"><h4 class="apps-name">{{app.appId}}</h4></div> <div class="col-md-3"><h4 class="apps-name" ng-bind="app.appId"></h4></div>
<div class="col-md-7 hidden-xs"> <div class="col-md-7 hidden-xs">
<p class="apps-description">{{app.name}}</p> <p class="apps-description" ng-bind="app.name"></p>
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
<p class="apps-description"> <p class="apps-description">
{{app.ownerName}} <span ng-bind="app.ownerName"></span>
<br> <br>
{{app.ownerEmail}} <span ng-bind="app.ownerEmail"></span>
</p> </p>
</div> </div>
......
...@@ -34,8 +34,7 @@ ...@@ -34,8 +34,7 @@
<form class="form-horizontal" ng-show="step == 1" ng-submit="createNamespace()"> <form class="form-horizontal" ng-show="step == 1" ng-submit="createNamespace()">
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">应用ID</label> <label class="col-sm-3 control-label">应用ID</label>
<div class="col-sm-6"> <div class="col-sm-6" ng-bind="appId">
{{appId}}
</div> </div>
</div> </div>
<div class="form-horizontal" ng-show="type == 'link'"> <div class="form-horizontal" ng-show="type == 'link'">
...@@ -55,8 +54,8 @@ ...@@ -55,8 +54,8 @@
<tr ng-repeat="namespaceIdentifer in namespaceIdentifers"> <tr ng-repeat="namespaceIdentifer in namespaceIdentifers">
<td width="10%"><input type="checkbox" ng-checked="namespaceIdentifer.checked" <td width="10%"><input type="checkbox" ng-checked="namespaceIdentifer.checked"
ng-click="switchSelect(namespaceIdentifer)"></td> ng-click="switchSelect(namespaceIdentifer)"></td>
<td width="30%">{{namespaceIdentifer.env}}</td> <td width="30%" ng-bind="namespaceIdentifer.env"></td>
<td width="60%">{{namespaceIdentifer.name}}</td> <td width="60%" ng-bind="namespaceIdentifer.name"></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
......
...@@ -151,6 +151,7 @@ application_module.controller("ConfigNamespaceController", ...@@ -151,6 +151,7 @@ application_module.controller("ConfigNamespaceController",
} }
); );
}; };
$('.config-item-container').removeClass('hide');
}]); }]);
...@@ -183,10 +183,6 @@ table th { ...@@ -183,10 +183,6 @@ table th {
font-size: 13px; font-size: 13px;
} }
.Hide {
display: none;
}
.config-item-container { .config-item-container {
padding-top: 19px; padding-top: 19px;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment