-
-
Notifications
You must be signed in to change notification settings - Fork 379
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
feat: dockge set/update agent friendly name #414
Open
lohrbini
wants to merge
17
commits into
louislam:master
Choose a base branch
from
lohrbini:feat/dockge-agents-friendly-name
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 14 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
c0fc76a
feat: dockge agent friendly name
lohrbini 11f5fff
docs(en): add missing new item
lohrbini 54e158f
DRAFT: feat(friendlyName): make friendlyname configurable
lohrbini 8f142af
feat(containerTerminal): add friendly name
lohrbini 62ceb44
feat(compose): add friendly names
lohrbini 5885665
chore(deps): update from upstream
lohrbini 2b64b3f
fix(agent-manager): add update query
lohrbini a8b75fb
fix(DashboardHome): remove edit-pen for controller
lohrbini 9748469
style(agent-manager): liniting
lohrbini 052cf17
fix(manage-agent-socket-handler): type
lohrbini dcc48d3
fix(DashboardHome): duplicate code
lohrbini 825b727
fix: pull-request suggestions
lohrbini 49eda70
fix(suggestion): added missing change
lohrbini 1c72c23
chore(lang): updated en.json
lohrbini 5b2ac56
fix: suggestions
lohrbini 29cc257
Merge branch 'master' into feat/dockge-agents-friendly-name
lohrbini 70bcc3f
fix(style): missing comma
lohrbini File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -49,13 +49,25 @@ | |||||||||||||
</template> | ||||||||||||||
|
||||||||||||||
<!-- Agent Display Name --> | ||||||||||||||
<span v-if="endpoint === ''">{{ $t("currentEndpoint") }}</span> | ||||||||||||||
<a v-else :href="agent.url" target="_blank">{{ endpoint }}</a> | ||||||||||||||
<template v-if="$root.agentStatusList[endpoint]"> | ||||||||||||||
<span v-if="endpoint === '' && agent.name === ''" class="badge bg-secondary me-2">Controller</span> | ||||||||||||||
<span v-else-if="agent.name === ''" :href="agent.url">{{ endpoint }}</span> | ||||||||||||||
<span v-else :href="agent.url">{{ agent.name }}</span> | ||||||||||||||
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.
Suggested change
Add spacing from controller badge to edit icon for agent url and agent name display. 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. Thanks for the feedback. Updated in latest commit |
||||||||||||||
</template> | ||||||||||||||
|
||||||||||||||
<!-- Edit Name --> | ||||||||||||||
<font-awesome-icon icon="pen-to-square" @click="showEditAgentNameDialog[agent.name] = !showEditAgentNameDialog[agent.Name]" /> | ||||||||||||||
|
||||||||||||||
<!-- Edit Dialog --> | ||||||||||||||
<BModal v-model="showEditAgentNameDialog[agent.name]" :no-close-on-backdrop="true" :close-on-esc="true" :okTitle="$t('Update Name')" okVariant="info" @ok="updateName(agent.url, agent.updatedName)"> | ||||||||||||||
<label for="Update Name" class="form-label">Current value: {{ $t(agent.name) }}</label> | ||||||||||||||
<input id="updatedName" v-model="agent.updatedName" type="text" class="form-control" optional> | ||||||||||||||
</BModal> | ||||||||||||||
|
||||||||||||||
<!-- Remove Button --> | ||||||||||||||
<font-awesome-icon v-if="endpoint !== ''" class="ms-2 remove-agent" icon="trash" @click="showRemoveAgentDialog[agent.url] = !showRemoveAgentDialog[agent.url]" /> | ||||||||||||||
|
||||||||||||||
<!-- Remoe Agent Dialog --> | ||||||||||||||
<!-- Remove Agent Dialog --> | ||||||||||||||
<BModal v-model="showRemoveAgentDialog[agent.url]" :okTitle="$t('removeAgent')" okVariant="danger" @ok="removeAgent(agent.url)"> | ||||||||||||||
<p>{{ agent.url }}</p> | ||||||||||||||
{{ $t("removeAgentMsg") }} | ||||||||||||||
|
@@ -81,6 +93,11 @@ | |||||||||||||
<input id="password" v-model="agent.password" type="password" class="form-control" required autocomplete="new-password"> | ||||||||||||||
</div> | ||||||||||||||
|
||||||||||||||
<div class="mb-3"> | ||||||||||||||
<label for="name" class="form-label">{{ $t("Friendly Name") }}</label> | ||||||||||||||
<input id="name" v-model="agent.name" type="text" class="form-control" optional> | ||||||||||||||
</div> | ||||||||||||||
|
||||||||||||||
<button type="submit" class="btn btn-primary" :disabled="connectingAgent"> | ||||||||||||||
<template v-if="connectingAgent">{{ $t("connecting") }}</template> | ||||||||||||||
<template v-else>{{ $t("connect") }}</template> | ||||||||||||||
|
@@ -121,11 +138,14 @@ export default { | |||||||||||||
dockerRunCommand: "", | ||||||||||||||
showAgentForm: false, | ||||||||||||||
showRemoveAgentDialog: {}, | ||||||||||||||
showEditAgentNameDialog: {}, | ||||||||||||||
connectingAgent: false, | ||||||||||||||
agent: { | ||||||||||||||
url: "http://", | ||||||||||||||
username: "", | ||||||||||||||
password: "", | ||||||||||||||
name: "", | ||||||||||||||
updatedName: "", | ||||||||||||||
} | ||||||||||||||
}; | ||||||||||||||
}, | ||||||||||||||
|
@@ -199,6 +219,19 @@ export default { | |||||||||||||
}); | ||||||||||||||
}, | ||||||||||||||
|
||||||||||||||
updateName(url, updatedName) { | ||||||||||||||
this.$root.getSocket().emit("updateAgent", url, updatedName, (res) => { | ||||||||||||||
this.$root.toastRes(res); | ||||||||||||||
|
||||||||||||||
if (res.ok) { | ||||||||||||||
this.showAgentForm = false; | ||||||||||||||
this.agent = { | ||||||||||||||
updatedName: "", | ||||||||||||||
}; | ||||||||||||||
} | ||||||||||||||
}); | ||||||||||||||
}, | ||||||||||||||
|
||||||||||||||
getStatusNum(statusName) { | ||||||||||||||
let num = 0; | ||||||||||||||
|
||||||||||||||
|
@@ -286,7 +319,7 @@ export default { | |||||||||||||
} | ||||||||||||||
|
||||||||||||||
}, | ||||||||||||||
}, | ||||||||||||||
} | ||||||||||||||
}; | ||||||||||||||
</script> | ||||||||||||||
|
||||||||||||||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Parameter updatedName is not used in this function, can be removed
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.
Thanks for the feedback. Updated in latest commit