Skip to content

Commit

Permalink
webui: Update remaining pages to the new layout
Browse files Browse the repository at this point in the history
  • Loading branch information
MKleusberg committed Apr 2, 2023
1 parent eff1cc1 commit f86aebf
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 39 deletions.
10 changes: 3 additions & 7 deletions webui/templates/createbranch.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
<body>
[[ template "header" . ]]
<div>
<div id="db-header-root"></div>
<div class="row">
<div class="col-md-1">
&nbsp;
</div>
<div class="col-md-10">
<div class="col-md-12">
<h2 style="text-align: center;" data-cy="createbranch">Create new branch</h2>
<form action="/x/createbranch" method="post">
<div style="text-align: center;"><i>From commit: [[ .Commit ]]</i></div>
Expand Down Expand Up @@ -41,11 +39,9 @@ <h2 style="text-align: center;" data-cy="createbranch">Create new branch</h2>
</table>
</form>
</div>
<div class="col-md-1">
&nbsp;
</div>
</div>
</div>
[[ template "script_db_header" . ]]
[[ template "footer" . ]]
</body>
</html>
Expand Down
10 changes: 3 additions & 7 deletions webui/templates/createtag.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
<body>
[[ template "header" . ]]
<div>
<div id="db-header-root"></div>
<div class="row">
<div class="col-md-1">
&nbsp;
</div>
<div class="col-md-10">
<div class="col-md-12">
<h2 style="text-align: center;">Create new tag or release</h2>
<form action="/x/createtag" method="post">
<div style="text-align: center;"><i>On commit: [[ .Commit ]]</i></div>
Expand Down Expand Up @@ -64,11 +62,9 @@ <h2 style="text-align: center;">Create new tag or release</h2>
</table>
</form>
</div>
<div class="col-md-1">
&nbsp;
</div>
</div>
</div>
[[ template "script_db_header" . ]]
[[ template "footer" . ]]
<script>
let app = angular.module('DBHub', ['ui.bootstrap', 'ngSanitize']);
Expand Down
15 changes: 4 additions & 11 deletions webui/templates/forks.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,18 @@
<body>
[[ template "header" . ]]
<div>
<div id="db-header-root"></div>
<div class="row">
<div class="col-md-1">
&nbsp;
</div>
<div class="col-md-10">
<div class="col-md-12">
<h2 style="text-align: center;">
<span data-cy="forks">Forks of</span>
<a class="blackLink" href="/[[ .DB.Info.Owner ]]" data-cy="ownerlnk">[[ .DB.Info.Owner ]]</a> /
<a class="blackLink" href="/[[ .DB.Info.Owner ]]/[[ .DB.Info.Database ]]" data-cy="dblnk">[[ .DB.Info.Database ]]</a>
</h2>
</div>
<div class="col-md-1">
&nbsp;
</div>
</div>
<div class="row">
<div class="col-md-3">
&nbsp;
</div>
<div class="col-md-9">
<div class="col-md-12">
<table class="table" style="border-style: none;">
<tr ng-repeat="row in forks.Forks">
<td style="border-style: none;">&nbsp;</td>
Expand All @@ -39,6 +31,7 @@ <h2 style="text-align: center;">
</div>
</div>
</div>
[[ template "script_db_header" . ]]
[[ template "footer" . ]]
<script>
let app = angular.module('DBHub', ['ui.bootstrap', 'ngSanitize']);
Expand Down
10 changes: 3 additions & 7 deletions webui/templates/stars.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
<body>
[[ template "header" . ]]
<div>
<div id="db-header-root"></div>
<div class="row">
<div class="col-md-2">
&nbsp;
</div>
<div class="col-md-8">
<div class="col-md-12">
<h2 style="text-align: center;">
<span data-cy="stars">People who starred</span>
<a class="blackLink" href="/[[ .DB.Info.Owner ]]" data-cy="ownerlnk">[[ .DB.Info.Owner ]]</a> /
Expand All @@ -25,11 +23,9 @@ <h4>• <a class="blackLink" href="/{{ row.Owner }}">{{ row.display_name}}</a></
</table>
<h3 ng-if="stars.Stars === null" style="text-align: center;">No-one has starred [[ .DB.Info.Owner ]]/[[ .DB.Info.Database ]] yet</h3>
</div>
<div class="col-md-2">
&nbsp;
</div>
</div>
</div>
[[ template "script_db_header" . ]]
[[ template "footer" . ]]
<script>
let app = angular.module('DBHub', ['ui.bootstrap', 'ngSanitize']);
Expand Down
10 changes: 3 additions & 7 deletions webui/templates/watchers.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
<body>
[[ template "header" . ]]
<div>
<div id="db-header-root"></div>
<div class="row">
<div class="col-md-2">
&nbsp;
</div>
<div class="col-md-8">
<div class="col-md-12">
<h2 style="text-align: center;">
<span data-cy="pplwatch">People watching</span>
<a class="blackLink" href="/[[ .DB.Info.Owner ]]" data-cy="ownerlnk">[[ .DB.Info.Owner ]]</a> /
Expand All @@ -25,11 +23,9 @@ <h4>• <a class="blackLink" href="/{{ row.Owner }}">{{ row.display_name}}</a></
</table>
<h3 ng-if="watchers.Watchers === null" style="text-align: center;">No-one is watching [[ .DB.Info.Owner ]]/[[ .DB.Info.Database ]] yet</h3>
</div>
<div class="col-md-2">
&nbsp;
</div>
</div>
</div>
[[ template "script_db_header" . ]]
[[ template "footer" . ]]
<script>
let app = angular.module('DBHub', ['ui.bootstrap', 'ngSanitize']);
Expand Down

4 comments on commit f86aebf

@MKleusberg
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea here. The test ran successfully on my system and reproducing this manually it works correctly too. Will investigate later 🤷‍♂️

@justinclift
Copy link
Member

@justinclift justinclift commented on f86aebf Apr 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries. I've just told it to rerun the job.

Have seen GitHub actions fail a "known good" job twice, then pass it on the third time, in similar fashion recently. GitHub Actions seems to be using flaky test infrastructure. ☹️

@justinclift
Copy link
Member

@justinclift justinclift commented on f86aebf Apr 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the failing tests in a bit more detail, they're happening in the visualisation tests I added over the past few days.

So, it's possibly a different thing.

I noticed when writing those tests, that sometimes it takes a fraction of a second for AngularJS to finish applying updates to everything. So I needed to add some cy.wait() statements in places to let it finish.

There's a timeout value at the top of each of the visualisation test files, with the number of milliseconds to use as the delay in that file. Yeah, this should probably be moved to a central spot. 😉

If this keeps on failing, we should probably just double the value and (hopefully) call it a day. 😄

@justinclift
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took a look at this after getting some sleep. The failure turned out to be a slight text change in the error message, probably due to the visualisation and database pages now using the same code for the access checks:

image

Adjusted the Cypress tests to look for the new text, and it's all happy now. 😄

Please sign in to comment.