-
Notifications
You must be signed in to change notification settings - Fork 299
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #366 from camicroscope/develop
For 3.7.2
- Loading branch information
Showing
33 changed files
with
3,328 additions
and
1,308 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Contributing to caMicroscope | ||
We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's: | ||
|
||
- Reporting a bug | ||
- Discussing the current state of the code | ||
- Submitting a fix | ||
- Proposing new features | ||
- Becoming a maintainer | ||
|
||
## We Develop with Github | ||
We use github to host code, to track issues and feature requests, as well as accept pull requests. | ||
|
||
## We Use [Github Flow](https://guides.github.com/introduction/flow/index.html), So All Code Changes Happen Through Pull Requests | ||
Pull requests are the best way to propose changes to the codebase (we use [Github Flow](https://guides.github.com/introduction/flow/index.html)). We actively welcome your pull requests: | ||
|
||
1. Fork the repo and create your branch from `develop`. | ||
2. If you've added code that should be tested, add tests. | ||
3. If you've changed APIs, update the documentation. | ||
4. Ensure the test suite passes. | ||
5. Make sure your code [lints](#Use-a-Consistent-Coding-Style). | ||
6. Issue that pull request! (If it's a development related update or fix, make sure you pull request into the `develop` branch) | ||
|
||
## Any contributions you make will be under the BSD-3 Clause Software License | ||
In short, when you submit code changes, your submissions are understood to be under the same [BSD-3 Clause License](https://opensource.org/licenses/BSD-3-Clause) that covers the project. Feel free to contact the maintainers if that's a concern. | ||
|
||
## Report bugs using Github's [issues](https://github.com/camicroscope/caMicroscope/issues) | ||
We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/camicroscope/caMicroscope/issues/new/choose). | ||
|
||
**Great Bug Reports** tend to have: | ||
|
||
- A quick summary and/or background | ||
- Steps to reproduce | ||
- Be specific! | ||
- Give sample code if you can. | ||
- What you expected would happen. | ||
- What actually happens. | ||
- If applicable, add screenshots to help explain your problem. | ||
- State the device, platform and versions you are running on. | ||
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work). | ||
|
||
## Use a Consistent Coding Style | ||
The coding style is based on [Google's Guidelines](https://github.com/google/styleguide). | ||
|
||
* Run `npm install` to install the dependencies | ||
* Then try running `npm run lint` for style unification | ||
|
||
## License | ||
By contributing, you agree that your contributions will be licensed under its [BSD-3 Clause License](https://github.com/camicroscope/.github/blob/master/LICENSE). | ||
|
||
## References | ||
This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,234 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta name="keywords" content="camicroscope, quip" /> | ||
<meta charset='utf-8'> | ||
<meta http-equiv='X-UA-Compatible' content='IE=edge'> | ||
<meta name='viewport' | ||
content='width=device-width, initial-scale=1, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no'> | ||
<!-- common --> | ||
<!-- <link rel='stylesheet' type='text/css' media='all' href='../css/style.css'/> --> | ||
<!-- Check If we're logged in ok, otherwise, log in for us --> | ||
<!-- Font Awesome --> | ||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css"> | ||
|
||
<script src='../common/authChecker.js'></script> | ||
<script> | ||
__auth_check(1) | ||
</script> | ||
|
||
<script src='../core/Store.js'></script> | ||
<script src='../common/util.js'></script> | ||
<script src='../common/ajv.js'></script> | ||
<script src='../components/loading/loading.js'></script> | ||
<script src="./loader/loader.js"></script> | ||
<script src="./loader/chunked_upload.js"></script> | ||
<title>CaMicroscope Data Table</title> | ||
|
||
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" | ||
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" | ||
crossorigin="anonymous"></script> | ||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" | ||
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" | ||
crossorigin="anonymous"></script> | ||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" | ||
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"> | ||
<link rel="stylesheet" href="../common/stacktable.css"> | ||
<style> | ||
html, | ||
body { | ||
width: 100%; | ||
height: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
</style> | ||
<script src='../common/stacktable.js'></script> | ||
<link rel="stylesheet" href="./table.css" /> | ||
<link rel="stylesheet" href="./info.css" /> | ||
<link rel="shortcut icon" type="image/x-icon" href="/apps/landing/favicon.png"> | ||
</head> | ||
|
||
<body> | ||
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark" style="position: sticky;"> | ||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
<div class="collapse navbar-collapse" id="navbarCollapse"> | ||
<ul class="navbar-nav mr-auto"> | ||
<li class="nav-item link"> | ||
<a class="nav-link" href="landing/landing.html"> <i class="fas fa-home"></i> Home</a> | ||
</li> | ||
<li class="nav-item link"> | ||
<a class="nav-link" href="table.html"> <i class="fas fa-list-ul"></i> Slides</a> | ||
</li> | ||
<li class="nav-item active link"> | ||
<a class="nav-link" href="Info.html"> <i class="fas fa-info-circle"></i> Info</a> | ||
</li> | ||
</ul> | ||
<ul class="navbar-nav"> | ||
<li class="nav-item link" style="font-family: sans-serif;"> | ||
<a class="nav-link" href="./signup/signup.html"> <i class="fas fa-user-plus"></i> Signup</a> | ||
</li> | ||
<li class="nav-item link"> | ||
<a class="nav-link" target="_blank" href="https://docs.google.com/forms/d/e/1FAIpQLScL91LxrpAZjU88GBZP9gmcdgdf8__uNUwhws2lzU6Lr4qNwA/viewform"> <i class="fas fa-comment"></i> Feedback</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</nav> | ||
|
||
<div class="header text-center text-white bg-info p-4"> | ||
<h1 class="h1">caMicroscope</h1> | ||
<p>Digital pathology image viewer with support for human/machine generated annotations and markups.</p> | ||
</div> | ||
|
||
<div class="container"> | ||
<h3 class="text-center h3 mb-2" style="margin-top:8px;margin-bottom:10px;">Information Dashboard</h3> | ||
<div class="form-group has-search"> | ||
<span class="fa fa-search form-control-feedback"></span> | ||
<input id="search-table" type="text" class="form-control" placeholder="Search"> | ||
</div> | ||
|
||
<div class="table-responsive" id="summary"> | ||
<table class="table table-striped"> | ||
<thead></thead> | ||
<tbody></tbody> | ||
</table> | ||
</div> | ||
</div> | ||
|
||
<div class="text-center text-white bg-dark p-3 mt-2 footer" style="position: static;bottom: 0;width: 100%;"> | ||
<p class="p">Copyright © 2020 caMicroscope</p> | ||
</div> | ||
|
||
</body> | ||
<script> | ||
|
||
var searching=false; | ||
|
||
function addhead(){ | ||
var table = $('table thead'); | ||
let headingList=['ID','Name','Annotations','Heatmaps'] | ||
const headingMarkup = headingList.map((title,i) => `<th>${title} | ||
<span class="sort-btn" data-order=${1} data-index=${i}> | ||
<i class="fa fa-sort"/> </span> | ||
</th>`); | ||
table.append(`<tr>${headingMarkup}</tr>`); | ||
} | ||
|
||
function addbody(JSONdata){ | ||
var table = $('table tbody'); | ||
// console.log(JSONdata.annotations); | ||
var annodisp=null; | ||
var heatdisp=null; | ||
if(JSONdata.annotations.length===0){ | ||
annodisp="<i class='fas fa-times' style='color:red;'></i>" | ||
} | ||
else{ | ||
annodisp="<i class='fas fa-check' style='color:green;'></i>" | ||
} | ||
if(JSONdata.heatmap.length===0){ | ||
heatdisp="<i class='fas fa-times' style='color:red;'></i>" | ||
} | ||
else{ | ||
heatdisp="<i class='fas fa-check' style='color:green;'></i>" | ||
} | ||
var markup = "<tr><td>"+JSONdata.id+"</td><td>"+JSONdata.name+"</td><td>"+annodisp+"</td><td>"+heatdisp+"</td></tr>" | ||
table.append(markup); | ||
} | ||
|
||
function searchSummaryTable(e) { | ||
var value = String($(this).val()).toLowerCase(); | ||
$("#summary table tbody tr").filter(function () { | ||
var t = String($(this).text()).toLowerCase().indexOf(value); | ||
if (t > -1) { | ||
$(this).addClass("searched"); | ||
$(this).removeClass("d-none"); | ||
} else { | ||
$(this).removeClass("searched"); | ||
$(this).addClass("d-none"); | ||
} | ||
}); | ||
if (value == "") { | ||
searching = false; | ||
} else { | ||
searching = true; | ||
} | ||
} | ||
|
||
function sortSummaryTable(e) { | ||
var index = e.currentTarget.dataset.index; | ||
var order = parseInt(e.currentTarget.dataset.order); | ||
var trs = "#summary table tbody tr"; | ||
if (searching) { | ||
trs += ".searched"; | ||
} | ||
|
||
$(trs).sort(function (a, b) { | ||
let at = $(a).children('td').get(index).textContent; | ||
let bt = $(b).children('td').get(index).textContent; | ||
if(at&&bt) | ||
{ | ||
at=at.toLowerCase(); | ||
bt=bt.toLowerCase(); | ||
} | ||
else | ||
{ | ||
at=$(a).children('td').get(index).childNodes[0].classList; | ||
bt=$(b).children('td').get(index).childNodes[0].classList; | ||
} | ||
if (order === 1) { | ||
e.currentTarget.dataset.order=2; | ||
if (at > bt) | ||
return 1; | ||
else if (at < bt) | ||
return -1; | ||
else | ||
return 0; | ||
} | ||
else { | ||
e.currentTarget.dataset.order = 1; | ||
if (at < bt) | ||
return 1; | ||
else if (at > bt) | ||
return -1; | ||
else | ||
return 0; | ||
} | ||
}).appendTo("#summary table tbody"); | ||
} | ||
|
||
function initialize() { | ||
const params = getUrlVars(); | ||
const store = new Store('../data/'); | ||
store.findSlide() | ||
.then(function (data) { | ||
if (data.length == 0) { | ||
var div = document.querySelector('.container'); | ||
div.textContent = `No Data Found ... x _ x`; | ||
div.classList = `text-center p-4`; | ||
return; | ||
} | ||
addhead(); | ||
$("#search-table").on("keyup",searchSummaryTable); | ||
$(".sort-btn").on("click", sortSummaryTable); | ||
for (var i = 0; i < data.length; i++) { | ||
const JSONdata={}; | ||
JSONdata.id=data[i]._id.$oid; | ||
JSONdata.name=data[i].name; | ||
store.fetchMark(JSONdata.id).then(function(dataq){ | ||
JSONdata.annotations=dataq; | ||
store.fetchHeatMap(JSONdata.id).then(function(dataqt){ | ||
JSONdata.heatmap=dataqt; | ||
addbody(JSONdata); | ||
}); | ||
}); | ||
// console.log(JSONdata); | ||
} | ||
}); | ||
} | ||
document.addEventListener('DOMContentLoaded', initialize); | ||
</script> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.