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

[data-export] fix : Remove client id from data export #339

Merged
merged 2 commits into from
Mar 6, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Version 1.23

- Remove Consumer key input from data export [issue 338](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/338)
- Customize extension's favicon [feature 197](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/197)
- Save default batch size and thread for data import [feature 329](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/329) (feature request by [ritterblau](https://github.com/ritterblau))
- Load recently viewed records on popup [feature 321](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/321)
Expand Down
24 changes: 1 addition & 23 deletions addon/data-export.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ class Model {
this.autocompleteProgress = {};
this.exportProgress = {};
this.queryName = "";
this.clientId = localStorage.getItem(sfHost + "_clientId") ? localStorage.getItem(sfHost + "_clientId") : "";
this.queryTemplates = localStorage.getItem("queryTemplates") ? this.queryTemplates = localStorage.getItem("queryTemplates").split("//") : [
"SELECT Id FROM ",
"SELECT Id FROM WHERE",
Expand Down Expand Up @@ -146,9 +145,6 @@ class Model {
setQueryName(value) {
this.queryName = value;
}
setClientId(value) {
this.clientId = value;
}
setQueryInput(queryInput) {
this.queryInput = queryInput;
queryInput.value = this.initialQuery;
Expand Down Expand Up @@ -251,9 +247,6 @@ class Model {
addToHistory() {
this.savedHistory.add({query: this.getQueryToSave(), useToolingApi: this.queryTooling});
}
saveClientId() {
localStorage.setItem(this.sfHost + "_clientId", this.clientId);
}
removeFromHistory() {
this.savedHistory.remove({query: this.getQueryToSave(), useToolingApi: this.queryTooling});
}
Expand Down Expand Up @@ -1035,7 +1028,6 @@ class App extends React.Component {
this.onClearHistory = this.onClearHistory.bind(this);
this.onSelectSavedEntry = this.onSelectSavedEntry.bind(this);
this.onAddToHistory = this.onAddToHistory.bind(this);
this.onSaveClientId = this.onSaveClientId.bind(this);
this.onRemoveFromHistory = this.onRemoveFromHistory.bind(this);
this.onClearSavedHistory = this.onClearSavedHistory.bind(this);
this.onToggleHelp = this.onToggleHelp.bind(this);
Expand All @@ -1050,7 +1042,6 @@ class App extends React.Component {
this.onDeleteRecords = this.onDeleteRecords.bind(this);
this.onResultsFilterInput = this.onResultsFilterInput.bind(this);
this.onSetQueryName = this.onSetQueryName.bind(this);
this.onSetClientId = this.onSetClientId.bind(this);
this.onStopExport = this.onStopExport.bind(this);
}
onQueryAllChange(e) {
Expand Down Expand Up @@ -1097,12 +1088,6 @@ class App extends React.Component {
model.addToHistory();
model.didUpdate();
}
onSaveClientId(e) {
e.preventDefault();
let {model} = this.props;
model.saveClientId();
model.didUpdate();
}
onRemoveFromHistory(e) {
e.preventDefault();
let r = confirm("Are you sure you want to remove this saved query?");
Expand Down Expand Up @@ -1191,11 +1176,6 @@ class App extends React.Component {
model.setQueryName(e.target.value);
model.didUpdate();
}
onSetClientId(e) {
let {model} = this.props;
model.setClientId(e.target.value);
model.didUpdate();
}
onStopExport() {
let {model} = this.props;
model.stopExport();
Expand Down Expand Up @@ -1320,9 +1300,7 @@ class App extends React.Component {
),
h("input", {placeholder: "Query Label", type: "save", value: model.queryName, onInput: this.onSetQueryName}),
h("button", {onClick: this.onAddToHistory, title: "Add query to saved history"}, "Save Query"),
h("button", {className: model.expandSavedOptions ? "toggle contract" : "toggle expand", title: "Show More Options", onClick: this.onToggleSavedOptions}, h("div", {className: "button-toggle-icon"})),
h("input", {placeholder: "Consumer Key", type: "default", value: model.clientId, onInput: this.onSetClientId}),
h("button", {onClick: this.onSaveClientId, title: "Save Consumer Key"}, "Save"),
h("button", {className: model.expandSavedOptions ? "toggle contract" : "toggle expand", title: "Show More Options", onClick: this.onToggleSavedOptions}, h("div", {className: "button-toggle-icon"}))
),
),
h("div", {className: "query-options"},
Expand Down
10 changes: 5 additions & 5 deletions addon/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,13 +319,13 @@ class App extends React.PureComponent {
},
h("span", {}, "Setup ", h("u", {}, "H"), "ome")),
),
),
h("div", {className: "slds-p-vertical_x-small slds-p-horizontal_x-small"},
h("div", {className: "slds-m-bottom_xx-small"},
h("a", {ref: "optionsBtn", href: "options.html?" + hostArg, target: linkTarget, className: "page-button slds-button slds-button_neutral"}, h("span", {}, "O", h("u", {}, "p"), "tions"))
),
)
),
h("div", {className: "slds-p-vertical_x-small slds-p-horizontal_x-small"},
h("div", {className: "slds-m-bottom_xx-small"},
h("a", {ref: "optionsBtn", href: "options.html?" + hostArg, target: linkTarget, className: "page-button slds-button slds-button_neutral"}, h("span", {}, "O", h("u", {}, "p"), "tions"))
),
),
h("div", {className: "slds-grid slds-theme_shade slds-p-around_x-small slds-border_top"},
h("div", {className: "slds-col slds-size_5-of-12 footer-small-text slds-m-top_xx-small"},
h("a", {href: "https://tprouvot.github.io/Salesforce-Inspector-reloaded/release-note/#version-" + addonVersion.replace(".", ""), title: "Release note", target: linkTarget}, "v" + addonVersion),
Expand Down
Loading