Explorar o código

allow image tag to be explicitly set

jusrhee %!s(int64=5) %!d(string=hai) anos
pai
achega
657aaf2f9b

+ 2 - 2
dashboard/src/components/image-selector/ImageSelector.tsx

@@ -299,7 +299,7 @@ const ImageItem = styled.div`
   align-items: center;
   align-items: center;
   padding: 10px 0px;
   padding: 10px 0px;
   cursor: pointer;
   cursor: pointer;
-  background: ${(props: { isSelected: boolean, lastItem: boolean }) => props.isSelected ? '#ffffff22' : '#ffffff11'};
+  background: ${(props: { isSelected: boolean, lastItem: boolean }) => props.isSelected ? '#ffffff11' : ''};
   :hover {
   :hover {
     background: #ffffff22;
     background: #ffffff22;
 
 
@@ -319,7 +319,6 @@ const ImageItem = styled.div`
 
 
 const LoadingWrapper = styled.div`
 const LoadingWrapper = styled.div`
   padding: 30px 0px;
   padding: 30px 0px;
-  background: #ffffff11;
   display: flex;
   display: flex;
   align-items: center;
   align-items: center;
   font-size: 13px;
   font-size: 13px;
@@ -333,6 +332,7 @@ const ExpandedWrapper = styled.div`
   border-radius: 3px;
   border-radius: 3px;
   border: 1px solid #ffffff44;
   border: 1px solid #ffffff44;
   max-height: 275px;
   max-height: 275px;
+  background: #ffffff11;
   overflow-y: auto;
   overflow-y: auto;
 `;
 `;
 
 

+ 1 - 2
dashboard/src/components/image-selector/TagList.tsx

@@ -104,7 +104,7 @@ const TagName = styled.div`
   align-items: center;
   align-items: center;
   padding: 10px 0px;
   padding: 10px 0px;
   cursor: pointer;
   cursor: pointer;
-  background: ${(props: { isSelected?: boolean, lastItem?: boolean }) => props.isSelected ? '#ffffff22' : '#ffffff11'};
+  background: ${(props: { isSelected?: boolean, lastItem?: boolean }) => props.isSelected ? '#ffffff11' : ''};
   :hover {
   :hover {
     background: #ffffff22;
     background: #ffffff22;
 
 
@@ -134,7 +134,6 @@ const TagNameAlt = styled(TagName)`
 
 
 const LoadingWrapper = styled.div`
 const LoadingWrapper = styled.div`
   padding: 30px 0px;
   padding: 30px 0px;
-  background: #ffffff11;
   display: flex;
   display: flex;
   align-items: center;
   align-items: center;
   justify-content: center;
   justify-content: center;

+ 1 - 1
dashboard/src/main/home/cluster-dashboard/expanded-chart/ExpandedChart.tsx

@@ -335,8 +335,8 @@ export default class ExpandedChart extends Component<PropsType, StateType> {
     // Append universal tabs
     // Append universal tabs
     tabOptions.push(
     tabOptions.push(
       { label: 'Status', value: 'status' },
       { label: 'Status', value: 'status' },
-      { label: 'Chart Overview', value: 'graph' },
       { label: 'Settings', value: 'settings' },
       { label: 'Settings', value: 'settings' },
+      { label: 'Chart Overview', value: 'graph' },
     );
     );
 
 
     if (this.state.devOpsMode) {
     if (this.state.devOpsMode) {

+ 10 - 2
dashboard/src/main/home/cluster-dashboard/expanded-chart/SettingsSection.tsx

@@ -44,11 +44,19 @@ export default class SettingsSection extends Component<PropsType, StateType> {
   redeployWithNewImage = (img: string, tag: string) => {
   redeployWithNewImage = (img: string, tag: string) => {
     this.setState({ saveValuesStatus: 'loading' });
     this.setState({ saveValuesStatus: 'loading' });
     let { currentCluster, currentProject } = this.context;
     let { currentCluster, currentProject } = this.context;
+
+    // If tag is explicitly declared, parse tag
+    let imgSplits = img.split(':');
+    let parsedTag = null;
+    if (imgSplits.length > 1) {
+      img = imgSplits[0];
+      parsedTag = imgSplits[1];
+    }
+
     let image = {
     let image = {
       image: {
       image: {
-        // TODO: prepend registry
         repository: img,
         repository: img,
-        tag: tag,
+        tag: parsedTag || tag,
       }
       }
     }
     }