Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Release chiba-02 #1298

Merged
merged 148 commits into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
9a195c9
Remove gldcore (again)
Apr 11, 2022
958bdbe
Update version.h
Apr 11, 2022
ee8629d
Change version to 4.3.1 (chiba-1) and fix resulting autotest errors
Apr 12, 2022
4ffbd77
Add Windows gridlabd.bat to README
dchassin Apr 12, 2022
aeb9857
Fixing typo in cooling_cop units (#1152)
aivanova5 Apr 15, 2022
16d534f
Add support for module template folder (#1159)
dchassin Apr 29, 2022
03b3248
Update gridlabd-geodata (#1153)
dchassin Apr 29, 2022
facbf47
Remove deprecated variables (#1151)
dchassin Apr 29, 2022
b50fc70
Add missing powerflow switch autotests (#1156)
dchassin Apr 29, 2022
2a9c869
Change slacgismo to hipas (#1155)
dchassin Apr 30, 2022
c19240e
Fix build folder (#1154)
dchassin Apr 30, 2022
7ffa3e0
Update main.cpp (#1147)
dchassin Apr 30, 2022
31d9379
Add powerflow violation detection (#1164)
dchassin May 6, 2022
3b091ba
Update gridlabd-version (#1166)
dchassin May 6, 2022
d8c2946
Add support for spidacalc equipment (#1160)
May 7, 2022
74bef95
Add service_level flag to powerflow meters (#1162)
dchassin May 10, 2022
0541dc1
Fix python solver (#1058)
dchassin May 13, 2022
fe9142c
Fix voltage violation detection implementation errors (#1170)
dchassin May 13, 2022
b46c7d8
Update nsrdb_weather.py (#1168)
dchassin May 13, 2022
f930e95
Add fire danger tool (#1146)
dchassin May 13, 2022
a988ff3
Update gridlabd-version
dchassin May 14, 2022
7843a8c
Add fire incident report tool (#1143)
dchassin May 16, 2022
90b3b0d
Update gridlabd-version
May 17, 2022
80b3340
Update gridlabd-version
May 17, 2022
bdac9b9
Merge branch 'develop-fix-origin' into develop-fix-version
May 17, 2022
7e7ffc7
Develop fix voltage violation detection (#1173)
dchassin May 18, 2022
2ef9678
Merge branch 'develop-fix-version' into develop
May 18, 2022
ca4f5c0
Update Dockerfile
May 19, 2022
c843890
Update load.cpp (#1177)
dchassin May 23, 2022
8073bde
Add missing default fuse replacement time (#1176)
dchassin May 23, 2022
f6e6283
Fix copyright dates/info on splash screen
dchassin Jun 5, 2022
c1a85ea
Update version number in docs
Jun 8, 2022
f381f00
Update json2md.py
Jun 9, 2022
c68a4f1
Update load.cpp
dchassin Jun 11, 2022
a9c8f36
Update market documentation
dchassin Jun 12, 2022
d9a808d
Update node.cpp
Jun 14, 2022
8e6f3ae
Add support for reverse geocode (#1182)
dchassin Jun 14, 2022
cc3579d
Add airport lookup (#1181)
dchassin Jun 14, 2022
b4b91e0
Merge pull request #1184 from slacgismo/develop-fix-node-violation-de…
johnsonhsiung Jun 14, 2022
f8dcd35
Add meteostat tool (#1180)
dchassin Jun 15, 2022
87db41a
Add session 1 tutorials (#1185)
dchassin Jun 17, 2022
06b8cfe
Update and rename Datetime.md to Timestamp.md
dchassin Jun 22, 2022
924cdfc
Update load.cpp
dchassin Jun 25, 2022
3fa358c
Merge branch 'develop' of https://github.com/slacgismo/gridlabd into …
dchassin Jun 25, 2022
1370daa
Fix meteostat autotest
Jun 25, 2022
8618e47
Update load.cpp
dchassin Jun 26, 2022
eca272d
Merge branch 'develop' of https://github.com/slacgismo/gridlabd into …
dchassin Jun 26, 2022
6d6e8f1
Update object.cpp
dchassin Jul 9, 2022
ba2a737
Update gridlabd-template
dchassin Jul 10, 2022
a813e00
Update gridlabd-template
dchassin Jul 10, 2022
b3e1d6f
Create README.md
dchassin Jul 11, 2022
773e00c
Fix meteostat autotest
Jul 11, 2022
e740291
Update gridlabd-template
dchassin Jul 12, 2022
61a4b67
Stop meteostat instability from causing autotest failures
Jul 13, 2022
ceb9fe1
Fix class event handlers (#1192)
dchassin Aug 1, 2022
0ebaf45
Add xlsx-workbook2csv-table converter (#1191)
dchassin Aug 1, 2022
7ff72cc
Add 'read_dlp' tool (#1188)
dchassin Aug 1, 2022
c105322
Add setup for version.gridlabd.us server (#1178)
dchassin Aug 1, 2022
44b59ed
Update library.csv
Aug 1, 2022
9fc5a19
Update gridlabd-template
Aug 5, 2022
7fd5239
Fix node undervoltage violation limit (#1199)
dchassin Aug 6, 2022
9586c15
Update python.cpp
dchassin Aug 6, 2022
6b18b2e
Update object.cpp
dchassin Aug 6, 2022
18b13fd
Fix sprintf vulnerabilities (#1195)
dchassin Aug 9, 2022
7415ff4
Enhance pole analysis (#1186)
Sep 7, 2022
3dfda09
Update Meter.md (#1207)
aivanova5 Sep 15, 2022
c04241b
Updating docker image base (#1208)
aivanova5 Sep 20, 2022
3016194
Update requirements.txt (#1209)
aivanova5 Sep 23, 2022
40c2ef7
Develop fix template load errors (#1215)
aivanova5 Oct 26, 2022
4f092e9
Update README.md (#1217)
dchassin Nov 4, 2022
bea1ac7
Fix deferred initialization in python on_init event handlers (#1219)
dchassin Nov 6, 2022
9a91fb9
Update README.md
dchassin Nov 9, 2022
ebdbfe6
Update LICENSE
dchassin Nov 10, 2022
3cdedd1
Fiona requirements.py update (#1222)
aivanova5 Nov 11, 2022
558fa7c
Fix json error in version output (#1223)
dchassin Nov 14, 2022
204d59e
Fix tmy32glm (#1229)
dchassin Dec 3, 2022
cff9084
Add gridlabd-model subcommand (#1230)
dchassin Dec 4, 2022
4f8e3a9
Add create_meters tool (#1226)
dchassin Dec 4, 2022
06c92d6
Fix 'gridlabd help' command output
dchassin Dec 22, 2022
7fb2e96
Pole module fixes for validation (#1221)
aivanova5 Dec 23, 2022
336ca01
Fix subcommand and tool help data
dchassin Dec 23, 2022
e3622a5
Update fit_filter.py
dchassin Dec 23, 2022
2f0faab
Update gridlabd-job
dchassin Dec 23, 2022
10d5da7
Fix json save (#1235)
dchassin Jan 4, 2023
5cb5edd
Add support for fast install (#1017)
dchassin Jan 7, 2023
675cbb1
Merge branch 'develop' into develop-fix-help
aivanova5 Jan 7, 2023
b905c0d
Update load.cpp (#1239)
dchassin Jan 17, 2023
3b7e215
Add install tool (#1237)
dchassin Jan 18, 2023
a1587c4
Update cmdarg.cpp (#1211)
dchassin Jan 19, 2023
d59aa2e
Develop update dockerbase (#1245)
aivanova5 Jan 20, 2023
fef3403
Revert "Merge branch 'develop' into develop-fix-help"
aivanova5 Jan 21, 2023
99cb76a
Bump ipython from 7.31.1 to 8.10.0 in /module/resilience/docs (#1249)
dependabot[bot] Mar 9, 2023
9c611e4
Merge branch 'develop' into develop-fix-help
aivanova5 Mar 9, 2023
2eec9a3
Fix ICA violation test speed issues (#1183)
dchassin Mar 10, 2023
9f68226
Merge branch 'develop' of https://github.com/slacgismo/gridlabd into …
aivanova5 Mar 10, 2023
ea828ab
Fix error message when branch is not found in repo (#1214)
dchassin Mar 11, 2023
9094a88
Resetting to develop-add-ductbank branch due to merge issues (#1254)
aivanova5 Mar 11, 2023
3b680ac
Develop add aws install (#1255)
aivanova5 Mar 11, 2023
b22f00d
Restoring missing commits (#1256)
aivanova5 Mar 11, 2023
67e5af7
Add ductbank thermal model (#1257)
aivanova5 Mar 11, 2023
7bb0fb6
Update vegetation geodata package to include contact (#1205)
xwang78su Mar 11, 2023
0eeae6a
Updating documentation to reflect config.csv converter use (#1259)
aivanova5 Mar 17, 2023
b1a643a
Add json2glm converter options to ignore the clock (#1233)
aivanova5 Mar 17, 2023
844be9c
Add cyme converter (#1204)
xiefuhong Mar 31, 2023
c8ea945
Develop implement venv (#1253)
Thistleman Apr 11, 2023
045d10a
Update python.cpp (#1261)
dchassin Apr 11, 2023
15231e5
Update unitfile.txt (#1263)
dchassin Apr 11, 2023
abe531b
Fix issue with CYME converter for CYME 9 Rev 6 MDB files (#1271)
MitchellAV Apr 11, 2023
cc8b4ea
Fixing test_datasets.glm (#1267)
aivanova5 Apr 11, 2023
0ba8b23
Update README.md
dchassin Apr 14, 2023
e2d8be5
Update user manuals (#862)
dchassin Apr 15, 2023
8bc1df1
Fix date/time handling in create_players tool (#1236)
aivanova5 Apr 15, 2023
fdbaf51
(#1277) Added additional check and errors for non-SPCT transformers t…
ftuffner Apr 23, 2023
351d732
Fix build warnings (#1279)
dchassin Apr 24, 2023
c67bcf2
Add advanced load model class to powerflow (#1216)
dchassin Apr 26, 2023
5f2fb0e
Add loaddata subcommand (#1272)
dchassin Apr 26, 2023
2f9298e
Add create_schedule tool (#1278)
dchassin Apr 26, 2023
b99676c
Fix setup/build/install scripts (#1282)
dchassin May 12, 2023
c2dfe85
Restructuring create_meters (#1264)
aivanova5 May 16, 2023
c5f21b3
Update CI-CD Process and Automate image generation (#1228)
Thistleman May 16, 2023
299aa86
Update README.md
dchassin May 17, 2023
d504d7b
ci-cd bug fix and adjustment
Stanford-CVX-group May 17, 2023
d096b7b
ignore validate error to publish image for debugging
Stanford-CVX-group May 17, 2023
01ea597
adding docker image with repo and validation error saved
Stanford-CVX-group May 17, 2023
b086b00
confirmed error was virtualization-ception issue. Cleaned and done.
Stanford-CVX-group May 17, 2023
ed8bec6
(#1277) Added additional check and errors for non-SPCT transformers t…
dchassin May 20, 2023
d809db3
Develop fix cite (#1288)
dchassin May 20, 2023
8a478e2
Add server subcommand and gldserver module (#1292)
dchassin May 31, 2023
5b6d1b9
Rename tools/test_server.glm to tools/autotest/test_server.glm (#1293)
dchassin Jun 1, 2023
457dc2c
Update AWS S3/EC2 sync operations (#1290) (#1291)
Thistleman Jun 1, 2023
43734b1
forgot to limit develop-image to only push to develop, and removed pr...
Stanford-CVX-group Jun 1, 2023
0e3b7b5
Merge remote-tracking branch 'origin/master' into develop
Jun 1, 2023
974ebd9
workflow tweaks for develop and master docker image generations
Stanford-CVX-group Jun 1, 2023
8bf3137
Merge branch 'develop' of https://github.com/slacgismo/gridlabd into …
Stanford-CVX-group Jun 1, 2023
526529c
updated packer for develop to remain private
Stanford-CVX-group Jun 1, 2023
32bc00f
Change instances of slacgismo to arras-energy
dchassin Jun 2, 2023
f91787f
Merge branch 'master' into develop
dchassin Jun 2, 2023
4fa1e45
adjusted naming system for AMI for public name and detailed tagname
Stanford-CVX-group Jun 2, 2023
4af1fe8
Merge branch 'master' into develop
dchassin Jun 3, 2023
6979e0d
Restore docs browser files
dchassin Jun 3, 2023
4e6a393
AMI now replaces same name, adjusted workflow order
Stanford-CVX-group Jun 6, 2023
0a2c879
Fix erroneous help messages
dchassin Jun 8, 2023
8006476
Update version.h
dchassin Jun 8, 2023
9805edd
Fix help output
dchassin Jun 9, 2023
a73e750
updated dockerhub image to use arras repo
Thistleman Jun 13, 2023
4111e71
Fixes #1284 - Updated CYME converter to solve outstanding problems (#…
MitchellAV Jun 26, 2023
3337df7
Fix metar2glm (#1302)
dchassin Jun 26, 2023
724f92b
Fix diesel torque unit (#1301)
dchassin Jun 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 51 additions & 24 deletions .github/workflows/develop-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,22 @@ jobs:

runs-on: ubuntu-latest
environment: Integration
needs: buildAWSUbuntuAMI
needs: buildUbuntu22FastS3

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Run CF invalidation
run: aws cloudfront create-invalidation --distribution-id ${{ secrets.DEV_CF_ID }} --paths '/*'

- name: Login to DockerHub
uses: docker/login-action@v1
with:
Expand All @@ -226,7 +236,7 @@ jobs:
context: .
file: ./docker/packer/Dockerfile.dev.ul
push: true
tags: hipas/gridlabd:develop
tags: lfenergy/arras:develop

updateS3websites:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -260,27 +270,44 @@ jobs:
- name: Run CF invalidation
run: aws cloudfront create-invalidation --distribution-id ${{ secrets.DEV_CF_ID }} --paths '/*'

- name: Install dependencies and package Lambda function
run: |
pip install -r ./cloud/websites/version.gridlabd.us/lambda/requirements.txt -t ./cloud/websites/version.gridlabd.us/lambda/package
cd ./cloud/websites/version.gridlabd.us/lambda/package
zip -r ../lambda.zip .
cd ..
zip -r lambda.zip app.py
versionUpdate:

- name: Update Lambda image version_handler
run: |
aws lambda update-function-code --function-name version_handler --zip-file fileb://$(pwd)/cloud/websites/version.gridlabd.us/lambda/lambda.zip

- name: Update Lambda image update_latest
run: |
aws lambda update-function-code --function-name update_latest --zip-file fileb://$(pwd)/cloud/websites/version.gridlabd.us/lambda/lambda.zip
runs-on: ubuntu-latest
environment: Integration
needs: buildAWSUbuntuAMI

- name: Make POST request to version.gridlabd.us/update
run: |
version=$(./build-aux/version.sh --version)
build=$(./build-aux/version.sh --number)
branch=$(./build-aux/version.sh --branch)
curl -f -X POST "https://version.gridlabd.us/update_latest" \
-H "Content-Type: application/json" \
-d "{\"version\": \"$version\", \"build\": \"$build\", \"branch\": \"$branch\", \"sk\": \"${{ secrets.DEVELOPSK }}\"}"
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Install dependencies and package Lambda function
run: |
pip install -r ./cloud/websites/version.gridlabd.us/lambda/requirements.txt -t ./cloud/websites/version.gridlabd.us/lambda/package
cd ./cloud/websites/version.gridlabd.us/lambda/package
zip -r ../lambda.zip .
cd ..
zip -r lambda.zip app.py

- name: Update Lambda image version_handler
run: |
aws lambda update-function-code --function-name version_handler --zip-file fileb://$(pwd)/cloud/websites/version.gridlabd.us/lambda/lambda.zip

- name: Update Lambda image update_latest
run: |
aws lambda update-function-code --function-name update_latest --zip-file fileb://$(pwd)/cloud/websites/version.gridlabd.us/lambda/lambda.zip

- name: Make POST request to version.gridlabd.us/update
run: |
version=$(./build-aux/version.sh --version)
build=$(./build-aux/version.sh --number)
branch=$(./build-aux/version.sh --branch)
curl -f -X POST "https://version.gridlabd.us/update_latest" \
-H "Content-Type: application/json" \
-d "{\"version\": \"$version\", \"build\": \"$build\", \"branch\": \"$branch\", \"sk\": \"${{ secrets.DEVELOPSK }}\"}"
75 changes: 51 additions & 24 deletions .github/workflows/master-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,22 @@ jobs:

runs-on: ubuntu-latest
environment: Integration
needs: buildAWSUbuntuAMI
needs: buildUbuntu22FastS3

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Run CF invalidation
run: aws cloudfront create-invalidation --distribution-id ${{ secrets.PROD_CF_ID }} --paths '/*'

- name: Set output
run: |
echo "VERSION=$(./build-aux/version.sh --version)" >> $GITHUB_ENV
Expand All @@ -204,7 +214,7 @@ jobs:
context: .
file: ./docker/packer/Dockerfile.prod.ul
push: true
tags: hipas/gridlabd:latest, hipas/gridlabd:${{ env.VERSION }}
tags: lfenergy/arras:latest, lfenergy/arras:${{ env.VERSION }}

updateS3websites:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -238,27 +248,44 @@ jobs:
- name: Run CF invalidation
run: aws cloudfront create-invalidation --distribution-id ${{ secrets.PROD_CF_ID }} --paths '/*'

- name: Install dependencies and package Lambda function
run: |
pip install -r ./cloud/websites/version.gridlabd.us/lambda/requirements.txt -t ./cloud/websites/version.gridlabd.us/lambda/package
cd ./cloud/websites/version.gridlabd.us/lambda/package
zip -r ../lambda.zip .
cd ..
zip -r lambda.zip app.py
versionUpdate:

- name: Update Lambda image version_handler
run: |
aws lambda update-function-code --function-name version_handler --zip-file fileb://$(pwd)/cloud/websites/version.gridlabd.us/lambda/lambda.zip

- name: Update Lambda image update_latest
run: |
aws lambda update-function-code --function-name update_latest --zip-file fileb://$(pwd)/cloud/websites/version.gridlabd.us/lambda/lambda.zip
runs-on: ubuntu-latest
environment: Integration
needs: buildAWSUbuntuAMI

- name: Make POST request to version.gridlabd.us/update
run: |
version=$(./build-aux/version.sh --version)
build=$(./build-aux/version.sh --number)
branch=$(./build-aux/version.sh --branch)
curl -f -X POST "https://version.gridlabd.us/update_latest" \
-H "Content-Type: application/json" \
-d "{\"version\": \"$version\", \"build\": \"$build\", \"branch\": \"$branch\", \"sk\": \"${{ secrets.MASTERSK }}\"}"
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Install dependencies and package Lambda function
run: |
pip install -r ./cloud/websites/version.gridlabd.us/lambda/requirements.txt -t ./cloud/websites/version.gridlabd.us/lambda/package
cd ./cloud/websites/version.gridlabd.us/lambda/package
zip -r ../lambda.zip .
cd ..
zip -r lambda.zip app.py

- name: Update Lambda image version_handler
run: |
aws lambda update-function-code --function-name version_handler --zip-file fileb://$(pwd)/cloud/websites/version.gridlabd.us/lambda/lambda.zip

- name: Update Lambda image update_latest
run: |
aws lambda update-function-code --function-name update_latest --zip-file fileb://$(pwd)/cloud/websites/version.gridlabd.us/lambda/lambda.zip

- name: Make POST request to version.gridlabd.us/update
run: |
version=$(./build-aux/version.sh --version)
build=$(./build-aux/version.sh --number)
branch=$(./build-aux/version.sh --branch)
curl -f -X POST "https://version.gridlabd.us/update_latest" \
-H "Content-Type: application/json" \
-d "{\"version\": \"$version\", \"build\": \"$build\", \"branch\": \"$branch\", \"sk\": \"${{ secrets.MASTERSK }}\"}"
151 changes: 151 additions & 0 deletions cloud/websites/docs.gridlabd.us/_config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
// config.js
// Copyright (C) 2019 Regents of the Leland Stanford Junior University
//
// This module set the document specifications `host`, `owner`, `project`, `branch`, and `doc`
// as given by the URL, or if absent, as given by the current defaults
//
var package = "Docs-Browser";
var version = "0.1";
var branch = "prototype";
var logorepo = "https://raw.githubusercontent.com/slacgismo/docs-browser/" + branch + "/src/"
var doelogo = logorepo + "doe-logo.png"
var sulogo = logorepo + "stanford-logo.png";
var slaclogo = logorepo + "slac-logo.png";
var gismologo = logorepo + "gismo-logo.png";
var icon = logorepo + "icon.png";
var source = "https://github.com/slacgismo/docs-browser/tree/" + branch + "";
var website = "http://www.slacgismo.org/";
var banner = '<TABLE WIDTH="100%" CELLPADDING=0 CELLSPACING=0 BORDER=0><TR><TD VALIGN="bottom" ALIGN="left"><A HREF="' + source + '" TARGET="_blank"><TABLE><TR><TD><IMG HEIGHT=' + top_panel_height + ' SRC="' + icon + '" />&nbsp;</TD><TD ALIGN="left" VALIGN="middle"><B>' + package + '</B><BR/>Version ' + version + ' by SLAC GISMo</TD></TR></TABLE></A></TD><TD ALIGN="right" VALIGN="middle">'
+ '<A HREF="https://www.energy.gov/science-innovation/electric-power" TARGET="_blank"><IMG HEIGHT=' + top_panel_height + ' SRC="' + doelogo + '" /></A>&nbsp;'
+ '<A HREF="https://www.stanford.edu/" TARGET="_blank"><IMG HEIGHT=' + top_panel_height + ' SRC="' + sulogo + '" /></A>&nbsp;'
+ '<A HREF="https://slac.stanford.edu/" TARGET="_blank"><IMG HEIGHT=' + top_panel_height + ' SRC="' + slaclogo + '" /></A>&nbsp;'
+ '<A HREF="' + website + '" TARGET="_blank"><IMG HEIGHT=' + top_panel_height + ' SRC="' + gismologo + '" /></A>'
+ '</TD></TR></TABLE>';
var year = (new Date()).getFullYear();
if ( year > 2019 )
{
year = "2019-" + year;
}
var copyright = '<A HREF="https://raw.githubusercontent.com/slacgismo/docs-browser/master/LICENSE" TARGET="_blank">Copyright (C) ' + year + ', Regents of the Leland Stanford Junior University</A>';
var query = new URLSearchParams(window.location.search);

function set_default(name, value)
{
// console.info("set_default('" + name + "',value='" + value + "') --> cookie = '" + document.cookie + "'");
if ( document.cookie.indexOf("BLOCKED=") >= 0 )
{
return;
}
if ( value == null )
{
document.cookie = name + "=;";
}
else
{
document.cookie = name + "=" + value + ";path=/; expires=36524";
}
}

function get_default(name,deflt,asnull)
{
// console.info("get_default('" + name + "',value='" + deflt + "')...");
var value = query.get(name);
var type = 'query';
if ( value == null )
{
var ca = document.cookie.split(';');
// console.info(" cookie = " + ca);
for ( var i = 0 ; i < ca.length ; i++ )
{
var c = ca[i].trim();
if ( c.indexOf(name+'=') == 0 )
{
value = c.substring(c.indexOf('=')+1, c.length);
type = 'cookie';
}
}
if ( value == null )
{
value = deflt;
type = 'default';
}
}
if ( asnull != null && value === asnull )
{
value = null;
type += ' asnull'
}
// console.info(" " + type + " --> " + name + " = '" + deflt + "'");
return value;
}

var host = get_default('host',default_host,null);
var owner = get_default('owner',default_owner,null);
var project = get_default('project',default_project,null);
var branch = get_default('branch',default_branch,null);
var doc = get_default('doc',default_doc,null);
var folder = get_default('folder',"",null);
var github_authorization_token = get_default('token',null,'');
var search_keyword = get_default('search',"",null);

function save_defaults()
{
set_default("host",host)
set_default("owner",owner);
set_default("project",project);
set_default("branch",branch);
set_default("folder",folder);
set_default("doc",doc);
}

function run_query(query)
{
// console.info("Running query '" + query + "'...")
var r = new XMLHttpRequest();
r.open('GET',query,false);
if ( github_authorization_token != null )
{
// console.info("API authorization token: ",github_authorization_token);
r.setRequestHeader("Authorization","token " + github_authorization_token);
}
r.send(null);
// console.info(" status -> " + r.status);
return r;
}
function reload_frameset()
{
top.frames.document.location.href=top.frames.document.location.href;
}

function cookie_view()
{
if ( document.cookie == "" )
alert("No data stored");
else if ( document.cookie.indexOf("BLOCKED=") >= 0 )
alert("The cookie is blocked. Use 'Clear' to unblock it.")
else
alert("Current data:\n\n" + document.cookie);
}

function cookie_clear(no_confirm)
{
if ( no_confirm || confirm("Clearing the cookie will delete all current data and unblock the cookie.\n\nIs this ok? ") )
{
var cookies = document.cookie.split(";");
for (var i = 0; i < cookies.length; i++) {
var cookie = cookies[i];
var eqPos = cookie.indexOf("=");
var name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT";
}
}
}

function cookie_block()
{
if ( confirm("Blocking the cookie will delete all current data.\n\nIs this ok?") )
{
cookie_clear(true);
document.cookie = "BLOCKED";
}
}
Loading