Skip to content

ACCUMULO-4764 Move html from js to templates#342

Merged
milleruntime merged 2 commits intoapache:masterfrom
milleruntime:move-static-html
Dec 19, 2017
Merged

ACCUMULO-4764 Move html from js to templates#342
milleruntime merged 2 commits intoapache:masterfrom
milleruntime:move-static-html

Conversation

@milleruntime
Copy link
Copy Markdown
Contributor

No description provided.

@asfgit
Copy link
Copy Markdown

asfgit commented Dec 15, 2017

Can one of the admins verify this patch?

Copy link
Copy Markdown
Member

@ctubbsii ctubbsii left a comment

Choose a reason for hiding this comment

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

+1; still room for further improvement, but nothing I see that needs to change here before this is applied.

-->
<div><h3>${title}</h3></div>
<div id="gcBanner"></div>
<div id="gcBanner" style="display: none;"><div class="alert alert-danger" role="alert">Collector is Unavailable</div></div>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This could be simplified by adding the id="gcBanner" to the div tag that's already there for the alert tags. Also, best practice is to not put inline style attributes. Could instead put a rule for #gcBanner { display: none; } in the main stylesheet for the site.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed. It turns out these style tags were not needed.

<tr><td class="left" style="display: table-cell;"><a href="/tables">Tables</a></td><td class="right" style="display: table-cell;"></td></tr>
<tr><td class="left" style="display: table-cell;"><a href="/tservers">Tablet&nbsp;Servers</a></td><td class="right" style="display: table-cell;"></td></tr>
<tr><td class="left" style="display: table-cell;"><a href="/tservers">Dead&nbsp;Tablet&nbsp;Servers</a></td><td class="right" style="display: table-cell;"></td></tr>
<tr><td class="left" style="display: table-cell;">Tablets</td><td class="right" style="display: table-cell;"></td></tr>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is another place where inline styles could be replaced with a separate globally defined class or id CSS rule.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed. It turns out these style tags were not needed.


<caption><span class="table-caption">Scan&nbsp;Status</span><br/></caption>
<tbody><tr><th class="firstcell" onclick="sortTable(0)">Server&nbsp;</th>
<th onclick="sortTable(1)" title="Number of scans presently running">#&nbsp;</th>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Might be able to change sortTable implementation to automatically detect which column number to sort on. May have to pass sortTable(this), but probably not. This isn't important, but just an idea for an improvement, since the numbers could result in copy/paste errors if the columns are reordered or new columns are added and the parameters aren't updated. Making the method call resilient in the face of column reordering or adding, would be nice in the future.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Created a newbie ticket as I thought this would be a good ticket for newcomers since it only requires knowledge of javascript to complete.

@milleruntime
Copy link
Copy Markdown
Contributor Author

Thanks for the reviews. I am going to make a few more similar changes that I missed and I will push an update soon.

@milleruntime milleruntime merged commit dd5d5e9 into apache:master Dec 19, 2017
@milleruntime milleruntime deleted the move-static-html branch December 19, 2017 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants