Skip to content

Commit

Permalink
Merge pull request #1146 from sandialabs/markings-bugs
Browse files Browse the repository at this point in the history
Closes #1145 and #1143
  • Loading branch information
Mletter1 authored Nov 6, 2023
2 parents 59efc9e + cd88923 commit e7f2893
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ session-timeout: datetime.timedelta(minutes=1000)
access-log: "-"
access-log-count: 100
access-log-size: 10000000
allowed-markings: ["", "faculty", "airmail"]
selectable-markings: ["", "airmail"]
allowed-markings: ["mna", "faculty", "airmail"]
selectable-markings: ["mna", "airmail"]
authentication: {"plugin":"slycat-password-authentication", "kwargs":{"realm":"Slycat", "rules":[]}}
autoreload: True
cache-store: "/var/lib/slycat/cache-store"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ session-timeout: datetime.timedelta(minutes=1000)
access-log: "-"
access-log-count: 100
access-log-size: 10000000
allowed-markings: ["", "faculty", "airmail"]
selectable-markings: ["", "airmail"]
allowed-markings: ["mna", "faculty", "airmail"]
selectable-markings: ["mna", "airmail"]
authentication: {"plugin":"slycat-no-authentication", "kwargs":{"realm":"Slycat", "rules":[]}}
autoreload: True
cache-store: "/var/lib/slycat/cache-store"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ export default class TimeseriesWizard extends React.Component<
}

getMarkings = () => {
client.get_configuration_markings_fetch().then((markings) => {
client.get_selectable_configuration_markings_fetch().then((markings) => {
markings.sort(function (left: any, right: any) {
return left.type == right.type ? 0 : left.type < right.type ? -1 : 1;
});
Expand Down
22 changes: 22 additions & 0 deletions web-server/js/slycat-web-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,28 @@ module.get_selectable_configuration_markings = function (params) {
});
};

// Fetch version of get_selectable_configuration_markings
module.get_selectable_configuration_markings_fetch = async function (params) {
return fetch(`${api_root}configuration/selectable-markings`, {
credentials: 'same-origin',
cache: 'no-store',
dataType: 'json'
})
.then(async function (response) {
if (!response.ok) {
throw `bad response with: ${response.status} :: ${response.statusText}`;
}
return response.json();
})
.catch(error => {
if (errorFunction) {
errorFunction(error);
} else {
console.log(error)
}
})
};

// Fetch version of get_configuration_markings
module.get_configuration_markings_fetch = async function (params) {
return fetch(`${api_root}configuration/markings`, {
Expand Down
2 changes: 1 addition & 1 deletion web-server/plugins/slycat-no-marking.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
# retains certain rights in this software.

def register_slycat_plugin(context):
context.register_marking("", "None", "")
context.register_marking("mna", "None", "")

0 comments on commit e7f2893

Please sign in to comment.