提交 ff8856fc 编写于 作者: L lepdou

Merge pull request #206 from lepdou/ng-bind

{{}} 改成ng-bind
......@@ -39,26 +39,25 @@
<tbody>
<tr>
<th>应用ID:</th>
<td>{{appBaseInfo.appId}}</td>
<td ng-bind="appBaseInfo.appId"></td>
</tr>
<tr>
<th>应用名:</th>
<td>{{appBaseInfo.name}}</td>
<td ng-bind="appBaseInfo.name"></td>
</tr>
<tr>
<th>Owner:</th>
<td>{{appBaseInfo.ownerName}}</td>
<td ng-bind="appBaseInfo.ownerName"></td>
</tr>
<tr>
<th>Owner Email:</th>
<td>{{appBaseInfo.ownerEmail}}</td>
<td ng-bind="appBaseInfo.ownerEmail"></td>
</tr>
<tr ng-show="missEnvs.length > 0">
<th>缺失的环境:</th>
<td>
<font ng-repeat="env in missEnvs">
{{env}}
</font>
<span ng-repeat="env in missEnvs" ng-bind="env">
</span>
</td>
</tr>
</tbody>
......@@ -109,7 +108,7 @@
<div class="checkbox" ng-repeat="env in missEnvs">
<label>
<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>
</div>
</div>
......@@ -126,15 +125,15 @@
</div>
<!--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 class="panel">
<header class="panel-heading">
<div class="row">
<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="badge">{{namespace.itemModifiedCnt}}</span></span>
<span class="badge" ng-bind="namespace.itemModifiedCnt"></span></span>
</div>
<div class="col-md-4">
<div class="btn-toolbar" role="toolbar" aria-label="...">
......@@ -204,8 +203,7 @@
<!--text view-->
<textarea class="form-control" rows="{{namespace.itemCnt}}" style="border-radius: 0px"
ng-show="namespace.viewType == 'text'"
ng-disabled="!namespace.isTextEditing" ng-model="namespace.text">
{{namespace.text}}
ng-disabled="!namespace.isTextEditing" ng-model="namespace.text" ng-bind="namespace.text">
</textarea>
<!--table view-->
......@@ -237,23 +235,21 @@
ng-repeat="config in namespace.items" ng-class="{warning:config.modified}"
ng-if="config.item.key"
ng-click="watchItem(config.item.key, config.item.value, config.oldValue)">
<td width="25%">
{{config.item.key | limitTo: 20}} {{config.item.key.length > 20 ? '...' :
''}}
<td width="25%" >
<span ng-bind="config.item.key | limitTo: 20"></span>
<span ng-bind="config.item.key.length > 20 ? '...' :''"></span>
</td>
<td width="30%">
{{config.item.value | limitTo: 20}} {{config.item.value.length > 20 ? '...'
: ''}}
<td width="30%" >
<span ng-bind="config.item.value | limitTo: 20"></span>
<span ng-bind="config.item.value.length > 20 ? '...': ''"></span>
</td>
<td width="20%">
{{config.item.comment | limitTo: 20}} {{config.item.comment.length > 20 ?
'...' : ''}}
<td width="20%" >
<span ng-bind="config.item.comment | limitTo: 20"></span>
<span ng-bind="config.item.comment.length > 20 ?'...' : ''"></span>
</td>
<td width="10%">
{{config.item.lastModifiedBy}}
<td width="10%" ng-bind="config.item.lastModifiedBy">
</td>
<td width="15%">
{{config.item.lastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'}}
<td width="15%" ng-bind="config.item.lastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'">
</td>
</tr>
......
......@@ -31,7 +31,8 @@
<button type="button" class="btn btn-primary" ng-show="syncItemStep < 2"
ng-click="diff()">下一步
</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 type="button" class="btn btn-success" data-dismiss="modal" ng-show="syncItemStep == 3"
ng-click="backToAppHomePage()">返回
......@@ -58,8 +59,8 @@
<tr ng-repeat="namespaceIdentifer in namespaceIdentifers">
<td width="10%"><input type="checkbox" ng-checked="namespaceIdentifer.checked"
ng-click="switchSelect(namespaceIdentifer)"></td>
<td width="30%">{{namespaceIdentifer.env}}</td>
<td width="60%">{{namespaceIdentifer.name}}</td>
<td width="30%" ng-bind="namespaceIdentifer.env"></td>
<td width="60%" ng-bind="namespaceIdentifer.name"></td>
</tr>
</tbody>
</table>
......@@ -88,11 +89,17 @@
<tr ng-repeat="item in sourceItems">
<td width="10%"><input type="checkbox" ng-checked="item.checked"
ng-click="switchSelect(item)"></td>
<td width="20%">{{item.key | limitTo: 30}} {{item.key.length > 30 ? '...' : ''}}</td>
<td width="50%">{{item.value | limitTo: 45}} {{item.value.length > 45 ? '...' : ''}}
<td width="20%">
<span ng-bind="item.key | limitTo: 30"></span>
<span ng-bind="item.key.length > 30 ? '...' : ''"></span>
</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>
</tr>
</tbody>
......@@ -105,7 +112,8 @@
<!--step 2-->
<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>
</h4>
<hr>
......@@ -124,9 +132,9 @@
</thead>
<tbody>
<tr ng-repeat="createItem in diff.diffs.createItems">
<td width="30%">{{createItem.key}}</td>
<td width="40%">{{createItem.value}}</td>
<td width="30%">{{createItem.comment}}</td>
<td width="30%" ng-bind="createItem.key"></td>
<td width="40%" ng-bind="createItem.value"></td>
<td width="30%" ng-bind="createItem.comment"></td>
</tr>
</tbody>
</table>
......@@ -148,9 +156,9 @@
</thead>
<tbody>
<tr ng-repeat="updateItem in diff.diffs.updateItems">
<td width="30%">{{updateItem.key}}</td>
<td width="40%">{{updateItem.value}}</td>
<td width="30%">{{updateItem.comment}}</td>
<td width="30%" ng-bind="updateItem.key"></td>
<td width="40%" ng-bind="updateItem.value"></td>
<td width="30%" ng-bind="updateItem.comment"></td>
</tr>
</tbody>
</table>
......
......@@ -14,7 +14,7 @@
<body ng-controller="IndexController">
<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;
环境点击切换
</div>
......@@ -24,7 +24,7 @@
<div class="row">
<div class="col-xs-12"><h1>Apollo</h1>
<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>
</p>
......@@ -45,15 +45,15 @@
<a class="package list-group-item" target="_blank" href="config.html?#/appid={{app.appId}}"
ng-repeat="app in apps ">
<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">
<p class="apps-description">{{app.name}}</p>
<p class="apps-description" ng-bind="app.name"></p>
</div>
<div class="col-md-2">
<p class="apps-description">
{{app.ownerName}}
<span ng-bind="app.ownerName"></span>
<br>
{{app.ownerEmail}}
<span ng-bind="app.ownerEmail"></span>
</p>
</div>
......
......@@ -34,8 +34,7 @@
<form class="form-horizontal" ng-show="step == 1" ng-submit="createNamespace()">
<div class="form-group">
<label class="col-sm-3 control-label">应用ID</label>
<div class="col-sm-6">
{{appId}}
<div class="col-sm-6" ng-bind="appId">
</div>
</div>
<div class="form-horizontal" ng-show="type == 'link'">
......@@ -55,8 +54,8 @@
<tr ng-repeat="namespaceIdentifer in namespaceIdentifers">
<td width="10%"><input type="checkbox" ng-checked="namespaceIdentifer.checked"
ng-click="switchSelect(namespaceIdentifer)"></td>
<td width="30%">{{namespaceIdentifer.env}}</td>
<td width="60%">{{namespaceIdentifer.name}}</td>
<td width="30%" ng-bind="namespaceIdentifer.env"></td>
<td width="60%" ng-bind="namespaceIdentifer.name"></td>
</tr>
</tbody>
</table>
......
......@@ -151,6 +151,7 @@ application_module.controller("ConfigNamespaceController",
}
);
};
$('.config-item-container').removeClass('hide');
}]);
......@@ -183,10 +183,6 @@ table th {
font-size: 13px;
}
.Hide {
display: none;
}
.config-item-container {
padding-top: 19px;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册