mirror of
https://github.com/lordmathis/llamactl.git
synced 2025-11-06 00:54:23 +00:00
Update button label for instance editing to clarify action
This commit is contained in:
@@ -201,7 +201,7 @@ const InstanceModal: React.FC<InstanceModalProps> = ({
|
||||
Cancel
|
||||
</Button>
|
||||
<Button onClick={handleSave} disabled={!instanceName.trim() || !!nameError}>
|
||||
{isEditing ? 'Save Changes' : 'Create Instance'}
|
||||
{isEditing ? 'Update & Restart Instance' : 'Create Instance'}
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
</DialogContent>
|
||||
|
||||
@@ -53,7 +53,6 @@ export const InstancesProvider = ({ children }: InstancesProviderProps) => {
|
||||
try {
|
||||
setError(null)
|
||||
await instancesApi.create(name, options)
|
||||
// Refresh the list to include the new instance
|
||||
await fetchInstances()
|
||||
} catch (err) {
|
||||
setError(err instanceof Error ? err.message : 'Failed to create instance')
|
||||
@@ -64,7 +63,6 @@ export const InstancesProvider = ({ children }: InstancesProviderProps) => {
|
||||
try {
|
||||
setError(null)
|
||||
await instancesApi.update(name, options)
|
||||
// Refresh the list to get updated instance
|
||||
await fetchInstances()
|
||||
} catch (err) {
|
||||
setError(err instanceof Error ? err.message : 'Failed to update instance')
|
||||
@@ -75,7 +73,6 @@ export const InstancesProvider = ({ children }: InstancesProviderProps) => {
|
||||
try {
|
||||
setError(null)
|
||||
await instancesApi.start(name)
|
||||
// Refresh the list to get updated status
|
||||
await fetchInstances()
|
||||
} catch (err) {
|
||||
setError(err instanceof Error ? err.message : 'Failed to start instance')
|
||||
@@ -86,7 +83,6 @@ export const InstancesProvider = ({ children }: InstancesProviderProps) => {
|
||||
try {
|
||||
setError(null)
|
||||
await instancesApi.stop(name)
|
||||
// Refresh the list to get updated status
|
||||
await fetchInstances()
|
||||
} catch (err) {
|
||||
setError(err instanceof Error ? err.message : 'Failed to stop instance')
|
||||
@@ -97,7 +93,6 @@ export const InstancesProvider = ({ children }: InstancesProviderProps) => {
|
||||
try {
|
||||
setError(null)
|
||||
await instancesApi.restart(name)
|
||||
// Refresh the list to get updated status
|
||||
await fetchInstances()
|
||||
} catch (err) {
|
||||
setError(err instanceof Error ? err.message : 'Failed to restart instance')
|
||||
@@ -108,7 +103,6 @@ export const InstancesProvider = ({ children }: InstancesProviderProps) => {
|
||||
try {
|
||||
setError(null)
|
||||
await instancesApi.delete(name)
|
||||
// Refresh the list to get updated status
|
||||
await fetchInstances()
|
||||
} catch (err) {
|
||||
setError(err instanceof Error ? err.message : 'Failed to delete instance')
|
||||
|
||||
Reference in New Issue
Block a user