Skip to content

Commit

Permalink
clean up diff
Browse files Browse the repository at this point in the history
  • Loading branch information
M-Kusumgar committed Nov 6, 2024
1 parent 8c51df0 commit 8c6f497
Show file tree
Hide file tree
Showing 17 changed files with 1 addition and 27 deletions.
4 changes: 0 additions & 4 deletions app/static/src/apiService.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


import axios, { AxiosError, AxiosResponse } from "axios";
import { Commit } from "vuex";
import { freezer } from "./utils";
Expand Down Expand Up @@ -34,9 +32,7 @@ export interface API<S, E> {
get<T>(url: string): Promise<void | ResponseWithType<T>>;
}


type OnError = (failure: ResponseFailure) => void;

type OnSuccess = (success: ResponseSuccess) => void;

export class APIService<S extends string, E extends string> implements API<S, E> {
Expand Down
2 changes: 0 additions & 2 deletions app/static/src/components/WodinPlot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export default defineComponent({
// Only used as an indicator that redraw is required when this changes - the data to display is calculated by
// plotData function using these solutions
redrawWatches: {
type: Array as PropType<any[]>,
required: true
},
Expand Down Expand Up @@ -102,7 +101,6 @@ export default defineComponent({
const lastYAxisFromZoom: Ref<Partial<LayoutAxis> | null> = ref(null);
const commitYAxisRange = () => {
const plotLayout = (plot.value as any).layout;
const yRange = plotLayout.yaxis?.range;
if (plotLayout) {
Expand Down
1 change: 0 additions & 1 deletion app/static/src/components/WodinSession.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export default defineComponent({
const appInitialised = computed(() => !!store.state.config && !!store.state.sessions.sessionsMetadata);
// These props won't change as provided by server
const { appName, baseUrl, loadSessionId, appsPath, enableI18n, defaultLanguage } = props;
store.dispatch(AppStateAction.InitialiseApp, {
Expand Down
1 change: 0 additions & 1 deletion app/static/src/components/options/ParameterSetView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ export default defineComponent({
};
const saveButton = ref<HTMLButtonElement | null>(null);
const cancelEditDisplayName = (event: FocusEvent) => {
if (event.relatedTarget && event.relatedTarget === (saveButton.value as any).$el) return;
store.commit(`run/${RunMutation.TurnOffDisplayNameError}`, props.parameterSet.name);
newDisplayName.value = props.parameterSet.displayName;
Expand Down
1 change: 0 additions & 1 deletion app/static/src/components/options/ParameterValues.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ export default defineComponent({
const paramVaryFlags = computed(() => {
return paramNames.value.reduce((values: Dict<boolean>, key: string) => {
values[key] = paramsToVary.value.includes(key);
return values;
}, {} as Dict<boolean>);
Expand Down
1 change: 0 additions & 1 deletion app/static/src/components/run/RunPlot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ const allPlotData = (start: number, end: number, points: number): WodinPlotData
const lineStylesForParamSets = computed(() => store.getters[`run/${RunGetter.lineStylesForParameterSets}`]);
const updatePlotTraceNameWithParameterSetName = (plotTrace: Partial<PlotData>, setName: string) => {
plotTrace.name = `${plotTrace.name} (${setName})`;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export default defineComponent({
const allFitData = computed(() => store.getters[`fitData/${FitDataGetter.allData}`]);
const allPlotData = (start: number, end: number, points: number): WodinPlotData => {
const result: Partial<PlotData>[] = [];
const result: WodinPlotData = [];
if (solutions.value.length) {
const { pars } = store.state.sensitivity.result!.batch!;
const time = {
Expand Down Expand Up @@ -156,7 +156,6 @@ export default defineComponent({
const plotlyOptions = { includeLegendGroup: true };
const filterStochasticCentralOutput = (centralOutput: OdinSeriesSet) => {
// Only show summary and deterministic values as central for stochastic
centralOutput.values = centralOutput.values.filter(
(v: DiscreteSeriesValues) => v.description !== "Individual"
);
Expand Down
2 changes: 0 additions & 2 deletions app/static/src/csvUpload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ import { WodinError } from "./types/responseTypes";
import { processFitData, ProcessFitDataResult } from "./utils";
import { SetDataPayload } from "./store/fitData/mutations";


type OnError = (error: WodinError) => void;

type OnSuccess = (success: SetDataPayload) => void;
type PostSuccess = () => void;

Expand Down
4 changes: 0 additions & 4 deletions app/static/src/directives/tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export default {
if (typeof value === "string") {
// disabling no-new lint error as bootstrap
// needs the new keyword

new Tooltip(el, {
title: value,
placement: "top",
Expand All @@ -27,7 +26,6 @@ export default {
});
} else {
const variant = value?.variant || "text";

new Tooltip(el, {
title: value?.content || "",
placement: value?.placement || "top",
Expand All @@ -47,7 +45,6 @@ export default {
const variant = value?.variant || "text";
const oldCustomClass = variant === "text" ? "" : `tooltip-${variant}`;


const isVariantSame = (tooltip as any)._config.customClass === oldCustomClass;
if (!isVariantSame) {
tooltip.dispose();
Expand All @@ -66,7 +63,6 @@ export default {
const content = typeof value === "string" ? value : value?.content || "";

if (tooltip) {

const configuredTooltip = tooltip as any;
configuredTooltip._config.title = content;
const { trigger } = configuredTooltip._config;
Expand Down
1 change: 0 additions & 1 deletion app/static/src/excel/wodinExcelDownload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export abstract class WodinExcelDownload {

protected readonly _state: AppState;


protected readonly _rootGetters: any;

protected readonly _commit: Commit;
Expand Down
1 change: 0 additions & 1 deletion app/static/src/plot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,5 @@ export const updatePlotTraceName = (
if (parameterSetName) {
parenthesisItems.push(parameterSetName);
}

plotTrace.name = `${plotTrace.name} (${parenthesisItems.join(" ")})`;
};
1 change: 0 additions & 1 deletion app/static/src/serialise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ export const deserialiseState = (targetState: AppState, serialised: SerialisedAp
!graphs.config[0].selectedVariables.length &&
!graphs.config[0].unselectedVariables?.length
) {

const selectedVariables = [...(model.odinModelResponse?.metadata?.variables || [])];
const unselectedVariables: string[] = [];

Expand Down
1 change: 0 additions & 1 deletion app/static/src/store/basic/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import { multiSensitivity } from "../multiSensitivity/multiSensitivity";

const language = getStoreModule();


const defaultState: () => any = () => {
return {
sessionId: newUid(),
Expand Down
1 change: 0 additions & 1 deletion app/static/src/store/fit/fit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import { multiSensitivity } from "../multiSensitivity/multiSensitivity";

const language = getStoreModule();


const defaultState: () => any = () => {
return {
sessionId: newUid(),
Expand Down
1 change: 0 additions & 1 deletion app/static/src/types/responseTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ export interface OdinParameter {
default: null | number;
min: null | number;
max: null | number;

is_integer: boolean;
rank: number;
}
Expand Down
1 change: 0 additions & 1 deletion app/static/src/types/utilTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ import { ActionContext } from "vuex";

export type Dict<V> = { [k: string]: V };


export type AppCtx = ActionContext<any, any>;
2 changes: 0 additions & 2 deletions app/static/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import { AppState } from "./store/appState/state";
import { AdvancedComponentType, AdvancedSettings, Tag } from "./store/run/state";

export const freezer = {

deepFreeze: (data: unknown): unknown => {
if (Array.isArray(data)) {
return Object.freeze(data.map((d) => freezer.deepFreeze(d)));
Expand All @@ -36,7 +35,6 @@ export const freezer = {
}
};


export function evaluateScript<T>(script: string): T {
return eval(script) as T;
}
Expand Down

0 comments on commit 8c6f497

Please sign in to comment.