Commit 5ed7b5c3 authored by Jonathon Duerig's avatar Jonathon Duerig

Improve cache management for require.js

parent 239011c5
......@@ -355,5 +355,12 @@ class Instance
}
return array($pcount, $phours);
}
#
# Determine Commit Hash of Emulab Install
#
function CommitHash() {
return mysql_fetch_array(DBQueryFatal("select value from version_info where name='commithash'"))[0];
}
}
?>
......@@ -28,7 +28,8 @@ window.APT_OPTIONS.configObject = {
'underscore': { exports: '_' },
'filesize' : { exports: 'filesize' },
'contextmenu': { },
}
},
urlArgs: "version=" + APT_COMMIT_HASH
};
window.APT_OPTIONS.initialize = function (sup)
......
......@@ -161,8 +161,9 @@ $PAGEHEADER_FUNCTION = function($thinheader = 0, $ignore1 = NULL,
type='image/vnd.microsoft.icon'>
<link rel='stylesheet' href='css/bootstrap.css'>
<link rel='stylesheet' href='css/quickvm.css'>
<link rel='stylesheet' href='css/$APTSTYLE'>
<script src='js/common.js'></script>
<link rel='stylesheet' href='css/$APTSTYLE'>";
echo "<script>APT_COMMIT_HASH='" . Instance::CommitHash() . "';</script>";
echo "<script src='js/common.js'></script>
<script src='https://www.emulab.net/emulab_sup.js'></script>
</head>
<body style='display: none;'>\n";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment