/*
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2020 Nordix Foundation.
+ * Modifications Copyright (C) 2020-2021 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
var requestURL = window.restRootURL + "/ContextAlbum/Get?name=" + name + "&version=" + version;
ajax_getWithKeyInfo(requestURL, "apexContextAlbum", function(contextAlbum) {
// Get all contextSchemas too for album item schema
- var requestURL = window.restRootURL + "/ContextSchema/Get?name=&version=";
+ requestURL = window.restRootURL + "/ContextSchema/Get?name=&version=";
var contextSchemas = new Array();
ajax_get(requestURL, function(data2) {
for (var i = 0; i < data2.messages.message.length; i++) {
var requestURL = window.restRootURL + "/ContextAlbum/Get?name=" + name + "&version=" + version;
ajax_getWithKeyInfo(requestURL, "apexContextAlbum", function(contextAlbum) {
// Get all contextSchemas too for album item schema
- var requestURL = window.restRootURL + "/ContextSchema/Get?name=&version=";
+ requestURL = window.restRootURL + "/ContextSchema/Get?name=&version=";
var contextSchemas = new Array();
ajax_get(requestURL, function(data2) {
for (var i = 0; i < data2.messages.message.length; i++) {
}
apexUtils_emptyElement(parent);
- var isedit = false;
var createEditOrView = "";
if (!operation) {
createEditOrView = operation.toUpperCase();
}
- if (createEditOrView == "CREATE") {
- isedit = true;
- } else if (createEditOrView == "EDIT" || createEditOrView == "VIEW") {
- if (createEditOrView == "EDIT") {
- isedit = true;
- }
+ if (createEditOrView == "EDIT" || createEditOrView == "VIEW") {
if (!contextAlbum) {
console.warn("Invalid value (\"" + contextAlbum
}
var readonly = $('#editContextAlbumFormAlbumReadOnlyCheckbox').prop('checked');
if (readonly && scope != "EXTERNAL") {
- var message = "Are you sure you want to set the scope ContextAlbum to \""
+ message = "Are you sure you want to set the scope ContextAlbum to \""
+ scope
+ "\" while it is set as Read Only. It only makes sense to use readonly for \"EXTERNAL\" Context Albums. If this Album is readonly it cannot be set!";
if (!apexUtils_areYouSure(message)) {
}
}
if (!readonly && scope == "EXTERNAL") {
- var message = "Are you sure you want to set the scope ContextAlbum to \""
+ message = "Are you sure you want to set the scope ContextAlbum to \""
+ scope
+ "\" while it is not set as Read Only. It only makes sense to use readonly for \"EXTERNAL\" Context Albums since EXTERNAL context cannot be set in policies.";
if (!apexUtils_areYouSure(message)) {
keyInformationTab_reset()
});
} else if (createEditOrView == "EDIT") {
- var requestURL = window.restRootURL + "/ContextAlbum/Update";
+ requestURL = window.restRootURL + "/ContextAlbum/Update";
ajax_put(requestURL, jsonString, function(resultData) {
apexUtils_removeElement("editContextAlbumFormDiv");
contextAlbumTab_reset();
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2020 Nordix Foundation.
+ * Copyright (C) 2020-2021 Nordix Foundation.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
// Find out how long is left to wait
long timeRemaining = parameters.getTimeToLive();
if (timeRemaining >= 0) {
- shutdownLatch.await(timeRemaining, TimeUnit.SECONDS);
+ if (!shutdownLatch.await(timeRemaining, TimeUnit.SECONDS)) {
+ shutdown();
+ }
} else {
shutdownLatch.await();
}