This commit is contained in:
@@ -70,6 +70,7 @@
|
|||||||
<script src="js/app.rfcaseEdit.js?rfv=6.5"></script>
|
<script src="js/app.rfcaseEdit.js?rfv=6.5"></script>
|
||||||
<script src="js/app.rfcases.js?rfv=6.5"></script>
|
<script src="js/app.rfcases.js?rfv=6.5"></script>
|
||||||
<script src="js/app.rfsettings.js?rfv=6.5"></script>
|
<script src="js/app.rfsettings.js?rfv=6.5"></script>
|
||||||
|
<script src="js/app.ops.js?rfv=6.5"></script>
|
||||||
|
|
||||||
<!-- handlebars templates -->
|
<!-- handlebars templates -->
|
||||||
<script src="js/templates/templates.js?rfv=6.5"></script>
|
<script src="js/templates/templates.js?rfv=6.5"></script>
|
||||||
|
|||||||
102
wwwroot/js/app.ops.js
Normal file
102
wwwroot/js/app.ops.js
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
/*jslint browser : true, continue : true,
|
||||||
|
devel : true, indent : 2, maxerr : 50,
|
||||||
|
newcap : true, nomen : true, plusplus : true,
|
||||||
|
regexp : true, sloppy : true, vars : false,
|
||||||
|
white : true
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*global $, app */
|
||||||
|
|
||||||
|
app.ops = (function() {
|
||||||
|
"use strict";
|
||||||
|
//---------------- BEGIN MODULE SCOPE VARIABLES --------------
|
||||||
|
var stateMap = {},
|
||||||
|
configModule,
|
||||||
|
//onChangePassword,
|
||||||
|
initModule;
|
||||||
|
//----------------- END MODULE SCOPE VARIABLES ---------------
|
||||||
|
|
||||||
|
//------------------- BEGIN UTILITY METHODS ------------------
|
||||||
|
//-------------------- END UTILITY METHODS -------------------
|
||||||
|
|
||||||
|
//------------------- BEGIN EVENT HANDLERS -------------------
|
||||||
|
|
||||||
|
///////////////////////////////
|
||||||
|
//ONUPDATE
|
||||||
|
//
|
||||||
|
// onChangePassword = function(event) {
|
||||||
|
// event.preventDefault();
|
||||||
|
// $.gevent.publish("app-clear-error");
|
||||||
|
// //get form data
|
||||||
|
// var formData = $("form").serializeArray({
|
||||||
|
// checkboxesAsBools: true
|
||||||
|
// });
|
||||||
|
|
||||||
|
// var submitData = app.utilB.objectifyFormDataArray(formData);
|
||||||
|
|
||||||
|
// app.api.create(
|
||||||
|
// "user/" + app.shell.stateMap.user.id + "/changepassword",
|
||||||
|
// submitData,
|
||||||
|
// function(res) {
|
||||||
|
// if (res.error) {
|
||||||
|
// $.gevent.publish("app-show-error", res.msg);
|
||||||
|
// } else {
|
||||||
|
// page("#!/logout");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// );
|
||||||
|
|
||||||
|
// return false; //prevent default?
|
||||||
|
// };
|
||||||
|
//-------------------- END EVENT HANDLERS --------------------
|
||||||
|
|
||||||
|
//------------------- BEGIN PUBLIC METHODS -------------------
|
||||||
|
//CONFIGMODULE
|
||||||
|
//
|
||||||
|
configModule = function(context) {
|
||||||
|
stateMap.context = context.context;
|
||||||
|
if (stateMap.context.params.id) {
|
||||||
|
stateMap.id = stateMap.context.params.id;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
//INITMODULE
|
||||||
|
//
|
||||||
|
initModule = function($container) {
|
||||||
|
if (typeof $container === "undefined") {
|
||||||
|
$container = $("#app-shell-main-content");
|
||||||
|
}
|
||||||
|
$container.html(Handlebars.templates["app.ops"]({}));
|
||||||
|
|
||||||
|
// bind actions
|
||||||
|
// $("#btn-change-password").bind("click", onChangePassword);
|
||||||
|
|
||||||
|
//Context menu
|
||||||
|
app.nav.contextClear();
|
||||||
|
|
||||||
|
app.api.get("ops/status/", function(res) {
|
||||||
|
if (res.error) {
|
||||||
|
$.gevent.publish("app-show-error", res.msg);
|
||||||
|
} else {
|
||||||
|
$("#about").append(
|
||||||
|
"<p>Ops status response: " +
|
||||||
|
res +
|
||||||
|
"</p>"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
//{"mailMirrorOK":true,"forumOK":true,"ayaNovaWebsiteOK":true,"apiWebsiteOK":true,"contactFormOK":true,"requestFormOK":true,"requestLiteFormOK":true,"subversionOK":true,"devOpsOK":true,"backupOK":true,"opsCheckMessage":""}
|
||||||
|
|
||||||
|
////app.nav.setContextTitle("Search");
|
||||||
|
};
|
||||||
|
|
||||||
|
//PUBLIC METHODS
|
||||||
|
//
|
||||||
|
return {
|
||||||
|
configModule: configModule,
|
||||||
|
initModule: initModule
|
||||||
|
};
|
||||||
|
//------------------- END PUBLIC METHODS ---------------------
|
||||||
|
})();
|
||||||
@@ -237,6 +237,7 @@ app.shell = (function () {
|
|||||||
page('/rfcases', rfcases);
|
page('/rfcases', rfcases);
|
||||||
page('/rfcaseEdit/:id', rfcaseEdit);
|
page('/rfcaseEdit/:id', rfcaseEdit);
|
||||||
page('/rfsettings', rfsettings);
|
page('/rfsettings', rfsettings);
|
||||||
|
page('/ops', ops);
|
||||||
page('*', notFound);
|
page('*', notFound);
|
||||||
page({
|
page({
|
||||||
hashbang: true
|
hashbang: true
|
||||||
@@ -539,7 +540,13 @@ app.shell = (function () {
|
|||||||
app.rfsettings.initModule();
|
app.rfsettings.initModule();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var ops = function (ctx) {
|
||||||
|
app.nav.setSelectedMenuItem('ops');
|
||||||
|
app.ops.configModule({
|
||||||
|
context: ctx
|
||||||
|
});
|
||||||
|
app.ops.initModule();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var notFound = function (ctx) {
|
var notFound = function (ctx) {
|
||||||
|
|||||||
16
wwwroot/js/templates/app.ops.handlebars
Normal file
16
wwwroot/js/templates/app.ops.handlebars
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<div>
|
||||||
|
<h2>OPS</h2>
|
||||||
|
<div class="alert alert-success mb-5" id="about" />
|
||||||
|
|
||||||
|
<form id="frm" method="post" action="index.html">
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="oldpassword">Change password</label>
|
||||||
|
<input class="form-control" type="text" id="oldpassword" name="oldpassword" placeholder="current password" value="">
|
||||||
|
<input class="form-control" type="text" id="newpassword" name="newpassword" placeholder="new password" value="">
|
||||||
|
<div class="app-frm-buttons mt-5">
|
||||||
|
<button id="btn-change-password">Update</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
@@ -28,6 +28,10 @@
|
|||||||
<a class="rfac nav-link mdi mdi-bug" href="#!/rfcases">Cases </a>
|
<a class="rfac nav-link mdi mdi-bug" href="#!/rfcases">Cases </a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li id="rfops" class="nav-item">
|
||||||
|
<a class="rfac nav-link mdi mdi-server-network" href="#!/ops">Server Ops </a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li id="rfsettings" class="nav-item">
|
<li id="rfsettings" class="nav-item">
|
||||||
<a class="rfac nav-link mdi mdi-settings" href="#!/rfsettings">Settings </a>
|
<a class="rfac nav-link mdi mdi-settings" href="#!/rfsettings">Settings </a>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user