-
Notifications
You must be signed in to change notification settings - Fork 32
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
Screen autocomplete #97
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,6 +69,7 @@ | |
:target="def.target" | ||
:screen="def.screen" | ||
:definition="def.definition" | ||
:keywords="keywords" | ||
@close-screen="closeScreen(def.id)" | ||
@min-max-screen="refreshLayout" | ||
@add-new-screen="($event) => showScreen(...$event)" | ||
|
@@ -129,6 +130,7 @@ export default { | |
newScreenDialog: false, | ||
grid: null, | ||
api: null, | ||
keywords: [], | ||
menus: [ | ||
{ | ||
label: 'File', | ||
|
@@ -169,6 +171,9 @@ export default { | |
} | ||
this.updateScreens() | ||
}) | ||
Api.get('/openc3-api/autocomplete/keywords/screen').then((response) => { | ||
this.keywords = response.data | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about autocomplete for target,packet,item in valueWidgets? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I punted on that for now. Might be a way to incorporate the existing stuff in there. |
||
}) | ||
}, | ||
mounted() { | ||
this.grid = new Muuri('.grid', { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
# Copyright 2022 Ball Aerospace & Technologies Corp. | ||
# All Rights Reserved. | ||
# | ||
# This program is free software; you can modify and/or redistribute it | ||
# under the terms of the GNU Affero General Public License | ||
# as published by the Free Software Foundation; version 3 with | ||
# attribution addendums as found in the LICENSE.txt | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Affero General Public License for more details. | ||
|
||
# Modified by OpenC3, Inc. | ||
# All changes Copyright 2022, OpenC3, Inc. | ||
# All Rights Reserved | ||
*/ | ||
|
||
import ScreenCompleter from './screenCompleter.js' | ||
|
||
export { ScreenCompleter } |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
# Copyright 2022 Ball Aerospace & Technologies Corp. | ||
# All Rights Reserved. | ||
# | ||
# This program is free software; you can modify and/or redistribute it | ||
# under the terms of the GNU Affero General Public License | ||
# as published by the Free Software Foundation; version 3 with | ||
# attribution addendums as found in the LICENSE.txt | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Affero General Public License for more details. | ||
|
||
# Modified by OpenC3, Inc. | ||
# All changes Copyright 2022, OpenC3, Inc. | ||
# All Rights Reserved | ||
*/ | ||
|
||
import Api from '@openc3/tool-common/src/services/api' | ||
|
||
export default class ScreenCompleter { | ||
constructor() { | ||
Api.get(`/openc3-api/autocomplete/data/screen`).then( | ||
(response) => (this.autocompleteData = response.data) | ||
) | ||
} | ||
getCompletions = function (editor, session, position, prefix, callback) { | ||
callback(null, [...this.autocompleteData]) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't going to scale well to lots of packets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worked ok for 1000 cmd packets generated by loadsim