Skip to content

Commit 2bc74e4

Browse files
authored
Merge pull request #175 from dls-controls/no-initial-query
No initial query
2 parents f2721aa + 7b4d164 commit 2bc74e4

File tree

7 files changed

+0
-50
lines changed

7 files changed

+0
-50
lines changed

src/connection/coniql.ts

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -188,38 +188,6 @@ function coniqlToDType(
188188
);
189189
}
190190

191-
const PV_QUERY = gql`
192-
query query1($pvName: ID!) {
193-
getChannel(id: $pvName) {
194-
id
195-
time {
196-
datetime
197-
}
198-
value {
199-
string
200-
float
201-
base64Array {
202-
numberType
203-
base64
204-
}
205-
}
206-
status {
207-
quality
208-
message
209-
mutable
210-
}
211-
display {
212-
units
213-
form
214-
controlRange {
215-
max
216-
min
217-
}
218-
}
219-
}
220-
}
221-
`;
222-
223191
const PV_SUBSCRIPTION = gql`
224192
subscription sub1($pvName: ID!) {
225193
subscribeChannel(id: $pvName) {
@@ -347,17 +315,6 @@ export class ConiqlPlugin implements Connection {
347315
}
348316

349317
private _subscribe(pvName: string): Subscription {
350-
// Make a query to get the initial values.
351-
// https://github.com/apollographql/subscriptions-transport-ws/issues/170
352-
this.client
353-
.query({
354-
query: PV_QUERY,
355-
variables: { pvName: pvName }
356-
})
357-
.then(data => {
358-
this._process(data, pvName, "getChannel");
359-
});
360-
// Subscribe to further updates.
361318
return this.client
362319
.subscribe({
363320
query: PV_SUBSCRIPTION,

src/connection/forwarder.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ export class ConnectionForwarder implements Connection {
1313
this.connected = false;
1414
}
1515
private getConnection(pvName: string): Connection {
16-
console.log("getConnection");
17-
console.log(pvName);
1816
for (const [prefix, connection] of this.prefixConnections) {
1917
if (pvName.startsWith(prefix)) {
2018
if (connection !== undefined) {

src/connection/sim.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ it("test illegal names", (): void => {
8686

8787
it("test enum", (): void => {
8888
getValue("sim://enum", (value: DType): void => {
89-
console.log(value);
9089
expect(
9190
["one", "two", "three", "four"].indexOf(DType.coerceString(value))
9291
).toBeGreaterThan(-1);

src/redux/connectionMiddleware.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ export const connectionMiddleware = (connection: Connection) => (
4646

4747
switch (action.type) {
4848
case SUBSCRIBE: {
49-
console.log(action.payload);
5049
const { pvName, type } = action.payload;
5150
// Are we already subscribed?
5251
const effectivePvName = connection.subscribe(pvName, type);

src/ui/widgets/EmbeddedDisplay/bobParser.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ describe("opi widget parser", (): void => {
8585
</display>`;
8686
it("handles a missing dimension", (): void => {
8787
const display = parseBob(noXString, "xxx");
88-
console.log(display);
8988
// Is this correct?
9089
expect(display.x).toEqual(undefined);
9190
});

src/ui/widgets/Slideshow/slideshow.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ describe("<Slideshow />", (): void => {
2626
});
2727

2828
test("it renders only one child component", () => {
29-
// console.log(mounted.find("#child-element").debug());
3029
expect(mounted.find("#child-element")).toHaveLength(1);
3130
});
3231

src/ui/widgets/Slideshow/slideshow.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ export const SlideshowComponent = (
132132
flexGrow: 0
133133
}}
134134
onClick={(): void => {
135-
console.log("Next button");
136135
setTransition(slideRightTransition);
137136
setChildIndex(
138137
nextChildIndex(childIndex, props.children?.length ?? 0)

0 commit comments

Comments
 (0)