@@ -18,6 +18,21 @@ export default class AiLlmQuotaEditor extends Component {
1818 @tracked newQuotaUsages = null ;
1919 @tracked newQuotaDuration = 86400 ; // 1 day default
2020
21+ @action
22+ updateExistingQuotaTokens (quota , event ) {
23+ quota .max_tokens = event .target .value ;
24+ }
25+
26+ @action
27+ updateExistingQuotaUsages (quota , event ) {
28+ quota .max_usages = event .target .value ;
29+ }
30+
31+ @action
32+ updateExistingQuotaDuration (quota , event ) {
33+ quota .duration_seconds = event .target .value ;
34+ }
35+
2136 get canAddQuota () {
2237 return (
2338 this .newQuotaGroupId &&
@@ -96,6 +111,7 @@ export default class AiLlmQuotaEditor extends Component {
96111 value ={{quota.max_tokens }}
97112 class =" ai-llm-quotas__input"
98113 min =" 1"
114+ {{on " input" ( fn this . updateExistingQuotaTokens quota ) }}
99115 />
100116 </td >
101117 <td class =" ai-llm-quotas__cell" >
@@ -104,6 +120,7 @@ export default class AiLlmQuotaEditor extends Component {
104120 value ={{quota.max_usages }}
105121 class =" ai-llm-quotas__input"
106122 min =" 1"
123+ {{on " input" ( fn this . updateExistingQuotaUsages quota ) }}
107124 />
108125 </td >
109126 <td class =" ai-llm-quotas__cell" >
@@ -112,6 +129,7 @@ export default class AiLlmQuotaEditor extends Component {
112129 value ={{quota.duration_seconds }}
113130 class =" ai-llm-quotas__input"
114131 min =" 1"
132+ {{on " input" ( fn this . updateExistingQuotaDuration quota ) }}
115133 />
116134 </td >
117135 <td class =" ai-llm-quotas__cell ai-llm-quotas__cell--actions" >
0 commit comments