-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pa table header refresh #24
base: main
Are you sure you want to change the base?
Changes from all commits
008f85b
7243e79
48a9532
1650109
0ffb581
08aa9f3
552f594
ee7795f
78e0e51
53c7db3
60b7def
6c3ae41
8a1481e
5036863
c76829b
26fa56a
279d722
e3fedf5
a87335d
93e5100
3f95ca3
86ad558
0bc50c0
0ed5fa9
165860c
0c539f0
45786e2
fe280cc
1391065
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,51 @@ | ||
# psi-j-testing-service | ||
# psi-j-testing-service | ||
|
||
# make virtual environment | ||
virtualvenv psi | ||
source psi/bin/activate | ||
|
||
# install some things. | ||
|
||
pip3 install -r requirements.txt | ||
|
||
cd ~/psi-j-testing-service/src/psij/testing | ||
python3 service.py | ||
|
||
# you will need mongoDB, follow the instructions here, it takes a while to install. | ||
https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-os-x/ | ||
|
||
On Mac OS X, the last step is: | ||
brew services start [email protected] | ||
|
||
|
||
|
||
Creating A Local Dev Environment | ||
------------------------------------------------------ | ||
This starts the service witch allows things to run locally: | ||
cd ~/psi-j-testing-service; | ||
python3 src/psij/testing/service.py | ||
|
||
then you can see it at this url: | ||
http://127.0.0.1:9909/summary.html | ||
|
||
|
||
|
||
To populate the data i need to run psi-j-python: | ||
Edit testing.conf first and, at a minimum, update the url to point to your server | ||
server_url = http://0.0.0.0:9909 | ||
|
||
~/psi-j-python: pip3 install -r requirements-dev.txt | ||
~/psi-j-python: make tests -- --upload-results | ||
|
||
|
||
Restoring a mongodump DB: | ||
You'll want to get a full dump, that way you can play with the data: | ||
|
||
First untar these: | ||
mongodump-psij.tar | ||
mongodump-sdk.tar.gz | ||
|
||
mongorestore dump/ | ||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -146,6 +146,7 @@ body { | |
width: 100%; | ||
text-align: right; | ||
margin-bottom: 32pt; | ||
position: relative; | ||
} | ||
|
||
#toolbar .spacer { | ||
|
@@ -547,3 +548,30 @@ td.run-id { | |
.calendar-cell { | ||
text-align: center; | ||
} | ||
|
||
.IntroBlurb { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps we may want to be consistent with naming conventions. Either use CamelCase for everything or use dashes, as in |
||
background-color: #ffffff; | ||
border: 1px solid #e2e2e2; | ||
border-radius: 5px; | ||
padding: 9px; | ||
margin: 10px 0 10px 0; | ||
font-size: 13px; | ||
color: #000000; | ||
position: relative; | ||
} | ||
|
||
.IntroBlurb .CloseMe { | ||
position: absolute; | ||
top: 7px; | ||
right: 10px; | ||
color: #999999; | ||
font-size: 17px; | ||
cursor: pointer; | ||
} | ||
|
||
.dashboard-title { | ||
position: absolute; | ||
left: 110px; | ||
top: 10px; | ||
font-weight: bold; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
var VC = VC || {}; | ||
|
||
VC.IntroBlurb = Vue.component("intro-blurb", { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I worry a bit here about an inner platform, in which we are developing a complex solution for something that can already be done with standard tools. It may be better to have a simple variable in customization.js that allows one to distinguish between the projects. Then, in the html source, we can have two divs with the relevant blurbs and corresponding
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You may not have been at the meeting. I was told that we would have different deployments and that people wanted to be able to change the text without having to make changes in the code, other than a config file. The idea was that the config file could be changed to accomodate any text string changes OR you could have one config file for PSI/J and another one for SDK and another one for another use case. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's possible that things weren't that clear during the meeting. I apologize for that. We already have different deployments and we don't want to maintain two codebases, which we don't. But changing html or changing a .js file, that is still changing some form of code. So again, let's try to keep this simple with text in a single place rather than spread around. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What I meant was just keep all the text in one file. It doesn't have to be customization.js. It could be any other config file, whatever you want me to call it. The reason they want it in 1 file is because that way it's easier to make text changes because it's all in one place. Also, they want to be able to specify which machines to show. And, as another requirement, they told me they want to be able to do more than 1 or 2 deployments. And so, if we do it in the HTML file, we'll have to add a new IF statement for every place where we do a text replacement, whenever we add a new deployment. However, if all the text is in one config file, we just add or create a new config file. |
||
data: function () { | ||
|
||
return { | ||
show: 0 | ||
} | ||
}, | ||
template: '<div v-if="this.show == 1" ref="myRef" class="IntroBlurb" v-on:click="close( $event )">' + | ||
'<div class="main_slot"><slot></slot></div>' + | ||
'<div class="CloseMe">X</div>' + | ||
'</div>', | ||
mounted: function( event ) { | ||
console.log('mounted'); | ||
var content = this.$slots.default[0].text; | ||
console.dir( content ); | ||
|
||
var hideBlurb = Cookies.get( content ); | ||
|
||
if( hideBlurb === "1" ) { | ||
// hide | ||
this.show = 0; | ||
} else { | ||
this.show = 1; | ||
} | ||
}, | ||
methods: { | ||
close: function( event ) { | ||
|
||
var ihtml = this.$el.firstChild.innerHTML; | ||
console.log(ihtml); | ||
|
||
Cookies.set( ihtml, "1" ) | ||
this.show = 0; | ||
} | ||
} | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
var VC = VC || {}; | ||
|
||
VC.RowAccordian = Vue.component("row-accordian", { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think vuetify already has the necessary component: https://vuetifyjs.com/en/components/expansion-panels/ Maybe we can use that instead? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They want to do it in a Table format and we want that table to look seamless to the user with triangle open/closers on the side (so we would need to find one that does that). Also, it's been my experience that if we want the accordian to do anything else in the future, it'll be easier if we just make it ourselves. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should keep styling separate from functionality. I would rather have one consistent styling coming from vuetify than coming up with something else for every component. It is important here to not only think of what is easy for us, but what would be easy for external contributors to quickly jump into. I think we are already doing a bit too much customization (and I am very much guilty of this), but I also think that in cases such as this, when a component already exists, we should use it. |
||
props: [ | ||
'logo_name', | ||
'machines', | ||
'logo_results', | ||
'machine_row_results' | ||
], | ||
data: function () { | ||
|
||
return { | ||
open: 1 | ||
} | ||
}, | ||
template: '<table>' + | ||
'</table>', | ||
mounted: function( event ) { | ||
}, | ||
methods: { | ||
toggle: function( event ) { | ||
|
||
this.open = this.open ? 0 : 1; | ||
} | ||
} | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
CUSTOMIZATION = { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file was not meant to be placed in the repo, at least not like this. This is used to distinguish between the different deployments (SDK and PSI/J), and we should either not have it in the repo, or have it disabled and clearly marked as a template (e.g. customization.js.example), or something like that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, so I could just rename it to customization.js.example That would rename it and disable it. sound ok? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Or maybe, I could move the entire CONF variable to another file and not check in the customization.js Would that work? |
||
projectName: "PSI/J" | ||
} | ||
|
||
var CONF = { | ||
STR: { | ||
"dashboardTitle": "Exascale dashboard testing service", | ||
"introBlurb": "The dashboard testing service shows you the status of various sites in the calendar view by date and machine without curation.", | ||
"bottomBlurb": "The curated sites tab will eventually show labs on the left which are expandable to show the machines of each lab on the y axis. Meanwhile, the X axis will show you test cases like PSI/J and PSI/J Parcel, etc." | ||
} | ||
}; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
var sites = [ | ||
]; | ||
|
||
settingsDefaults({"viewMode": "calendar", "inactiveTimeout": 10, "showBranchBubbles": false}); | ||
|
||
set = function(dst, src) { | ||
dst.length = 0; | ||
for (var i = 0; i < src.length; i++) { | ||
dst.push(src[i]); | ||
} | ||
} | ||
|
||
update = function() { | ||
$.get("summary", settings("inactiveTimeout"), function(data) { | ||
set(sites, data); | ||
}); | ||
}; | ||
|
||
update(); | ||
|
||
var siteStatus = new Vue({ | ||
el: "#container", | ||
components: { | ||
'intro-blurb':VC.IntroBlurb | ||
}, | ||
vuetify: new Vuetify(), | ||
data: { | ||
sites: sites, | ||
mode: '', | ||
now: moment().utc().startOf("day"), | ||
settingsDialog: false, | ||
STR: CONF.STR | ||
}, | ||
methods: globalMethods, | ||
computed: { | ||
inactiveTimeout: makeSetting("inactiveTimeout", update), | ||
showBranchBubbles: makeSetting("showBranchBubbles", update, "bool"), | ||
allBranches: function() { | ||
var unique = {}; | ||
for (var i = 0; i < this.sites.length; i++) { | ||
var site = this.sites[i]; | ||
var branches = site.branches; | ||
for (var j = 0; j < branches.length; j++) { | ||
var branch = branches[j]; | ||
if (branch.name in unique) { | ||
var existing = unique[branch.name]; | ||
existing['failed_count'] += branch['failed_count']; | ||
existing['completed_count'] += branch['completed_count']; | ||
} | ||
else { | ||
unique[branch.name] = {... branch}; | ||
unique[branch.name]['sites'] = {}; | ||
} | ||
unique[branch.name]['sites'][site.site_id] = branch; | ||
} | ||
} | ||
|
||
values = []; | ||
for (var k in unique) { | ||
values.push(unique[k]); | ||
} | ||
return this.sort('name', values); | ||
}, | ||
branchIndexMap: function() { | ||
var all = this.allBranches; | ||
var map = {}; | ||
for (var i = 0; i < all.length; i++) { | ||
map[all[i].name] = i; | ||
} | ||
return map; | ||
} | ||
} | ||
}); | ||
|
||
var setViewMode = function(viewMode) { | ||
if (viewMode === undefined) { | ||
viewMode = Cookies.get('viewMode'); | ||
} | ||
if (viewMode === undefined) { | ||
viewMode = 'calendar'; | ||
} | ||
Cookies.set('viewMode', viewMode); | ||
$('.view-mode-group').removeClass('selected'); | ||
$('#view-mode-' + viewMode).addClass('selected'); | ||
siteStatus.mode = viewMode; | ||
} | ||
|
||
setViewMode(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,12 +8,12 @@ | |
crossorigin="anonymous"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js.cookie.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/ansi_up.js"></script> | ||
<script src="lib.js"></script> | ||
<link rel="stylesheet" href="style.css"> | ||
<script src="js/lib.js"></script> | ||
<link rel="stylesheet" href="css/style.css"> | ||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | ||
<link href="https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css" rel="stylesheet"> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/vuetify.min.css" rel="stylesheet"> | ||
<script src="/instance/customization.js"></script> | ||
<script src="/js/customization.js"></script> | ||
</head> | ||
<body> | ||
<div id="container"> | ||
|
@@ -33,7 +33,7 @@ | |
{{ branch.name }} | ||
<div class="counts"> | ||
<span class="failed-count" v-if="branch.failed_count > 0">{{ branch.failed_count }}</span> | ||
<img class="check-mark" src="checkmark.png" v-if="branch.failed_count == 0"/> | ||
<img class="check-mark" src="imgs/checkmark.png" v-if="branch.failed_count == 0"/> | ||
</div> | ||
</div> | ||
</div> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,12 +8,12 @@ | |
crossorigin="anonymous"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js.cookie.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/ansi_up.js"></script> | ||
<script src="lib.js"></script> | ||
<link rel="stylesheet" href="style.css"> | ||
<script src="js/lib.js"></script> | ||
<link rel="stylesheet" href="css/style.css"> | ||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | ||
<link href="https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css" rel="stylesheet"> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/vuetify.min.css" rel="stylesheet"> | ||
<script src="/instance/customization.js"></script> | ||
<script src="/js/customization.js"></script> | ||
</head> | ||
<body> | ||
<div id="container"> | ||
|
@@ -48,7 +48,7 @@ | |
</div> | ||
<div class="counts"> | ||
<span class="failed-count" v-if="branch.failed_count > 0">{{ branch.failed_count }}</span> | ||
<img class="check-mark" src="checkmark.png" v-if="branch.failed_count == 0"/> | ||
<img class="check-mark" src="imgs/checkmark.png" v-if="branch.failed_count == 0"/> | ||
</div> | ||
</div> | ||
</div> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this belongs in a README-dev.md document or under a section that specifies that this allows one to create a local development environment.