Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #1145 and #1143 #1146

Merged
merged 1 commit into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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", "")