Optimize routing and code format

This commit is contained in:
Lennart Blom 2018-12-01 20:49:59 +01:00
parent 5bb7dfce7d
commit cf883cbfc7
2 changed files with 108 additions and 106 deletions

View file

@ -15,14 +15,14 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<tag-history-button>
<a href="#" title="This will show the history of given tag" onclick="registryUI.taghistory.go('{ opts.image.name }', '{ opts.image.tag }');">
<a href="#" title="This will show the history of given tag"
onclick="registryUI.taghistory.go('{ opts.image.name }', '{ opts.image.tag }');">
<i class="material-icons">history</i>
</a>
<script type="text/javascript">
registryUI.taghistory.instance = this;
registryUI.taghistory.go = function (image, tag) {
route('taglist/joxit/docker-registry-ui');
route('/taghistory/image/' + image + '/tag/' + tag);
};
</script>

View file

@ -20,7 +20,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<a href="#!taglist/{registryUI.taghistory.image}" onclick="registryUI.home();">
<i class="material-icons">arrow_back</i>
</a>
<h2>History of Image Tag | { registryUI.taghistory.image }:{ registryUI.taghistory.tag } <i class="material-icons">history</i> </h2>
<h2>
History of Image Tag |
{ registryUI.taghistory.image }:{ registryUI.taghistory.tag } <i class="material-icons">history</i>
</h2>
</div>
<div hide="{ registryUI.taghistory.loadend }" class="spinner-wrapper">
<material-spinner></material-spinner>
@ -30,7 +33,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<material-card each="{ guiElement in registryUI.taghistory.elements }" class="tag-history-element">
<div each="{ entry in guiElement }" class="{ entry.key }">
<div class="headline"><i class="material-icons"></i> <p>{ entry.key }</p></div>
<div class="headline"><i class="material-icons"></i>
<p>{ entry.key }</p></div>
<div class="value"> { entry.value }</div>
</div>
@ -42,8 +46,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<script type="text/javascript">
console.log("taghistory script area");
registryUI.taghistory.instance = this;
registryUI.taghistory.display = function () {
var oReq = new Http();